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

Diff of /lbbs/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.48 by sysadm, Fri Nov 7 07:27:36 2025 UTC Revision 1.62 by sysadm, Tue Nov 18 03:19:20 2025 UTC
# Line 2  Line 2 
2  # Process this file with autoconf to produce a configure script.  # Process this file with autoconf to produce a configure script.
3    
4  AC_PREREQ([2.69])  AC_PREREQ([2.69])
5  AC_INIT([lbbs],[1.5.3])  AC_INIT([lbbs],[1.5.6])
6  AC_CONFIG_SRCDIR([src/])  AC_CONFIG_SRCDIR([src/])
7    AC_CONFIG_HEADERS([config.h])
8  AC_CONFIG_MACRO_DIRS([m4])  AC_CONFIG_MACRO_DIRS([m4])
9  AM_INIT_AUTOMAKE([foreign])  AM_INIT_AUTOMAKE([foreign])
10  AM_SILENT_RULES(yes)  AM_SILENT_RULES(yes)
# Line 18  AC_PROG_INSTALL Line 19  AC_PROG_INSTALL
19  AC_PROG_LN_S  AC_PROG_LN_S
20  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
21    
22    AC_ARG_WITH([iconv],
23                [AS_HELP_STRING([--with-iconv], [Use iconv library package config])],
24                [],
25                [with_iconv="no"])
26    AC_ARG_WITH([mariadb],
27                [AS_HELP_STRING([--with-mariadb], [Use MariaDB library instead of MySQL client library])],
28                [],
29                [with_mariadb="no"])
30    AC_ARG_ENABLE([systemd],
31                  [AS_HELP_STRING([--enable-systemd], [Enable systemd daemon])],
32                  [],
33                  [enable_systemd="no"])
34    AC_ARG_WITH([epoll],
35                [AS_HELP_STRING([--with-epoll], [Use epoll instead of poll])],
36                [],
37                [with_epoll="yes"])
38    
39  AC_SUBST([PKG_CONFIG_PATH])  AC_SUBST([PKG_CONFIG_PATH])
40  PKG_PROG_PKG_CONFIG  PKG_PROG_PKG_CONFIG
41  PKG_CHECK_MODULES([LIBSSH], [libssh])  PKG_CHECK_MODULES([LIBSSH], [libssh], [], [AC_MSG_ERROR([libssh is required.])])
42  PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient])  PKG_CHECK_MODULES([LIBPCRE2], [libpcre2-8], [], [AC_MSG_ERROR([libpcre2-8 is required.])])
 PKG_CHECK_MODULES([SYSTEMD], [libsystemd])  
 PKG_CHECK_MODULES([LIBPCRE2], [libpcre2-8])  
