some modifications for WIN32 support :)
[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],
15   [AS_HELP_STRING([--with-mysql=DIR],
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],
22   [AS_HELP_STRING([--with-mysql-lib=DIR], [location of the MySQL libraries])],
23   [MYSQL_LIBS="-L$withval -lmysqlclient"],
24   [MYSQL_LIBS='-lmysqlclient'])
25 AC_SUBST([MYSQL_LIBS])
26
27 AC_ARG_WITH([winsock],
28   [AS_HELP_STRING([--with-winsock], [use winsock (WIN32 systems)])],
29   [WINSOCK_LIBS='-lws2_32'],
30   [WINSOCK_LIBS=''])
31 AC_SUBST([WINSOCK_LIBS])
32
33 # Checks for header files.
34 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h])
35
36 # Checks for typedefs, structures, and compiler characteristics.
37
38 # Checks for library functions.
39 AC_FUNC_MALLOC
40 AC_CHECK_FUNCS([gethostbyname memset select socket strchr strdup strstr])
41
42 AC_CONFIG_FILES([Makefile])
43 AC_OUTPUT