]> git.ipfire.org Git - thirdparty/dhcp.git/blame - configure.ac
- Replaced ./configure shellscripting with GNU Autoconf. [ISC-Bugs #16405b]
[thirdparty/dhcp.git] / configure.ac
CommitLineData
fe5b0fdd
DH
1AC_INIT([DHCP], [4.0.0-dev-2006-12-06], [dhcp-users@isc.org])
2
3# we specify "foreign" to avoid having to have the GNU mandated files,
4# like AUTHORS, COPYING, and such
5AM_INIT_AUTOMAKE([foreign])
6
7AC_PROG_CC
8AC_PROG_RANLIB
9AC_CONFIG_HEADERS([includes/config.h])
10
11# we sometimes need to know byte order for building packets
12AC_C_BIGENDIAN(AC_SUBST(byte_order, BIG_ENDIAN),
13 AC_SUBST(byte_order, LITTLE_ENDIAN))
14AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order],
15 [Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs)
16 or LITTLE_ENDIAN for LSB (Intel CPUs).])
17
18# DHCPv6 is off by default
19AC_ARG_ENABLE(dhcpv6,
20 AC_HELP_STRING([--enable-dhcpv6],
21 [enable support for DHCPv6 (default is NO)]),
22 AC_DEFINE([DHCPv6], [1],
23 [Define to 1 to include DHCPv6 support.]))
24
25# Allow specification of alternate state files
26AC_ARG_WITH(srv-lease-file,
27 AC_HELP_STRING([--with-srv-lease-file=PATH],
28 [File for dhcpd leases
29 (default is LOCALSTATEDIR/db/dhcpd.leases)]),
30 AC_DEFINE_UNQUOTED([_PATH_DHCPD_DB], ["$withval"],
31 [File for dhcpd leases.]))
32AC_ARG_WITH(cli-lease-file,
33 AC_HELP_STRING([--with-cli-lease-file=PATH],
34 [File for dhclient leases
35 (default is LOCALSTATEDIR/db/dhclient.leases)]),
36 AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_DB], ["$withval"],
37 [File for dhclient leases.]))
38AC_ARG_WITH(srv-pid-file,
39 AC_HELP_STRING([--with-srv-pid-file=PATH],
40 [File for dhcpd process information
41 (default is LOCALSTATEDIR/run/dhcpd.pid)]),
42 AC_DEFINE_UNQUOTED([_PATH_DHCPD_PID], ["$withval"],
43 [File for dhcpd process information.]))
44AC_ARG_WITH(cli-pid-file,
45 AC_HELP_STRING([--with-cli-pid-file=PATH],
46 [File for dhclient process information
47 (default is LOCALSTATEDIR/run/dhclient.pid)]),
48 AC_DEFINE_UNQUOTED([_PATH_DHCLIENT], ["$withval"],
49 [File for dhclient process information.]))
50AC_ARG_WITH(relay-pid-file,
51 AC_HELP_STRING([--with-relay-pid-file=PATH],
52 [File for dhcrelay process information
53 (default is LOCALSTATEDIR/run/dhcrelay.pid)]),
54 AC_DEFINE_UNQUOTED([_PATH_DHCRELAY_PID], ["$withval"],
55 [File for dhcrelay process information.]))
56
57# figure out what IPv4 interface code to use
58AC_CHECK_HEADER(linux/filter.h,
59 AC_DEFINE([USE_LPF], [1],
60 [Define to 1 to use the Linux Packet Filter interface code.]))
61AC_CHECK_HEADER(sys/dlpi.h,
62 AC_DEFINE([USE_DLPI], [1],
63 [Define to 1 to use DLPI interface code.]))
64AC_CHECK_HEADER(net/bpf.h,
65 AC_DEFINE([USE_BPF], [1],
66 [Define to 1 to use the
67 Berkeley Packet Filter interface code.]))
68
69# find an MD5 library
70AC_SEARCH_LIBS(MD5_Init, [crypto])
71AC_SEARCH_LIBS(MD5Init, [crypto])
72
73# Solaris needs some libraries for functions
74AC_SEARCH_LIBS(socket, [socket])
75AC_SEARCH_LIBS(inet_ntoa, [nsl])
76
77AC_SEARCH_LIBS(inet_aton, [socket nsl], ,
78 AC_DEFINE([NEED_INET_ATON], [1],
79 [Define to 1 if the inet_aton() function is missing.]))
80
81# check for /dev/random (declares HAVE_DEV_RANDOM)
82AC_CHECK_FILE(/dev/random,
83 AC_DEFINE([HAVE_DEV_RANDOM], [1],
84 [Define to 1 if you have the /dev/random file.]))
85
86# see if there is a "sa_len" field in our interface information structure
87AC_CHECK_MEMBER(struct sockaddr.sa_len,
88 AC_DEFINE([HAVE_SA_LEN], [],
89 [Define to 1 if the sockaddr structure has a length field.]),
90 ,
91 [#include <sys/socket.h>])
92
93AC_OUTPUT(
94 Makefile
95 client/Makefile
96 common/Makefile
97 dhcpctl/Makefile
98 dst/Makefile
99 includes/Makefile
100 minires/Makefile
101 omapip/Makefile
102 relay/Makefile
103 server/Makefile
104)
105