blob: 290d8331961eba537aaee99c7c5997a33b63ad41 [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
161 AC_MSG_ERROR([--enable-vty-group requires a group as argument])
162fi
163if test "${enable_vty_group}" = ""; then
164 AC_MSG_ERROR([--enable-vty-group requires a group as argument])
165fi
166if test x"${enable_vty_group}" != x"no"; then
167 if test "${enable_vty_group}" != ""; then
168 AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
169 fi
170fi
171
paul7ea487b2003-03-17 02:05:07 +0000172changequote(, )dnl
173
174MULTIPATH_NUM=1
175
176case "${enable_multipath}" in
177 [0-9]|[1-9][0-9])
178 MULTIPATH_NUM="${enable_multipath}"
179 ;;
180 "")
181 ;;
182 *)
183 echo "Please specify digit to --enable-multipath ARG."
184 exit 1
185 ;;
186esac
187
188changequote([, ])dnl
189
190AC_SUBST(MULTIPATH_NUM)
191
192dnl -------------------
193dnl Check header files.
194dnl -------------------
195AC_STDC_HEADERS
paul595db7f2003-05-25 21:35:06 +0000196AC_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 +0000197
198dnl check some types
199AC_C_CONST
200dnl AC_TYPE_PID_T
201AC_TYPE_SIGNAL
202
203dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
204case "$host" in
205 *-sunos5.6* | *-solaris2.6*)
206 opsys=sol2-6
207 AC_DEFINE(SUNOS_5,,SunOS 5)
208 AC_CHECK_LIB(xnet, main)
209 CURSES=-lcurses
210 ;;
211 *-sunos5* | *-solaris2*)
212 AC_DEFINE(SUNOS_5,,SunOS 5)
213 AC_CHECK_LIB(socket, main)
214 AC_CHECK_LIB(nsl, main)
215 CURSES=-lcurses
216 ;;
217 *-linux-*)
218 opsys=gnu-linux
219 AC_DEFINE(GNU_LINUX,,GNU Linux)
220 ;;
221 *-nec-sysv4*)
222 AC_CHECK_LIB(nsl, gethostbyname)
223 AC_CHECK_LIB(socket, socket)
224 ;;
225 *-freebsd3.2)
226 AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
227 ;;
228 *-openbsd*)
229 opsys=openbsd
230 AC_DEFINE(OPEN_BSD,,OpenBSD)
231 ;;
232 *-bsdi*)
233 opsys=bsdi
234 OTHER_METHOD="mtu_kvm.o"
235 AC_CHECK_LIB(kvm, main)
236 ;;
237esac
238
239dnl ---------------------
240dnl Integrated VTY option
241dnl ---------------------
242case "${enable_vtysh}" in
243 "yes") VTYSH="vtysh";
244 AC_DEFINE(VTYSH,,VTY shell)
245 AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs))
246 AC_CHECK_LIB(readline, main)
247 if test $ac_cv_lib_readline_main = no; then
248 AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.])
249 fi
250 AC_CHECK_HEADER(readline/history.h)
251 if test $ac_cv_header_readline_history_h = no;then
252 AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
253 fi
paul3d3de8c2003-05-23 10:33:49 +0000254 AC_CHECK_LIB(readline, rl_completion_matches)
255 if test $ac_cv_lib_readline_rl_completion_matches = no; then
256 AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
257 fi
258 ;;
paul7ea487b2003-03-17 02:05:07 +0000259 "no" ) VTYSH="";;
260 * ) ;;
261esac
262
263dnl ----------
264dnl PAM module
265dnl ----------
266if test "$with_libpam" = "yes"; then
paul24cd4352003-05-06 12:16:27 +0000267 AC_CHECK_HEADER(security/pam_misc.h)
268 if test "$ac_cv_header_security_pam_misc_h" = yes; then
269 AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
270 AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
271 pam_conv_func="misc_conv"
paul24cd4352003-05-06 12:16:27 +0000272 fi
paul24cd4352003-05-06 12:16:27 +0000273 AC_CHECK_HEADER(security/openpam.h)
274 if test "$ac_cv_header_security_openpam_h" = yes; then
275 AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
276 AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
277 pam_conv_func="openpam_ttyconv"
paul24cd4352003-05-06 12:16:27 +0000278 fi
279 if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
280 AC_MSG_WARN([*** pam support will not be built ***])
281 with_libpam="no"
282 fi
283fi
284
285if test "$with_libpam" = "yes"; then
paul7ea487b2003-03-17 02:05:07 +0000286dnl took this test from proftpd's configure.in and suited to our needs
287dnl -------------------------------------------------------------------------
288dnl
289dnl This next check looks funky due to a linker problem with some versions
290dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
291dnl omitted requiring libdl linking information. PAM-0.72 or better ships
292dnl with RedHat 6.2 and Debian 2.2 or better.
293AC_CHECK_LIB(pam, pam_start,
paul24cd4352003-05-06 12:16:27 +0000294 [AC_CHECK_LIB(pam, $pam_conv_func,
paul7ea487b2003-03-17 02:05:07 +0000295 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
296 LIBPAM="-lpam"],
297 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
298 LIBPAM="-lpam -lpam_misc"]
299 )
300 ],
301
302 [AC_CHECK_LIB(pam, pam_end,
paul24cd4352003-05-06 12:16:27 +0000303 [AC_CHECK_LIB(pam, $pam_conv_func,
paula159ed92003-06-04 11:01:45 +0000304 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
paul7ea487b2003-03-17 02:05:07 +0000305 LIBPAM="-lpam -ldl"],
paula159ed92003-06-04 11:01:45 +0000306 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
paul7ea487b2003-03-17 02:05:07 +0000307 LIBPAM="-lpam -ldl -lpam_misc"]
308 )
309 ],AC_MSG_WARN([*** pam support will not be built ***]),
310 [-ldl])
311 ]
312)
313fi
314AC_SUBST(LIBPAM)
315
316dnl -------------------------------
317dnl Endian-ness check
318dnl -------------------------------
319AC_WORDS_BIGENDIAN
320
321dnl -------------------------------
322dnl check the size in byte of the C
323dnl -------------------------------
324dnl AC_CHECK_SIZEOF(char)
325dnl AC_CHECK_SIZEOF(int)
326dnl AC_CHECK_SIZEOF(short)
327dnl AC_CHECK_SIZEOF(long)
328
329dnl ----------------------------
330dnl check existance of functions
331dnl ----------------------------
332AC_CHECK_FUNCS(bcopy bzero strerror inet_aton daemon snprintf vsnprintf strlcat strlcpy if_nametoindex if_indextoname getifaddrs)
paula159ed92003-06-04 11:01:45 +0000333AC_CHECK_FUNCS(setproctitle, ,
334 [AC_CHECK_LIB(util, setproctitle,
335 [LIBS="$LIBS -lutil"
336 AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
337 ]
338 )
339 ]
340)
paul7ea487b2003-03-17 02:05:07 +0000341
342dnl ------------------------------------
343dnl Determine routing get and set method
344dnl ------------------------------------
345AC_MSG_CHECKING(zebra between kernel interface method)
346if test x"$opsys" = x"gnu-linux"; then
347 if test "${enable_netlink}" = "yes";then
348 AC_MSG_RESULT(netlink)
349 RT_METHOD=rt_netlink.o
350 AC_DEFINE(HAVE_NETLINK,,netlink)
351 netlink=yes
352 elif test "${enable_netlink}" = "no"; then
353 AC_MSG_RESULT(ioctl)
354 RT_METHOD=rt_ioctl.o
355 netlink=no
356 else
357 AC_MSG_RESULT(netlink)
358 RT_METHOD=rt_netlink.o
359 AC_DEFINE(HAVE_NETLINK,,netlink)
360 netlink=yes
361 fi
362else
363 if test "$opsys" = "sol2-6";then
364 AC_MSG_RESULT(solaris)
365 KERNEL_METHOD="kernel_socket.o"
366 RT_METHOD="rt_socket.o"
367 else
368 AC_TRY_RUN([#include <errno.h>
369#include <sys/types.h>
370#include <sys/socket.h>
371
372main ()
373{
374 int ac_sock;
375
376 ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
377 if (ac_sock < 0 && errno == EINVAL)
378 exit (1);
379 exit (0);
380}],
381 [KERNEL_METHOD=kernel_socket.o
382 RT_METHOD=rt_socket.o
383 AC_MSG_RESULT(socket)],
384 [RT_METHOD=rt_ioctl.o
385 AC_MSG_RESULT(ioctl)],
386 [KERNEL_METHOD=kernel_socket.o
387 RT_METHOD=rt_socket.o
388 AC_MSG_RESULT(socket)])
389 fi
390fi
391AC_SUBST(RT_METHOD)
392AC_SUBST(KERNEL_METHOD)
393AC_SUBST(OTHER_METHOD)
394
395dnl ------------------------------
396dnl check kernel route read method
397dnl ------------------------------
398AC_CACHE_CHECK(route read method check, zebra_rtread,
399[if test "$netlink" = yes; then
400 RTREAD_METHOD="rtread_netlink.o"
401 zebra_rtread="netlink"
402else
403for zebra_rtread in /proc/net/route /dev/ip /dev/null;
404do
405 test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
406done
407case $zebra_rtread in
408 "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
409 zebra_rtread="proc";;
410 "/dev/ip") RTREAD_METHOD="rtread_getmsg.o"
411 zebra_rtread="getmsg";;
412 *) RTREAD_METHOD="rtread_sysctl.o"
413 zebra_rtread="sysctl";;
414esac
415fi])
416AC_SUBST(RTREAD_METHOD)
417
418dnl -----------------------------
419dnl check interface lookup method
420dnl -----------------------------
421AC_MSG_CHECKING(interface looking up method)
422if test "$netlink" = yes; then
423 AC_MSG_RESULT(netlink)
424 IF_METHOD=if_netlink.o
425else
426 if test "$opsys" = "sol2-6";then
427 AC_MSG_RESULT(solaris)
428 IF_METHOD=if_ioctl.o
429 elif test "$opsys" = "openbsd";then
430 AC_MSG_RESULT(openbsd)
431 IF_METHOD=if_ioctl.o
432 elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
433 AC_MSG_RESULT(sysctl)
434 IF_METHOD=if_sysctl.o
435 AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
436 else
437 AC_MSG_RESULT(ioctl)
438 IF_METHOD=if_ioctl.o
439 fi
440fi
441AC_SUBST(IF_METHOD)
442
443dnl -----------------------
444dnl check proc file system.
445dnl -----------------------
446if test -r /proc/net/dev; then
447 AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
448 IF_PROC=if_proc.o
449fi
450
451if test -r /proc/net/if_inet6; then
452 AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
453 IF_PROC=if_proc.o
454fi
455AC_SUBST(IF_PROC)
456
457dnl -----------------------------
458dnl check ipforward detect method
459dnl -----------------------------
460AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
461[for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
462do
463 test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
464done
465case $zebra_ipforward_path in
466 "/proc/net/snmp") IPFORWARD=ipforward_proc.o
467 zebra_ipforward_path="proc";;
468 "/dev/ip")
469 case "$host" in
470 *-nec-sysv4*) IPFORWARD=ipforward_ews.o
471 zebra_ipforward_path="ews";;
472 *) IPFORWARD=ipforward_solaris.o
473 zebra_ipforward_path="solaris";;
474 esac;;
475 *) IPFORWARD=ipforward_sysctl.o
476 zebra_ipforward_path="sysctl";;
477esac])
478AC_SUBST(IPFORWARD)
479
480AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
481
482dnl ----------
483dnl IPv6 check
484dnl ----------
485AC_MSG_CHECKING(whether does this OS have IPv6 stack)
486if test "${enable_ipv6}" = "no"; then
487 AC_MSG_RESULT(disabled)
488else
489dnl ----------
490dnl INRIA IPv6
491dnl ----------
paula159ed92003-06-04 11:01:45 +0000492 if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
493 zebra_cv_ipv6=yes
494 AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
495 AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
496 RIPNGD="ripngd"
497 OSPF6D="ospf6d"
498 LIB_IPV6=""
499 AC_MSG_RESULT(INRIA IPv6)
paul7ea487b2003-03-17 02:05:07 +0000500dnl ---------
501dnl KAME IPv6
502dnl ---------
paula159ed92003-06-04 11:01:45 +0000503 elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
504 zebra_cv_ipv6=yes
505 AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
506 AC_DEFINE(KAME,1,KAME IPv6)
507 RIPNGD="ripngd"
508 OSPF6D="ospf6d"
509 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
paul7ea487b2003-03-17 02:05:07 +0000510 LIB_IPV6="-L/usr/local/v6/lib -linet6"
paula159ed92003-06-04 11:01:45 +0000511 fi
512 AC_MSG_RESULT(KAME)
hasso71c0fb52003-05-25 20:18:13 +0000513dnl -------------------------
514dnl MUSICA IPv6
515dnl default host check
516dnl It is not used by Kheops
517dnl -------------------------
paula159ed92003-06-04 11:01:45 +0000518 elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
519 zebra_cv_ipv6=yes
520 AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
521 AC_DEFINE(MUSICA,1,Musica IPv6 stack)
522 AC_DEFINE(KAME,1,KAME IPv6 stack)
523 RIPNGD="ripngd"
524 OSPF6D="ospf6d"
525 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
hasso71c0fb52003-05-25 20:18:13 +0000526 LIB_IPV6="-L/usr/local/v6/lib -linet6"
paula159ed92003-06-04 11:01:45 +0000527 fi
528 AC_MSG_RESULT(MUSICA)
paul7ea487b2003-03-17 02:05:07 +0000529dnl ---------
530dnl NRL check
531dnl ---------
paula159ed92003-06-04 11:01:45 +0000532 elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
533 zebra_cv_ipv6=yes
534 AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
535 AC_DEFINE(NRL,1,NRL)
536 RIPNGD="ripngd"
537 OSPF6D="ospf6d"
538 if test x"$opsys" = x"bsdi";then
paul7ea487b2003-03-17 02:05:07 +0000539 AC_DEFINE(BSDI_NRL,,BSDI)
540 AC_MSG_RESULT(BSDI_NRL)
paula159ed92003-06-04 11:01:45 +0000541 else
paul7ea487b2003-03-17 02:05:07 +0000542 AC_MSG_RESULT(NRL)
paula159ed92003-06-04 11:01:45 +0000543 fi
paul7ea487b2003-03-17 02:05:07 +0000544dnl ----------
545dnl Linux IPv6
546dnl ----------
paula159ed92003-06-04 11:01:45 +0000547 elif test "${enable_ipv6}" = "yes"; then
548 AC_EGREP_CPP(yes, [
549 #include <linux/version.h>
550 /* 2.1.128 or later */
551 #if LINUX_VERSION_CODE >= 0x020180
552 yes
553 #endif],
554 [zebra_cv_ipv6=yes
555 zebra_cv_linux_ipv6=yes
556 AC_MSG_RESULT(Linux IPv6)])
557 else
558 if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
559 then
paul7ea487b2003-03-17 02:05:07 +0000560 zebra_cv_ipv6=yes
561 zebra_cv_linux_ipv6=yes
562 AC_MSG_RESULT(Linux IPv6)
paula159ed92003-06-04 11:01:45 +0000563 fi
564 fi
paul7ea487b2003-03-17 02:05:07 +0000565
paula159ed92003-06-04 11:01:45 +0000566 if test "$zebra_cv_linux_ipv6" = "yes";then
567 AC_MSG_CHECKING(for GNU libc >= 2.1)
568 AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
569 AC_EGREP_CPP(yes, [
paul7ea487b2003-03-17 02:05:07 +0000570#include <features.h>
571#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
572 yes
paula159ed92003-06-04 11:01:45 +0000573#endif],
574 [glibc=yes
575 AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
576 AC_MSG_RESULT(yes)],
577 AC_MSG_RESULT(no)
578 )
579 RIPNGD="ripngd"
580 OSPF6D="ospf6d"
581 if test "$glibc" != "yes"; then
paul7ea487b2003-03-17 02:05:07 +0000582 INCLUDES="-I/usr/inet6/include"
583 if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
584 LIB_IPV6="-L/usr/inet6/lib -linet6"
585 fi
paula159ed92003-06-04 11:01:45 +0000586 fi
587 fi
paul7ea487b2003-03-17 02:05:07 +0000588
589dnl -----------------------
590dnl Set IPv6 related values
591dnl -----------------------
paula159ed92003-06-04 11:01:45 +0000592 LIBS="$LIB_IPV6 $LIBS"
593 AC_SUBST(LIB_IPV6)
paul7ea487b2003-03-17 02:05:07 +0000594
paula159ed92003-06-04 11:01:45 +0000595 if test x"$RIPNGD" = x""; then
596 AC_MSG_RESULT(IPv4 only)
597 fi
paul7ea487b2003-03-17 02:05:07 +0000598fi
599
600dnl --------------------
601dnl Daemon disable check
602dnl --------------------
603if test "${enable_zebra}" = "no";then
604 ZEBRA=""
605else
606 ZEBRA="zebra"
607fi
608
609if test "${enable_bgpd}" = "no";then
610 BGPD=""
611else
612 BGPD="bgpd"
613fi
614
615if test "${enable_ripd}" = "no";then
616 RIPD=""
617else
618 RIPD="ripd"
619fi
620
621if test "${enable_ospfd}" = "no";then
622 OSPFD=""
623else
624 OSPFD="ospfd"
625fi
626
paul1ef74ef2003-03-21 15:16:05 +0000627OSPFCLIENT=""
628if test "${enable_opaque_lsa}" = "yes"; then
629 if test "${enable_ospfapi}" != "no";then
paul9a569842003-03-28 01:45:13 +0000630 AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
paul1ef74ef2003-03-21 15:16:05 +0000631
632 if test "${enable_ospfclient}" != "no";then
633 OSPFCLIENT="ospfclient"
634 fi
635 fi
636
paul7ea487b2003-03-17 02:05:07 +0000637fi
638
639case "${enable_ripngd}" in
640 "yes") RIPNGD="ripngd";;
641 "no" ) RIPNGD="";;
642 * ) ;;
643esac
644
645case "${enable_ospf6d}" in
646 "yes") OSPF6D="ospf6d";;
647 "no" ) OSPF6D="";;
648 * ) ;;
649esac
650
651if test "${enable_bgp_announce}" = "no";then
652 AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
653fi
654
655AC_SUBST(ZEBRA)
656AC_SUBST(BGPD)
657AC_SUBST(RIPD)
658AC_SUBST(RIPNGD)
659AC_SUBST(OSPFD)
660AC_SUBST(OSPF6D)
661AC_SUBST(VTYSH)
662AC_SUBST(INCLUDES)
663AC_SUBST(CURSES)
664AC_SUBST(OSPFCLIENT)
paul1ef74ef2003-03-21 15:16:05 +0000665AC_SUBST(OSPFAPI)
paul7ea487b2003-03-17 02:05:07 +0000666AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
667AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
668AC_CHECK_LIB(crypt, crypt)
669AC_CHECK_LIB(resolv, res_init)
670AC_CHECK_LIB(m, main)
671
672dnl ---------------------------------------------------
673dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
674dnl ---------------------------------------------------
paula159ed92003-06-04 11:01:45 +0000675AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
676AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
677AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
paul7ea487b2003-03-17 02:05:07 +0000678
679dnl ---------------------------
680dnl check system has GNU regexp
681dnl ---------------------------
682dnl AC_MSG_CHECKING(whether system has GNU regex)
683AC_CHECK_LIB(c, regexec,
684[AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
685 LIB_REGEX=""],
686[LIB_REGEX="regex.o"])
687AC_SUBST(LIB_REGEX)
688
689dnl ------------------
690dnl check SNMP library
691dnl ------------------
692if test "${enable_snmp}" = "yes";then
693dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
paul7ea487b2003-03-17 02:05:07 +0000694 if test "${HAVE_SNMP}" = ""; then
paul1ef74ef2003-03-21 15:16:05 +0000695 old_libs="${LIBS}"
696 LIBS="-L/usr/lib"
paul7ea487b2003-03-17 02:05:07 +0000697 unset ac_cv_lib_snmp_asn_parse_int
paul1ef74ef2003-03-21 15:16:05 +0000698 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
699 if test "${NEED_CRYPTO}" = ""; then
700 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ])
701 else
702 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
703 fi
704 LIBS="${old_libs}"
paul7ea487b2003-03-17 02:05:07 +0000705 fi
paul1ef74ef2003-03-21 15:16:05 +0000706 if test "${HAVE_SNMP}" = ""; then
707 old_libs="${LIBS}"
708 LIBS="-L/usr/lib"
709 unset ac_cv_lib_snmp_asn_parse_int
710 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
711 if test "${HAVE_SNMP}" = ""; then
712 unset ac_cv_lib_snmp_asn_parse_int
713 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
714 if test "${NEED_CRYPTO}" = "yes"; then
715 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
716 fi
717 fi
718 LIBS="${old_libs}"
719 fi
paul7ea487b2003-03-17 02:05:07 +0000720
721 if test "${HAVE_SNMP}" = ""; then
paul1ef74ef2003-03-21 15:16:05 +0000722 old_libs="${LIBS}"
723 LIBS="-L/usr/local/lib"
724 unset ac_cv_lib_snmp_asn_parse_int
725 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
726 if test "${HAVE_SNMP}" = ""; then
727 unset ac_cv_lib_snmp_asn_parse_int
728 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
729 if test "${NEED_CRYPTO}" = "yes"; then
730 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
731 fi
732 fi
733 LIBS="${old_libs}"
paul7ea487b2003-03-17 02:05:07 +0000734 fi
paul1ef74ef2003-03-21 15:16:05 +0000735
paul7ea487b2003-03-17 02:05:07 +0000736 if test "${HAVE_SNMP}" = "yes"; then
737 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
738 do
739 test -f "${ac_snmp}" && break
740 done
paul1ef74ef2003-03-21 15:16:05 +0000741
paul7ea487b2003-03-17 02:05:07 +0000742 case ${ac_snmp} in
743 /usr/include/net-snmp/*)
744 AC_DEFINE(HAVE_SNMP,,SNMP)
paul1ef74ef2003-03-21 15:16:05 +0000745 AC_DEFINE(HAVE_NETSNMP,,SNMP)
paul7ea487b2003-03-17 02:05:07 +0000746 AC_DEFINE(UCD_COMPATIBLE,,SNMP)
paulac7c4bb2003-03-19 04:25:08 +0000747 CFLAGS="${CFLAGS} -I/usr/include/net-snmp -I/usr/include/net-snmp/library"
748 if test "${HAVE_NETSNMP}" = "yes"; then
paul1ef74ef2003-03-21 15:16:05 +0000749 LIBS="${LIBS} -lnetsnmp"
paulac7c4bb2003-03-19 04:25:08 +0000750 else
paul1ef74ef2003-03-21 15:16:05 +0000751 LIBS="${LIBS} -lsnmp"
paulac7c4bb2003-03-19 04:25:08 +0000752 fi
paul7ea487b2003-03-17 02:05:07 +0000753 ;;
754 /usr/include/ucd-snmp/*)
755 AC_DEFINE(HAVE_SNMP,,SNMP)
756 CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp"
757 LIBS="${LIBS} -lsnmp"
758 ;;
759 /usr/local/include/ucd-snmp/*)
760 AC_DEFINE(HAVE_SNMP,,SNMP)
761 CFLAGS="${CFLAGS} -I/usr/local/include/ucd-snmp"
762 LIBS="${LIBS} -L/usr/local/lib -lsnmp"
763 ;;
764 esac
765 if test "${NEED_CRYPTO}" = "yes"; then
766 LIBS="${LIBS} -lcrypto"
767 fi
768 fi
769fi
770
771dnl ----------------------------
772dnl check sa_len of sockaddr
773dnl ----------------------------
774AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
775AC_TRY_COMPILE([#include <sys/types.h>
776#include <sys/socket.h>
777],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
778[AC_MSG_RESULT(yes)
779 AC_DEFINE(HAVE_SA_LEN,,sa_len)],
780 AC_MSG_RESULT(no))
781
782dnl ----------------------------
783dnl check sin_len of sockaddr_in
784dnl ----------------------------
785AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
786AC_TRY_COMPILE([#include <sys/types.h>
787#include <netinet/in.h>
788],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
789[AC_MSG_RESULT(yes)
790 AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
791 AC_MSG_RESULT(no))
792
793dnl ----------------------------
794dnl check sun_len of sockaddr_un
795dnl ----------------------------
796AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
797AC_TRY_COMPILE([#include <sys/types.h>
798#include <sys/un.h>
799],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
800[AC_MSG_RESULT(yes)
801 AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
802 AC_MSG_RESULT(no))
803
804dnl -----------------------------------
805dnl check sin6_scope_id of sockaddr_in6
806dnl -----------------------------------
807if test "$zebra_cv_ipv6" = yes; then
808 AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
809 AC_TRY_COMPILE([#include <sys/types.h>
810#include <netinet/in.h>
811],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
812[AC_MSG_RESULT(yes)
813 AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
814 AC_MSG_RESULT(no))
815fi
816
817dnl ----------------------------
818dnl check socklen_t exist or not
819dnl ----------------------------
820AC_MSG_CHECKING(whther socklen_t is defined)
821AC_TRY_COMPILE([#include <sys/types.h>
822#include <sys/socket.h>
823#include <netinet/in.h>
824],[socklen_t ac_x;],
825[AC_MSG_RESULT(yes)
826 AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
827 AC_MSG_RESULT(no))
828
829dnl ------------------------
830dnl check struct sockaddr_dl
831dnl ------------------------
832AC_MSG_CHECKING(whether struct sockaddr_dl exist)
833AC_EGREP_HEADER(sockaddr_dl,
834net/if_dl.h,
835[AC_MSG_RESULT(yes)
836 AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
837 AC_MSG_RESULT(no))
838
839dnl --------------------------
840dnl check structure ifaliasreq
841dnl --------------------------
842AC_MSG_CHECKING(whether struct ifaliasreq exist)
843AC_EGREP_HEADER(ifaliasreq,
844net/if.h,
845[AC_MSG_RESULT(yes)
846 AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
847 AC_MSG_RESULT(no))
848
849dnl ----------------------------
850dnl check structure in6_aliasreq
851dnl ----------------------------
hasso71c0fb52003-05-25 20:18:13 +0000852AC_MSG_CHECKING(whether struct in6_aliasreq exist)
paul7ea487b2003-03-17 02:05:07 +0000853AC_EGREP_HEADER(in6_aliasreq,
854netinet6/in6_var.h,
855[AC_MSG_RESULT(yes)
856 AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
857 AC_MSG_RESULT(no))
858
hasso71c0fb52003-05-25 20:18:13 +0000859dnl -----------------------------------
860dnl check ifra_lifetime of in6_aliasreq
861dnl -----------------------------------
862AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist)
863AC_TRY_COMPILE([#include <sys/types.h>
864#include <netinet6/in6_var.h>
865],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);],
866[AC_MSG_RESULT(yes)
paula159ed92003-06-04 11:01:45 +0000867 AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)],
hasso71c0fb52003-05-25 20:18:13 +0000868 AC_MSG_RESULT(no))
869
paul7ea487b2003-03-17 02:05:07 +0000870dnl ---------------------------
871dnl check structure rt_addrinfo
872dnl ---------------------------
873AC_MSG_CHECKING(whether struct rt_addrinfo exist)
874AC_EGREP_HEADER(rt_addrinfo,
875net/route.h,
876[AC_MSG_RESULT(yes)
877 AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
878 AC_MSG_RESULT(no))
879
880dnl --------------------------
881dnl check structure in_pktinfo
882dnl --------------------------
883AC_MSG_CHECKING(whether struct in_pktinfo exist)
884AC_TRY_COMPILE([#include <netinet/in.h>
885],[struct in_pktinfo ac_x;],
886[AC_MSG_RESULT(yes)
887 AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
888 AC_MSG_RESULT(no))
889
890dnl --------------------------------------
891dnl checking for getrusage struct and call
892dnl --------------------------------------
893AC_MSG_CHECKING(whether getrusage is available)
894AC_TRY_COMPILE([#include <sys/resource.h>
895],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
896[AC_MSG_RESULT(yes)
897 AC_DEFINE(HAVE_RUSAGE,,rusage)],
898 AC_MSG_RESULT(no))
899
pauledd7c242003-06-04 13:59:38 +0000900dnl -------------------
901dnl capabilities checks
902dnl -------------------
903AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
904AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
905 [AC_MSG_RESULT(yes)
906 AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
907 zebra_ac_keepcaps="yes"],
908 AC_MSG_RESULT(no)
909)
910if test x"${zebra_ac_keepcaps}" = x"yes"; then
911 AC_CHECK_HEADERS(sys/capability.h)
912fi
913if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
914 AC_CHECK_LIB(cap, cap_init,
915 [AC_DEFINE(HAVE_LCAPS,1,Capabilities)
916 LIBCAP="-lcap"
917 ]
918 )
919fi
920AC_SUBST(LIBCAP)
921
paulfb2d1502003-06-04 09:40:54 +0000922dnl ---------------------------
923dnl check for glibc 'backtrace'
924dnl ---------------------------
925if test "${glibc}" = "yes"; then
926 AC_CHECK_HEADER(execinfo.h)
927fi
928if test x"${ac_cv_header_execinfo_h}" = x"yes"; then
929 AC_CHECK_FUNC(backtrace,
930 [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)]
931 )
932fi
933
paul7ea487b2003-03-17 02:05:07 +0000934dnl -------------
935dnl check version
936dnl -------------
937file="${srcdir}/lib/version.h"
938VERSION=`sed -ne 's/^#.*ZEBRA_VERSION.*\"\([^\"]*\)\"$/\1/p' $file`
939AC_SUBST(VERSION)
940
paul408ad942003-05-20 00:03:33 +0000941dnl ----------
942dnl configure date
943dnl ----------
944CONFDATE=`date '+%Y%m%d'`
945AC_SUBST(CONFDATE)
946
paul7ea487b2003-03-17 02:05:07 +0000947dnl ------------------------------
paula159ed92003-06-04 11:01:45 +0000948dnl set paths for state directory
paul23bd12c2003-04-07 06:11:09 +0000949dnl ------------------------------
950if test "${prefix}" = "NONE"; then
paula159ed92003-06-04 11:01:45 +0000951 zebra_statedir_prefix="";
paul23bd12c2003-04-07 06:11:09 +0000952else
paula159ed92003-06-04 11:01:45 +0000953 zebra_statedir_prefix=${prefix}
paul23bd12c2003-04-07 06:11:09 +0000954fi
955if test "${localstatedir}" = '${prefix}/var'; then
paula159ed92003-06-04 11:01:45 +0000956 AC_CACHE_CHECK(state directory,ac_statedir,
957 [for ZEBRA_STATE_DIR in ${zebra_statedir_prefix}/var/run dnl
958 ${zebra_statedir_prefix}/var/adm dnl
959 ${zebra_statedir_prefix}/etc dnl
960 /var/run dnl
961 /var/adm dnl
962 /etc dnl
963 /dev/null;
paul23bd12c2003-04-07 06:11:09 +0000964 do
paula159ed92003-06-04 11:01:45 +0000965 test -d $ZEBRA_STATE_DIR && break
paul23bd12c2003-04-07 06:11:09 +0000966 done
paula159ed92003-06-04 11:01:45 +0000967 zebra_statedir=$ZEBRA_STATE_DIR])
paul23bd12c2003-04-07 06:11:09 +0000968else
paula159ed92003-06-04 11:01:45 +0000969 zebra_statedir=${localstatedir}
970 AC_MSG_CHECKING(directory to use for state file)
971 AC_MSG_RESULT(${zebra_statedir})
paul23bd12c2003-04-07 06:11:09 +0000972fi
paula159ed92003-06-04 11:01:45 +0000973if test $zebra_statedir = "/dev/null"; then
974 AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
975fi
976
977AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$zebra_statedir/zebra.pid",zebra PID)
978AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$zebra_statedir/ripd.pid",ripd PID)
979AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$zebra_statedir/ripngd.pid",ripngd PID)
980AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$zebra_statedir/bgpd.pid",bgpd PID)
981AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$zebra_statedir/ospfd.pid",ospfd PID)
982AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$zebra_statedir/ospf6d.pid",ospf6d PID)
983AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$zebra_statedir/zserv.api",zebra api socket)
984AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$zebra_statedir/zebra.vty",zebra vty socket)
985AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$zebra_statedir/ripd.vty",rip vty socket)
986AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$zebra_statedir/ripngd.vty",ripng vty socket)
987AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$zebra_statedir/bgpd.vty",bgpd vty socket)
988AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$zebra_statedir/ospfd.vty",ospfd vty socket)
989AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$zebra_statedir/ospf6d.vty",ospf6d vty socket)
paul7ea487b2003-03-17 02:05:07 +0000990
991dnl ---------------------------
992dnl Check htonl works correctly
993dnl ---------------------------
994AC_MSG_CHECKING(for working htonl)
995AC_CACHE_VAL(ac_cv_htonl_works, [
996AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
997#include <sys/types.h>
998#endif
999#ifdef HAVE_NETDB_H
1000#include <netdb.h>
1001#endif
1002#ifdef HAVE_NETINET_IN_H
1003#include <netinet/in.h>
1004#endif],
1005[htonl (0);],
1006ac_cv_htonl_works=yes,
1007ac_cv_htonl_works=no)])
1008AC_MSG_RESULT($ac_cv_htonl_works)
1009
paul6382b6f2003-05-20 00:17:45 +00001010AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile
1011 ripngd/Makefile bgpd/Makefile ospfd/Makefile
1012 ospf6d/Makefile vtysh/Makefile doc/Makefile
1013 ospfclient/Makefile
1014 redhat/zebra.spec)
paul7ea487b2003-03-17 02:05:07 +00001015
1016echo "
1017zebra configuration
1018-------------------
1019zebra version : ${VERSION}
1020host operationg system : ${host_os}
1021source code location : ${srcdir}
1022compiler : ${CC}
1023compiler flags : ${CFLAGS}
hasso71c0fb52003-05-25 20:18:13 +00001024linker flags : ${LDFLAGS} ${LIBS}
paula159ed92003-06-04 11:01:45 +00001025state file directory : ${zebra_statedir}
paul7ea487b2003-03-17 02:05:07 +00001026"