| 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.3]) |
| 6 |
AC_CONFIG_SRCDIR([src/]) |
AC_CONFIG_SRCDIR([src/]) |
|
# AM_CONFIG_HEADERS(config.h) |
|
| 7 |
AC_CONFIG_MACRO_DIRS([m4]) |
AC_CONFIG_MACRO_DIRS([m4]) |
| 8 |
AM_INIT_AUTOMAKE([foreign]) |
AM_INIT_AUTOMAKE([foreign]) |
| 9 |
|
AM_SILENT_RULES(yes) |
| 10 |
|
|
| 11 |
|
AC_USE_SYSTEM_EXTENSIONS |
| 12 |
# Checks for programs. |
# Checks for programs. |
|
AC_PROG_GCC_TRADITIONAL |
|
| 13 |
LT_INIT |
LT_INIT |
| 14 |
AC_PROG_CXX |
AC_PROG_CXX |
| 15 |
AC_PROG_CC |
AC_PROG_CC |
| 21 |
# Checks for libraries. |
# Checks for libraries. |
| 22 |
AC_CHECK_LIB([mysqlclient], [mysql_connect]) |
AC_CHECK_LIB([mysqlclient], [mysql_connect]) |
| 23 |
AC_CHECK_LIB([z], [unzip]) |
AC_CHECK_LIB([z], [unzip]) |
| 24 |
|
AC_CHECK_LIB([ssh], [ssh_init]) |
| 25 |
|
|
| 26 |
|
AC_HEADER_STAT |
| 27 |
|
AC_PROG_EGREP |
| 28 |
|
|
| 29 |
|
AC_HEADER_RESOLV |
| 30 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
| 31 |
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 mysql.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 \ |
| 32 |
|
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 \ |
| 33 |
|
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 \ |
| 34 |
|
unistd.h utmp.h]) |
| 35 |
|
|
| 36 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
| 37 |
AC_C_CONST |
AC_C_CONST |
| 44 |
AC_FUNC_FORK |
AC_FUNC_FORK |
| 45 |
AC_FUNC_MALLOC |
AC_FUNC_MALLOC |
| 46 |
AC_FUNC_SELECT_ARGTYPES |
AC_FUNC_SELECT_ARGTYPES |
| 47 |
|
AC_FUNC_MMAP |
| 48 |
|
AC_FUNC_MKTIME |
| 49 |
|
|
| 50 |
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 |
| 51 |
(`int' or `void').]) |
(`int' or `void').]) |
| 52 |
|
|
| 53 |
AC_FUNC_STRFTIME |
AC_FUNC_STRFTIME |
| 54 |
AC_FUNC_VPRINTF |
AC_FUNC_VPRINTF |
| 55 |
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]) |
| 56 |
|
|
| 57 |
AC_CONFIG_FILES([Makefile |
AC_CONFIG_FILES([Makefile |
| 58 |
src/Makefile |
src/Makefile |
| 59 |
utils/Makefile |
utils/Makefile |
| 60 |
utils/game/Makefile]) |
utils/game/Makefile]) |
| 61 |
|
|
| 62 |
|
AC_ARG_ENABLE([debug], |
| 63 |
|
[AS_HELP_STRING([--enable-debug], [Enable debug log])], |
| 64 |
|
[AS_IF([test "x$enable_debug" = xyes], |
| 65 |
|
[AC_DEFINE([_DEBUG], [1], [Define if debug log is enabled])])]) |
| 66 |
|
|
| 67 |
AC_OUTPUT |
AC_OUTPUT |