autotools: point correct location of src
[debian/dhcpd-pools.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.64)
5 AC_CONFIG_MACRO_DIR([m4])
6 AC_INIT([dhcpd-pools],[2.14],[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
7 AM_INIT_AUTOMAKE
8 AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
9 AC_CONFIG_HEADERS([config.h])
10
11 AC_GNU_SOURCE
12
13 # Checks for programs
14 AC_PROG_AWK
15 AC_PROG_CC
16 AC_PROG_CXX
17 AC_PROG_MAKE_SET
18 AC_PROG_LIBTOOL
19
20 # Checks for libraries.
21 LT_INIT
22
23 # Checks for header files.
24
25 AC_CHECK_HEADERS([arpa/inet.h \
26         fcntl.h \
27         libintl.h \
28         netinet/in.h \
29         stdlib.h \
30         string.h \
31         strings.h \
32         sys/socket.h \
33         unistd.h])
34
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_HEADER_STDBOOL
37 AC_TYPE_SIZE_T
38
39 # Checks for library functions.
40 AC_FUNC_MALLOC
41 AC_CHECK_FUNCS([inet_ntoa memset strerror strstr strdup])
42
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")
46
47 AC_CONFIG_FILES([Makefile
48                  man/Makefile
49                  src/Makefile
50                  contrib/Makefile])
51
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]))
68
69 AC_OUTPUT