2 # Process this file with autoconf to produce a configure script.
5 AC_CONFIG_MACRO_DIR([m4])
7 m4_esyscmd([build-aux/git-version-gen .tarball-version]),
8 [kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
10 AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
11 AC_CONFIG_HEADERS([config.h])
22 # Checks for libraries.
25 # Checks for header files.
27 AC_CHECK_HEADERS([arpa/inet.h \
37 # Checks for typedefs, structures, and compiler characteristics.
41 # Checks for library functions.
43 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr strdup])
45 # GNU commandline parsing in getopt.h present?
46 AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
47 import_sources="getopt.c getopt1.c $import_sources")
49 AC_CONFIG_FILES([Makefile
54 AC_MSG_CHECKING(whether program_invocation_short_name is defined)
55 AC_TRY_COMPILE([#include <argp.h>],
56 [program_invocation_short_name = "test";],
57 AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
58 [Define if program_invocation_short_name is defined])
62 AC_MSG_CHECKING([whether __progname is defined])
63 AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
64 [if (*__progname == 0) return;])],
65 AC_DEFINE(HAVE___PROGNAME, 1, [Define if __progname is defined])
69 AC_ARG_WITH(dhcpd-conf,
70 [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],
71 AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"),
72 AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf]))
73 AC_ARG_WITH(dhcpd-leases,
74 [AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])],
75 AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"),
76 AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases]))
77 AC_ARG_WITH(output-format,
78 [AC_HELP_STRING([--with-output-format], [default output format])],
79 AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"),
80 AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format]))
81 AC_ARG_WITH(output-limit,
82 [AC_HELP_STRING([--with-output-limit], [default output limitations])],
83 AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"),
84 AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations]))