2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([dhcpd-pools],[2.13],[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
6 AM_INIT_AUTOMAKE(dhcpd-pools, 2.13)
7 AC_CONFIG_SRCDIR([config.h.in])
8 AC_CONFIG_HEADERS([config.h])
10 # Checks for programs.
13 # Checks for libraries.
15 # Checks for header files.
16 AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h netinet/in.h stdlib.h string.h strings.h sys/socket.h unistd.h])
18 # Checks for typedefs, structures, and compiler characteristics.
22 # Checks for library functions.
24 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr])
26 # GNU commandline parsing in getopt.h present?
27 AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
28 import_sources="getopt.c getopt1.c $import_sources")
30 AC_CONFIG_FILES([Makefile
35 AC_ARG_WITH(dhcpd-conf,
36 [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],
37 AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"),
38 AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf]))
39 AC_ARG_WITH(dhcpd-leases,
40 [AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])],
41 AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"),
42 AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases]))
43 AC_ARG_WITH(output-format,
44 [AC_HELP_STRING([--with-output-format], [default output format])],
45 AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"),
46 AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format]))
47 AC_ARG_WITH(output-limit,
48 [AC_HELP_STRING([--with-output-limit], [default output limitations])],
49 AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"),
50 AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations]))