Use what libc will provide
[debian/dhcpd-pools.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.64)
5 AC_CONFIG_MACRO_DIR([m4])
6 AC_INIT([dhcpd-pools],[2.13],[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
7 AM_INIT_AUTOMAKE(dhcpd-pools, 2.13)
8 AC_CONFIG_SRCDIR([config.h.in])
9 AC_CONFIG_HEADERS([config.h])
10
11 AC_GNU_SOURCE
12
13 # Checks for programs
14 AC_PROG_CC
15
16 # Checks for libraries.
17 LT_INIT
18
19 # Checks for header files.
20 AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h netinet/in.h stdlib.h string.h strings.h sys/socket.h unistd.h])
21
22 # Checks for typedefs, structures, and compiler characteristics.
23 AC_HEADER_STDBOOL
24 AC_TYPE_SIZE_T
25
26 # Checks for library functions.
27 AC_FUNC_MALLOC
28 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr])
29
30 # GNU commandline parsing in getopt.h present?
31 AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
32         import_sources="getopt.c getopt1.c $import_sources")
33
34 AC_CONFIG_FILES([Makefile
35                  man/Makefile
36                  src/Makefile
37                  contrib/Makefile])
38
39 AC_ARG_WITH(dhcpd-conf,
40         [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],
41         AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"),
42         AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf]))
43 AC_ARG_WITH(dhcpd-leases,
44         [AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])],
45         AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"),
46         AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases]))
47 AC_ARG_WITH(output-format,
48         [AC_HELP_STRING([--with-output-format], [default output format])],
49         AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"),
50         AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format]))
51 AC_ARG_WITH(output-limit,
52         [AC_HELP_STRING([--with-output-limit], [default output limitations])],
53         AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"),
54         AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations]))
55
56 AC_OUTPUT