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

Contents of /lbbs/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.53 - (show annotations)
Sun Nov 16 13:18:30 2025 UTC (3 months, 4 weeks ago) by sysadm
Branch: MAIN
Changes since 1.52: +16 -3 lines
Content type: application/pkix-attr-cert
Add options to ./configure
  --with-mariadb
  --enable-systemd

1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.69])
5 AC_INIT([lbbs],[1.5.5])
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_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([mariadb],
28 [AS_HELP_STRING([--with-mariadb], [With MariaDB library])],
29 [PKG_CHECK_MODULES([MYSQLCLIENT], [libmariadb])],
30 [PKG_CHECK_MODULES([MYSQLCLIENT], [mysqlclient])])
31
32 AC_ARG_ENABLE([systemd],
33 [AS_HELP_STRING([--enable-systemd], [Enable systemd daemon])],
34 [enable_systemd="yes"])
35
36 AS_IF([test "x$enable_systemd" = xyes],
37 [PKG_CHECK_MODULES([SYSTEMD], [libsystemd])])
38
39 # Checks for libraries.
40 AC_CHECK_LIB([mysqlclient], [mysql_real_connect])
41 AC_CHECK_LIB([z], [unzip])
42 AC_CHECK_LIB([ssh], [ssh_init])
43
44 AC_HEADER_STAT
45 AC_PROG_EGREP
46
47 AC_HEADER_RESOLV
48 AC_HEADER_SYS_WAIT
49 AC_CHECK_HEADERS([arpa/inet.h dflcn.h fcntl.h iconv.h libssh/libssh.h libssh/server.h memory.h mysql.h net/if.h netdb.h netinet/in.h \
50 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 \
51 sys/time.h sys/types.h sys/sem.h sys/shm.h sys/stat.h sys/syscall.h sys/wait.h \
52 unistd.h utmp.h wchar.h])
53
54 AS_IF([test "x$enable_systemd" = xyes],
55 [AC_CHECK_HEADERS([systemd/sd-daemon.h])])
56
57 # Checks for typedefs, structures, and compiler characteristics.
58 AC_C_CONST
59 AC_TYPE_SIZE_T
60 AC_CHECK_HEADERS_ONCE([sys/time.h])
61
62 AC_STRUCT_TM
63
64 # Checks for library functions.
65 AC_FUNC_FORK
66 AC_FUNC_MALLOC
67 AC_FUNC_SELECT_ARGTYPES
68 AC_FUNC_MMAP
69 AC_FUNC_MKTIME
70
71 AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
72 (`int' or `void').])
73
74 AC_FUNC_STRFTIME
75 AC_FUNC_VPRINTF
76 AC_CHECK_FUNCS([dup2 gethostbyname inet_ntoa memset mkdir rmdir regcomp select socket strstr])
77
78 AC_CONFIG_FILES([Makefile
79 src/Makefile
80 utils/Makefile
81 utils/game/Makefile])
82
83 AC_ARG_ENABLE([debug],
84 [AS_HELP_STRING([--enable-debug], [Enable debug log])],
85 [AS_IF([test "x$enable_debug" = xyes],
86 [AC_DEFINE([_DEBUG], [1], [Define if debug log is enabled])])])
87
88 AC_OUTPUT

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