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

Contents of /lbbs/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.68 - (show annotations)
Fri Nov 21 11:24:17 2025 UTC (3 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.67: +1 -1 lines
Content type: application/pkix-attr-cert
Update version and changelog

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

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