2 # Process this file with autoconf to produce a configure script.
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])
16 # Checks for libraries.
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])
22 # Checks for typedefs, structures, and compiler characteristics.
26 # Checks for library functions.
28 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr])
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")
34 AC_CONFIG_FILES([Makefile
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]))