| 25 |
PKG_CHECK_MODULES([LIBPCRE2], [libpcre2-8]) |
PKG_CHECK_MODULES([LIBPCRE2], [libpcre2-8]) |
| 26 |
|
|
| 27 |
AC_ARG_WITH([mariadb], |
AC_ARG_WITH([mariadb], |
| 28 |
[AS_HELP_STRING([--with-mariadb], [With MariaDB library])], |
[AS_HELP_STRING([--with-mariadb], [Use MariaDB library instead of MySQL client library])], |
| 29 |
[with_mariadb="yes"], |
[], |
| 30 |
[with_mysqlclient="yes"]) |
[with_mariadb="no"]) |
| 31 |
|
|
| 32 |
AS_IF([test "x$with_mariadb" = xyes], |
AS_IF([test "x$with_mariadb" = xyes], |
| 33 |
[PKG_CHECK_MODULES([MYSQLCLIENT], [libmariadb])]) |
[PKG_CHECK_MODULES([MYSQLCLIENT], [libmariadb])]) |
| 34 |
AS_IF([test "x$with_mysqlclient" = xyes], |
AS_IF([test "x$with_mariadb" = xno], |
| 35 |
[PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient])]) |
[PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient])]) |
| 36 |
|
|
| 37 |
AC_ARG_ENABLE([systemd], |
AC_ARG_ENABLE([systemd], |
| 38 |
[AS_HELP_STRING([--enable-systemd], [Enable systemd daemon])], |
[AS_HELP_STRING([--enable-systemd], [Enable systemd daemon])], |
| 39 |
[enable_systemd="yes"]) |
[], |
| 40 |
|
[enable_systemd="no"]) |
| 41 |
|
|
| 42 |
AS_IF([test "x$enable_systemd" = xyes], |
AS_IF([test "x$enable_systemd" = xyes], |
| 43 |
[PKG_CHECK_MODULES([SYSTEMD], [libsystemd])]) |
[PKG_CHECK_MODULES([SYSTEMD], [libsystemd])]) |
| 45 |
# Checks for libraries. |
# Checks for libraries. |
| 46 |
AS_IF([test "x$with_mariadb" = xyes], |
AS_IF([test "x$with_mariadb" = xyes], |
| 47 |
[AC_CHECK_LIB([mariadb], [mysql_real_connect])]) |
[AC_CHECK_LIB([mariadb], [mysql_real_connect])]) |
| 48 |
AS_IF([test "x$with_mysqlclient" = xyes], |
AS_IF([test "x$with_mariadb" = xno], |
| 49 |
[AC_CHECK_LIB([mysqlclient], [mysql_real_connect])]) |
[AC_CHECK_LIB([mysqlclient], [mysql_real_connect])]) |
| 50 |
|
|
| 51 |
AC_CHECK_LIB([ssh], [ssh_init]) |
AC_CHECK_LIB([ssh], [ssh_init]) |
| 56 |
AC_HEADER_RESOLV |
AC_HEADER_RESOLV |
| 57 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
| 58 |
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 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 \ |
| 59 |
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 \ |
poll.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 \ |
| 60 |
sys/time.h sys/types.h sys/sem.h sys/shm.h sys/stat.h sys/syscall.h sys/wait.h \ |
sys/time.h sys/types.h sys/sem.h sys/shm.h sys/stat.h sys/syscall.h sys/wait.h unistd.h utmp.h wchar.h]) |
|
unistd.h utmp.h wchar.h]) |
|
| 61 |
|
|
| 62 |
AS_IF([test "x$enable_systemd" = xyes], |
AS_IF([test "x$enable_systemd" = xyes], |
| 63 |
[AC_CHECK_HEADERS([systemd/sd-daemon.h])]) |
[AC_CHECK_HEADERS([systemd/sd-daemon.h])]) |
| 64 |
|
|
| 65 |
|
AC_ARG_WITH([epoll], |
| 66 |
|
[AS_HELP_STRING([--with-epoll], [Use epoll instead of poll])], |
| 67 |
|
[], |
| 68 |
|
[with_epoll="yes"]) |
| 69 |
|
|
| 70 |
|
AS_IF([test "x$with_epoll" = xyes], |
| 71 |
|
[AC_CHECK_HEADERS([sys/epoll.h])]) |
| 72 |
|
|
| 73 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
| 74 |
AC_C_CONST |
AC_C_CONST |
| 75 |
AC_TYPE_SIZE_T |
AC_TYPE_SIZE_T |
| 85 |
AC_FUNC_MKTIME |
AC_FUNC_MKTIME |
| 86 |
|
|
| 87 |
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers |
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers |
| 88 |
(`int' or `void').]) |
(`int' or `void').]) |
| 89 |
|
|
| 90 |
AC_FUNC_STRFTIME |
AC_FUNC_STRFTIME |
| 91 |
AC_FUNC_VPRINTF |
AC_FUNC_VPRINTF |
| 92 |
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 select socket strstr]) |
| 93 |
|
|
| 94 |
AC_CONFIG_FILES([Makefile |
AC_CONFIG_FILES([Makefile |
| 95 |
src/Makefile |
src/Makefile |
| 96 |
utils/Makefile |
utils/Makefile |
| 97 |
utils/game/Makefile |
utils/game/Makefile |
| 98 |
conf/lbbs.service |
conf/lbbs.service |
| 99 |
conf/lbbs.logrotate]) |
conf/lbbs.logrotate]) |