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([config.h.in])
9 AC_CONFIG_HEADERS([config.h])
19 # Checks for libraries.
22 # Checks for header files.
23 AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h netinet/in.h stdlib.h string.h strings.h sys/socket.h unistd.h])
25 # Checks for typedefs, structures, and compiler characteristics.
29 # Checks for library functions.
31 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr strdup])
33 # GNU commandline parsing in getopt.h present?
34 AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
35 import_sources="getopt.c getopt1.c $import_sources")
37 AC_CONFIG_FILES([Makefile
42 AC_ARG_WITH(dhcpd-conf,
43 [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],
44 AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"),
45 AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf]))
46 AC_ARG_WITH(dhcpd-leases,
47 [AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])],
48 AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"),
49 AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases]))
50 AC_ARG_WITH(output-format,
51 [AC_HELP_STRING([--with-output-format], [default output format])],
52 AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"),
53 AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format]))
54 AC_ARG_WITH(output-limit,
55 [AC_HELP_STRING([--with-output-limit], [default output limitations])],
56 AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"),
57 AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations]))