/[LeafOK_CVS]/lbbs/configure.ac
ViewVC logotype

Contents of /lbbs/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.69 - (show annotations)
Fri Nov 21 12:19:15 2025 UTC (3 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.68: +7 -8 lines
Content type: application/pkix-attr-cert
Display compile config with startup argument

1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.69])
5 AC_INIT([lbbs],[1.6.0])
6 AC_CONFIG_SRCDIR([src/])
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_MACRO_DIRS([m4])
9 AM_INIT_AUTOMAKE([foreign])
10 AM_SILENT_RULES(yes)
11
12 AC_USE_SYSTEM_EXTENSIONS
13 # Checks for programs.
14 LT_INIT
15 AC_PROG_CXX
16 AC_PROG_CC
17 AC_PROG_CPP
18 AC_PROG_INSTALL
19 AC_PROG_LN_S
20 AC_PROG_MAKE_SET
21
22 AC_ARG_WITH([sysv],
23 [AS_HELP_STRING([--with-sysv], [Use System V specific APIs])],
24 [AS_IF([test "x$with_sysv" != xno],
25 [AC_DEFINE([HAVE_SYSTEM_V], [1], [Define if System V is available [default=yes]])])],
26 [AC_DEFINE([HAVE_SYSTEM_V], [1], [Define if System V is available])])
27 AC_ARG_ENABLE([debug],
28 [AS_HELP_STRING([--enable-debug], [Enable debug log [default=no]])],
29 [AS_IF([test "x$enable_debug" = xyes],
30 [AC_DEFINE([_DEBUG], [1], [Define if debug log is enabled])])])
31 AC_ARG_WITH([iconv],
32 [AS_HELP_STRING([--with-iconv], [Use iconv library package config [default=no]])],
33 [],
34 [with_iconv="no"])
35 AC_ARG_WITH([mariadb],
36 [AS_HELP_STRING([--with-mariadb], [Use MariaDB library instead of MySQL client library [default=no]])],
37 [AS_IF([test "x$with_mariadb" = xyes],
38 [AC_DEFINE([HAVE_MARIADB_CLIENT], [1], [Define if MariaDB client is used])])],
39 [with_mariadb="no"])
40 AC_ARG_ENABLE([systemd],
41 [AS_HELP_STRING([--enable-systemd], [Enable systemd daemon [default=no]])],
42 [],
43 [enable_systemd="no"])
44 AC_ARG_WITH([epoll],
45 [AS_HELP_STRING([--with-epoll], [Use epoll instead of poll [default=yes]])],
46 [],
47 [with_epoll="yes"])
48
49 AC_SUBST([PKG_CONFIG_PATH])
50 PKG_PROG_PKG_CONFIG
51 PKG_CHECK_MODULES([LIBSSH], [libssh], [], [AC_MSG_ERROR([libssh is required.])])
52 PKG_CHECK_MODULES([LIBPCRE2], [libpcre2-8], [], [AC_MSG_ERROR([libpcre2-8 is required.])])
53
54 AS_IF([test "x$with_iconv" = xyes],
55 [PKG_CHECK_MODULES([ICONV], [iconv], [], [AC_MSG_ERROR([iconv is required.])])])
56
57 AS_IF([test "x$with_mariadb" = xyes],
58 [PKG_CHECK_MODULES([MYSQLCLIENT], [libmariadb], [], [AC_MSG_ERROR([libmariadb is required.])])],
59 [PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient], [], [AC_MSG_ERROR([mysqlclient is required.])])])
60
61 AS_IF([test "x$enable_systemd" = xyes],
62 [PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [], [AC_MSG_ERROR([libsystemd is required.])])])
63
64 AS_IF([test "x$enable_shared" = xyes],
65 [AC_DEFINE([_ENABLE_SHARED], [1], [Define if shared library is enabled])])
66 AM_CONDITIONAL([USE_SO], [test "x$enable_shared" = xyes])
67
68 CPPFLAGS="$CPPFLAGS $LIBSSH_CFLAGS $MYSQLCLIENT_CFLAGS $SYSTEMD_CFLAGS $LIBPCRE2_CFLAGS $ICONV_CFLAGS"
69
70 # Checks for libraries.
71 AC_HEADER_STAT
72 AC_PROG_EGREP
73
74 AC_HEADER_RESOLV
75 AC_HEADER_SYS_WAIT
76 AC_CHECK_HEADERS([arpa/inet.h fcntl.h iconv.h libssh/libssh.h mysql.h netdb.h netinet/in.h pcre2.h pty.h \
77 semaphore.h signal.h stdint.h stdlib.h string.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h \
78 sys/types.h sys/sem.h sys/stat.h sys/wait.h time.h unistd.h utmp.h wchar.h],
79 [],
80 [AC_MSG_ERROR([Missing required header file])],
81 [#define PCRE2_CODE_UNIT_WIDTH 8])
82
83 AS_IF([test "x$enable_systemd" = xyes],
84 [AC_CHECK_HEADERS([systemd/sd-daemon.h], [], [AC_MSG_ERROR([systemd/sd-daemon.h not found.])])])
85
86 AS_IF([test "x$with_epoll" = xyes],
87 [AC_CHECK_HEADERS([sys/epoll.h], [], [AC_MSG_ERROR([sys/epoll.h not found.])])],
88 [AC_CHECK_HEADERS([poll.h], [], [AC_MSG_ERROR([poll.h not found.])])])
89
90 # Checks for typedefs, structures, and compiler characteristics.
91 AC_C_CONST
92 AC_TYPE_SIZE_T
93
94 AC_STRUCT_TM
95
96 # Checks for library functions.
97 AC_FUNC_FORK
98 AC_FUNC_MALLOC
99 AC_FUNC_SELECT_ARGTYPES
100 AC_FUNC_MMAP
101 AC_FUNC_MKTIME
102
103 AC_DEFINE_UNQUOTED([RETSIGTYPE],
104 [$ac_cv_type_signal],
105 [Define as the return type of signal handlers (`int' or `void').])
106
107 AC_FUNC_STRFTIME
108 AC_FUNC_VPRINTF
109 AC_CHECK_FUNCS([dup2 gethostbyname inet_ntoa memset mkdir rmdir regcomp poll socket strstr])
110
111 AC_CONFIG_FILES([Makefile
112 src/Makefile
113 utils/Makefile
114 utils/game/Makefile
115 conf/lbbs.service
116 conf/lbbs.logrotate])
117
118 AC_OUTPUT

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1