tried to reorder the program structure and build process
[NeonServV5.git] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ([2.67])
4 AC_INIT([NeonServ], [5.0], [bugs@pk910.de], [neonserv], [http://neonserv.krypton-bouncer.de])
5 AM_INIT_AUTOMAKE([foreign subdir-objects])
6 AC_CONFIG_HEADERS([config.h])
7
8 # Checks for programs.
9 AC_PROG_CC
10 AC_PROG_AWK
11
12 # Checks for libraries.
13 # Get MySQL library and include locations
14 AC_ARG_WITH([mysql-include-path],
15   [AS_HELP_STRING([--with-mysql-include-path],
16     [location of the MySQL headers, defaults to /usr/include/mysql])],
17   [MYSQL_CFLAGS="-I$withval"],
18   [MYSQL_CFLAGS='-I/usr/include/mysql'])
19 AC_SUBST([MYSQL_CFLAGS])
20
21 AC_ARG_WITH([mysql-lib-path],
22   [AS_HELP_STRING([--with-mysql-lib-path], [location of the MySQL libraries])],
23   [MYSQL_LIBS="-L$withval -lmysqlclient"],
24   [MYSQL_LIBS='-lmysqlclient'])
25 AC_SUBST([MYSQL_LIBS])
26
27 # Checks for header files.
28 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
29
30 # Checks for typedefs, structures, and compiler characteristics.
31
32 # Checks for library functions.
33 AC_FUNC_MALLOC
34 AC_CHECK_FUNCS([gethostbyname memset select socket strchr strdup strstr])
35
36 AC_CONFIG_FILES([Makefile])
37 AC_OUTPUT