2 ## Configure template file for Zebra.
3 ## autoconf will generate configure script.
5 ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
10 AM_INIT_AUTOMAKE(zebra, 0.94)
11 AM_CONFIG_HEADER(config.h)
13 dnl -----------------------------------
14 dnl Get hostname and other information.
15 dnl -----------------------------------
22 [ --with-cflags Set CFLAGS for use in compilation.])
23 if test "x$with_cflags" != "x" ; then
24 CFLAGS="$with_cflags" ; cflags_specified=yes ;
25 elif test -n "$CFLAGS" ; then
26 cflags_specified=yes ;
34 dnl -----------------------------------------
35 dnl If CLFAGS doesn\'t exist set default value
36 dnl -----------------------------------------
37 if test "x$cflags_specified" = "x" ; then
38 CFLAGS="$CFLAGS -Wall"
48 AC_CHECK_TOOL(RANLIB, ranlib, :)
55 dnl ----------------------
56 dnl Packages configuration
57 dnl ----------------------
59 [ --enable-vtysh, Make integrated VTY version of zebra])
61 [ --disable-ipv6 turn off IPv6 related features and daemons])
63 [ --disable-zebra do not build zebra daemon])
65 [ --disable-bgpd do not build bgpd])
67 [ --disable-ripd do not build ripd])
69 [ --disable-ripngd do not build ripngd])
71 [ --disable-ospfd do not build ospfd])
72 AC_ARG_ENABLE(ospfclient,
73 [ --disable-ospfclient do not build ospfclient])
75 [ --disable-ospf6d do not build ospf6d])
76 AC_ARG_ENABLE(bgp-announce,
77 [ --disable-bgp-announce, turn off BGP route announcement])
78 AC_ARG_ENABLE(netlink,
79 [ --enable-netlink force to use Linux netlink interface])
80 AC_ARG_ENABLE(broken-aliases,
81 [ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
83 [ --enable-snmp enable SNMP support])
85 [ --with-libpam use libpam for PAM support in vtysh])
86 AC_ARG_ENABLE(tcpsock,
87 [ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon])
88 dnl Temporary option until OSPF NSSA implementation complete
90 [ --enable-nssa enable OSPF NSSA option])
91 AC_ARG_ENABLE(opaque-lsa,
92 [ --enable-opaque-lsa enable OSPF Opaque-LSA support (RFC2370)])
93 AC_ARG_ENABLE(ospf-te,
94 [ --enable-ospf-te enable Traffic Engineering Extension to OSPF])
95 AC_ARG_ENABLE(multipath,
96 [ --enable-multipath=ARG enable multipath function, ARG must be digit])
98 dnl AC_ARG_ENABLE(rtadv,
99 dnl [ --enable-rtadv enable IPV6 router advertisment option])
101 if test "${enable_broken_aliases}" = "yes"; then
102 if test "${enable_netlink}" = "yes"
104 echo "Sorry, you can't use netlink with broken aliases"
107 AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias)
111 if test "${enable_tcp_zebra}" = "yes"; then
112 AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
115 if test "${enable_nssa}" = "yes"; then
116 AC_DEFINE(HAVE_NSSA,,OSPF NSSA)
119 if test "${enable_opaque_lsa}" = "yes"; then
120 AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
123 if test "${enable_ospf_te}" = "yes"; then
124 AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
125 AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
128 dnl if test "${enable_rtadv}" = "yes"; then
129 dnl AC_DEFINE(HAVE_RTADV)
136 case "${enable_multipath}" in
138 MULTIPATH_NUM="${enable_multipath}"
143 echo "Please specify digit to --enable-multipath ARG."
150 AC_SUBST(MULTIPATH_NUM)
152 dnl -------------------
153 dnl Check header files.
154 dnl -------------------
156 AC_CHECK_HEADERS(string.h stropts.h sys/conf.h sys/ksym.h sys/time.h sys/times.h sys/select.h sys/sysctl.h sys/sockio.h sys/types.h net/if_dl.h net/if_var.h linux/version.h kvm.h netdb.h netinet/in.h net/netopt.h netinet/in_var.h netinet/in6_var.h netinet/in6.h inet/nd.h asm/types.h netinet/icmp6.h netinet6/nd6.h libutil.h)
163 dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
165 *-sunos5.6* | *-solaris2.6*)
167 AC_DEFINE(SUNOS_5,,SunOS 5)
168 AC_CHECK_LIB(xnet, main)
171 *-sunos5* | *-solaris2*)
172 AC_DEFINE(SUNOS_5,,SunOS 5)
173 AC_CHECK_LIB(socket, main)
174 AC_CHECK_LIB(nsl, main)
179 AC_DEFINE(GNU_LINUX,,GNU Linux)
182 AC_CHECK_LIB(nsl, gethostbyname)
183 AC_CHECK_LIB(socket, socket)
186 AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
190 AC_DEFINE(OPEN_BSD,,OpenBSD)
194 OTHER_METHOD="mtu_kvm.o"
195 AC_CHECK_LIB(kvm, main)
199 dnl ---------------------
200 dnl Integrated VTY option
201 dnl ---------------------
202 case "${enable_vtysh}" in
203 "yes") VTYSH="vtysh";
204 AC_DEFINE(VTYSH,,VTY shell)
205 AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs))
206 AC_CHECK_LIB(readline, main)
207 if test $ac_cv_lib_readline_main = no; then
208 AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.])
210 AC_CHECK_HEADER(readline/history.h)
211 if test $ac_cv_header_readline_history_h = no;then
212 AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
222 if test "$with_libpam" = "yes"; then
223 dnl took this test from proftpd's configure.in and suited to our needs
224 dnl -------------------------------------------------------------------------
226 dnl This next check looks funky due to a linker problem with some versions
227 dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
228 dnl omitted requiring libdl linking information. PAM-0.72 or better ships
229 dnl with RedHat 6.2 and Debian 2.2 or better.
230 AC_CHECK_LIB(pam, pam_start,
231 [AC_CHECK_LIB(pam, misc_conv,
232 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
234 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
235 LIBPAM="-lpam -lpam_misc"]
239 [AC_CHECK_LIB(pam, pam_end,
240 [AC_CHECK_LIB(pam, misc_conv,
242 LIBPAM="-lpam -ldl"],
244 LIBPAM="-lpam -ldl -lpam_misc"]
246 ],AC_MSG_WARN([*** pam support will not be built ***]),
253 dnl -------------------------------
254 dnl Endian-ness check
255 dnl -------------------------------
258 dnl -------------------------------
259 dnl check the size in byte of the C
260 dnl -------------------------------
261 dnl AC_CHECK_SIZEOF(char)
262 dnl AC_CHECK_SIZEOF(int)
263 dnl AC_CHECK_SIZEOF(short)
264 dnl AC_CHECK_SIZEOF(long)
266 dnl ----------------------------
267 dnl check existance of functions
268 dnl ----------------------------
269 AC_CHECK_FUNCS(bcopy bzero strerror inet_aton daemon snprintf vsnprintf strlcat strlcpy if_nametoindex if_indextoname getifaddrs)
270 AC_CHECK_FUNCS(setproctitle, ,[AC_CHECK_LIB(util, setproctitle, [LIBS="$LIBS -lutil"; AC_DEFINE(HAVE_SETPROCTITLE)])])
272 dnl ------------------------------------
273 dnl Determine routing get and set method
274 dnl ------------------------------------
275 AC_MSG_CHECKING(zebra between kernel interface method)
276 if test x"$opsys" = x"gnu-linux"; then
277 if test "${enable_netlink}" = "yes";then
278 AC_MSG_RESULT(netlink)
279 RT_METHOD=rt_netlink.o
280 AC_DEFINE(HAVE_NETLINK,,netlink)
282 elif test "${enable_netlink}" = "no"; then
287 AC_MSG_RESULT(netlink)
288 RT_METHOD=rt_netlink.o
289 AC_DEFINE(HAVE_NETLINK,,netlink)
293 if test "$opsys" = "sol2-6";then
294 AC_MSG_RESULT(solaris)
295 KERNEL_METHOD="kernel_socket.o"
296 RT_METHOD="rt_socket.o"
298 AC_TRY_RUN([#include <errno.h>
299 #include <sys/types.h>
300 #include <sys/socket.h>
306 ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
307 if (ac_sock < 0 && errno == EINVAL)
311 [KERNEL_METHOD=kernel_socket.o
312 RT_METHOD=rt_socket.o
313 AC_MSG_RESULT(socket)],
314 [RT_METHOD=rt_ioctl.o
315 AC_MSG_RESULT(ioctl)],
316 [KERNEL_METHOD=kernel_socket.o
317 RT_METHOD=rt_socket.o
318 AC_MSG_RESULT(socket)])
322 AC_SUBST(KERNEL_METHOD)
323 AC_SUBST(OTHER_METHOD)
325 dnl ------------------------------
326 dnl check kernel route read method
327 dnl ------------------------------
328 AC_CACHE_CHECK(route read method check, zebra_rtread,
329 [if test "$netlink" = yes; then
330 RTREAD_METHOD="rtread_netlink.o"
331 zebra_rtread="netlink"
333 for zebra_rtread in /proc/net/route /dev/ip /dev/null;
335 test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
337 case $zebra_rtread in
338 "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
339 zebra_rtread="proc";;
340 "/dev/ip") RTREAD_METHOD="rtread_getmsg.o"
341 zebra_rtread="getmsg";;
342 *) RTREAD_METHOD="rtread_sysctl.o"
343 zebra_rtread="sysctl";;
346 AC_SUBST(RTREAD_METHOD)
348 dnl -----------------------------
349 dnl check interface lookup method
350 dnl -----------------------------
351 AC_MSG_CHECKING(interface looking up method)
352 if test "$netlink" = yes; then
353 AC_MSG_RESULT(netlink)
354 IF_METHOD=if_netlink.o
356 if test "$opsys" = "sol2-6";then
357 AC_MSG_RESULT(solaris)
359 elif test "$opsys" = "openbsd";then
360 AC_MSG_RESULT(openbsd)
362 elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
363 AC_MSG_RESULT(sysctl)
364 IF_METHOD=if_sysctl.o
365 AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
373 dnl -----------------------
374 dnl check proc file system.
375 dnl -----------------------
376 if test -r /proc/net/dev; then
377 AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
381 if test -r /proc/net/if_inet6; then
382 AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
387 dnl -----------------------------
388 dnl check ipforward detect method
389 dnl -----------------------------
390 AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
391 [for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
393 test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
395 case $zebra_ipforward_path in
396 "/proc/net/snmp") IPFORWARD=ipforward_proc.o
397 zebra_ipforward_path="proc";;
400 *-nec-sysv4*) IPFORWARD=ipforward_ews.o
401 zebra_ipforward_path="ews";;
402 *) IPFORWARD=ipforward_solaris.o
403 zebra_ipforward_path="solaris";;
405 *) IPFORWARD=ipforward_sysctl.o
406 zebra_ipforward_path="sysctl";;
410 AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
415 AC_MSG_CHECKING(whether does this OS have IPv6 stack)
416 if test "${enable_ipv6}" = "no"; then
417 AC_MSG_RESULT(disabled)
422 if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
424 AC_DEFINE(HAVE_IPV6,,IPv6)
425 AC_DEFINE(INRIA_IPV6,,Inria IPv6)
429 AC_MSG_RESULT(INRIA IPv6)
434 if grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
436 AC_DEFINE(HAVE_IPV6,,IPv6)
437 AC_DEFINE(KAME,,KAME IPv6)
440 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
441 LIB_IPV6="-L/usr/local/v6/lib -linet6"
448 if grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
450 AC_DEFINE(HAVE_IPV6,,IPv6)
454 if test x"$opsys" = x"bsdi";then
455 AC_DEFINE(BSDI_NRL,,BSDI)
456 AC_MSG_RESULT(BSDI_NRL)
465 if test "${enable_ipv6}" = "yes"; then
467 #include <linux/version.h>
468 /* 2.1.128 or later */
469 #if LINUX_VERSION_CODE >= 0x020180
472 [zebra_cv_ipv6=yes; zebra_cv_linux_ipv6=yes;AC_MSG_RESULT(Linux IPv6)])
474 if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
477 zebra_cv_linux_ipv6=yes
478 AC_MSG_RESULT(Linux IPv6)
482 if test "$zebra_cv_linux_ipv6" = "yes";then
484 AC_MSG_CHECKING(for GNU libc 2.1)
486 #include <features.h>
487 #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
489 #endif], [glibc=yes; AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))
490 AC_DEFINE(LINUX_IPV6,,Linux IPv6)
493 if test "$glibc" != "yes"; then
494 INCLUDES="-I/usr/inet6/include"
495 if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
496 LIB_IPV6="-L/usr/inet6/lib -linet6"
501 dnl -----------------------
502 dnl Set IPv6 related values
503 dnl -----------------------
504 LIBS="$LIB_IPV6 $LIBS"
507 if test x"$RIPNGD" = x""; then
508 AC_MSG_RESULT(IPv4 only)
512 dnl --------------------
513 dnl Daemon disable check
514 dnl --------------------
515 if test "${enable_zebra}" = "no";then
521 if test "${enable_bgpd}" = "no";then
527 if test "${enable_ripd}" = "no";then
533 if test "${enable_ospfd}" = "no";then
539 if test "${enable_ospfclient}" = "no";then
542 OSPFCLIENT="ospfclient"
545 case "${enable_ripngd}" in
546 "yes") RIPNGD="ripngd";;
551 case "${enable_ospf6d}" in
552 "yes") OSPF6D="ospf6d";;
557 if test "${enable_bgp_announce}" = "no";then
558 AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
571 AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
572 AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
573 AC_CHECK_LIB(crypt, crypt)
574 AC_CHECK_LIB(resolv, res_init)
575 AC_CHECK_LIB(m, main)
577 dnl ---------------------------------------------------
578 dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
579 dnl ---------------------------------------------------
580 AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP))
581 AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON))
582 AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON))
584 dnl ---------------------------
585 dnl check system has GNU regexp
586 dnl ---------------------------
587 dnl AC_MSG_CHECKING(whether system has GNU regex)
588 AC_CHECK_LIB(c, regexec,
589 [AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
591 [LIB_REGEX="regex.o"])
594 dnl ------------------
595 dnl check SNMP library
596 dnl ------------------
597 if test "${enable_snmp}" = "yes";then
598 dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
600 LIBS="-L/usr/local/lib"
601 unset ac_cv_lib_snmp_asn_parse_int
602 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
603 if test "${HAVE_SNMP}" = ""; then
604 unset ac_cv_lib_snmp_asn_parse_int
605 AC_CHECK_LIB(crypto, main, [NEED_CRYPTO=yes ], )
606 if test "${NEED_CRYPTO}" = ""; then
607 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes ],)
609 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
614 if test "${HAVE_SNMP}" = ""; then
616 LIBS="-L/usr/local/lib"
617 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
620 if test "${HAVE_SNMP}" = ""; then
621 if test "${NEED_CRYPTO}" = ""; then
624 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ])
629 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
633 if test "${HAVE_SNMP}" = "yes"; then
634 for ac_snmp in /usr/include/net-snmp/library/asn1.h /usr/include/ucd-snmp/asn1.h /usr/local/include/ucd-snmp/asn1.h /dev/null
636 test -f "${ac_snmp}" && break
639 /usr/include/net-snmp/*)
640 AC_DEFINE(HAVE_SNMP,,SNMP)
641 AC_DEFINE(UCD_COMPATIBLE,,SNMP)
642 CFLAGS="${CFLAGS} -I/usr/include/net-snmp -I/usr/include/net-snmp/library"
643 if test "${HAVE_NETSNMP}" = "yes"; then
644 AC_DEFINE(HAVE_NETSNMP,,SNMP)
645 LIBS="${LIBS} -lnetsnmp"
647 LIBS="${LIBS} -lsnmp"
650 /usr/include/ucd-snmp/*)
651 AC_DEFINE(HAVE_SNMP,,SNMP)
652 CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp"
653 LIBS="${LIBS} -lsnmp"
655 /usr/local/include/ucd-snmp/*)
656 AC_DEFINE(HAVE_SNMP,,SNMP)
657 CFLAGS="${CFLAGS} -I/usr/local/include/ucd-snmp"
658 LIBS="${LIBS} -L/usr/local/lib -lsnmp"
661 if test "${NEED_CRYPTO}" = "yes"; then
662 LIBS="${LIBS} -lcrypto"
667 dnl ----------------------------
668 dnl check sa_len of sockaddr
669 dnl ----------------------------
670 AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
671 AC_TRY_COMPILE([#include <sys/types.h>
672 #include <sys/socket.h>
673 ],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
675 AC_DEFINE(HAVE_SA_LEN,,sa_len)],
678 dnl ----------------------------
679 dnl check sin_len of sockaddr_in
680 dnl ----------------------------
681 AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
682 AC_TRY_COMPILE([#include <sys/types.h>
683 #include <netinet/in.h>
684 ],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
686 AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
689 dnl ----------------------------
690 dnl check sun_len of sockaddr_un
691 dnl ----------------------------
692 AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
693 AC_TRY_COMPILE([#include <sys/types.h>
695 ],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
697 AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
700 dnl -----------------------------------
701 dnl check sin6_scope_id of sockaddr_in6
702 dnl -----------------------------------
703 if test "$zebra_cv_ipv6" = yes; then
704 AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
705 AC_TRY_COMPILE([#include <sys/types.h>
706 #include <netinet/in.h>
707 ],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
709 AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
713 dnl ----------------------------
714 dnl check socklen_t exist or not
715 dnl ----------------------------
716 AC_MSG_CHECKING(whther socklen_t is defined)
717 AC_TRY_COMPILE([#include <sys/types.h>
718 #include <sys/socket.h>
719 #include <netinet/in.h>
722 AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
725 dnl ------------------------
726 dnl check struct sockaddr_dl
727 dnl ------------------------
728 AC_MSG_CHECKING(whether struct sockaddr_dl exist)
729 AC_EGREP_HEADER(sockaddr_dl,
732 AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
735 dnl --------------------------
736 dnl check structure ifaliasreq
737 dnl --------------------------
738 AC_MSG_CHECKING(whether struct ifaliasreq exist)
739 AC_EGREP_HEADER(ifaliasreq,
742 AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
745 dnl ----------------------------
746 dnl check structure in6_aliasreq
747 dnl ----------------------------
748 AC_MSG_CHECKING(whether struct if6_aliasreq exist)
749 AC_EGREP_HEADER(in6_aliasreq,
752 AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
755 dnl ---------------------------
756 dnl check structure rt_addrinfo
757 dnl ---------------------------
758 AC_MSG_CHECKING(whether struct rt_addrinfo exist)
759 AC_EGREP_HEADER(rt_addrinfo,
762 AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
765 dnl --------------------------
766 dnl check structure in_pktinfo
767 dnl --------------------------
768 AC_MSG_CHECKING(whether struct in_pktinfo exist)
769 AC_TRY_COMPILE([#include <netinet/in.h>
770 ],[struct in_pktinfo ac_x;],
772 AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
775 dnl --------------------------------------
776 dnl checking for getrusage struct and call
777 dnl --------------------------------------
778 AC_MSG_CHECKING(whether getrusage is available)
779 AC_TRY_COMPILE([#include <sys/resource.h>
780 ],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
782 AC_DEFINE(HAVE_RUSAGE,,rusage)],
788 file="${srcdir}/lib/version.h"
789 VERSION=`sed -ne 's/^#.*ZEBRA_VERSION.*\"\([^\"]*\)\"$/\1/p' $file`
792 dnl ------------------------------
793 dnl set paths for process id files
794 dnl ------------------------------
795 AC_CACHE_CHECK(pid file directory,ac_piddir,
796 [for ZEBRA_PID_DIR in /var/run dnl
801 test -d $ZEBRA_PID_DIR && break
803 ac_piddir=$ZEBRA_PID_DIR
804 if test $ZEBRA_PID_DIR = "/dev/null"; then
805 echo "PID DIRECTORY NOT FOUND!"
807 AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$ac_piddir/zebra.pid",zebra PID)
808 AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$ac_piddir/ripd.pid",ripd PID)
809 AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$ac_piddir/ripngd.pid",ripngd PID)
810 AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$ac_piddir/bgpd.pid",bgpd PID)
811 AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$ac_piddir/ospfd.pid",ospfd PID)
812 AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$ac_piddir/ospf6d.pid",ospf6d PID)
815 dnl ---------------------------
816 dnl Check htonl works correctly
817 dnl ---------------------------
818 AC_MSG_CHECKING(for working htonl)
819 AC_CACHE_VAL(ac_cv_htonl_works, [
820 AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
821 #include <sys/types.h>
826 #ifdef HAVE_NETINET_IN_H
827 #include <netinet/in.h>
830 ac_cv_htonl_works=yes,
831 ac_cv_htonl_works=no)])
832 AC_MSG_RESULT($ac_cv_htonl_works)
834 AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile ripngd/Makefile bgpd/Makefile ospfd/Makefile ospf6d/Makefile vtysh/Makefile doc/Makefile ospfclient/Makefile)
839 zebra version : ${VERSION}
840 host operationg system : ${host_os}
841 source code location : ${srcdir}
843 compiler flags : ${CFLAGS}
844 directory for pid files : ${ac_piddir}