2 ## Configure template file for Quagga.
3 ## autoconf will generate configure script.
5 ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
6 ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
11 AC_INIT(Quagga, 0.99.6, [http://bugzilla.quagga.net])
12 AC_CONFIG_SRCDIR(lib/zebra.h)
14 dnl -----------------------------------
15 dnl Get hostname and other information.
16 dnl -----------------------------------
22 AM_CONFIG_HEADER(config.h)
24 dnl we need gawk for memtypes.awk
25 AC_CHECK_PROG([GAWK],[gawk],[gawk],[/bin/false])
26 AC_ARG_VAR([GAWK],[GNU AWK])
28 dnl default is to match previous behavior
29 exampledir=${sysconfdir}
30 AC_ARG_ENABLE([exampledir],
31 AC_HELP_STRING([--enable-exampledir],
32 [specify alternate directory for examples]),
33 exampledir="$enableval",)
34 dnl XXX add --exampledir to autoconf standard directory list somehow
37 dnl default is to match previous behavior
40 AC_ARG_ENABLE([pkgsrcrcdir],
41 AC_HELP_STRING([--enable-pkgsrcrcdir],
42 [specify directory for rc.d scripts]),
43 pkgsrcrcdir="$enableval"; pkgsrcdir="pkgsrc",)
44 dnl XXX add --pkgsrcrcdir to autoconf standard directory list somehow
52 [ --with-cflags Set CFLAGS for use in compilation.])
53 if test "x$with_cflags" != "x" ; then
54 CFLAGS="$with_cflags" ; cflags_specified=yes ;
55 elif test -n "$CFLAGS" ; then
56 cflags_specified=yes ;
59 dnl --------------------
60 dnl Check CC and friends
61 dnl --------------------
68 dnl ------------------------------------------------------------------
69 dnl Intel compiler check. Although Intel tries really hard to make icc
70 dnl look like gcc, there are some differences. It's very verbose with
71 dnl -Wall and it doesn't support the individual -W options.
72 dnl ------------------------------------------------------------------
73 if test "x${GCC}" = "xyes" ; then
75 AC_MSG_CHECKING([whether we are using the Intel compiler])
76 AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
77 [AC_MSG_RESULT([no])],
82 AC_MSG_CHECKING([whether we are using SunPro compiler])
83 AC_EGREP_CPP([^__SUNPRO_C.*0x5(7|8|9)], ["__SUNPRO_C" __SUNPRO_C],
84 [AC_MSG_RESULT([no])],
90 dnl ---------------------------------------------
91 dnl If CLFAGS doesn\'t exist set default value
92 dnl AC_PROG_CC will have set minimal default
93 dnl already, eg "-O2 -g" for gcc, "-g" for others
94 dnl (Wall is gcc specific... have to make sure
95 dnl gcc is being used before setting it)
97 dnl Intel icc 8.0 also sets __GNUC__,
98 dnl but doesn't support all these fancy -W options.
99 dnl Intel compiler warnings we ignore:
100 dnl 279: controlling expression is constant.
101 dnl 869: parameter "xxx" was never referenced - to avoid massive warnings
102 dnl about "self", "vty", "argc" and "argv" never referenced in DEFUN
104 dnl 981: operands are evaluated in unspecified order.
106 dnl Sun Studio 10 / SunPro 5.7 is also supported,
107 dnl so lets set some sane CFLAGS for it.
108 dnl ---------------------------------------------
110 AC_MSG_CHECKING([whether to set a default CFLAGS])
111 if test "x${cflags_specified}" = "x" ; then
114 CFLAGS="-Os -g -Wall -wd 279,869,981"
115 AC_MSG_RESULT([Intel default])
118 CFLAGS="-Os -fno-omit-frame-pointer -g -std=c99 -Wall"
119 CFLAGS="${CFLAGS} -Wsign-compare -Wpointer-arith"
120 CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings"
121 CFLAGS="${CFLAGS} -Wmissing-prototypes -Wmissing-declarations"
122 CFLAGS="${CFLAGS} -Wchar-subscripts -Wcast-qual"
123 # TODO: conditionally addd -Wpacked if handled
124 AC_MSG_RESULT([gcc default])
127 CFLAGS="-xO4 -v -g -xspace -xcode=pic32 -xstrconst -xc99"
128 AC_MSG_RESULT([SunPro default])
131 AC_MSG_RESULT([unknown compiler])
135 AC_MSG_RESULT([CFLAGS supplied by user])
143 AC_CHECK_TOOL(AR, ar)
144 AC_CHECK_TOOL(RANLIB, ranlib, :)
146 dnl ---------------------------
147 dnl We, perhaps unfortunately,
148 dnl depend on GNU Make specific
150 dnl Give the user a warning if
152 dnl ---------------------------
153 AC_CACHE_CHECK([if ${MAKE-make} is GNU make], [quagga_cv_gnu_make],
154 [quagga_cv_gnu_make=no
155 if ${MAKE-make} --version 2>/dev/null | \
156 grep '^GNU Make ' >/dev/null ; then
157 quagga_cv_gnu_make=yes;
172 dnl ----------------------
173 dnl Packages configuration
174 dnl ----------------------
176 [ --enable-vtysh include integrated vty shell for Quagga])
178 [ --disable-ipv6 turn off IPv6 related features and daemons])
180 [ --disable-zebra do not build zebra daemon])
182 [ --disable-bgpd do not build bgpd])
184 [ --disable-ripd do not build ripd])
185 AC_ARG_ENABLE(ripngd,
186 [ --disable-ripngd do not build ripngd])
188 [ --disable-ospfd do not build ospfd])
189 AC_ARG_ENABLE(ospf6d,
190 [ --disable-ospf6d do not build ospf6d])
191 AC_ARG_ENABLE(watchquagga,
192 [ --disable-watchquagga do not build watchquagga])
194 [ --enable-isisd build isisd])
195 AC_ARG_ENABLE(bgp-announce,
196 [ --disable-bgp-announce, turn off BGP route announcement])
197 AC_ARG_ENABLE(netlink,
198 [ --enable-netlink force to use Linux netlink interface])
199 AC_ARG_ENABLE(broken-aliases,
200 [ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
202 [ --enable-snmp enable SNMP support])
204 [ --with-libpam use libpam for PAM support in vtysh])
205 AC_ARG_ENABLE(tcp-zebra,
206 [ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon])
207 AC_ARG_ENABLE(opaque-lsa,
208 [ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)])
209 AC_ARG_ENABLE(ospfapi,
210 [ --disable-ospfapi do not build OSPFAPI to access the OSPF LSA Database,
211 (this is the default if --enable-opaque-lsa is not set)])
212 AC_ARG_ENABLE(ospfclient,
213 [ --disable-ospfclient do not build OSPFAPI client for OSPFAPI,
214 (this is the default if --disable-ospfapi is set)])
215 AC_ARG_ENABLE(ospf-te,
216 [ --enable-ospf-te enable Traffic Engineering Extension to OSPF])
217 AC_ARG_ENABLE(multipath,
218 [ --enable-multipath=ARG enable multipath function, ARG must be digit])
219 AC_ARG_ENABLE(quagga_user,
220 [ --enable-user=ARG user to run Quagga suite as (default quagga)])
221 AC_ARG_ENABLE(quagga_group,
222 [ --enable-group=ARG group to run Quagga suite as (default quagga)])
223 AC_ARG_ENABLE(vty_group,
224 [ --enable-vty-group=ARG set vty sockets to have specified group as owner])
225 AC_ARG_ENABLE(configfile_mask,
226 [ --enable-configfile-mask=ARG set mask for config files])
227 AC_ARG_ENABLE(logfile_mask,
228 [ --enable-logfile-mask=ARG set mask for log files])
231 [ --disable-rtadv disable IPV6 router advertisement feature])
233 [ --enable-irdp enable IRDP server support in zebra])
234 AC_ARG_ENABLE(isis_topology,
235 [ --enable-isis-topology enable IS-IS topology generator])
236 AC_ARG_ENABLE(capabilities,
237 [ --disable-capabilities disable using POSIX capabilities])
238 AC_ARG_ENABLE(gcc_ultra_verbose,
239 [ --enable-gcc-ultra-verbose enable ultra verbose GCC warnings])
240 AC_ARG_ENABLE(gcc-rdynamic,
241 [ --enable-gcc-rdynamic enable gcc linking with -rdynamic for better backtraces])
242 AC_ARG_ENABLE(time-check,
243 [ --disable-time-check disable slow thread warning messages])
245 if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then
246 CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
247 CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn"
248 CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code"
249 CFLAGS="${CFLAGS} -Wpacked -Wpadded"
252 if test x"${enable_gcc_rdynamic}" = x"yes" ; then
253 LDFLAGS="${LDFLAGS} -rdynamic"
256 if test x"${enable_time_check}" != x"no" ; then
257 if test x"${enable_time_check}" = x"yes" -o x"${enable_time_check}" = x ; then
258 AC_DEFINE(CONSUMED_TIME_CHECK,5000000,Consumed Time Check)
260 AC_DEFINE_UNQUOTED(CONSUMED_TIME_CHECK,$enable_time_check,Consumed Time Check)
264 if test "${enable_broken_aliases}" = "yes"; then
265 if test "${enable_netlink}" = "yes"
267 echo "Sorry, you can't use netlink with broken aliases"
270 AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias)
274 if test "${enable_tcp_zebra}" = "yes"; then
275 AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
278 if test "${enable_opaque_lsa}" = "yes"; then
279 AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
282 if test "${enable_ospf_te}" = "yes"; then
283 AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
284 AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
287 AC_MSG_CHECKING(if zebra should be configurable to send Route Advertisements)
288 if test "${enable_rtadv}" != "no"; then
290 AC_DEFINE(HAVE_RTADV,,Enable IPv6 Routing Advertisement support)
295 if test "${enable_irdp}" = "yes"; then
296 AC_DEFINE(HAVE_IRDP,, IRDP )
299 if test "${enable_isisd}" = "yes" && test "${enable_isis_topology}" = yes; then
300 AC_DEFINE(TOPOLOGY_GENERATE,,Enable IS-IS topology generator code)
301 ISIS_TOPOLOGY_INCLUDES="-I./topology"
302 ISIS_TOPOLOGY_DIR="topology"
303 ISIS_TOPOLOGY_LIB="./topology/libtopology.a"
306 AC_SUBST(ISIS_TOPOLOGY_INCLUDES)
307 AC_SUBST(ISIS_TOPOLOGY_DIR)
308 AC_SUBST(ISIS_TOPOLOGY_LIB)
310 if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
312 elif test "${enable_user}" = "no"; then
316 if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
317 enable_group="quagga"
318 elif test "${enable_group}" = "no"; then
322 if test x"${enable_vty_group}" = x"yes" ; then
323 AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes])
324 elif test x"${enable_vty_group}" != x""; then
325 if test x"${enable_vty_group}" != x"no"; then
326 AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
329 AC_SUBST([enable_user])
330 AC_SUBST([enable_group])
331 AC_SUBST([enable_vty_group])
332 AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User)
333 AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group)
335 enable_configfile_mask=${enable_configfile_mask:-0600}
336 AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files)
338 enable_logfile_mask=${enable_logfile_mask:-0600}
339 AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files)
345 case "${enable_multipath}" in
347 MULTIPATH_NUM="${enable_multipath}"
352 echo "Please specify digit to --enable-multipath ARG."
359 AC_SUBST(MULTIPATH_NUM)
361 dnl -------------------
362 dnl Check header files.
363 dnl -------------------
365 AC_CHECK_HEADERS([string.h stropts.h sys/conf.h sys/ksym.h sys/time.h \
366 sys/times.h sys/select.h sys/sysctl.h sys/sockio.h \
367 sys/types.h linux/version.h kvm.h netdb.h asm/types.h \
368 sys/param.h libutil.h limits.h stdint.h])
370 AC_CHECK_HEADERS([sys/socket.h netinet/in_systm.h netinet/in.h \
371 net/if_dl.h net/netopt.h inet/nd.h net/route.h \
372 net/if.h net/if_var.h netinet/in_var.h])
374 dnl V6 headers are checked below, after we check for v6
381 dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
383 [*-sunos5.[6-7]*] | [*-solaris2.[6-7]*])
385 AC_DEFINE(SUNOS_56, 1, SunOS 5.6 to 5.7)
386 AC_DEFINE(SUNOS_5, 1, SunOS 5)
387 AC_CHECK_LIB(xnet, main)
391 | [*-sunos5.1[0-9]] \
392 | [*-sunos5.1[0-9].[0-9]] \
393 | [*-solaris2.[8-9]] \
394 | [*-solaris2.1[0-9]] \
395 | [*-solaris2.1[0-9].[0-9]])
397 AC_DEFINE(SUNOS_59, 1, [SunOS 5.8 up])
398 AC_DEFINE(SUNOS_5, 1, [SunOS 5])
399 AC_CHECK_LIB(socket, main)
400 AC_CHECK_LIB(nsl, main)
401 AC_CHECK_LIB(umem, main)
402 AC_CHECK_FUNCS([printstack],
403 [AC_DEFINE([HAVE_PRINTSTACK],1,[Solaris printstack])
404 AC_DEFINE([HAVE_STACK_TRACE],1,[Stack symbols decode functionality])
408 *-sunos5* | *-solaris2*)
409 AC_DEFINE(SUNOS_5,,SunOS 5, Unknown SunOS)
410 AC_CHECK_LIB(socket, main)
411 AC_CHECK_LIB(nsl, main)
416 AC_DEFINE(GNU_LINUX,,GNU Linux)
419 AC_CHECK_LIB(nsl, gethostbyname)
420 AC_CHECK_LIB(socket, socket)
424 AC_DEFINE(OPEN_BSD,,OpenBSD)
428 OTHER_METHOD="mtu_kvm.o"
429 AC_CHECK_LIB(kvm, main)
433 AC_DEFINE(IRIX_65,,IRIX 6.5)
437 dnl ---------------------
438 dnl Integrated VTY option
439 dnl ---------------------
440 case "${enable_vtysh}" in
441 "yes") VTYSH="vtysh";
442 AC_DEFINE(VTYSH,,VTY shell)
443 AC_PATH_PROG(PERL, perl)
444 dnl Vtysh uses libreadline, which looks for termcap functions at
445 dnl configure time. We follow readline's search order.
446 dnl The required procedures are in libtermcap on NetBSD, in
447 dnl [TODO] on Linux, and in [TODO] on Solaris.
448 AC_CHECK_LIB(termcap, tputs, LIBREADLINE="$LIBREADLINE -ltermcap",
449 [AC_CHECK_LIB(tinfo, tputs, LIBREADLINE="$LIBREADLINE -ltinfo",
450 [AC_CHECK_LIB(curses, tputs, LIBREADLINE="$LIBREADLINE -lcurses",
451 [AC_CHECK_LIB(ncurses, tputs,
452 LIBREADLINE="$LIBREADLINE -lncurses")]
456 AC_CHECK_LIB(readline, main, LIBREADLINE="$LIBREADLINE -lreadline",,
458 if test $ac_cv_lib_readline_main = no; then
459 AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.])
461 AC_CHECK_HEADER(readline/history.h)
462 if test $ac_cv_header_readline_history_h = no;then
463 AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
465 AC_CHECK_LIB(readline, rl_completion_matches,
466 LIBREADLINE="$LIBREADLINE",, "$LIBREADLINE")
467 if test $ac_cv_lib_readline_rl_completion_matches = no; then
468 AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
474 AC_SUBST(LIBREADLINE)
479 if test "$with_libpam" = "yes"; then
480 AC_CHECK_HEADER(security/pam_misc.h)
481 if test "$ac_cv_header_security_pam_misc_h" = yes; then
482 AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
483 AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
484 pam_conv_func="misc_conv"
486 AC_CHECK_HEADER(security/openpam.h)
487 if test "$ac_cv_header_security_openpam_h" = yes; then
488 AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
489 AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
490 pam_conv_func="openpam_ttyconv"
492 if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
493 AC_MSG_WARN([*** pam support will not be built ***])
498 if test "$with_libpam" = "yes"; then
499 dnl took this test from proftpd's configure.in and suited to our needs
500 dnl -------------------------------------------------------------------------
502 dnl This next check looks funky due to a linker problem with some versions
503 dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
504 dnl omitted requiring libdl linking information. PAM-0.72 or better ships
505 dnl with RedHat 6.2 and Debian 2.2 or better.
506 AC_CHECK_LIB(pam, pam_start,
507 [AC_CHECK_LIB(pam, $pam_conv_func,
508 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
510 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
511 LIBPAM="-lpam -lpam_misc"]
515 [AC_CHECK_LIB(pam, pam_end,
516 [AC_CHECK_LIB(pam, $pam_conv_func,
517 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
518 LIBPAM="-lpam -ldl"],
519 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
520 LIBPAM="-lpam -ldl -lpam_misc"]
522 ],AC_MSG_WARN([*** pam support will not be built ***]),
529 dnl -------------------------------
530 dnl Endian-ness check
531 dnl -------------------------------
534 dnl -------------------------------
535 dnl check the size in byte of the C
536 dnl -------------------------------
537 dnl AC_CHECK_SIZEOF(char)
538 dnl AC_CHECK_SIZEOF(int)
539 dnl AC_CHECK_SIZEOF(short)
540 dnl AC_CHECK_SIZEOF(long)
542 dnl ----------------------------
543 dnl check existance of functions
544 dnl ----------------------------
545 AC_CHECK_FUNCS(memset memcpy strerror inet_aton daemon snprintf vsnprintf \
546 strlcat strlcpy if_nametoindex if_indextoname getifaddrs \
547 fcntl strnlen strndup)
548 AC_CHECK_FUNCS(setproctitle, ,
549 [AC_CHECK_LIB(util, setproctitle,
551 AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
557 dnl ------------------------------------
558 dnl Determine routing get and set method
559 dnl ------------------------------------
560 AC_MSG_CHECKING(zebra between kernel interface method)
561 if test x"$opsys" = x"gnu-linux"; then
562 if test "${enable_netlink}" = "yes";then
563 AC_MSG_RESULT(netlink)
564 RT_METHOD=rt_netlink.o
565 AC_DEFINE(HAVE_NETLINK,,netlink)
567 elif test "${enable_netlink}" = "no"; then
572 AC_MSG_RESULT(netlink)
573 RT_METHOD=rt_netlink.o
574 AC_DEFINE(HAVE_NETLINK,,netlink)
577 elif test x"$opsys" = x"sol2-6";then
578 AC_MSG_RESULT(Route socket)
579 KERNEL_METHOD="kernel_socket.o"
580 RT_METHOD="rt_socket.o"
581 elif test x"$opsys" = x"sol8";then
582 AC_MSG_RESULT(Route socket)
583 KERNEL_METHOD="kernel_socket.o"
584 RT_METHOD="rt_socket.o"
585 elif test "$opsys" = "irix" ; then
586 AC_MSG_RESULT(Route socket)
587 KERNEL_METHOD="kernel_socket.o"
588 RT_METHOD="rt_socket.o"
590 AC_TRY_RUN([#include <errno.h>
591 #include <sys/types.h>
592 #include <sys/socket.h>
598 ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
599 if (ac_sock < 0 && errno == EINVAL)
603 [KERNEL_METHOD=kernel_socket.o
604 RT_METHOD=rt_socket.o
605 AC_MSG_RESULT(socket)],
606 [RT_METHOD=rt_ioctl.o
607 AC_MSG_RESULT(ioctl)],
608 [KERNEL_METHOD=kernel_socket.o
609 RT_METHOD=rt_socket.o
610 AC_MSG_RESULT(socket)])
613 AC_SUBST(KERNEL_METHOD)
614 AC_SUBST(OTHER_METHOD)
616 dnl ------------------------------------
617 dnl check for broken CMSG_FIRSTHDR macro
618 dnl ------------------------------------
619 AC_MSG_CHECKING(for broken CMSG_FIRSTHDR)
620 AC_RUN_IFELSE([AC_LANG_SOURCE([[
623 #define __EXTENSIONS__
626 #include <sys/types.h>
627 #include <sys/socket.h>
634 msg.msg_control = buf;
635 msg.msg_controllen = 0;
637 if (CMSG_FIRSTHDR(&msg) != NULL)
640 }]])],[AC_MSG_RESULT(yes - using workaround) AC_DEFINE(HAVE_BROKEN_CMSG_FIRSTHDR,,Broken CMSG_FIRSTHDR)],
641 [AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
643 dnl ------------------------------
644 dnl check kernel route read method
645 dnl ------------------------------
646 AC_CACHE_CHECK(route read method check, zebra_rtread,
647 [if test "$netlink" = yes; then
648 RTREAD_METHOD="rtread_netlink.o"
649 zebra_rtread="netlink"
651 for zebra_rtread in /proc/net/route /dev/ip /dev/null;
653 test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
655 case $zebra_rtread in
656 "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
657 zebra_rtread="proc";;
660 *-freebsd*) RTREAD_METHOD=rtread_sysctl.o
661 zebra_rtread="sysctl";;
662 *) RTREAD_METHOD="rtread_getmsg.o"
663 zebra_rtread="getmsg";;
665 *) RTREAD_METHOD="rtread_sysctl.o"
666 zebra_rtread="sysctl";;
669 AC_SUBST(RTREAD_METHOD)
671 dnl -----------------------------
672 dnl check interface lookup method
673 dnl -----------------------------
675 AC_MSG_CHECKING(interface looking up method)
676 if test "$netlink" = yes; then
677 AC_MSG_RESULT(netlink)
678 IF_METHOD=if_netlink.o
679 elif test "$opsys" = "sol2-6";then
680 AC_MSG_RESULT(Solaris GIF)
682 elif test "$opsys" = "sol8";then
683 AC_MSG_RESULT(Solaris GLIF)
684 IF_METHOD=if_ioctl_solaris.o
685 IOCTL_METHOD=ioctl_solaris.o
686 elif test "$opsys" = "irix" ; then
689 elif test "$opsys" = "openbsd";then
690 AC_MSG_RESULT(openbsd)
692 elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
693 AC_MSG_RESULT(sysctl)
694 IF_METHOD=if_sysctl.o
695 AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
701 AC_SUBST(IOCTL_METHOD)
703 dnl ---------------------------------------------------------------
704 dnl figure out how to specify an interface in multicast sockets API
705 dnl ---------------------------------------------------------------
706 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex],,,[#ifdef HAVE_SYS_TYPES_H
707 #include <sys/types.h>
709 #ifdef HAVE_NETINET_IN_H
710 #include <netinet/in.h>
713 AC_MSG_CHECKING([for BSD struct ip_mreq hack])
714 AC_TRY_COMPILE([#ifdef HAVE_SYS_PARAM_H
715 #include <sys/param.h>
716 #endif],[#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500022 || (__FreeBSD_version < 500000 && __FreeBSD_version >= 440000))) || (defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 106010000)
719 #error No support for BSD struct ip_mreq hack detected
720 #endif],[AC_MSG_RESULT(yes)
721 AC_DEFINE(HAVE_BSD_STRUCT_IP_MREQ_HACK,,[Can pass ifindex in struct ip_mreq])],
724 dnl -----------------------
725 dnl check proc file system.
726 dnl -----------------------
727 if test -r /proc/net/dev; then
728 AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
732 if test -r /proc/net/if_inet6; then
733 AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
738 dnl -----------------------------
739 dnl check ipforward detect method
740 dnl -----------------------------
741 AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
742 [for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
744 test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
746 case $zebra_ipforward_path in
747 "/proc/net/snmp") IPFORWARD=ipforward_proc.o
748 zebra_ipforward_path="proc";;
751 *-nec-sysv4*) IPFORWARD=ipforward_ews.o
752 zebra_ipforward_path="ews";;
753 *-freebsd*) IPFORWARD=ipforward_sysctl.o
754 zebra_ipforward_path="sysctl";;
755 *) IPFORWARD=ipforward_solaris.o
756 zebra_ipforward_path="solaris";;
758 *) IPFORWARD=ipforward_sysctl.o
759 zebra_ipforward_path="sysctl";;
763 AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
768 AC_MSG_CHECKING(whether does this OS have IPv6 stack)
769 if test "${enable_ipv6}" = "no"; then
770 AC_MSG_RESULT(disabled)
775 if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
777 AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
778 AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
782 AC_MSG_RESULT(INRIA IPv6)
786 elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
788 AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
789 AC_DEFINE(KAME,1,KAME IPv6)
792 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
793 LIB_IPV6="-L/usr/local/v6/lib -linet6"
796 dnl -------------------------
798 dnl default host check
799 dnl It is not used by Kheops
800 dnl -------------------------
801 elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
803 AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
804 AC_DEFINE(MUSICA,1,Musica IPv6 stack)
805 AC_DEFINE(KAME,1,KAME IPv6 stack)
808 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
809 LIB_IPV6="-L/usr/local/v6/lib -linet6"
811 AC_MSG_RESULT(MUSICA)
815 elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
817 AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
821 if test x"$opsys" = x"bsdi";then
822 AC_DEFINE(BSDI_NRL,,BSDI)
823 AC_MSG_RESULT(BSDI_NRL)
827 dnl ------------------------------------
828 dnl Solaris 9, 10 and potentially higher
829 dnl ------------------------------------
830 elif test x"$opsys" = x"sol8"; then
832 AC_DEFINE(HAVE_IPV6, 1, IPv6)
833 AC_DEFINE(SOLARIS_IPV6, 1, Solaris IPv6)
836 AC_MSG_RESULT(Solaris IPv6)
840 elif test "${enable_ipv6}" = "yes"; then
842 #include <linux/version.h>
843 /* 2.1.128 or later */
844 #if LINUX_VERSION_CODE >= 0x020180
848 zebra_cv_linux_ipv6=yes
849 AC_MSG_RESULT(Linux IPv6)])
851 if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
854 zebra_cv_linux_ipv6=yes
855 AC_MSG_RESULT(Linux IPv6)
859 if test "$zebra_cv_linux_ipv6" = "yes";then
860 AC_MSG_CHECKING(whether libc has IPv6 support)
861 AC_TRY_LINK([#include <netinet/in.h>
862 ],[ int a; a = (int) in6addr_any.s6_addr[0]; if (a != 12345) return a; ],
865 zebra_cv_linux_ipv6=yes],
868 zebra_cv_linux_ipv6=no])
871 if test "$zebra_cv_linux_ipv6" = "yes";then
872 AC_MSG_CHECKING(for GNU libc >= 2.1)
873 AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
875 #include <features.h>
876 #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
880 AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
886 if test "$glibc" != "yes"; then
887 INCLUDES="-I/usr/inet6/include"
888 if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
889 LIB_IPV6="-L/usr/inet6/lib -linet6"
894 dnl -----------------------
895 dnl Set IPv6 related values
896 dnl -----------------------
897 LIBS="$LIB_IPV6 $LIBS"
900 if test x"$RIPNGD" = x""; then
901 AC_MSG_RESULT(IPv4 only)
905 dnl ------------------
906 dnl IPv6 header checks
907 dnl ------------------
908 if test "x${zebra_cv_ipv6}" = "xyes"; then
909 AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \
910 netinet6/in6_var.h netinet6/nd6.h])
913 dnl --------------------
914 dnl Daemon disable check
915 dnl --------------------
916 if test "${enable_zebra}" = "no";then
922 if test "${enable_bgpd}" = "no";then
928 if test "${enable_ripd}" = "no";then
934 if test "${enable_ospfd}" = "no";then
940 if test "${enable_watchquagga}" = "no";then
943 WATCHQUAGGA="watchquagga"
947 if test "${enable_opaque_lsa}" = "yes"; then
948 if test "${enable_ospfapi}" != "no";then
949 AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
951 if test "${enable_ospfclient}" != "no";then
952 OSPFCLIENT="ospfclient"
958 case "${enable_ripngd}" in
959 "yes") RIPNGD="ripngd";;
964 case "${enable_ospf6d}" in
965 "yes") OSPF6D="ospf6d";;
970 case "${enable_isisd}" in
971 "yes") ISISD="isisd";;
976 if test "${enable_bgp_announce}" = "no";then
977 AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
986 AC_SUBST(WATCHQUAGGA)
993 AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
994 AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
995 AC_CHECK_LIB(crypt, crypt)
996 AC_CHECK_LIB(resolv, res_init)
997 AC_CHECK_LIB(m, main)
999 dnl ---------------------------------------------------
1000 dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
1001 dnl ---------------------------------------------------
1002 AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
1003 AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
1004 AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
1006 dnl ---------------------------
1007 dnl check system has GNU regexp
1008 dnl ---------------------------
1009 dnl AC_MSG_CHECKING(whether system has GNU regex)
1010 AC_CHECK_LIB(c, regexec,
1011 [AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
1013 [LIB_REGEX="regex.o"])
1016 dnl ------------------
1017 dnl check Net-SNMP library
1018 dnl ------------------
1019 if test "${enable_snmp}" = "yes"; then
1020 LIBS="${LIBS} -lcrypto"
1021 AC_CHECK_LIB(netsnmp, asn_parse_int,
1022 [AC_DEFINE(HAVE_NETSNMP,,Net SNMP)
1023 AC_DEFINE(HAVE_SNMP,,SNMP)
1024 LIBS="${LIBS} -lnetsnmp"],
1025 [AC_MSG_ERROR([--enable-snmp given, but cannot find support for SNMP])])
1027 for ac_snmp in /usr/include \
1028 /usr/local/include \
1030 test -f "${ac_snmp}/net-snmp/library/asn1.h" && break
1035 AC_MSG_ERROR([--enable-snmp given, but can not find header])
1038 SNMP_INCLUDES="-I${ac_snmp}/net-snmp"
1039 SNMP_INCLUDES="${SNMP_INCLUDES} -I${ac_snmp}/net-snmp/library"
1043 AC_SUBST(SNMP_INCLUDES)
1046 dnl ----------------------------
1047 dnl check sa_len of sockaddr
1048 dnl ----------------------------
1049 AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
1050 AC_TRY_COMPILE([#include <sys/types.h>
1051 #include <sys/socket.h>
1052 ],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
1054 AC_DEFINE(HAVE_SA_LEN,,sa_len)],
1057 dnl ----------------------------
1058 dnl check sin_len of sockaddr_in
1059 dnl ----------------------------
1060 AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
1061 AC_TRY_COMPILE([#include <sys/types.h>
1062 #include <netinet/in.h>
1063 ],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
1065 AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
1068 dnl ----------------------------
1069 dnl check sun_len of sockaddr_un
1070 dnl ----------------------------
1071 AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
1072 AC_TRY_COMPILE([#include <sys/types.h>
1074 ],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
1076 AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
1079 dnl -----------------------------------
1080 dnl check sin6_scope_id of sockaddr_in6
1081 dnl -----------------------------------
1082 if test "$zebra_cv_ipv6" = yes; then
1083 AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
1084 AC_TRY_COMPILE([#include <sys/types.h>
1085 #include <netinet/in.h>
1086 ],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
1088 AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
1092 dnl ----------------------------
1093 dnl check socklen_t exist or not
1094 dnl ----------------------------
1095 AC_MSG_CHECKING(whther socklen_t is defined)
1096 AC_TRY_COMPILE([#include <sys/types.h>
1097 #include <sys/socket.h>
1098 #include <netinet/in.h>
1099 ],[socklen_t ac_x;],
1101 AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
1104 dnl ------------------------
1105 dnl check struct sockaddr_dl
1106 dnl ------------------------
1107 AC_MSG_CHECKING(whether struct sockaddr_dl exist)
1108 AC_EGREP_HEADER(sockaddr_dl,
1111 AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
1114 dnl --------------------------
1115 dnl check structure ifaliasreq
1116 dnl --------------------------
1117 AC_MSG_CHECKING(whether struct ifaliasreq exist)
1118 AC_EGREP_HEADER(ifaliasreq,
1121 AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
1124 dnl ----------------------------
1125 dnl check structure in6_aliasreq
1126 dnl ----------------------------
1127 AC_MSG_CHECKING(whether struct in6_aliasreq exist)
1128 AC_EGREP_HEADER(in6_aliasreq,
1131 AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
1134 dnl -----------------------------------
1135 dnl check ifra_lifetime of in6_aliasreq
1136 dnl -----------------------------------
1137 AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist)
1138 AC_TRY_COMPILE([#include <sys/types.h>
1139 #include <netinet6/in6_var.h>
1140 ],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);],
1142 AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)],
1145 dnl ---------------------------
1146 dnl check structure rt_addrinfo
1147 dnl ---------------------------
1148 AC_MSG_CHECKING(whether struct rt_addrinfo exist)
1149 AC_EGREP_HEADER(rt_addrinfo,
1152 AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
1155 dnl --------------------------
1156 dnl check structure in_pktinfo
1157 dnl --------------------------
1158 AC_MSG_CHECKING(whether struct in_pktinfo exist)
1159 AC_TRY_COMPILE([#include <netinet/in.h>
1160 ],[struct in_pktinfo ac_x;],
1162 AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
1165 dnl ----------------------------------
1166 dnl check struct nd_opt_homeagent_info
1167 dnl ----------------------------------
1168 AC_MSG_CHECKING(whether struct nd_opt_homeagent_info exist)
1169 AC_EGREP_HEADER(nd_opt_homeagent_info,
1172 AC_DEFINE(HAVE_ND_OPT_HOMEAGENT_INFO,,nd_opt_homeagent_info)],
1175 dnl --------------------------------
1176 dnl check struct nd_opt_adv_interval
1177 dnl --------------------------------
1178 AC_MSG_CHECKING(whether struct nd_opt_adv_interval exist)
1179 AC_EGREP_HEADER(nd_opt_adv_interval,
1182 AC_DEFINE(HAVE_ND_OPT_ADV_INTERVAL,,nd_opt_adv_interval)],
1185 dnl ------------------------------------
1186 dnl check fields in nd_opt_adv_interval
1187 dnl ------------------------------------
1188 AC_MSG_CHECKING(whether nd_opt_ai_type field exist)
1189 AC_EGREP_HEADER(nd_opt_ai_type,
1192 AC_DEFINE(HAVE_ND_OPT_ADV_INTERVAL_AI_FIELDS,,nd_opt_ai_type)],
1195 dnl --------------------------------------
1196 dnl checking for getrusage struct and call
1197 dnl --------------------------------------
1198 AC_MSG_CHECKING(whether getrusage is available)
1199 AC_TRY_COMPILE([#include <sys/resource.h>
1200 ],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
1202 AC_DEFINE(HAVE_RUSAGE,,rusage)],
1205 dnl -------------------
1206 dnl capabilities checks
1207 dnl -------------------
1208 if test "${enable_capabilities}" != "no"; then
1209 AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
1210 AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
1212 AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
1213 quagga_ac_keepcaps="yes"],
1216 if test x"${quagga_ac_keepcaps}" = x"yes"; then
1217 AC_CHECK_HEADERS(sys/capability.h)
1219 if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
1220 AC_CHECK_LIB(cap, cap_init,
1221 [AC_DEFINE(HAVE_LCAPS,1,Capabilities)
1223 quagga_ac_lcaps="yes"]
1226 AC_CHECK_HEADERS(priv.h,
1227 [AC_MSG_CHECKING(Solaris style privileges are available)
1228 AC_TRY_COMPILE([#include <priv.h>],[getpflags(PRIV_AWARE);],
1230 AC_DEFINE(HAVE_SOLARIS_CAPABILITIES,1,getpflags)
1231 quagga_ac_scaps="yes"],
1237 if test x"${quagga_ac_scaps}" = x"yes" \
1238 -o x"${quagga_ac_lcaps}" = x"yes"; then
1239 AC_DEFINE(HAVE_CAPABILITIES,1,capabilities)
1244 dnl -------------------
1245 dnl test for ucontext.h
1246 dnl -------------------
1247 AC_CHECK_HEADERS(ucontext.h)
1249 dnl ---------------------------
1250 dnl check for glibc 'backtrace'
1251 dnl ---------------------------
1252 if test "${glibc}" = "yes"; then
1253 AC_CHECK_HEADER([execinfo.h],
1254 [AC_CHECK_FUNC([backtrace],
1255 [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,[Glibc backtrace])
1256 AC_DEFINE(HAVE_STACK_TRACE,,[Stack symbol decoding])
1261 dnl -----------------------------------------
1262 dnl check for malloc mallinfo struct and call
1263 dnl this must try and link using LIBS, in
1264 dnl order to check no alternative allocator
1265 dnl has been specified, which might not provide
1266 dnl mallinfo, e.g. such as Umem on Solaris.
1267 dnl -----------------------------------------
1268 AC_CHECK_HEADERS(malloc.h,
1269 [AC_MSG_CHECKING(whether mallinfo is available)
1270 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
1271 [[struct mallinfo ac_x; ac_x = mallinfo ();]])],
1273 AC_DEFINE(HAVE_MALLINFO,,mallinfo)],
1282 CONFDATE=`date '+%Y%m%d'`
1285 dnl ------------------------------
1286 dnl set paths for state directory
1287 dnl ------------------------------
1288 if test "${prefix}" = "NONE"; then
1289 quagga_statedir_prefix="";
1291 quagga_statedir_prefix=${prefix}
1293 if test "${localstatedir}" = '${prefix}/var'; then
1294 AC_CACHE_CHECK(state directory,ac_statedir,
1295 [for QUAGGA_STATE_DIR in ${quagga_statedir_prefix}/var/run dnl
1296 ${quagga_statedir_prefix}/var/adm dnl
1297 ${quagga_statedir_prefix}/etc dnl
1303 test -d $QUAGGA_STATE_DIR && break
1305 quagga_statedir=$QUAGGA_STATE_DIR])
1307 quagga_statedir=${localstatedir}
1308 AC_MSG_CHECKING(directory to use for state file)
1309 AC_MSG_RESULT(${quagga_statedir})
1310 AC_SUBST(quagga_statedir)
1312 if test $quagga_statedir = "/dev/null"; then
1313 AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
1316 AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$quagga_statedir/zebra.pid",zebra PID)
1317 AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$quagga_statedir/ripd.pid",ripd PID)
1318 AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$quagga_statedir/ripngd.pid",ripngd PID)
1319 AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$quagga_statedir/bgpd.pid",bgpd PID)
1320 AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID)
1321 AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID)
1322 AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$quagga_statedir/isisd.pid",isisd PID)
1323 AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$quagga_statedir/watchquagga.pid",watchquagga PID)
1324 AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket)
1325 AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket)
1326 AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket)
1327 AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$quagga_statedir/ripngd.vty",ripng vty socket)
1328 AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$quagga_statedir/bgpd.vty",bgpd vty socket)
1329 AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$quagga_statedir/ospfd.vty",ospfd vty socket)
1330 AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty socket)
1331 AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$quagga_statedir/isisd.vty",isisd vty socket)
1332 AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$quagga_statedir",daemon vty directory)
1334 dnl -------------------------------
1335 dnl Quagga sources should always be
1336 dnl current wrt interfaces. Dont
1337 dnl allow deprecated interfaces to
1339 dnl -------------------------------
1340 AC_DEFINE(QUAGGA_NO_DEPRECATED_INTERFACES, 1, Hide deprecated interfaces)
1342 dnl ---------------------------
1343 dnl Check htonl works correctly
1344 dnl ---------------------------
1345 AC_MSG_CHECKING(for working htonl)
1346 AC_CACHE_VAL(ac_cv_htonl_works, [
1347 AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
1348 #include <sys/types.h>
1353 #ifdef HAVE_NETINET_IN_H
1354 #include <netinet/in.h>
1357 ac_cv_htonl_works=yes,
1358 ac_cv_htonl_works=no)])
1359 AC_MSG_RESULT($ac_cv_htonl_works)
1361 AC_CONFIG_FILES([Makefile lib/Makefile zebra/Makefile ripd/Makefile
1362 ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile
1363 ospf6d/Makefile isisd/Makefile vtysh/Makefile doc/Makefile
1364 ospfclient/Makefile tests/Makefile m4/Makefile redhat/Makefile
1369 isisd/topology/Makefile
1370 pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
1371 pkgsrc/ripd.sh pkgsrc/ripngd.sh pkgsrc/zebra.sh])
1372 AC_CONFIG_FILES([solaris/Makefile])
1374 AC_CONFIG_FILES([vtysh/extract.pl],[chmod +x vtysh/extract.pl])
1375 ## Hack, but working solution to avoid rebuilding of quagga.info.
1376 ## It's already in CVS until texinfo 4.7 is more common.
1377 AC_CONFIG_COMMANDS([info-time],[touch doc/quagga.info])
1381 Quagga configuration
1382 --------------------
1383 quagga version : ${PACKAGE_VERSION}
1384 host operationg system : ${host_os}
1385 source code location : ${srcdir}
1387 compiler flags : ${CFLAGS}
1388 includes : ${INCLUDES} ${SNMP_INCLUDES}
1389 linker flags : ${LDFLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE}
1390 state file directory : ${quagga_statedir}
1391 config file directory : `eval echo \`echo ${sysconfdir}\``
1392 example directory : `eval echo \`echo ${exampledir}\``
1393 user to run as : ${enable_user}
1394 group to run as : ${enable_group}
1395 group for vty sockets : ${enable_vty_group}
1396 config file mask : ${enable_configfile_mask}
1397 log file mask : ${enable_logfile_mask}
1399 The above user and group must have read/write access to the state file
1400 directory and to the config files in the config file directory."
1402 if test x"$quagga_cv_gnu_make" = x"no"; then echo "
1403 Warning: The ${MAKE-make} programme detected, either in your path or
1404 via the MAKE variable, is not GNU Make. GNU make may be installed as
1405 gmake on some systems. and is required to complete a build of Quagga