43    
44  # Checks for libraries.  AS_IF([test "x$with_iconv" = xyes],
45  AC_CHECK_LIB([mysqlclient], [mysql_connect])        [PKG_CHECK_MODULES([ICONV], [iconv], [], [AC_MSG_ERROR([iconv is required.])])])
46  AC_CHECK_LIB([z], [unzip])  
47  AC_CHECK_LIB([ssh], [ssh_init])  AS_IF([test "x$with_mariadb" = xyes],
48          [PKG_CHECK_MODULES([MYSQLCLIENT], [libmariadb], [], [AC_MSG_ERROR([libmariadb is required.])])],
49          [PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient], [], [AC_MSG_ERROR([mysqlclient is required.])])])
50    
51    AS_IF([test "x$enable_systemd" = xyes],
52          [PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [], [AC_MSG_ERROR([libsystemd is required.])])])
53    
54    CPPFLAGS="$CPPFLAGS $LIBSSH_CFLAGS $MYSQLCLIENT_CFLAGS $SYSTEMD_CFLAGS $LIBPCRE2_CFLAGS $ICONV_CFLAGS"
55    
56    # Checks for libraries.
57  AC_HEADER_STAT  AC_HEADER_STAT
58  AC_PROG_EGREP  AC_PROG_EGREP
59    
60  AC_HEADER_RESOLV  AC_HEADER_RESOLV
61  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
62  AC_CHECK_HEADERS([arpa/inet.h dflcn.h fcntl.h iconv.h libssh/libssh.h libssh/server.h memory.h mysql/mysql.h net/if.h netdb.h netinet/in.h \  AC_CHECK_HEADERS([arpa/inet.h fcntl.h iconv.h libssh/libssh.h mysql.h netdb.h netinet/in.h pcre2.h \
63                                          pty.h signal.h stdint.h stdlib.h string.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/mman.h sys/param.h sys/socket.h \                    pty.h signal.h stdint.h stdlib.h string.h sys/ioctl.h sys/ipc.h sys/mman.h sys/param.h sys/socket.h \
64                                          sys/time.h sys/types.h sys/sem.h sys/shm.h sys/stat.h sys/syscall.h sys/wait.h systemd/sd-daemon.h \                    sys/types.h sys/sem.h sys/shm.h sys/stat.h sys/wait.h time.h unistd.h utmp.h wchar.h],
65                                          unistd.h utmp.h])                    [],
66                      [AC_MSG_ERROR([Missing required header file])],
67                      [#define PCRE2_CODE_UNIT_WIDTH 8])
68    
69    AS_IF([test "x$enable_systemd" = xyes],
70          [AC_CHECK_HEADERS([systemd/sd-daemon.h], [], [AC_MSG_ERROR([systemd/sd-daemon.h not found.])])])
71    
72    AS_IF([test "x$with_epoll" = xyes],
73          [AC_CHECK_HEADERS([sys/epoll.h], [], [AC_MSG_ERROR([sys/epoll.h not found.])])],
74          [AC_CHECK_HEADERS([poll.h], [], [AC_MSG_ERROR([poll.h not found.])])])
75    
76  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
77  AC_C_CONST  AC_C_CONST
78  AC_TYPE_SIZE_T  AC_TYPE_SIZE_T
 AC_CHECK_HEADERS_ONCE([sys/time.h])  
79    
80  AC_STRUCT_TM  AC_STRUCT_TM
81    
# Line 54  AC_FUNC_SELECT_ARGTYPES Line 86  AC_FUNC_SELECT_ARGTYPES
86  AC_FUNC_MMAP  AC_FUNC_MMAP
87  AC_FUNC_MKTIME  AC_FUNC_MKTIME
88    
89  AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers  AC_DEFINE_UNQUOTED([RETSIGTYPE],
90                      (`int' or `void').])                     [$ac_cv_type_signal],
91                       [Define as the return type of signal handlers (`int' or `void').])
92    
93  AC_FUNC_STRFTIME  AC_FUNC_STRFTIME
94  AC_FUNC_VPRINTF  AC_FUNC_VPRINTF
95  AC_CHECK_FUNCS([dup2 gethostbyname inet_ntoa memset mkdir rmdir regcomp select socket strstr])  AC_CHECK_FUNCS([dup2 gethostbyname inet_ntoa memset mkdir rmdir regcomp poll socket strstr])
96    
97  AC_CONFIG_FILES([Makefile  AC_CONFIG_FILES([Makefile
98                  src/Makefile                   src/Makefile
99                  utils/Makefile                   utils/Makefile
100          utils/game/Makefile])                   utils/game/Makefile
101                     conf/lbbs.service
102                     conf/lbbs.logrotate])
103    
104  AC_ARG_ENABLE([debug],  AC_ARG_ENABLE([debug],
105    [AS_HELP_STRING([--enable-debug], [Enable debug log])],                [AS_HELP_STRING([--enable-debug], [Enable debug log])],
106    [AS_IF([test "x$enable_debug" = xyes],                [AS_IF([test "x$enable_debug" = xyes],
107      [AC_DEFINE([_DEBUG], [1], [Define if debug log is enabled])])])                       [AC_DEFINE([_DEBUG], [1], [Define if debug log is enabled])])])
108    
109  AC_OUTPUT  AC_OUTPUT


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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