modified: configure.in
[katrin.git] / configure.in
blob398f5395ab72e4a9a07548ba384871d2906f2c94
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.59)
5 AC_INIT([katrin], [1.0.0], [kliden at km.ru])
6 AM_INIT_AUTOMAKE
8 AM_CONFIG_HEADER(src/config.h)
10 # Checks for programs.
11 AC_PROG_CC
12 AC_PROG_LIBTOOL
14 # Checks for libraries.
15 # FIXME: Replace `main' with a function in `-ldl':
16 AC_CHECK_LIB([dl], [dlopen])
17 # FIXME: Replace `main' with a function in `-lmysqlclient':
18 AC_CHECK_LIB([mysqlclient], [mysql_real_query])
19 AC_CHECK_LIB([confuse], [cfg_init])
21 # Checks for header files.
22 AC_HEADER_STDC
23 AC_CHECK_HEADERS([arpa/inet.h \
24         netinet/in.h \
25         stdint.h \
26         stdlib.h \
27         string.h \
28         sys/socket.h \
29         sys/time.h \
30         syslog.h \
31         unistd.h])
33 # Checks for typedefs, structures, and compiler characteristics.
34 AC_HEADER_STDBOOL
35 AC_C_CONST
36 AC_TYPE_PID_T
37 AC_TYPE_SIZE_T
38 AC_STRUCT_TM
40 # Checks for library functions.
41 AC_FUNC_FORK
42 AC_FUNC_MALLOC
43 AC_FUNC_MEMCMP
44 AC_FUNC_STRFTIME
45 AC_FUNC_VPRINTF
46 AC_CHECK_FUNCS([dup2 \
47         inet_ntoa \
48         memset \
49         socket \
50         strdup \
51         strrchr \
52         strstr \
53         strtol])
55 AC_ARG_WITH([pppd-auth],
56 [  --with-pppd-auth     Build with pppd auth library],
57 [       if test "$with_pppd_auth" = "yes"; then 
58                 AC_CONFIG_FILES(src/auth/other/ppp/Makefile)
59                 AUTH_MOD_SUBDIRS="auth/other/ppp"
60                 AC_MSG_RESULT([yes])
61         else
62                 AC_MSG_RESULT([no])
63         fi
64 ], [AC_MSG_RESULT([no])])
66 AC_SUBST(AUTH_MOD_SUBDIRS)
68 AC_CONFIG_FILES([Makefile \
69         src/Makefile \
70         src/kcdr-sender/Makefile])
72 AC_OUTPUT