dhcpd-pools/configure.in
Sami Kerola 573418a9e4 Version 2.9
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-07-11 14:09:43 +02:00

70 lines
2 KiB
Text

dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([dhcpd-pools], [2.9], [kerolasa@iki.fi])
AM_INIT_AUTOMAKE([1.6 foreign])
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_ISC_POSIX
dnl Default paths.
dhcpd_conf_default=/home/kerolasa/crap/src/old-dhcpd-pools/backup/input/dhcpd.conf
dhcpd_leases_default=/home/kerolasa/crap/src/old-dhcpd-pools/backup/input/dhcpd.leases
output_format_default=text
dnl Let the user set his own paths
AC_ARG_WITH(dhcpd-conf,
[ --with-dhcpd-conf=PATH Path where dhcpd.conf is located],
[ dhcpd_conf=$withval
CPPFLAGS="$CPPFLAGS -DDHCPDCONF_FILE='\"$withval\"'" ],
[ dhcpd_conf=$dhcpd_conf_default ]
)
AC_SUBST(dhcpd_conf)
AC_ARG_WITH(dhcpd-leases,
[ --with-dhcpd-leases=PATH Path where dhcpd.leases is located],
[ dhcpd_leases=$withval
CPPFLAGS="$CPPFLAGS -DDHCPDLEASE_FILE='\"$withval\"'" ],
[ dhcpd_leases=$dhcpd_leases_default ]
)
AC_SUBST(dhcpd_leases)
AC_ARG_WITH(output-format,
[ --with-output-format=FORMAT Default output format],
[ output_format=$withval
CPPFLAGS="$CPPFLAGS -DOUTPUT_FORMAT='\"$withval\"'" ],
[ output_format=$output_format_default ]
)
AC_SUBST(output_format)
AC_ARG_WITH(output-limit,
[ --with-output-limit=NRO Default output limit 00 - 77],
[ output_limit=$withval
CPPFLAGS="$CPPFLAGS -DOUTPUT_LIMIT='\"$withval\"'" ],
[ output_limit=$output_limit_default ]
)
AC_SUBST(output_limit)
AC_CHECK_FUNCS(getopt_long inet_aton inet_addr, break)
AC_CHECK_LIB(resolv, inet_ntoa)
AC_CHECK_HEADERS([arpa/inet.h errno.h netinet/in.h stdio.h \
stdlib.h string.h sys/socket.h sys/stat.h sys/types.h unistd.h])
dnl GNU commandline parsing in getopt.h present ?
AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
import_sources="getopt.c getopt1.c $import_sources")
dnl Checks for library functions.
AC_FUNC_ALLOCA
dnl for help2man
AC_CHECK_PROG(PERL, perl, perl)
AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
AC_OUTPUT