blob: 3f19601e8000d23626035eb8d614c451096b93f9 [file] [log] [blame]
paul7ea487b2003-03-17 02:05:07 +00001##
2## Configure template file for Zebra.
3## autoconf will generate configure script.
4##
5## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
6##
7AC_PREREQ(2.13)
8
9AC_INIT(lib/zebra.h)
10AM_INIT_AUTOMAKE(zebra, 0.94)
11AM_CONFIG_HEADER(config.h)
12
13dnl -----------------------------------
14dnl Get hostname and other information.
15dnl -----------------------------------
16AC_CANONICAL_HOST
17
18dnl ------------
19dnl Check CFLAGS
20dnl ------------
21AC_ARG_WITH(cflags,
22[ --with-cflags Set CFLAGS for use in compilation.])
23if test "x$with_cflags" != "x" ; then
24 CFLAGS="$with_cflags" ; cflags_specified=yes ;
25elif test -n "$CFLAGS" ; then
26 cflags_specified=yes ;
27fi
28
29dnl --------
30dnl Check CC
31dnl --------
32AC_PROG_CC
33
34dnl -----------------------------------------
35dnl If CLFAGS doesn\'t exist set default value
36dnl -----------------------------------------
37if test "x$cflags_specified" = "x" ; then
38 CFLAGS="$CFLAGS -Wall"
39fi
40
41dnl --------------
42dnl Check programs
43dnl --------------
44AC_PROG_CPP
45AC_PROG_INSTALL
46AC_PROG_MAKE_SET
47AC_CHECK_TOOL(AR, ar)
48AC_CHECK_TOOL(RANLIB, ranlib, :)
49
50dnl ---------
51dnl AIX check
52dnl ---------
53AC_AIX
54
55dnl ----------------------
56dnl Packages configuration
57dnl ----------------------
58AC_ARG_ENABLE(vtysh,
59[ --enable-vtysh, Make integrated VTY version of zebra])
60AC_ARG_ENABLE(ipv6,
61[ --disable-ipv6 turn off IPv6 related features and daemons])
62AC_ARG_ENABLE(zebra,
63[ --disable-zebra do not build zebra daemon])
64AC_ARG_ENABLE(bgpd,
65[ --disable-bgpd do not build bgpd])
66AC_ARG_ENABLE(ripd,
67[ --disable-ripd do not build ripd])
68AC_ARG_ENABLE(ripngd,
69[ --disable-ripngd do not build ripngd])
70AC_ARG_ENABLE(ospfd,
71[ --disable-ospfd do not build ospfd])
paul7ea487b2003-03-17 02:05:07 +000072AC_ARG_ENABLE(ospf6d,
73[ --disable-ospf6d do not build ospf6d])
74AC_ARG_ENABLE(bgp-announce,
75[ --disable-bgp-announce, turn off BGP route announcement])
76AC_ARG_ENABLE(netlink,
77[ --enable-netlink force to use Linux netlink interface])
78AC_ARG_ENABLE(broken-aliases,
79[ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
80AC_ARG_ENABLE(snmp,
81[ --enable-snmp enable SNMP support])
82AC_ARG_WITH(libpam,
83[ --with-libpam use libpam for PAM support in vtysh])
hasso71c0fb52003-05-25 20:18:13 +000084AC_ARG_ENABLE(tcp-zebra,
paul7ea487b2003-03-17 02:05:07 +000085[ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon])
86dnl Temporary option until OSPF NSSA implementation complete
87AC_ARG_ENABLE(nssa,
88[ --enable-nssa enable OSPF NSSA option])
89AC_ARG_ENABLE(opaque-lsa,
paul1ef74ef2003-03-21 15:16:05 +000090[ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)])
91AC_ARG_ENABLE(ospfapi,
92[ --disable-ospfapi do not build OSPFAPI to access the OSPF LSA Database,
93 (this is the default if --enable-opaque-lsa is not set)])
94AC_ARG_ENABLE(ospfclient,
95[ --disable-ospfclient do not build OSPFAPI client for OSPFAPI,
96 (this is the default if --disable-ospfapi is set)])
paul7ea487b2003-03-17 02:05:07 +000097AC_ARG_ENABLE(ospf-te,
98[ --enable-ospf-te enable Traffic Engineering Extension to OSPF])
99AC_ARG_ENABLE(multipath,
100[ --enable-multipath=ARG enable multipath function, ARG must be digit])
pauledd7c242003-06-04 13:59:38 +0000101AC_ARG_ENABLE(zebra_user,
102[ --enable-user=ARG user to run zebra suite as (default zebra)])
103AC_ARG_ENABLE(zebra_group,
104[ --enable-group=ARG group to run zebra suite as (default zebra)])
105AC_ARG_ENABLE(vty_group,
106[ --enable-vty-group=ARG set vty sockets to have specified group as owner])
107
hasso71c0fb52003-05-25 20:18:13 +0000108AC_ARG_ENABLE(rtadv,
pauledd7c242003-06-04 13:59:38 +0000109[ --enable-rtadv enable IPV6 router advertisement feature])
paul7ea487b2003-03-17 02:05:07 +0000110
111if test "${enable_broken_aliases}" = "yes"; then
112 if test "${enable_netlink}" = "yes"
113 then
114 echo "Sorry, you can't use netlink with broken aliases"
115 exit 1
116 fi
117 AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias)
118 enable_netlink=no
119fi
120
121if test "${enable_tcp_zebra}" = "yes"; then
122 AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
123fi
124
125if test "${enable_nssa}" = "yes"; then
126 AC_DEFINE(HAVE_NSSA,,OSPF NSSA)
127fi
128
129if test "${enable_opaque_lsa}" = "yes"; then
130 AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
131fi
132
133if test "${enable_ospf_te}" = "yes"; then
134 AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
135 AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
136fi
137
hasso71c0fb52003-05-25 20:18:13 +0000138AC_MSG_CHECKING(Should Zebra's RTADV be used)
paul2487bea2003-05-25 23:51:31 +0000139if test "${enable_rtadv}" = "yes"; then
hasso71c0fb52003-05-25 20:18:13 +0000140 AC_MSG_RESULT(yes)
paula159ed92003-06-04 11:01:45 +0000141 AC_DEFINE(HAVE_RTADV,,Enable Zebra IPv6 Routing Advertisements)
paul2487bea2003-05-25 23:51:31 +0000142else
143 AC_MSG_RESULT(no)
hasso71c0fb52003-05-25 20:18:13 +0000144fi
paul7ea487b2003-03-17 02:05:07 +0000145
pauledd7c242003-06-04 13:59:38 +0000146if test "${enable_user}" = "yes" ; then
147 enable_user="zebra"
148elif test "${enable_user}" = "no"; then
149 enable_user="root"
150fi
151AC_DEFINE_UNQUOTED(ZEBRA_USER, "${enable_user}", Zebra User)
152
153if test "${enable_group}" = "yes" ; then
154 enable_group="zebra"
155elif test "${enable_group}" = "no"; then
156 enable_group="root"
157fi
158AC_DEFINE_UNQUOTED(ZEBRA_GROUP, "${enable_group}", Zebra Group)
159
160if test x"${enable_vty_group}" = x"yes" ; then
paul8d4aee52003-06-06 00:30:35 +0000161 AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes])
pauledd7c242003-06-04 13:59:38 +0000162fi
paul8d4aee52003-06-06 00:30:35 +0000163if test x"${enable_vty_group}" != x""; then
164 if test x"${enable_vty_group}" != x"no"; then
pauledd7c242003-06-04 13:59:38 +0000165 AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
166 fi
167fi
168
paul7ea487b2003-03-17 02:05:07 +0000169changequote(, )dnl
170
171MULTIPATH_NUM=1
172
173case "${enable_multipath}" in
174 [0-9]|[1-9][0-9])
175 MULTIPATH_NUM="${enable_multipath}"
176 ;;
177 "")
178 ;;
179 *)
180 echo "Please specify digit to --enable-multipath ARG."
181 exit 1
182 ;;
183esac
184
185changequote([, ])dnl
186
187AC_SUBST(MULTIPATH_NUM)
188
189dnl -------------------
190dnl Check header files.
191dnl -------------------
192AC_STDC_HEADERS
paul595db7f2003-05-25 21:35:06 +0000193AC_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 netinet6/in6_var.h netinet/in6.h inet/nd.h asm/types.h netinet/icmp6.h netinet6/nd6.h libutil.h)
paul7ea487b2003-03-17 02:05:07 +0000194
195dnl check some types
196AC_C_CONST
197dnl AC_TYPE_PID_T
198AC_TYPE_SIGNAL
199
200dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
201case "$host" in
202 *-sunos5.6* | *-solaris2.6*)
203 opsys=sol2-6
204 AC_DEFINE(SUNOS_5,,SunOS 5)
205 AC_CHECK_LIB(xnet, main)
206 CURSES=-lcurses
207 ;;
208 *-sunos5* | *-solaris2*)
209 AC_DEFINE(SUNOS_5,,SunOS 5)
210 AC_CHECK_LIB(socket, main)
211 AC_CHECK_LIB(nsl, main)
212 CURSES=-lcurses
213 ;;
214 *-linux-*)
215 opsys=gnu-linux
216 AC_DEFINE(GNU_LINUX,,GNU Linux)
217 ;;
218 *-nec-sysv4*)
219 AC_CHECK_LIB(nsl, gethostbyname)
220 AC_CHECK_LIB(socket, socket)
221 ;;
222 *-freebsd3.2)
223 AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
224 ;;
225 *-openbsd*)
226 opsys=openbsd
227 AC_DEFINE(OPEN_BSD,,OpenBSD)
228 ;;
229 *-bsdi*)
230 opsys=bsdi
231 OTHER_METHOD="mtu_kvm.o"
232 AC_CHECK_LIB(kvm, main)
233 ;;
234esac
235
236dnl ---------------------
237dnl Integrated VTY option
238dnl ---------------------
239case "${enable_vtysh}" in
240 "yes") VTYSH="vtysh";
241 AC_DEFINE(VTYSH,,VTY shell)
242 AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs))
243 AC_CHECK_LIB(readline, main)
244 if test $ac_cv_lib_readline_main = no; then
245 AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.])
246 fi
247 AC_CHECK_HEADER(readline/history.h)
248 if test $ac_cv_header_readline_history_h = no;then
249 AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
250 fi
paul3d3de8c2003-05-23 10:33:49 +0000251 AC_CHECK_LIB(readline, rl_completion_matches)
252 if test $ac_cv_lib_readline_rl_completion_matches = no; then
253 AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
254 fi
255 ;;
paul7ea487b2003-03-17 02:05:07 +0000256 "no" ) VTYSH="";;
257 * ) ;;
258esac
259
260dnl ----------
261dnl PAM module
262dnl ----------
263if test "$with_libpam" = "yes"; then
paul24cd4352003-05-06 12:16:27 +0000264 AC_CHECK_HEADER(security/pam_misc.h)
265 if test "$ac_cv_header_security_pam_misc_h" = yes; then
266 AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
267 AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
268 pam_conv_func="misc_conv"
paul24cd4352003-05-06 12:16:27 +0000269 fi
paul24cd4352003-05-06 12:16:27 +0000270 AC_CHECK_HEADER(security/openpam.h)
271 if test "$ac_cv_header_security_openpam_h" = yes; then
272 AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
273 AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
274 pam_conv_func="openpam_ttyconv"
paul24cd4352003-05-06 12:16:27 +0000275 fi
276 if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
277 AC_MSG_WARN([*** pam support will not be built ***])
278 with_libpam="no"
279 fi
280fi
281
282if test "$with_libpam" = "yes"; then
paul7ea487b2003-03-17 02:05:07 +0000283dnl took this test from proftpd's configure.in and suited to our needs
284dnl -------------------------------------------------------------------------
285dnl
286dnl This next check looks funky due to a linker problem with some versions
287dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
288dnl omitted requiring libdl linking information. PAM-0.72 or better ships
289dnl with RedHat 6.2 and Debian 2.2 or better.
290AC_CHECK_LIB(pam, pam_start,
paul24cd4352003-05-06 12:16:27 +0000291 [AC_CHECK_LIB(pam, $pam_conv_func,
paul7ea487b2003-03-17 02:05:07 +0000292 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
293 LIBPAM="-lpam"],
294 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
295 LIBPAM="-lpam -lpam_misc"]
296 )
297 ],
298
299 [AC_CHECK_LIB(pam, pam_end,
paul24cd4352003-05-06 12:16:27 +0000300 [AC_CHECK_LIB(pam, $pam_conv_func,
paula159ed92003-06-04 11:01:45 +0000301 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
paul7ea487b2003-03-17 02:05:07 +0000302 LIBPAM="-lpam -ldl"],
paula159ed92003-06-04 11:01:45 +0000303 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
paul7ea487b2003-03-17 02:05:07 +0000304 LIBPAM="-lpam -ldl -lpam_misc"]
305 )
306 ],AC_MSG_WARN([*** pam support will not be built ***]),
307 [-ldl])
308 ]
309)
310fi
311AC_SUBST(LIBPAM)
312
313dnl -------------------------------
314dnl Endian-ness check
315dnl -------------------------------
316AC_WORDS_BIGENDIAN
317
318dnl -------------------------------
319dnl check the size in byte of the C
320dnl -------------------------------
321dnl AC_CHECK_SIZEOF(char)
322dnl AC_CHECK_SIZEOF(int)
323dnl AC_CHECK_SIZEOF(short)
324dnl AC_CHECK_SIZEOF(long)
325
326dnl ----------------------------
327dnl check existance of functions
328dnl ----------------------------
329AC_CHECK_FUNCS(bcopy bzero strerror inet_aton daemon snprintf vsnprintf strlcat strlcpy if_nametoindex if_indextoname getifaddrs)
paula159ed92003-06-04 11:01:45 +0000330AC_CHECK_FUNCS(setproctitle, ,
331 [AC_CHECK_LIB(util, setproctitle,
332 [LIBS="$LIBS -lutil"
333 AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
334 ]
335 )
336 ]
337)
paul7ea487b2003-03-17 02:05:07 +0000338
339dnl ------------------------------------
340dnl Determine routing get and set method
341dnl ------------------------------------
342AC_MSG_CHECKING(zebra between kernel interface method)
343if test x"$opsys" = x"gnu-linux"; then
344 if test "${enable_netlink}" = "yes";then
345 AC_MSG_RESULT(netlink)
346 RT_METHOD=rt_netlink.o
347 AC_DEFINE(HAVE_NETLINK,,netlink)
348 netlink=yes
349 elif test "${enable_netlink}" = "no"; then
350 AC_MSG_RESULT(ioctl)
351 RT_METHOD=rt_ioctl.o
352 netlink=no
353 else
354 AC_MSG_RESULT(netlink)
355 RT_METHOD=rt_netlink.o
356 AC_DEFINE(HAVE_NETLINK,,netlink)
357 netlink=yes
358 fi
359else
360 if test "$opsys" = "sol2-6";then
361 AC_MSG_RESULT(solaris)
362 KERNEL_METHOD="kernel_socket.o"
363 RT_METHOD="rt_socket.o"
364 else
365 AC_TRY_RUN([#include <errno.h>
366#include <sys/types.h>
367#include <sys/socket.h>
368
369main ()
370{
371 int ac_sock;
372
373 ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
374 if (ac_sock < 0 && errno == EINVAL)
375 exit (1);
376 exit (0);
377}],
378 [KERNEL_METHOD=kernel_socket.o
379 RT_METHOD=rt_socket.o
380 AC_MSG_RESULT(socket)],
381 [RT_METHOD=rt_ioctl.o
382 AC_MSG_RESULT(ioctl)],
383 [KERNEL_METHOD=kernel_socket.o
384 RT_METHOD=rt_socket.o
385 AC_MSG_RESULT(socket)])
386 fi
387fi
388AC_SUBST(RT_METHOD)
389AC_SUBST(KERNEL_METHOD)
390AC_SUBST(OTHER_METHOD)
391
392dnl ------------------------------
393dnl check kernel route read method
394dnl ------------------------------
395AC_CACHE_CHECK(route read method check, zebra_rtread,
396[if test "$netlink" = yes; then
397 RTREAD_METHOD="rtread_netlink.o"
398 zebra_rtread="netlink"
399else
400for zebra_rtread in /proc/net/route /dev/ip /dev/null;
401do
402 test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
403done
404case $zebra_rtread in
405 "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
406 zebra_rtread="proc";;
407 "/dev/ip") RTREAD_METHOD="rtread_getmsg.o"
408 zebra_rtread="getmsg";;
409 *) RTREAD_METHOD="rtread_sysctl.o"
410 zebra_rtread="sysctl";;
411esac
412fi])
413AC_SUBST(RTREAD_METHOD)
414
415dnl -----------------------------
416dnl check interface lookup method
417dnl -----------------------------
418AC_MSG_CHECKING(interface looking up method)
419if test "$netlink" = yes; then
420 AC_MSG_RESULT(netlink)
421 IF_METHOD=if_netlink.o
422else
423 if test "$opsys" = "sol2-6";then
424 AC_MSG_RESULT(solaris)
425 IF_METHOD=if_ioctl.o
426 elif test "$opsys" = "openbsd";then
427 AC_MSG_RESULT(openbsd)
428 IF_METHOD=if_ioctl.o
429 elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
430 AC_MSG_RESULT(sysctl)
431 IF_METHOD=if_sysctl.o
432 AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
433 else
434 AC_MSG_RESULT(ioctl)
435 IF_METHOD=if_ioctl.o
436 fi
437fi
438AC_SUBST(IF_METHOD)
439
440dnl -----------------------
441dnl check proc file system.
442dnl -----------------------
443if test -r /proc/net/dev; then
444 AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
445 IF_PROC=if_proc.o
446fi
447
448if test -r /proc/net/if_inet6; then
449 AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
450 IF_PROC=if_proc.o
451fi
452AC_SUBST(IF_PROC)
453
454dnl -----------------------------
455dnl check ipforward detect method
456dnl -----------------------------
457AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
458[for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
459do
460 test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
461done
462case $zebra_ipforward_path in
463 "/proc/net/snmp") IPFORWARD=ipforward_proc.o
464 zebra_ipforward_path="proc";;
465 "/dev/ip")
466 case "$host" in
467 *-nec-sysv4*) IPFORWARD=ipforward_ews.o
468 zebra_ipforward_path="ews";;
469 *) IPFORWARD=ipforward_solaris.o
470 zebra_ipforward_path="solaris";;
471 esac;;
472 *) IPFORWARD=ipforward_sysctl.o
473 zebra_ipforward_path="sysctl";;
474esac])
475AC_SUBST(IPFORWARD)
476
477AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
478
479dnl ----------
480dnl IPv6 check
481dnl ----------
482AC_MSG_CHECKING(whether does this OS have IPv6 stack)
483if test "${enable_ipv6}" = "no"; then
484 AC_MSG_RESULT(disabled)
485else
486dnl ----------
487dnl INRIA IPv6
488dnl ----------
paula159ed92003-06-04 11:01:45 +0000489 if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
490 zebra_cv_ipv6=yes
491 AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
492 AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
493 RIPNGD="ripngd"
494 OSPF6D="ospf6d"
495 LIB_IPV6=""
496 AC_MSG_RESULT(INRIA IPv6)
paul7ea487b2003-03-17 02:05:07 +0000497dnl ---------
498dnl KAME IPv6
499dnl ---------
paula159ed92003-06-04 11:01:45 +0000500 elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
501 zebra_cv_ipv6=yes
502 AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
503 AC_DEFINE(KAME,1,KAME IPv6)
504 RIPNGD="ripngd"
505 OSPF6D="ospf6d"
506 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
paul7ea487b2003-03-17 02:05:07 +0000507 LIB_IPV6="-L/usr/local/v6/lib -linet6"
paula159ed92003-06-04 11:01:45 +0000508 fi
509 AC_MSG_RESULT(KAME)
hasso71c0fb52003-05-25 20:18:13 +0000510dnl -------------------------
511dnl MUSICA IPv6
512dnl default host check
513dnl It is not used by Kheops
514dnl -------------------------
paula159ed92003-06-04 11:01:45 +0000515 elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
516 zebra_cv_ipv6=yes
517 AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
518 AC_DEFINE(MUSICA,1,Musica IPv6 stack)
519 AC_DEFINE(KAME,1,KAME IPv6 stack)
520 RIPNGD="ripngd"
521 OSPF6D="ospf6d"
522 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
hasso71c0fb52003-05-25 20:18:13 +0000523 LIB_IPV6="-L/usr/local/v6/lib -linet6"
paula159ed92003-06-04 11:01:45 +0000524 fi
525 AC_MSG_RESULT(MUSICA)
paul7ea487b2003-03-17 02:05:07 +0000526dnl ---------
527dnl NRL check
528dnl ---------
paula159ed92003-06-04 11:01:45 +0000529 elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
530 zebra_cv_ipv6=yes
531 AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
532 AC_DEFINE(NRL,1,NRL)
533 RIPNGD="ripngd"
534 OSPF6D="ospf6d"
535 if test x"$opsys" = x"bsdi";then
paul7ea487b2003-03-17 02:05:07 +0000536 AC_DEFINE(BSDI_NRL,,BSDI)
537 AC_MSG_RESULT(BSDI_NRL)
paula159ed92003-06-04 11:01:45 +0000538 else
paul7ea487b2003-03-17 02:05:07 +0000539 AC_MSG_RESULT(NRL)
paula159ed92003-06-04 11:01:45 +0000540 fi
paul7ea487b2003-03-17 02:05:07 +0000541dnl ----------
542dnl Linux IPv6
543dnl ----------
paula159ed92003-06-04 11:01:45 +0000544 elif test "${enable_ipv6}" = "yes"; then
545 AC_EGREP_CPP(yes, [
546 #include <linux/version.h>
547 /* 2.1.128 or later */
548 #if LINUX_VERSION_CODE >= 0x020180
549 yes
550 #endif],
551 [zebra_cv_ipv6=yes
552 zebra_cv_linux_ipv6=yes
553 AC_MSG_RESULT(Linux IPv6)])
554 else
555 if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
556 then
paul7ea487b2003-03-17 02:05:07 +0000557 zebra_cv_ipv6=yes
558 zebra_cv_linux_ipv6=yes
559 AC_MSG_RESULT(Linux IPv6)
paula159ed92003-06-04 11:01:45 +0000560 fi
561 fi
paul7ea487b2003-03-17 02:05:07 +0000562
paula159ed92003-06-04 11:01:45 +0000563 if test "$zebra_cv_linux_ipv6" = "yes";then
564 AC_MSG_CHECKING(for GNU libc >= 2.1)
565 AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
566 AC_EGREP_CPP(yes, [
paul7ea487b2003-03-17 02:05:07 +0000567#include <features.h>
568#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
569 yes
paula159ed92003-06-04 11:01:45 +0000570#endif],
571 [glibc=yes
572 AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
573 AC_MSG_RESULT(yes)],
574 AC_MSG_RESULT(no)
575 )
576 RIPNGD="ripngd"
577 OSPF6D="ospf6d"
578 if test "$glibc" != "yes"; then
paul7ea487b2003-03-17 02:05:07 +0000579 INCLUDES="-I/usr/inet6/include"
580 if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
581 LIB_IPV6="-L/usr/inet6/lib -linet6"
582 fi
paula159ed92003-06-04 11:01:45 +0000583 fi
584 fi
paul7ea487b2003-03-17 02:05:07 +0000585
586dnl -----------------------
587dnl Set IPv6 related values
588dnl -----------------------
paula159ed92003-06-04 11:01:45 +0000589 LIBS="$LIB_IPV6 $LIBS"
590 AC_SUBST(LIB_IPV6)
paul7ea487b2003-03-17 02:05:07 +0000591
paula159ed92003-06-04 11:01:45 +0000592 if test x"$RIPNGD" = x""; then
593 AC_MSG_RESULT(IPv4 only)
594 fi
paul7ea487b2003-03-17 02:05:07 +0000595fi
596
597dnl --------------------
598dnl Daemon disable check
599dnl --------------------
600if test "${enable_zebra}" = "no";then
601 ZEBRA=""
602else
603 ZEBRA="zebra"
604fi
605
606if test "${enable_bgpd}" = "no";then
607 BGPD=""
608else
609 BGPD="bgpd"
610fi
611
612if test "${enable_ripd}" = "no";then
613 RIPD=""
614else
615 RIPD="ripd"
616fi
617
618if test "${enable_ospfd}" = "no";then
619 OSPFD=""
620else
621 OSPFD="ospfd"
622fi
623
paul1ef74ef2003-03-21 15:16:05 +0000624OSPFCLIENT=""
625if test "${enable_opaque_lsa}" = "yes"; then
626 if test "${enable_ospfapi}" != "no";then
paul9a569842003-03-28 01:45:13 +0000627 AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
paul1ef74ef2003-03-21 15:16:05 +0000628
629 if test "${enable_ospfclient}" != "no";then
630 OSPFCLIENT="ospfclient"
631 fi
632 fi
633
paul7ea487b2003-03-17 02:05:07 +0000634fi
635
636case "${enable_ripngd}" in
637 "yes") RIPNGD="ripngd";;
638 "no" ) RIPNGD="";;
639 * ) ;;
640esac
641
642case "${enable_ospf6d}" in
643 "yes") OSPF6D="ospf6d";;
644 "no" ) OSPF6D="";;
645 * ) ;;
646esac
647
648if test "${enable_bgp_announce}" = "no";then
649 AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
650fi
651
652AC_SUBST(ZEBRA)
653AC_SUBST(BGPD)
654AC_SUBST(RIPD)
655AC_SUBST(RIPNGD)
656AC_SUBST(OSPFD)
657AC_SUBST(OSPF6D)
658AC_SUBST(VTYSH)
659AC_SUBST(INCLUDES)
660AC_SUBST(CURSES)
661AC_SUBST(OSPFCLIENT)
paul1ef74ef2003-03-21 15:16:05 +0000662AC_SUBST(OSPFAPI)
paul7ea487b2003-03-17 02:05:07 +0000663AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
664AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
665AC_CHECK_LIB(crypt, crypt)
666AC_CHECK_LIB(resolv, res_init)
667AC_CHECK_LIB(m, main)
668
669dnl ---------------------------------------------------
670dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
671dnl ---------------------------------------------------
paula159ed92003-06-04 11:01:45 +0000672AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
673AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
674AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
paul7ea487b2003-03-17 02:05:07 +0000675
676dnl ---------------------------
677dnl check system has GNU regexp
678dnl ---------------------------
679dnl AC_MSG_CHECKING(whether system has GNU regex)
680AC_CHECK_LIB(c, regexec,
681[AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
682 LIB_REGEX=""],
683[LIB_REGEX="regex.o"])
684AC_SUBST(LIB_REGEX)
685
686dnl ------------------
687dnl check SNMP library
688dnl ------------------
689if test "${enable_snmp}" = "yes";then
690dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
paul7ea487b2003-03-17 02:05:07 +0000691 if test "${HAVE_SNMP}" = ""; then
paul1ef74ef2003-03-21 15:16:05 +0000692 old_libs="${LIBS}"
693 LIBS="-L/usr/lib"
paul7ea487b2003-03-17 02:05:07 +0000694 unset ac_cv_lib_snmp_asn_parse_int
paul1ef74ef2003-03-21 15:16:05 +0000695 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
696 if test "${NEED_CRYPTO}" = ""; then
697 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ])
698 else
699 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
700 fi
701 LIBS="${old_libs}"
paul7ea487b2003-03-17 02:05:07 +0000702 fi
paul1ef74ef2003-03-21 15:16:05 +0000703 if test "${HAVE_SNMP}" = ""; then
704 old_libs="${LIBS}"
705 LIBS="-L/usr/lib"
706 unset ac_cv_lib_snmp_asn_parse_int
707 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
708 if test "${HAVE_SNMP}" = ""; then
709 unset ac_cv_lib_snmp_asn_parse_int
710 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
711 if test "${NEED_CRYPTO}" = "yes"; then
712 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
713 fi
714 fi
715 LIBS="${old_libs}"
716 fi
paul7ea487b2003-03-17 02:05:07 +0000717
718 if test "${HAVE_SNMP}" = ""; then
paul1ef74ef2003-03-21 15:16:05 +0000719 old_libs="${LIBS}"
720 LIBS="-L/usr/local/lib"
721 unset ac_cv_lib_snmp_asn_parse_int
722 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
723 if test "${HAVE_SNMP}" = ""; then
724 unset ac_cv_lib_snmp_asn_parse_int
725 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
726 if test "${NEED_CRYPTO}" = "yes"; then
727 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
728 fi
729 fi
730 LIBS="${old_libs}"
paul7ea487b2003-03-17 02:05:07 +0000731 fi
paul1ef74ef2003-03-21 15:16:05 +0000732
paul7ea487b2003-03-17 02:05:07 +0000733 if test "${HAVE_SNMP}" = "yes"; then
734 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
735 do
736 test -f "${ac_snmp}" && break
737 done
paul1ef74ef2003-03-21 15:16:05 +0000738
paul7ea487b2003-03-17 02:05:07 +0000739 case ${ac_snmp} in
740 /usr/include/net-snmp/*)
741 AC_DEFINE(HAVE_SNMP,,SNMP)
paul1ef74ef2003-03-21 15:16:05 +0000742 AC_DEFINE(HAVE_NETSNMP,,SNMP)
paul7ea487b2003-03-17 02:05:07 +0000743 AC_DEFINE(UCD_COMPATIBLE,,SNMP)
paulac7c4bb2003-03-19 04:25:08 +0000744 CFLAGS="${CFLAGS} -I/usr/include/net-snmp -I/usr/include/net-snmp/library"
745 if test "${HAVE_NETSNMP}" = "yes"; then
paul1ef74ef2003-03-21 15:16:05 +0000746 LIBS="${LIBS} -lnetsnmp"
paulac7c4bb2003-03-19 04:25:08 +0000747 else
paul1ef74ef2003-03-21 15:16:05 +0000748 LIBS="${LIBS} -lsnmp"
paulac7c4bb2003-03-19 04:25:08 +0000749 fi
paul7ea487b2003-03-17 02:05:07 +0000750 ;;
751 /usr/include/ucd-snmp/*)
752 AC_DEFINE(HAVE_SNMP,,SNMP)
753 CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp"
754 LIBS="${LIBS} -lsnmp"
755 ;;
756 /usr/local/include/ucd-snmp/*)
757 AC_DEFINE(HAVE_SNMP,,SNMP)
758 CFLAGS="${CFLAGS} -I/usr/local/include/ucd-snmp"
759 LIBS="${LIBS} -L/usr/local/lib -lsnmp"
760 ;;
761 esac
762 if test "${NEED_CRYPTO}" = "yes"; then
763 LIBS="${LIBS} -lcrypto"
764 fi
765 fi
766fi
767
768dnl ----------------------------
769dnl check sa_len of sockaddr
770dnl ----------------------------
771AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
772AC_TRY_COMPILE([#include <sys/types.h>
773#include <sys/socket.h>
774],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
775[AC_MSG_RESULT(yes)
776 AC_DEFINE(HAVE_SA_LEN,,sa_len)],
777 AC_MSG_RESULT(no))
778
779dnl ----------------------------
780dnl check sin_len of sockaddr_in
781dnl ----------------------------
782AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
783AC_TRY_COMPILE([#include <sys/types.h>
784#include <netinet/in.h>
785],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
786[AC_MSG_RESULT(yes)
787 AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
788 AC_MSG_RESULT(no))
789
790dnl ----------------------------
791dnl check sun_len of sockaddr_un
792dnl ----------------------------
793AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
794AC_TRY_COMPILE([#include <sys/types.h>
795#include <sys/un.h>
796],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
797[AC_MSG_RESULT(yes)
798 AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
799 AC_MSG_RESULT(no))
800
801dnl -----------------------------------
802dnl check sin6_scope_id of sockaddr_in6
803dnl -----------------------------------
804if test "$zebra_cv_ipv6" = yes; then
805 AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
806 AC_TRY_COMPILE([#include <sys/types.h>
807#include <netinet/in.h>
808],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
809[AC_MSG_RESULT(yes)
810 AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
811 AC_MSG_RESULT(no))
812fi
813
814dnl ----------------------------
815dnl check socklen_t exist or not
816dnl ----------------------------
817AC_MSG_CHECKING(whther socklen_t is defined)
818AC_TRY_COMPILE([#include <sys/types.h>
819#include <sys/socket.h>
820#include <netinet/in.h>
821],[socklen_t ac_x;],
822[AC_MSG_RESULT(yes)
823 AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
824 AC_MSG_RESULT(no))
825
826dnl ------------------------
827dnl check struct sockaddr_dl
828dnl ------------------------
829AC_MSG_CHECKING(whether struct sockaddr_dl exist)
830AC_EGREP_HEADER(sockaddr_dl,
831net/if_dl.h,
832[AC_MSG_RESULT(yes)
833 AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
834 AC_MSG_RESULT(no))
835
836dnl --------------------------
837dnl check structure ifaliasreq
838dnl --------------------------
839AC_MSG_CHECKING(whether struct ifaliasreq exist)
840AC_EGREP_HEADER(ifaliasreq,
841net/if.h,
842[AC_MSG_RESULT(yes)
843 AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
844 AC_MSG_RESULT(no))
845
846dnl ----------------------------
847dnl check structure in6_aliasreq
848dnl ----------------------------
hasso71c0fb52003-05-25 20:18:13 +0000849AC_MSG_CHECKING(whether struct in6_aliasreq exist)
paul7ea487b2003-03-17 02:05:07 +0000850AC_EGREP_HEADER(in6_aliasreq,
851netinet6/in6_var.h,
852[AC_MSG_RESULT(yes)
853 AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
854 AC_MSG_RESULT(no))
855
hasso71c0fb52003-05-25 20:18:13 +0000856dnl -----------------------------------
857dnl check ifra_lifetime of in6_aliasreq
858dnl -----------------------------------
859AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist)
860AC_TRY_COMPILE([#include <sys/types.h>
861#include <netinet6/in6_var.h>
862],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);],
863[AC_MSG_RESULT(yes)
paula159ed92003-06-04 11:01:45 +0000864 AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)],
hasso71c0fb52003-05-25 20:18:13 +0000865 AC_MSG_RESULT(no))
866
paul7ea487b2003-03-17 02:05:07 +0000867dnl ---------------------------
868dnl check structure rt_addrinfo
869dnl ---------------------------
870AC_MSG_CHECKING(whether struct rt_addrinfo exist)
871AC_EGREP_HEADER(rt_addrinfo,
872net/route.h,
873[AC_MSG_RESULT(yes)
874 AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
875 AC_MSG_RESULT(no))
876
877dnl --------------------------
878dnl check structure in_pktinfo
879dnl --------------------------
880AC_MSG_CHECKING(whether struct in_pktinfo exist)
881AC_TRY_COMPILE([#include <netinet/in.h>
882],[struct in_pktinfo ac_x;],
883[AC_MSG_RESULT(yes)
884 AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
885 AC_MSG_RESULT(no))
886
887dnl --------------------------------------
888dnl checking for getrusage struct and call
889dnl --------------------------------------
890AC_MSG_CHECKING(whether getrusage is available)
891AC_TRY_COMPILE([#include <sys/resource.h>
892],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
893[AC_MSG_RESULT(yes)
894 AC_DEFINE(HAVE_RUSAGE,,rusage)],
895 AC_MSG_RESULT(no))
896
pauledd7c242003-06-04 13:59:38 +0000897dnl -------------------
898dnl capabilities checks
899dnl -------------------
900AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
901AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
902 [AC_MSG_RESULT(yes)
903 AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
904 zebra_ac_keepcaps="yes"],
905 AC_MSG_RESULT(no)
906)
907if test x"${zebra_ac_keepcaps}" = x"yes"; then
908 AC_CHECK_HEADERS(sys/capability.h)
909fi
910if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
911 AC_CHECK_LIB(cap, cap_init,
912 [AC_DEFINE(HAVE_LCAPS,1,Capabilities)
913 LIBCAP="-lcap"
914 ]
915 )
916fi
917AC_SUBST(LIBCAP)
918
paulfb2d1502003-06-04 09:40:54 +0000919dnl ---------------------------
920dnl check for glibc 'backtrace'
921dnl ---------------------------
922if test "${glibc}" = "yes"; then
923 AC_CHECK_HEADER(execinfo.h)
924fi
925if test x"${ac_cv_header_execinfo_h}" = x"yes"; then
926 AC_CHECK_FUNC(backtrace,
927 [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)]
928 )
929fi
930
paul7ea487b2003-03-17 02:05:07 +0000931dnl -------------
932dnl check version
933dnl -------------
934file="${srcdir}/lib/version.h"
935VERSION=`sed -ne 's/^#.*ZEBRA_VERSION.*\"\([^\"]*\)\"$/\1/p' $file`
936AC_SUBST(VERSION)
937
paul408ad942003-05-20 00:03:33 +0000938dnl ----------
939dnl configure date
940dnl ----------
941CONFDATE=`date '+%Y%m%d'`
942AC_SUBST(CONFDATE)
943
paul7ea487b2003-03-17 02:05:07 +0000944dnl ------------------------------
paula159ed92003-06-04 11:01:45 +0000945dnl set paths for state directory
paul23bd12c2003-04-07 06:11:09 +0000946dnl ------------------------------
947if test "${prefix}" = "NONE"; then
paula159ed92003-06-04 11:01:45 +0000948 zebra_statedir_prefix="";
paul23bd12c2003-04-07 06:11:09 +0000949else
paula159ed92003-06-04 11:01:45 +0000950 zebra_statedir_prefix=${prefix}
paul23bd12c2003-04-07 06:11:09 +0000951fi
952if test "${localstatedir}" = '${prefix}/var'; then
paula159ed92003-06-04 11:01:45 +0000953 AC_CACHE_CHECK(state directory,ac_statedir,
954 [for ZEBRA_STATE_DIR in ${zebra_statedir_prefix}/var/run dnl
955 ${zebra_statedir_prefix}/var/adm dnl
956 ${zebra_statedir_prefix}/etc dnl
957 /var/run dnl
958 /var/adm dnl
959 /etc dnl
960 /dev/null;
paul23bd12c2003-04-07 06:11:09 +0000961 do
paula159ed92003-06-04 11:01:45 +0000962 test -d $ZEBRA_STATE_DIR && break
paul23bd12c2003-04-07 06:11:09 +0000963 done
paula159ed92003-06-04 11:01:45 +0000964 zebra_statedir=$ZEBRA_STATE_DIR])
paul23bd12c2003-04-07 06:11:09 +0000965else
paula159ed92003-06-04 11:01:45 +0000966 zebra_statedir=${localstatedir}
967 AC_MSG_CHECKING(directory to use for state file)
968 AC_MSG_RESULT(${zebra_statedir})
paul23bd12c2003-04-07 06:11:09 +0000969fi
paula159ed92003-06-04 11:01:45 +0000970if test $zebra_statedir = "/dev/null"; then
971 AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
972fi
973
974AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$zebra_statedir/zebra.pid",zebra PID)
975AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$zebra_statedir/ripd.pid",ripd PID)
976AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$zebra_statedir/ripngd.pid",ripngd PID)
977AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$zebra_statedir/bgpd.pid",bgpd PID)
978AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$zebra_statedir/ospfd.pid",ospfd PID)
979AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$zebra_statedir/ospf6d.pid",ospf6d PID)
980AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$zebra_statedir/zserv.api",zebra api socket)
981AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$zebra_statedir/zebra.vty",zebra vty socket)
982AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$zebra_statedir/ripd.vty",rip vty socket)
983AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$zebra_statedir/ripngd.vty",ripng vty socket)
984AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$zebra_statedir/bgpd.vty",bgpd vty socket)
985AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$zebra_statedir/ospfd.vty",ospfd vty socket)
986AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$zebra_statedir/ospf6d.vty",ospf6d vty socket)
paul7ea487b2003-03-17 02:05:07 +0000987
988dnl ---------------------------
989dnl Check htonl works correctly
990dnl ---------------------------
991AC_MSG_CHECKING(for working htonl)
992AC_CACHE_VAL(ac_cv_htonl_works, [
993AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
994#include <sys/types.h>
995#endif
996#ifdef HAVE_NETDB_H
997#include <netdb.h>
998#endif
999#ifdef HAVE_NETINET_IN_H
1000#include <netinet/in.h>
1001#endif],
1002[htonl (0);],
1003ac_cv_htonl_works=yes,
1004ac_cv_htonl_works=no)])
1005AC_MSG_RESULT($ac_cv_htonl_works)
1006
paul6382b6f2003-05-20 00:17:45 +00001007AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile
1008 ripngd/Makefile bgpd/Makefile ospfd/Makefile
1009 ospf6d/Makefile vtysh/Makefile doc/Makefile
1010 ospfclient/Makefile
1011 redhat/zebra.spec)
paul7ea487b2003-03-17 02:05:07 +00001012
1013echo "
1014zebra configuration
1015-------------------
1016zebra version : ${VERSION}
1017host operationg system : ${host_os}
1018source code location : ${srcdir}
1019compiler : ${CC}
1020compiler flags : ${CFLAGS}
hasso71c0fb52003-05-25 20:18:13 +00001021linker flags : ${LDFLAGS} ${LIBS}
paula159ed92003-06-04 11:01:45 +00001022state file directory : ${zebra_statedir}
paul8d4aee52003-06-06 00:30:35 +00001023user to run as : ${enable_user}
1024group to run as : ${enable_group}
1025group for vty sockets : ${enable_vty_group}
paul7ea487b2003-03-17 02:05:07 +00001026"