2 # Process this file with autoconf to produce a configure script.
5 AC_CONFIG_MACRO_DIR([m4])
6 AC_INIT([dhcpd-pools],[2.14],[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
8 AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
9 AC_CONFIG_HEADERS([config.h])
20 # Checks for libraries.
23 # Checks for header files.
25 AC_CHECK_HEADERS([arpa/inet.h \
35 # Checks for typedefs, structures, and compiler characteristics.
39 # Checks for library functions.
41 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr strdup])
43 # GNU commandline parsing in getopt.h present?
44 AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
45 import_sources="getopt.c getopt1.c $import_sources")
47 AC_CONFIG_FILES([Makefile
52 AC_ARG_WITH(dhcpd-conf,
53 [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],
54 AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"),
55 AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf]))
56 AC_ARG_WITH(dhcpd-leases,
57 [AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])],
58 AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"),
59 AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases]))
60 AC_ARG_WITH(output-format,
61 [AC_HELP_STRING([--with-output-format], [default output format])],
62 AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"),
63 AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format]))
64 AC_ARG_WITH(output-limit,
65 [AC_HELP_STRING([--with-output-limit], [default output limitations])],
66 AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"),
67 AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations]))