blob: 000729be2463a5ea882135fad1c46344797da08f [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
paul79cb2162003-06-06 12:19:53 +0000146if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
pauledd7c242003-06-04 13:59:38 +0000147 enable_user="zebra"
148elif test "${enable_user}" = "no"; then
149 enable_user="root"
150fi
151AC_DEFINE_UNQUOTED(ZEBRA_USER, "${enable_user}", Zebra User)
152
paul79cb2162003-06-06 12:19:53 +0000153if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
pauledd7c242003-06-04 13:59:38 +0000154 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])
paul79cb2162003-06-06 12:19:53 +0000162elif test x"${enable_vty_group}" != x""; then
paul8d4aee52003-06-06 00:30:35 +0000163 if test x"${enable_vty_group}" != x"no"; then
pauledd7c242003-06-04 13:59:38 +0000164 AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
165 fi
166fi
167
paul7ea487b2003-03-17 02:05:07 +0000168changequote(, )dnl
169
170MULTIPATH_NUM=1
171
172case "${enable_multipath}" in
173 [0-9]|[1-9][0-9])
174 MULTIPATH_NUM="${enable_multipath}"
175 ;;
176 "")
177 ;;
178 *)
179 echo "Please specify digit to --enable-multipath ARG."
180 exit 1
181 ;;
182esac
183
184changequote([, ])dnl
185
186AC_SUBST(MULTIPATH_NUM)
187
188dnl -------------------
189dnl Check header files.
190dnl -------------------
191AC_STDC_HEADERS
paul595db7f2003-05-25 21:35:06 +0000192AC_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 +0000193
194dnl check some types
195AC_C_CONST
196dnl AC_TYPE_PID_T
197AC_TYPE_SIGNAL
198
199dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
200case "$host" in
201 *-sunos5.6* | *-solaris2.6*)
202 opsys=sol2-6
203 AC_DEFINE(SUNOS_5,,SunOS 5)
204 AC_CHECK_LIB(xnet, main)
205 CURSES=-lcurses
206 ;;
207 *-sunos5* | *-solaris2*)
208 AC_DEFINE(SUNOS_5,,SunOS 5)
209 AC_CHECK_LIB(socket, main)
210 AC_CHECK_LIB(nsl, main)
211 CURSES=-lcurses
212 ;;
213 *-linux-*)
214 opsys=gnu-linux
215 AC_DEFINE(GNU_LINUX,,GNU Linux)
216 ;;
217 *-nec-sysv4*)
218 AC_CHECK_LIB(nsl, gethostbyname)
219 AC_CHECK_LIB(socket, socket)
220 ;;
221 *-freebsd3.2)
222 AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
223 ;;
224 *-openbsd*)
225 opsys=openbsd
226 AC_DEFINE(OPEN_BSD,,OpenBSD)
227 ;;
228 *-bsdi*)
229 opsys=bsdi
230 OTHER_METHOD="mtu_kvm.o"
231 AC_CHECK_LIB(kvm, main)
232 ;;
233esac
234
235dnl ---------------------
236dnl Integrated VTY option
237dnl ---------------------
238case "${enable_vtysh}" in
239 "yes") VTYSH="vtysh";
240 AC_DEFINE(VTYSH,,VTY shell)
241 AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs))
242 AC_CHECK_LIB(readline, main)
243 if test $ac_cv_lib_readline_main = no; then
244 AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.])
245 fi
246 AC_CHECK_HEADER(readline/history.h)
247 if test $ac_cv_header_readline_history_h = no;then
248 AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
249 fi
paul3d3de8c2003-05-23 10:33:49 +0000250 AC_CHECK_LIB(readline, rl_completion_matches)
251 if test $ac_cv_lib_readline_rl_completion_matches = no; then
252 AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
253 fi
254 ;;
paul7ea487b2003-03-17 02:05:07 +0000255 "no" ) VTYSH="";;
256 * ) ;;
257esac
258
259dnl ----------
260dnl PAM module
261dnl ----------
262if test "$with_libpam" = "yes"; then
paul24cd4352003-05-06 12:16:27 +0000263 AC_CHECK_HEADER(security/pam_misc.h)
264 if test "$ac_cv_header_security_pam_misc_h" = yes; then
265 AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
266 AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
267 pam_conv_func="misc_conv"
paul24cd4352003-05-06 12:16:27 +0000268 fi
paul24cd4352003-05-06 12:16:27 +0000269 AC_CHECK_HEADER(security/openpam.h)
270 if test "$ac_cv_header_security_openpam_h" = yes; then
271 AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
272 AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
273 pam_conv_func="openpam_ttyconv"
paul24cd4352003-05-06 12:16:27 +0000274 fi
275 if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
276 AC_MSG_WARN([*** pam support will not be built ***])
277 with_libpam="no"
278 fi
279fi
280
281if test "$with_libpam" = "yes"; then
paul7ea487b2003-03-17 02:05:07 +0000282dnl took this test from proftpd's configure.in and suited to our needs
283dnl -------------------------------------------------------------------------
284dnl
285dnl This next check looks funky due to a linker problem with some versions
286dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
287dnl omitted requiring libdl linking information. PAM-0.72 or better ships
288dnl with RedHat 6.2 and Debian 2.2 or better.
289AC_CHECK_LIB(pam, pam_start,
paul24cd4352003-05-06 12:16:27 +0000290 [AC_CHECK_LIB(pam, $pam_conv_func,
paul7ea487b2003-03-17 02:05:07 +0000291 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
292 LIBPAM="-lpam"],
293 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
294 LIBPAM="-lpam -lpam_misc"]
295 )
296 ],
297
298 [AC_CHECK_LIB(pam, pam_end,
paul24cd4352003-05-06 12:16:27 +0000299 [AC_CHECK_LIB(pam, $pam_conv_func,
paula159ed92003-06-04 11:01:45 +0000300 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
paul7ea487b2003-03-17 02:05:07 +0000301 LIBPAM="-lpam -ldl"],
paula159ed92003-06-04 11:01:45 +0000302 [AC_DEFINE(USE_PAM,,Use PAM for authentication)
paul7ea487b2003-03-17 02:05:07 +0000303 LIBPAM="-lpam -ldl -lpam_misc"]
304 )
305 ],AC_MSG_WARN([*** pam support will not be built ***]),
306 [-ldl])
307 ]
308)
309fi
310AC_SUBST(LIBPAM)
311
312dnl -------------------------------
313dnl Endian-ness check
314dnl -------------------------------
315AC_WORDS_BIGENDIAN
316
317dnl -------------------------------
318dnl check the size in byte of the C
319dnl -------------------------------
320dnl AC_CHECK_SIZEOF(char)
321dnl AC_CHECK_SIZEOF(int)
322dnl AC_CHECK_SIZEOF(short)
323dnl AC_CHECK_SIZEOF(long)
324
325dnl ----------------------------
326dnl check existance of functions
327dnl ----------------------------
328AC_CHECK_FUNCS(bcopy bzero strerror inet_aton daemon snprintf vsnprintf strlcat strlcpy if_nametoindex if_indextoname getifaddrs)
paula159ed92003-06-04 11:01:45 +0000329AC_CHECK_FUNCS(setproctitle, ,
330 [AC_CHECK_LIB(util, setproctitle,
331 [LIBS="$LIBS -lutil"
332 AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
333 ]
334 )
335 ]
336)
paul7ea487b2003-03-17 02:05:07 +0000337
338dnl ------------------------------------
339dnl Determine routing get and set method
340dnl ------------------------------------
341AC_MSG_CHECKING(zebra between kernel interface method)
342if test x"$opsys" = x"gnu-linux"; then
343 if test "${enable_netlink}" = "yes";then
344 AC_MSG_RESULT(netlink)
345 RT_METHOD=rt_netlink.o
346 AC_DEFINE(HAVE_NETLINK,,netlink)
347 netlink=yes
348 elif test "${enable_netlink}" = "no"; then
349 AC_MSG_RESULT(ioctl)
350 RT_METHOD=rt_ioctl.o
351 netlink=no
352 else
353 AC_MSG_RESULT(netlink)
354 RT_METHOD=rt_netlink.o
355 AC_DEFINE(HAVE_NETLINK,,netlink)
356 netlink=yes
357 fi
358else
359 if test "$opsys" = "sol2-6";then
360 AC_MSG_RESULT(solaris)
361 KERNEL_METHOD="kernel_socket.o"
362 RT_METHOD="rt_socket.o"
363 else
364 AC_TRY_RUN([#include <errno.h>
365#include <sys/types.h>
366#include <sys/socket.h>
367
368main ()
369{
370 int ac_sock;
371
372 ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
373 if (ac_sock < 0 && errno == EINVAL)
374 exit (1);
375 exit (0);
376}],
377 [KERNEL_METHOD=kernel_socket.o
378 RT_METHOD=rt_socket.o
379 AC_MSG_RESULT(socket)],
380 [RT_METHOD=rt_ioctl.o
381 AC_MSG_RESULT(ioctl)],
382 [KERNEL_METHOD=kernel_socket.o
383 RT_METHOD=rt_socket.o
384 AC_MSG_RESULT(socket)])
385 fi
386fi
387AC_SUBST(RT_METHOD)
388AC_SUBST(KERNEL_METHOD)
389AC_SUBST(OTHER_METHOD)
390
391dnl ------------------------------
392dnl check kernel route read method
393dnl ------------------------------
394AC_CACHE_CHECK(route read method check, zebra_rtread,
395[if test "$netlink" = yes; then
396 RTREAD_METHOD="rtread_netlink.o"
397 zebra_rtread="netlink"
398else
399for zebra_rtread in /proc/net/route /dev/ip /dev/null;
400do
401 test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
402done
403case $zebra_rtread in
404 "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
405 zebra_rtread="proc";;
406 "/dev/ip") RTREAD_METHOD="rtread_getmsg.o"
407 zebra_rtread="getmsg";;
408 *) RTREAD_METHOD="rtread_sysctl.o"
409 zebra_rtread="sysctl";;
410esac
411fi])
412AC_SUBST(RTREAD_METHOD)
413
414dnl -----------------------------
415dnl check interface lookup method
416dnl -----------------------------
417AC_MSG_CHECKING(interface looking up method)
418if test "$netlink" = yes; then
419 AC_MSG_RESULT(netlink)
420 IF_METHOD=if_netlink.o
421else
422 if test "$opsys" = "sol2-6";then
423 AC_MSG_RESULT(solaris)
424 IF_METHOD=if_ioctl.o
425 elif test "$opsys" = "openbsd";then
426 AC_MSG_RESULT(openbsd)
427 IF_METHOD=if_ioctl.o
428 elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
429 AC_MSG_RESULT(sysctl)
430 IF_METHOD=if_sysctl.o
431 AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
432 else
433 AC_MSG_RESULT(ioctl)
434 IF_METHOD=if_ioctl.o
435 fi
436fi
437AC_SUBST(IF_METHOD)
438
439dnl -----------------------
440dnl check proc file system.
441dnl -----------------------
442if test -r /proc/net/dev; then
443 AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
444 IF_PROC=if_proc.o
445fi
446
447if test -r /proc/net/if_inet6; then
448 AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
449 IF_PROC=if_proc.o
450fi
451AC_SUBST(IF_PROC)
452
453dnl -----------------------------
454dnl check ipforward detect method
455dnl -----------------------------
456AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
457[for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
458do
459 test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
460done
461case $zebra_ipforward_path in
462 "/proc/net/snmp") IPFORWARD=ipforward_proc.o
463 zebra_ipforward_path="proc";;
464 "/dev/ip")
465 case "$host" in
466 *-nec-sysv4*) IPFORWARD=ipforward_ews.o
467 zebra_ipforward_path="ews";;
468 *) IPFORWARD=ipforward_solaris.o
469 zebra_ipforward_path="solaris";;
470 esac;;
471 *) IPFORWARD=ipforward_sysctl.o
472 zebra_ipforward_path="sysctl";;
473esac])
474AC_SUBST(IPFORWARD)
475
476AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
477
478dnl ----------
479dnl IPv6 check
480dnl ----------
481AC_MSG_CHECKING(whether does this OS have IPv6 stack)
482if test "${enable_ipv6}" = "no"; then
483 AC_MSG_RESULT(disabled)
484else
485dnl ----------
486dnl INRIA IPv6
487dnl ----------
paula159ed92003-06-04 11:01:45 +0000488 if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
489 zebra_cv_ipv6=yes
490 AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
491 AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
492 RIPNGD="ripngd"
493 OSPF6D="ospf6d"
494 LIB_IPV6=""
495 AC_MSG_RESULT(INRIA IPv6)
paul7ea487b2003-03-17 02:05:07 +0000496dnl ---------
497dnl KAME IPv6
498dnl ---------
paula159ed92003-06-04 11:01:45 +0000499 elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
500 zebra_cv_ipv6=yes
501 AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
502 AC_DEFINE(KAME,1,KAME IPv6)
503 RIPNGD="ripngd"
504 OSPF6D="ospf6d"
505 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
paul7ea487b2003-03-17 02:05:07 +0000506 LIB_IPV6="-L/usr/local/v6/lib -linet6"
paula159ed92003-06-04 11:01:45 +0000507 fi
508 AC_MSG_RESULT(KAME)
hasso71c0fb52003-05-25 20:18:13 +0000509dnl -------------------------
510dnl MUSICA IPv6
511dnl default host check
512dnl It is not used by Kheops
513dnl -------------------------
paula159ed92003-06-04 11:01:45 +0000514 elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
515 zebra_cv_ipv6=yes
516 AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
517 AC_DEFINE(MUSICA,1,Musica IPv6 stack)
518 AC_DEFINE(KAME,1,KAME IPv6 stack)
519 RIPNGD="ripngd"
520 OSPF6D="ospf6d"
521 if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
hasso71c0fb52003-05-25 20:18:13 +0000522 LIB_IPV6="-L/usr/local/v6/lib -linet6"
paula159ed92003-06-04 11:01:45 +0000523 fi
524 AC_MSG_RESULT(MUSICA)
paul7ea487b2003-03-17 02:05:07 +0000525dnl ---------
526dnl NRL check
527dnl ---------
paula159ed92003-06-04 11:01:45 +0000528 elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
529 zebra_cv_ipv6=yes
530 AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
531 AC_DEFINE(NRL,1,NRL)
532 RIPNGD="ripngd"
533 OSPF6D="ospf6d"
534 if test x"$opsys" = x"bsdi";then
paul7ea487b2003-03-17 02:05:07 +0000535 AC_DEFINE(BSDI_NRL,,BSDI)
536 AC_MSG_RESULT(BSDI_NRL)
paula159ed92003-06-04 11:01:45 +0000537 else
paul7ea487b2003-03-17 02:05:07 +0000538 AC_MSG_RESULT(NRL)
paula159ed92003-06-04 11:01:45 +0000539 fi
paul7ea487b2003-03-17 02:05:07 +0000540dnl ----------
541dnl Linux IPv6
542dnl ----------
paula159ed92003-06-04 11:01:45 +0000543 elif test "${enable_ipv6}" = "yes"; then
544 AC_EGREP_CPP(yes, [
545 #include <linux/version.h>
546 /* 2.1.128 or later */
547 #if LINUX_VERSION_CODE >= 0x020180
548 yes
549 #endif],
550 [zebra_cv_ipv6=yes
551 zebra_cv_linux_ipv6=yes
552 AC_MSG_RESULT(Linux IPv6)])
553 else
554 if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
555 then
paul7ea487b2003-03-17 02:05:07 +0000556 zebra_cv_ipv6=yes
557 zebra_cv_linux_ipv6=yes
558 AC_MSG_RESULT(Linux IPv6)
paula159ed92003-06-04 11:01:45 +0000559 fi
560 fi
paul7ea487b2003-03-17 02:05:07 +0000561
paula159ed92003-06-04 11:01:45 +0000562 if test "$zebra_cv_linux_ipv6" = "yes";then
563 AC_MSG_CHECKING(for GNU libc >= 2.1)
564 AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
565 AC_EGREP_CPP(yes, [
paul7ea487b2003-03-17 02:05:07 +0000566#include <features.h>
567#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
568 yes
paula159ed92003-06-04 11:01:45 +0000569#endif],
570 [glibc=yes
571 AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
572 AC_MSG_RESULT(yes)],
573 AC_MSG_RESULT(no)
574 )
575 RIPNGD="ripngd"
576 OSPF6D="ospf6d"
577 if test "$glibc" != "yes"; then
paul7ea487b2003-03-17 02:05:07 +0000578 INCLUDES="-I/usr/inet6/include"
579 if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
580 LIB_IPV6="-L/usr/inet6/lib -linet6"
581 fi
paula159ed92003-06-04 11:01:45 +0000582 fi
583 fi
paul7ea487b2003-03-17 02:05:07 +0000584
585dnl -----------------------
586dnl Set IPv6 related values
587dnl -----------------------
paula159ed92003-06-04 11:01:45 +0000588 LIBS="$LIB_IPV6 $LIBS"
589 AC_SUBST(LIB_IPV6)
paul7ea487b2003-03-17 02:05:07 +0000590
paula159ed92003-06-04 11:01:45 +0000591 if test x"$RIPNGD" = x""; then
592 AC_MSG_RESULT(IPv4 only)
593 fi
paul7ea487b2003-03-17 02:05:07 +0000594fi
595
596dnl --------------------
597dnl Daemon disable check
598dnl --------------------
599if test "${enable_zebra}" = "no";then
600 ZEBRA=""
601else
602 ZEBRA="zebra"
603fi
604
605if test "${enable_bgpd}" = "no";then
606 BGPD=""
607else
608 BGPD="bgpd"
609fi
610
611if test "${enable_ripd}" = "no";then
612 RIPD=""
613else
614 RIPD="ripd"
615fi
616
617if test "${enable_ospfd}" = "no";then
618 OSPFD=""
619else
620 OSPFD="ospfd"
621fi
622
paul1ef74ef2003-03-21 15:16:05 +0000623OSPFCLIENT=""
624if test "${enable_opaque_lsa}" = "yes"; then
625 if test "${enable_ospfapi}" != "no";then
paul9a569842003-03-28 01:45:13 +0000626 AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
paul1ef74ef2003-03-21 15:16:05 +0000627
628 if test "${enable_ospfclient}" != "no";then
629 OSPFCLIENT="ospfclient"
630 fi
631 fi
632
paul7ea487b2003-03-17 02:05:07 +0000633fi
634
635case "${enable_ripngd}" in
636 "yes") RIPNGD="ripngd";;
637 "no" ) RIPNGD="";;
638 * ) ;;
639esac
640
641case "${enable_ospf6d}" in
642 "yes") OSPF6D="ospf6d";;
643 "no" ) OSPF6D="";;
644 * ) ;;
645esac
646
647if test "${enable_bgp_announce}" = "no";then
648 AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
649fi
650
651AC_SUBST(ZEBRA)
652AC_SUBST(BGPD)
653AC_SUBST(RIPD)
654AC_SUBST(RIPNGD)
655AC_SUBST(OSPFD)
656AC_SUBST(OSPF6D)
657AC_SUBST(VTYSH)
658AC_SUBST(INCLUDES)
659AC_SUBST(CURSES)
660AC_SUBST(OSPFCLIENT)
paul1ef74ef2003-03-21 15:16:05 +0000661AC_SUBST(OSPFAPI)
paul7ea487b2003-03-17 02:05:07 +0000662AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
663AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
664AC_CHECK_LIB(crypt, crypt)
665AC_CHECK_LIB(resolv, res_init)
666AC_CHECK_LIB(m, main)
667
668dnl ---------------------------------------------------
669dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
670dnl ---------------------------------------------------
paula159ed92003-06-04 11:01:45 +0000671AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
672AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
673AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
paul7ea487b2003-03-17 02:05:07 +0000674
675dnl ---------------------------
676dnl check system has GNU regexp
677dnl ---------------------------
678dnl AC_MSG_CHECKING(whether system has GNU regex)
679AC_CHECK_LIB(c, regexec,
680[AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
681 LIB_REGEX=""],
682[LIB_REGEX="regex.o"])
683AC_SUBST(LIB_REGEX)
684
685dnl ------------------
686dnl check SNMP library
687dnl ------------------
688if test "${enable_snmp}" = "yes";then
689dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
paul7ea487b2003-03-17 02:05:07 +0000690 if test "${HAVE_SNMP}" = ""; then
paul1ef74ef2003-03-21 15:16:05 +0000691 old_libs="${LIBS}"
692 LIBS="-L/usr/lib"
paul7ea487b2003-03-17 02:05:07 +0000693 unset ac_cv_lib_snmp_asn_parse_int
paul1ef74ef2003-03-21 15:16:05 +0000694 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
695 if test "${NEED_CRYPTO}" = ""; then
696 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ])
697 else
698 AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
699 fi
700 LIBS="${old_libs}"
paul7ea487b2003-03-17 02:05:07 +0000701 fi
paul1ef74ef2003-03-21 15:16:05 +0000702 if test "${HAVE_SNMP}" = ""; then
703 old_libs="${LIBS}"
704 LIBS="-L/usr/lib"
705 unset ac_cv_lib_snmp_asn_parse_int
706 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
707 if test "${HAVE_SNMP}" = ""; then
708 unset ac_cv_lib_snmp_asn_parse_int
709 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
710 if test "${NEED_CRYPTO}" = "yes"; then
711 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
712 fi
713 fi
714 LIBS="${old_libs}"
715 fi
paul7ea487b2003-03-17 02:05:07 +0000716
717 if test "${HAVE_SNMP}" = ""; then
paul1ef74ef2003-03-21 15:16:05 +0000718 old_libs="${LIBS}"
719 LIBS="-L/usr/local/lib"
720 unset ac_cv_lib_snmp_asn_parse_int
721 AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
722 if test "${HAVE_SNMP}" = ""; then
723 unset ac_cv_lib_snmp_asn_parse_int
724 AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
725 if test "${NEED_CRYPTO}" = "yes"; then
726 AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
727 fi
728 fi
729 LIBS="${old_libs}"
paul7ea487b2003-03-17 02:05:07 +0000730 fi
paul1ef74ef2003-03-21 15:16:05 +0000731
paul7ea487b2003-03-17 02:05:07 +0000732 if test "${HAVE_SNMP}" = "yes"; then
733 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
734 do
735 test -f "${ac_snmp}" && break
736 done
paul1ef74ef2003-03-21 15:16:05 +0000737
paul7ea487b2003-03-17 02:05:07 +0000738 case ${ac_snmp} in
739 /usr/include/net-snmp/*)
740 AC_DEFINE(HAVE_SNMP,,SNMP)
paul1ef74ef2003-03-21 15:16:05 +0000741 AC_DEFINE(HAVE_NETSNMP,,SNMP)
paul7ea487b2003-03-17 02:05:07 +0000742 AC_DEFINE(UCD_COMPATIBLE,,SNMP)
paulac7c4bb2003-03-19 04:25:08 +0000743 CFLAGS="${CFLAGS} -I/usr/include/net-snmp -I/usr/include/net-snmp/library"
744 if test "${HAVE_NETSNMP}" = "yes"; then
paul1ef74ef2003-03-21 15:16:05 +0000745 LIBS="${LIBS} -lnetsnmp"
paulac7c4bb2003-03-19 04:25:08 +0000746 else
paul1ef74ef2003-03-21 15:16:05 +0000747 LIBS="${LIBS} -lsnmp"
paulac7c4bb2003-03-19 04:25:08 +0000748 fi
paul7ea487b2003-03-17 02:05:07 +0000749 ;;
750 /usr/include/ucd-snmp/*)
751 AC_DEFINE(HAVE_SNMP,,SNMP)
752 CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp"
753 LIBS="${LIBS} -lsnmp"
754 ;;
755 /usr/local/include/ucd-snmp/*)
756 AC_DEFINE(HAVE_SNMP,,SNMP)
757 CFLAGS="${CFLAGS} -I/usr/local/include/ucd-snmp"
758 LIBS="${LIBS} -L/usr/local/lib -lsnmp"
759 ;;
760 esac
761 if test "${NEED_CRYPTO}" = "yes"; then
762 LIBS="${LIBS} -lcrypto"
763 fi
764 fi
765fi
766
767dnl ----------------------------
768dnl check sa_len of sockaddr
769dnl ----------------------------
770AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
771AC_TRY_COMPILE([#include <sys/types.h>
772#include <sys/socket.h>
773],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
774[AC_MSG_RESULT(yes)
775 AC_DEFINE(HAVE_SA_LEN,,sa_len)],
776 AC_MSG_RESULT(no))
777
778dnl ----------------------------
779dnl check sin_len of sockaddr_in
780dnl ----------------------------
781AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
782AC_TRY_COMPILE([#include <sys/types.h>
783#include <netinet/in.h>
784],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
785[AC_MSG_RESULT(yes)
786 AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
787 AC_MSG_RESULT(no))
788
789dnl ----------------------------
790dnl check sun_len of sockaddr_un
791dnl ----------------------------
792AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
793AC_TRY_COMPILE([#include <sys/types.h>
794#include <sys/un.h>
795],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
796[AC_MSG_RESULT(yes)
797 AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
798 AC_MSG_RESULT(no))
799
800dnl -----------------------------------
801dnl check sin6_scope_id of sockaddr_in6
802dnl -----------------------------------
803if test "$zebra_cv_ipv6" = yes; then
804 AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
805 AC_TRY_COMPILE([#include <sys/types.h>
806#include <netinet/in.h>
807],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
808[AC_MSG_RESULT(yes)
809 AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
810 AC_MSG_RESULT(no))
811fi
812
813dnl ----------------------------
814dnl check socklen_t exist or not
815dnl ----------------------------
816AC_MSG_CHECKING(whther socklen_t is defined)
817AC_TRY_COMPILE([#include <sys/types.h>
818#include <sys/socket.h>
819#include <netinet/in.h>
820],[socklen_t ac_x;],
821[AC_MSG_RESULT(yes)
822 AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
823 AC_MSG_RESULT(no))
824
825dnl ------------------------
826dnl check struct sockaddr_dl
827dnl ------------------------
828AC_MSG_CHECKING(whether struct sockaddr_dl exist)
829AC_EGREP_HEADER(sockaddr_dl,
830net/if_dl.h,
831[AC_MSG_RESULT(yes)
832 AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
833 AC_MSG_RESULT(no))
834
835dnl --------------------------
836dnl check structure ifaliasreq
837dnl --------------------------
838AC_MSG_CHECKING(whether struct ifaliasreq exist)
839AC_EGREP_HEADER(ifaliasreq,
840net/if.h,
841[AC_MSG_RESULT(yes)
842 AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
843 AC_MSG_RESULT(no))
844
845dnl ----------------------------
846dnl check structure in6_aliasreq
847dnl ----------------------------
hasso71c0fb52003-05-25 20:18:13 +0000848AC_MSG_CHECKING(whether struct in6_aliasreq exist)
paul7ea487b2003-03-17 02:05:07 +0000849AC_EGREP_HEADER(in6_aliasreq,
850netinet6/in6_var.h,
851[AC_MSG_RESULT(yes)
852 AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
853 AC_MSG_RESULT(no))
854
hasso71c0fb52003-05-25 20:18:13 +0000855dnl -----------------------------------
856dnl check ifra_lifetime of in6_aliasreq
857dnl -----------------------------------
858AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist)
859AC_TRY_COMPILE([#include <sys/types.h>
860#include <netinet6/in6_var.h>
861],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);],
862[AC_MSG_RESULT(yes)
paula159ed92003-06-04 11:01:45 +0000863 AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)],
hasso71c0fb52003-05-25 20:18:13 +0000864 AC_MSG_RESULT(no))
865
paul7ea487b2003-03-17 02:05:07 +0000866dnl ---------------------------
867dnl check structure rt_addrinfo
868dnl ---------------------------
869AC_MSG_CHECKING(whether struct rt_addrinfo exist)
870AC_EGREP_HEADER(rt_addrinfo,
871net/route.h,
872[AC_MSG_RESULT(yes)
873 AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
874 AC_MSG_RESULT(no))
875
876dnl --------------------------
877dnl check structure in_pktinfo
878dnl --------------------------
879AC_MSG_CHECKING(whether struct in_pktinfo exist)
880AC_TRY_COMPILE([#include <netinet/in.h>
881],[struct in_pktinfo ac_x;],
882[AC_MSG_RESULT(yes)
883 AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
884 AC_MSG_RESULT(no))
885
886dnl --------------------------------------
887dnl checking for getrusage struct and call
888dnl --------------------------------------
889AC_MSG_CHECKING(whether getrusage is available)
890AC_TRY_COMPILE([#include <sys/resource.h>
891],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
892[AC_MSG_RESULT(yes)
893 AC_DEFINE(HAVE_RUSAGE,,rusage)],
894 AC_MSG_RESULT(no))
895
pauledd7c242003-06-04 13:59:38 +0000896dnl -------------------
897dnl capabilities checks
898dnl -------------------
899AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
900AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
901 [AC_MSG_RESULT(yes)
902 AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
903 zebra_ac_keepcaps="yes"],
904 AC_MSG_RESULT(no)
905)
906if test x"${zebra_ac_keepcaps}" = x"yes"; then
907 AC_CHECK_HEADERS(sys/capability.h)
908fi
909if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
910 AC_CHECK_LIB(cap, cap_init,
911 [AC_DEFINE(HAVE_LCAPS,1,Capabilities)
912 LIBCAP="-lcap"
913 ]
914 )
915fi
916AC_SUBST(LIBCAP)
917
paulfb2d1502003-06-04 09:40:54 +0000918dnl ---------------------------
919dnl check for glibc 'backtrace'
920dnl ---------------------------
921if test "${glibc}" = "yes"; then
922 AC_CHECK_HEADER(execinfo.h)
923fi
924if test x"${ac_cv_header_execinfo_h}" = x"yes"; then
925 AC_CHECK_FUNC(backtrace,
926 [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)]
927 )
928fi
929
paul7ea487b2003-03-17 02:05:07 +0000930dnl -------------
931dnl check version
932dnl -------------
933file="${srcdir}/lib/version.h"
934VERSION=`sed -ne 's/^#.*ZEBRA_VERSION.*\"\([^\"]*\)\"$/\1/p' $file`
935AC_SUBST(VERSION)
936
paul408ad942003-05-20 00:03:33 +0000937dnl ----------
938dnl configure date
939dnl ----------
940CONFDATE=`date '+%Y%m%d'`
941AC_SUBST(CONFDATE)
942
paul7ea487b2003-03-17 02:05:07 +0000943dnl ------------------------------
paula159ed92003-06-04 11:01:45 +0000944dnl set paths for state directory
paul23bd12c2003-04-07 06:11:09 +0000945dnl ------------------------------
946if test "${prefix}" = "NONE"; then
paula159ed92003-06-04 11:01:45 +0000947 zebra_statedir_prefix="";
paul23bd12c2003-04-07 06:11:09 +0000948else
paula159ed92003-06-04 11:01:45 +0000949 zebra_statedir_prefix=${prefix}
paul23bd12c2003-04-07 06:11:09 +0000950fi
951if test "${localstatedir}" = '${prefix}/var'; then
paula159ed92003-06-04 11:01:45 +0000952 AC_CACHE_CHECK(state directory,ac_statedir,
953 [for ZEBRA_STATE_DIR in ${zebra_statedir_prefix}/var/run dnl
954 ${zebra_statedir_prefix}/var/adm dnl
955 ${zebra_statedir_prefix}/etc dnl
956 /var/run dnl
957 /var/adm dnl
958 /etc dnl
959 /dev/null;
paul23bd12c2003-04-07 06:11:09 +0000960 do
paula159ed92003-06-04 11:01:45 +0000961 test -d $ZEBRA_STATE_DIR && break
paul23bd12c2003-04-07 06:11:09 +0000962 done
paula159ed92003-06-04 11:01:45 +0000963 zebra_statedir=$ZEBRA_STATE_DIR])
paul23bd12c2003-04-07 06:11:09 +0000964else
paula159ed92003-06-04 11:01:45 +0000965 zebra_statedir=${localstatedir}
966 AC_MSG_CHECKING(directory to use for state file)
967 AC_MSG_RESULT(${zebra_statedir})
paul23bd12c2003-04-07 06:11:09 +0000968fi
paula159ed92003-06-04 11:01:45 +0000969if test $zebra_statedir = "/dev/null"; then
970 AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
971fi
972
973AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$zebra_statedir/zebra.pid",zebra PID)
974AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$zebra_statedir/ripd.pid",ripd PID)
975AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$zebra_statedir/ripngd.pid",ripngd PID)
976AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$zebra_statedir/bgpd.pid",bgpd PID)
977AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$zebra_statedir/ospfd.pid",ospfd PID)
978AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$zebra_statedir/ospf6d.pid",ospf6d PID)
979AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$zebra_statedir/zserv.api",zebra api socket)
980AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$zebra_statedir/zebra.vty",zebra vty socket)
981AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$zebra_statedir/ripd.vty",rip vty socket)
982AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$zebra_statedir/ripngd.vty",ripng vty socket)
983AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$zebra_statedir/bgpd.vty",bgpd vty socket)
984AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$zebra_statedir/ospfd.vty",ospfd vty socket)
985AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$zebra_statedir/ospf6d.vty",ospf6d vty socket)
paul7ea487b2003-03-17 02:05:07 +0000986
987dnl ---------------------------
988dnl Check htonl works correctly
989dnl ---------------------------
990AC_MSG_CHECKING(for working htonl)
991AC_CACHE_VAL(ac_cv_htonl_works, [
992AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
993#include <sys/types.h>
994#endif
995#ifdef HAVE_NETDB_H
996#include <netdb.h>
997#endif
998#ifdef HAVE_NETINET_IN_H
999#include <netinet/in.h>
1000#endif],
1001[htonl (0);],
1002ac_cv_htonl_works=yes,
1003ac_cv_htonl_works=no)])
1004AC_MSG_RESULT($ac_cv_htonl_works)
1005
paul6382b6f2003-05-20 00:17:45 +00001006AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile
1007 ripngd/Makefile bgpd/Makefile ospfd/Makefile
1008 ospf6d/Makefile vtysh/Makefile doc/Makefile
1009 ospfclient/Makefile
1010 redhat/zebra.spec)
paul7ea487b2003-03-17 02:05:07 +00001011
1012echo "
1013zebra configuration
1014-------------------
1015zebra version : ${VERSION}
1016host operationg system : ${host_os}
1017source code location : ${srcdir}
1018compiler : ${CC}
1019compiler flags : ${CFLAGS}
hasso71c0fb52003-05-25 20:18:13 +00001020linker flags : ${LDFLAGS} ${LIBS}
paula159ed92003-06-04 11:01:45 +00001021state file directory : ${zebra_statedir}
paul8d4aee52003-06-06 00:30:35 +00001022user to run as : ${enable_user}
1023group to run as : ${enable_group}
1024group for vty sockets : ${enable_vty_group}
paul7ea487b2003-03-17 02:05:07 +00001025"