| 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([bbsd],[1.0]) |
AC_INIT([lbbs],[1.5.5]) |
| 6 |
AC_CONFIG_SRCDIR([src/]) |
AC_CONFIG_SRCDIR([src/]) |
| 7 |
# AM_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS([config.h]) |
| 8 |
AM_INIT_AUTOMAKE |
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. |
# Checks for programs. |
|
AC_PROG_GCC_TRADITIONAL |
|
| 14 |
LT_INIT |
LT_INIT |
|
AC_PROG_RANLIB |
|
| 15 |
AC_PROG_CXX |
AC_PROG_CXX |
| 16 |
AC_PROG_CC |
AC_PROG_CC |
| 17 |
AC_PROG_CPP |
AC_PROG_CPP |
| 19 |
AC_PROG_LN_S |
AC_PROG_LN_S |
| 20 |
AC_PROG_MAKE_SET |
AC_PROG_MAKE_SET |
| 21 |
|
|
| 22 |
|
AC_SUBST([PKG_CONFIG_PATH]) |
| 23 |
|
PKG_PROG_PKG_CONFIG |
| 24 |
|
PKG_CHECK_MODULES([LIBSSH], [libssh]) |
| 25 |
|
PKG_CHECK_MODULES([LIBPCRE2], [libpcre2-8]) |
| 26 |
|
|
| 27 |
|
AC_ARG_WITH([iconv], |
| 28 |
|
[AS_HELP_STRING([--with-iconv], [Use iconv library package config])], |
| 29 |
|
[], |
| 30 |
|
[with_iconv="no"]) |
| 31 |
|
|
| 32 |
|
AS_IF([test "x$with_iconv" = xyes], |
| 33 |
|
[PKG_CHECK_MODULES([ICONV], [iconv])]) |
| 34 |
|
|
| 35 |
|
AC_ARG_WITH([mariadb], |
| 36 |
|
[AS_HELP_STRING([--with-mariadb], [Use MariaDB library instead of MySQL client library])], |
| 37 |
|
[], |
| 38 |
|
[with_mariadb="no"]) |
| 39 |
|
|
| 40 |
|
AS_IF([test "x$with_mariadb" = xyes], |
| 41 |
|
[PKG_CHECK_MODULES([MYSQLCLIENT], [libmariadb])]) |
| 42 |
|
AS_IF([test "x$with_mariadb" = xno], |
| 43 |
|
[PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient])]) |
| 44 |
|
|
| 45 |
|
AC_ARG_ENABLE([systemd], |
| 46 |
|
[AS_HELP_STRING([--enable-systemd], [Enable systemd daemon])], |
| 47 |
|
[], |
| 48 |
|
[enable_systemd="no"]) |
| 49 |
|
|
| 50 |
|
AS_IF([test "x$enable_systemd" = xyes], |
| 51 |
|
[PKG_CHECK_MODULES([SYSTEMD], [libsystemd])]) |
| 52 |
|
|
| 53 |
# Checks for libraries. |
# Checks for libraries. |
| 54 |
AC_CHECK_LIB([mysqlclient], [mysql_connect]) |
AS_IF([test "x$with_mariadb" = xyes], |
| 55 |
AC_CHECK_LIB([z], [unzip]) |
[AC_CHECK_LIB([mariadb], [mysql_real_connect])]) |
| 56 |
|
AS_IF([test "x$with_mariadb" = xno], |
| 57 |
|
[AC_CHECK_LIB([mysqlclient], [mysql_real_connect])]) |
| 58 |
|
|
| 59 |
|
AC_CHECK_LIB([ssh], [ssh_init]) |
| 60 |
|
|
| 61 |
# Autoupdate added the next two lines to ensure that your configure |
AC_HEADER_STAT |
|
# script's behavior did not change. They are probably safe to remove. |
|
|
AC_CHECK_INCLUDES_DEFAULT |
|
| 62 |
AC_PROG_EGREP |
AC_PROG_EGREP |
| 63 |
|
|
| 64 |
|
AC_HEADER_RESOLV |
| 65 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
| 66 |
AC_CHECK_HEADERS([arpa/inet.h dflcn.h fcntl.h memory.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.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 \ |
| 67 |
|
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 \ |
| 68 |
|
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]) |
| 69 |
|
|
| 70 |
|
AS_IF([test "x$enable_systemd" = xyes], |
| 71 |
|
[AC_CHECK_HEADERS([systemd/sd-daemon.h])]) |
| 72 |
|
|
| 73 |
|
AC_ARG_WITH([epoll], |
| 74 |
|
[AS_HELP_STRING([--with-epoll], [Use epoll instead of poll])], |
| 75 |
|
[], |
| 76 |
|
[with_epoll="yes"]) |
| 77 |
|
|
| 78 |
|
AS_IF([test "x$with_epoll" = xyes], |
| 79 |
|
[AC_CHECK_HEADERS([sys/epoll.h])]) |
| 80 |
|
|
| 81 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
| 82 |
AC_C_CONST |
AC_C_CONST |
| 83 |
AC_TYPE_SIZE_T |
AC_TYPE_SIZE_T |
| 84 |
AC_CHECK_HEADERS_ONCE([sys/time.h]) |
AC_CHECK_HEADERS_ONCE([sys/time.h]) |
|
# Obsolete code to be removed. |
|
|
if test $ac_cv_header_sys_time_h = yes; then |
|
|
AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h> |
|
|
and <time.h>. This macro is obsolete.]) |
|
|
fi |
|
|
# End of obsolete code. |
|
| 85 |
|
|
| 86 |
AC_STRUCT_TM |
AC_STRUCT_TM |
| 87 |
|
|
| 89 |
AC_FUNC_FORK |
AC_FUNC_FORK |
| 90 |
AC_FUNC_MALLOC |
AC_FUNC_MALLOC |
| 91 |
AC_FUNC_SELECT_ARGTYPES |
AC_FUNC_SELECT_ARGTYPES |
| 92 |
|
AC_FUNC_MMAP |
| 93 |
|
AC_FUNC_MKTIME |
| 94 |
|
|
| 95 |
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 |
| 96 |
(`int' or `void').]) |
(`int' or `void').]) |
| 97 |
|
|
| 98 |
AC_FUNC_STRFTIME |
AC_FUNC_STRFTIME |
| 99 |
AC_FUNC_VPRINTF |
AC_FUNC_VPRINTF |
| 100 |
AC_CHECK_FUNCS([bzero 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]) |
| 101 |
|
|
| 102 |
AC_CONFIG_FILES([Makefile |
AC_CONFIG_FILES([Makefile |
| 103 |
src/Makefile |
src/Makefile |
| 104 |
utils/Makefile |
utils/Makefile |
| 105 |
utils/game/Makefile]) |
utils/game/Makefile |
| 106 |
|
conf/lbbs.service |
| 107 |
|
conf/lbbs.logrotate]) |
| 108 |
|
|
| 109 |
|
AC_ARG_ENABLE([debug], |
| 110 |
|
[AS_HELP_STRING([--enable-debug], [Enable debug log])], |
| 111 |
|
[AS_IF([test "x$enable_debug" = xyes], |
| 112 |
|
[AC_DEFINE([_DEBUG], [1], [Define if debug log is enabled])])]) |
| 113 |
|
|
| 114 |
AC_OUTPUT |
AC_OUTPUT |