]>
Commit | Line | Data |
---|---|---|
7ea487bc | 1 | ## |
e8f2984c | 2 | ## Configure template file for Quagga. |
7ea487bc | 3 | ## autoconf will generate configure script. |
4 | ## | |
5 | ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org> | |
e8f2984c | 6 | ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st> |
7ea487bc | 7 | ## |
9bc6875a | 8 | AC_PREREQ(2.60) |
7ea487bc | 9 | |
867f76c0 | 10 | AC_INIT(Quagga, 2.0.999, [https://bugzilla.quagga.net]) |
5ee1bde7 | 11 | CONFIG_ARGS="$ac_configure_args" |
80db5ac1 | 12 | AC_SUBST(CONFIG_ARGS) |
fa1253d0 | 13 | AC_CONFIG_SRCDIR(lib/zebra.h) |
62c9f504 | 14 | AC_CONFIG_MACRO_DIR([m4]) |
dfb9a545 | 15 | |
16 | dnl ----------------------------------- | |
17 | dnl Get hostname and other information. | |
18 | dnl ----------------------------------- | |
19 | AC_CANONICAL_BUILD() | |
20 | AC_CANONICAL_HOST() | |
21 | AC_CANONICAL_TARGET() | |
22 | ||
f77cba1b AS |
23 | # Disable portability warnings -- our automake code (in particular |
24 | # common.am) uses some constructs specific to gmake. | |
25 | AM_INIT_AUTOMAKE([1.6 -Wno-portability]) | |
50cfc0d2 | 26 | m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) |
e54583ea | 27 | AM_SILENT_RULES([yes]) |
303bb005 | 28 | AC_CONFIG_HEADERS(config.h) |
7ea487bc | 29 | |
0be793e6 | 30 | AC_PATH_PROG(PERL, perl) |
03ecfb67 | 31 | |
d6b72f7a | 32 | dnl default is to match previous behavior |
c4f0efe6 | 33 | exampledir=${sysconfdir} |
d6b72f7a | 34 | AC_ARG_ENABLE([exampledir], |
23925784 | 35 | AS_HELP_STRING([--enable-exampledir], |
d6b72f7a | 36 | [specify alternate directory for examples]), |
37 | exampledir="$enableval",) | |
c4f0efe6 | 38 | dnl XXX add --exampledir to autoconf standard directory list somehow |
d6b72f7a | 39 | AC_SUBST(exampledir) |
40 | ||
cbd04084 | 41 | dnl default is to match previous behavior |
42 | pkgsrcrcdir="" | |
43 | pkgsrcdir="" | |
44 | AC_ARG_ENABLE([pkgsrcrcdir], | |
23925784 | 45 | AS_HELP_STRING([--enable-pkgsrcrcdir], |
cbd04084 | 46 | [specify directory for rc.d scripts]), |
47 | pkgsrcrcdir="$enableval"; pkgsrcdir="pkgsrc",) | |
48 | dnl XXX add --pkgsrcrcdir to autoconf standard directory list somehow | |
49 | AC_SUBST(pkgsrcdir) | |
50 | AC_SUBST(pkgsrcrcdir) | |
51 | ||
3f9c7369 | 52 | AC_ARG_ENABLE(tcmalloc, |
428cd73f | 53 | AS_HELP_STRING([--enable-tcmalloc], [Turn on tcmalloc]), |
3f9c7369 DS |
54 | [case "${enableval}" in |
55 | yes) tcmalloc_enabled=true | |
56 | LIBS="$LIBS -ltcmalloc_minimal" | |
57 | ;; | |
58 | no) tcmalloc_enabled=false ;; | |
59 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-tcmalloc) ;; | |
60 | esac],[tcmalloc_enabled=false]) | |
61 | ||
62 | ||
1969e4b9 | 63 | dnl -------------------- |
64 | dnl Check CC and friends | |
65 | dnl -------------------- | |
a89b1641 DL |
66 | dnl note orig_cflags is also used further down |
67 | orig_cflags="$CFLAGS" | |
46bc0e43 | 68 | AC_LANG([C]) |
7ea487bc | 69 | AC_PROG_CC |
1969e4b9 | 70 | AC_PROG_CPP |
46bc0e43 | 71 | AM_PROG_CC_C_O |
a89b1641 DL |
72 | dnl remove autoconf default "-g -O2" |
73 | CFLAGS="$orig_cflags" | |
1769aff8 | 74 | AC_PROG_CC_C99 |
553bdfe3 | 75 | |
a89b1641 DL |
76 | AC_PROG_EGREP |
77 | ||
553bdfe3 GT |
78 | dnl autoconf 2.59 appears not to support AC_PROG_SED |
79 | dnl AC_PROG_SED | |
80 | AC_CHECK_PROG([SED],[sed],[sed],[/bin/false]) | |
1969e4b9 | 81 | |
a89b1641 DL |
82 | dnl try and enable CFLAGS that are useful for Quagga |
83 | dnl - specifically, options to control warnings | |
1969e4b9 | 84 | |
988225dd DL |
85 | AC_USE_SYSTEM_EXTENSIONS() |
86 | AC_DEFUN([AC_C_FLAG], [{ | |
87 | AC_LANG_PUSH(C) | |
88 | ac_c_flag_save="$CFLAGS" | |
89 | CFLAGS="$CFLAGS $1" | |
90 | AC_MSG_CHECKING([[whether $CC supports $1]]) | |
91 | AC_COMPILE_IFELSE( | |
92 | [AC_LANG_PROGRAM([[]])], | |
93 | [ | |
94 | AC_MSG_RESULT([yes]) | |
95 | m4_if([$3], [], [], [ | |
96 | CFLAGS="$ac_c_flag_save" | |
97 | $3 | |
98 | ]) | |
99 | ], [ | |
100 | CFLAGS="$ac_c_flag_save" | |
101 | AC_MSG_RESULT([no]) | |
102 | $2 | |
103 | ]) | |
104 | AC_LANG_POP(C) | |
105 | }]) | |
106 | ||
a89b1641 DL |
107 | dnl ICC won't bail on unknown options without -diag-error 10006 |
108 | dnl need to do this first so we get useful results for the other options | |
109 | AC_C_FLAG([-diag-error 10006]) | |
110 | ||
111 | dnl if the user specified any CFLAGS, we don't add "-g -Os/-O2" here | |
112 | if test "z$orig_cflags" = "z"; then | |
113 | AC_C_FLAG([-g]) | |
114 | AC_C_FLAG([-Os], [ | |
115 | AC_C_FLAG([-O2]) | |
116 | ]) | |
117 | fi | |
118 | ||
119 | dnl always want these CFLAGS | |
120 | AC_C_FLAG([-fno-omit-frame-pointer]) | |
121 | AC_C_FLAG([-Wall]) | |
122 | AC_C_FLAG([-Wextra]) | |
123 | AC_C_FLAG([-Wmissing-prototypes]) | |
124 | AC_C_FLAG([-Wmissing-declarations]) | |
125 | AC_C_FLAG([-Wpointer-arith]) | |
126 | AC_C_FLAG([-Wbad-function-cast]) | |
127 | AC_C_FLAG([-Wwrite-strings]) | |
128 | if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then | |
129 | AC_C_FLAG([-Wcast-qual]) | |
130 | AC_C_FLAG([-Wstrict-prototypes]) | |
131 | AC_C_FLAG([-Wmissing-noreturn]) | |
132 | AC_C_FLAG([-Wmissing-format-attribute]) | |
133 | AC_C_FLAG([-Wunreachable-code]) | |
134 | AC_C_FLAG([-Wpacked]) | |
135 | AC_C_FLAG([-Wpadded]) | |
6a4b8832 | 136 | else |
a89b1641 | 137 | AC_C_FLAG([-Wno-unused-result]) |
1969e4b9 | 138 | fi |
a89b1641 DL |
139 | AC_C_FLAG([-Wno-unused-parameter]) |
140 | AC_C_FLAG([-Wno-missing-field-initializers]) | |
141 | ||
142 | dnl ICC emits a broken warning for const char *x = a ? "b" : "c"; | |
143 | dnl for some reason the string consts get 'promoted' to char *, | |
144 | dnl triggering a const to non-const conversion warning. | |
145 | AC_C_FLAG([-diag-disable 3179]) | |
1969e4b9 | 146 | |
aa9584c1 DS |
147 | if test x"${enable_werror}" = x"yes" ; then |
148 | WERROR="-Werror" | |
149 | fi | |
150 | AC_SUBST(WERROR) | |
151 | ||
2e83e8e9 DL |
152 | dnl need link on this one, not compile |
153 | AC_LANG_PUSH(C) | |
154 | ac_ld_flag_save="$LDFLAGS" | |
155 | LDFLAGS="$LDFLAGS -rdynamic" | |
156 | AC_MSG_CHECKING([[whether linker supports -rdynamic]]) | |
157 | AC_LINK_IFELSE( | |
158 | [AC_LANG_PROGRAM([[]])], | |
159 | [AC_MSG_RESULT([yes])], | |
160 | [ | |
161 | LDFLAGS="$ac_ld_flag_save" | |
162 | AC_MSG_RESULT([no]) | |
163 | ]) | |
164 | AC_LANG_POP(C) | |
165 | ||
7ea487bc | 166 | dnl -------------- |
167 | dnl Check programs | |
168 | dnl -------------- | |
7ea487bc | 169 | AC_PROG_INSTALL |
6f0e3f6e | 170 | AC_PROG_LN_S |
7ea487bc | 171 | AC_PROG_MAKE_SET |
172 | AC_CHECK_TOOL(AR, ar) | |
7ea487bc | 173 | |
d46d2a24 PJ |
174 | dnl ----------------- |
175 | dnl System extensions | |
176 | dnl ----------------- | |
d46d2a24 | 177 | AC_GNU_SOURCE |
7ea487bc | 178 | |
87efd646 | 179 | dnl ------- |
180 | dnl libtool | |
181 | dnl ------- | |
95bb8305 | 182 | LT_INIT |
87efd646 | 183 | |
7ea487bc | 184 | dnl ---------------------- |
185 | dnl Packages configuration | |
186 | dnl ---------------------- | |
1080c13f JN |
187 | AC_ARG_WITH(pkg-extra-version, |
188 | AS_HELP_STRING([--with-pkg-extra-version=VER], [add extra version field, for packagers/distributions]), | |
189 | [EXTRAVERSION=$withval],) | |
0be793e6 DL |
190 | AC_ARG_WITH(pkg-git-version, |
191 | AS_HELP_STRING([--with-pkg-git-version], [add git information to MOTD and build version string]), | |
a16dcf7c | 192 | [ test "x$withval" != "xno" && with_pkg_git_version="yes" ]) |
7ea487bc | 193 | AC_ARG_ENABLE(vtysh, |
23925784 | 194 | AS_HELP_STRING([--disable-vtysh], [do not build integrated vty shell for Quagga])) |
cbcd9bfc | 195 | AC_ARG_ENABLE(doc, |
23925784 | 196 | AS_HELP_STRING([--disable-doc], [do not build docs])) |
7ea487bc | 197 | AC_ARG_ENABLE(zebra, |
23925784 | 198 | AS_HELP_STRING([--disable-zebra], [do not build zebra daemon])) |
7ea487bc | 199 | AC_ARG_ENABLE(bgpd, |
23925784 | 200 | AS_HELP_STRING([--disable-bgpd], [do not build bgpd])) |
7ea487bc | 201 | AC_ARG_ENABLE(ripd, |
23925784 | 202 | AS_HELP_STRING([--disable-ripd], [do not build ripd])) |
7ea487bc | 203 | AC_ARG_ENABLE(ripngd, |
23925784 | 204 | AS_HELP_STRING([--disable-ripngd], [do not build ripngd])) |
7ea487bc | 205 | AC_ARG_ENABLE(ospfd, |
23925784 | 206 | AS_HELP_STRING([--disable-ospfd], [do not build ospfd])) |
7ea487bc | 207 | AC_ARG_ENABLE(ospf6d, |
23925784 | 208 | AS_HELP_STRING([--disable-ospf6d], [do not build ospf6d])) |
eac6e3f0 RW |
209 | AC_ARG_ENABLE(ldpd, |
210 | AS_HELP_STRING([--enable-ldpd], [build ldpd])) | |
d0199430 | 211 | AC_ARG_ENABLE(watchquagga, |
23925784 | 212 | AS_HELP_STRING([--disable-watchquagga], [do not build watchquagga])) |
9e867fe6 | 213 | AC_ARG_ENABLE(isisd, |
c3a9461e | 214 | AS_HELP_STRING([--disable-isisd], [do not build isisd])) |
12e41d03 | 215 | AC_ARG_ENABLE(pimd, |
23925784 | 216 | AS_HELP_STRING([--disable-pimd], [do not build pimd])) |
7ea487bc | 217 | AC_ARG_ENABLE(bgp-announce, |
23925784 | 218 | AS_HELP_STRING([--disable-bgp-announce,], [turn off BGP route announcement])) |
65efcfce | 219 | AC_ARG_ENABLE(bgp-vnc, |
f95f2ad9 | 220 | AS_HELP_STRING([--disable-bgp-vnc],[turn off BGP VNC support])) |
65efcfce LB |
221 | AC_ARG_WITH(rfp-path, |
222 | AS_HELP_STRING([--with-rfp-path[=DIR]],[path to replaced stub RFP used with BGP VNC])) | |
7ea487bc | 223 | AC_ARG_ENABLE(snmp, |
23925784 | 224 | AS_HELP_STRING([--enable-snmp=ARG], [enable SNMP support (smux or agentx)])) |
7ea487bc | 225 | AC_ARG_WITH(libpam, |
23925784 | 226 | AS_HELP_STRING([--with-libpam], [use libpam for PAM support in vtysh])) |
71c0fb50 | 227 | AC_ARG_ENABLE(tcp-zebra, |
23925784 | 228 | AS_HELP_STRING([--enable-tcp-zebra], [enable TCP/IP socket connection between zebra and protocol daemon])) |
1ef74ef7 | 229 | AC_ARG_ENABLE(ospfapi, |
23925784 | 230 | AS_HELP_STRING([--disable-ospfapi], [do not build OSPFAPI to access the OSPF LSA Database])) |
1ef74ef7 | 231 | AC_ARG_ENABLE(ospfclient, |
23925784 DL |
232 | AS_HELP_STRING([--disable-ospfclient], [do not build OSPFAPI client for OSPFAPI, |
233 | (this is the default if --disable-ospfapi is set)])) | |
7ea487bc | 234 | AC_ARG_ENABLE(multipath, |
23925784 | 235 | AS_HELP_STRING([--enable-multipath=ARG], [enable multipath function, ARG must be digit])) |
fe86b484 | 236 | AC_ARG_ENABLE(user, |
23925784 | 237 | AS_HELP_STRING([--enable-user=USER], [user to run Quagga suite as (default quagga)])) |
fe86b484 | 238 | AC_ARG_ENABLE(group, |
23925784 | 239 | AS_HELP_STRING([--enable-group=GROUP], [group to run Quagga suite as (default quagga)])) |
edd7c245 | 240 | AC_ARG_ENABLE(vty_group, |
23925784 | 241 | AS_HELP_STRING([--enable-vty-group=ARG], [set vty sockets to have specified group as owner])) |
aa593d5e | 242 | AC_ARG_ENABLE(configfile_mask, |
23925784 | 243 | AS_HELP_STRING([--enable-configfile-mask=ARG], [set mask for config files])) |
aa593d5e | 244 | AC_ARG_ENABLE(logfile_mask, |
23925784 | 245 | AS_HELP_STRING([--enable-logfile-mask=ARG], [set mask for log files])) |
5fd1f747 | 246 | AC_ARG_ENABLE(shell_access, |
23925784 | 247 | AS_HELP_STRING([--enable-shell-access], [Allow users to access shell/telnet/ssh])) |
71c0fb50 | 248 | AC_ARG_ENABLE(rtadv, |
23925784 | 249 | AS_HELP_STRING([--disable-rtadv], [disable IPV6 router advertisement feature])) |
ca776988 | 250 | AC_ARG_ENABLE(irdp, |
23925784 | 251 | AS_HELP_STRING([--enable-irdp], [enable IRDP server support in zebra])) |
41d3fc96 | 252 | AC_ARG_ENABLE(capabilities, |
23925784 | 253 | AS_HELP_STRING([--disable-capabilities], [disable using POSIX capabilities])) |
47f6aef0 | 254 | AC_ARG_ENABLE(rusage, |
23925784 | 255 | AS_HELP_STRING([--disable-rusage], [disable using getrusage])) |
6b6942f9 | 256 | AC_ARG_ENABLE(gcc_ultra_verbose, |
23925784 | 257 | AS_HELP_STRING([--enable-gcc-ultra-verbose], [enable ultra verbose GCC warnings])) |
3453a712 | 258 | AC_ARG_ENABLE(linux24_tcp_md5, |
23925784 | 259 | AS_HELP_STRING([--enable-linux24-tcp-md5], [enable support for old, Linux-2.4 RFC2385 patch])) |
8c99b4c1 | 260 | AC_ARG_ENABLE(backtrace, |
23925784 | 261 | AS_HELP_STRING([--disable-backtrace,], [disable crash backtraces (default autodetect)])) |
924b9229 | 262 | AC_ARG_ENABLE(time-check, |
23925784 | 263 | AS_HELP_STRING([--disable-time-check], [disable slow thread warning messages])) |
25f45887 | 264 | AC_ARG_ENABLE(pcreposix, |
23925784 | 265 | AS_HELP_STRING([--enable-pcreposix], [enable using PCRE Posix libs for regex functions])) |
5adc2528 | 266 | AC_ARG_ENABLE(fpm, |
23925784 | 267 | AS_HELP_STRING([--enable-fpm], [enable Forwarding Plane Manager support])) |
ddd82ff6 | 268 | AC_ARG_ENABLE(systemd, |
23925784 | 269 | AS_HELP_STRING([--enable-systemd], [enable Systemd support])) |
0a95a0d0 | 270 | AC_ARG_ENABLE(poll, |
23925784 | 271 | AS_HELP_STRING([--enable-poll], [enable usage of Poll instead of select])) |
aa9584c1 DS |
272 | AC_ARG_ENABLE(werror, |
273 | AS_HELP_STRING([--enable-werror], [enable -Werror (recommended for developers only)])) | |
000cf1fb | 274 | AC_ARG_ENABLE(cumulus, |
23925784 | 275 | AS_HELP_STRING([--enable-cumulus], [enable Cumulus Switch Special Extensions])) |
76981cd3 DS |
276 | AC_ARG_ENABLE(rr-semantics, |
277 | AS_HELP_STRING([--disable-rr-semantics], [disable the v6 Route Replace semantics])) | |
dad253b4 AS |
278 | AC_ARG_ENABLE([protobuf], |
279 | AS_HELP_STRING([--enable-protobuf], [Enable experimental protobuf support])) | |
6b6942f9 | 280 | |
112072ac DS |
281 | AC_CHECK_HEADERS(json-c/json.h) |
282 | AC_CHECK_LIB(json-c, json_object_get, LIBS="$LIBS -ljson-c") | |
283 | if test $ac_cv_lib_json_c_json_object_get = no; then | |
10b8ab26 DS |
284 | AC_CHECK_LIB(json, json_object_get, LIBS="$LIBS -ljson") |
285 | if test $ac_cv_lib_json_json_object_get = no; then | |
286 | AC_MSG_ERROR([lib json is needed to compile]) | |
287 | fi | |
c2f4c19c DS |
288 | fi |
289 | ||
3b8282a8 AS |
290 | AC_ARG_ENABLE([dev_build], |
291 | AS_HELP_STRING([--enable-dev-build], [build for development])) | |
292 | ||
924b9229 | 293 | if test x"${enable_time_check}" != x"no" ; then |
294 | if test x"${enable_time_check}" = x"yes" -o x"${enable_time_check}" = x ; then | |
295 | AC_DEFINE(CONSUMED_TIME_CHECK,5000000,Consumed Time Check) | |
296 | else | |
297 | AC_DEFINE_UNQUOTED(CONSUMED_TIME_CHECK,$enable_time_check,Consumed Time Check) | |
298 | fi | |
299 | fi | |
300 | ||
37219958 DS |
301 | case "${enable_systemd}" in |
302 | "no") ;; | |
303 | "yes") | |
304 | AC_CHECK_LIB(systemd, sd_notify, LIBS="$LIBS -lsystemd") | |
305 | if test $ac_cv_lib_systemd_sd_notify = no; then | |
306 | AC_MSG_ERROR([enable systemd has been specified but systemd development env not found on your system]) | |
63e30864 DS |
307 | else |
308 | AC_DEFINE(HAVE_SYSTEMD,,Compile systemd support in) | |
37219958 DS |
309 | fi |
310 | ;; | |
311 | "*") ;; | |
312 | esac | |
ddd82ff6 | 313 | |
76981cd3 DS |
314 | if test "${enable_rr_semantics}" != "no" ; then |
315 | AC_DEFINE(HAVE_V6_RR_SEMANTICS,, Compile in v6 Route Replacement Semantics) | |
316 | fi | |
317 | ||
0a95a0d0 DS |
318 | if test "${enable_poll}" = "yes" ; then |
319 | AC_DEFINE(HAVE_POLL,,Compile systemd support in) | |
320 | fi | |
321 | ||
be0dba35 RW |
322 | dnl ---------- |
323 | dnl MPLS check | |
324 | dnl ---------- | |
be0dba35 | 325 | AC_MSG_CHECKING(whether this OS has MPLS stack) |
fe6c7157 RW |
326 | case "$host" in |
327 | *-linux*) | |
328 | MPLS_METHOD="zebra_mpls_netlink.o" | |
329 | AC_MSG_RESULT(Linux MPLS) | |
330 | ;; | |
331 | *-openbsd*) | |
332 | MPLS_METHOD="zebra_mpls_openbsd.o" | |
333 | AC_MSG_RESULT(OpenBSD MPLS) | |
334 | ;; | |
335 | *) | |
336 | MPLS_METHOD="zebra_mpls_null.o" | |
337 | AC_MSG_RESULT(Unsupported kernel) | |
338 | ;; | |
339 | esac | |
be0dba35 RW |
340 | AC_SUBST(MPLS_METHOD) |
341 | ||
000cf1fb DS |
342 | if test "${enable_cumulus}" = "yes" ; then |
343 | AC_DEFINE(HAVE_CUMULUS,,Compile Special Cumulus Code in) | |
344 | fi | |
345 | ||
576b6b5d DS |
346 | if test "${enable_shell_access}" = "yes"; then |
347 | AC_DEFINE(HAVE_SHELL_ACCESS,,Allow user to use ssh/telnet/bash) | |
348 | fi | |
349 | ||
5adc2528 AS |
350 | if test "${enable_fpm}" = "yes"; then |
351 | AC_DEFINE(HAVE_FPM,,Forwarding Plane Manager support) | |
352 | fi | |
353 | ||
3b8282a8 AS |
354 | if test "x${enable_dev_build}" = "xyes"; then |
355 | AC_DEFINE(DEV_BUILD,,Build for development) | |
356 | fi | |
357 | AM_CONDITIONAL([DEV_BUILD], [test "x$enable_dev_build" = "xyes"]) | |
358 | ||
dad253b4 AS |
359 | # |
360 | # Logic for protobuf support. | |
361 | # | |
362 | if test "$enable_protobuf" = "yes"; then | |
363 | have_protobuf=yes | |
364 | ||
365 | # Check for protoc-c | |
366 | AC_CHECK_PROG([PROTOC_C], [protoc-c], [protoc-c], [/bin/false]) | |
367 | if test "x$PROTOC_C" = "x/bin/false"; then | |
368 | have_protobuf=no | |
369 | else | |
370 | found_protobuf_c=no | |
371 | PKG_CHECK_MODULES([PROTOBUF_C], libprotobuf-c >= 0.14, | |
372 | [found_protobuf_c=yes], | |
373 | [AC_MSG_RESULT([pkg-config did not find libprotobuf-c])]) | |
374 | ||
375 | if test "x$found_protobuf_c" = "xyes"; then | |
376 | LDFLAGS="$LDFLAGS $PROTOBUF_C_LIBS" | |
377 | CFLAGS="$CFLAGS $PROTOBUF_C_CFLAGS" | |
378 | else | |
379 | AC_CHECK_HEADER([google/protobuf-c/protobuf-c.h], [], | |
380 | [have_protobuf=no; AC_MSG_RESULT([Couldn't find google/protobuf-c.h])]) | |
381 | fi | |
382 | fi | |
383 | fi | |
384 | ||
385 | # Fail if the user explicity enabled protobuf support and we couldn't | |
386 | # find the compiler or libraries. | |
387 | if test "x$have_protobuf" = "xno" && test "x$enable_protobuf" = "xyes"; then | |
388 | AC_MSG_ERROR([Protobuf enabled explicitly but can't find libraries/tools]) | |
389 | fi | |
390 | ||
391 | if test "x$have_protobuf" = "xyes"; then | |
392 | AC_DEFINE(HAVE_PROTOBUF,, protobuf) | |
393 | fi | |
394 | ||
395 | AM_CONDITIONAL([HAVE_PROTOBUF], [test "x$have_protobuf" = "xyes"]) | |
396 | ||
397 | # | |
398 | # End of logic for protobuf support. | |
399 | # | |
400 | ||
7ea487bc | 401 | if test "${enable_tcp_zebra}" = "yes"; then |
402 | AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication) | |
403 | fi | |
404 | ||
3453a712 PJ |
405 | if test "${enable_linux24_tcp_md5}" = "yes"; then |
406 | AC_DEFINE(HAVE_TCP_MD5_LINUX24,,Old Linux 2.4 TCP MD5 Signature Patch) | |
407 | fi | |
408 | ||
d2a0ccc6 | 409 | AC_MSG_CHECKING(if zebra should be configurable to send Route Advertisements) |
410 | if test "${enable_rtadv}" != "no"; then | |
71c0fb50 | 411 | AC_MSG_RESULT(yes) |
d2a0ccc6 | 412 | AC_DEFINE(HAVE_RTADV,,Enable IPv6 Routing Advertisement support) |
2487bea1 | 413 | else |
414 | AC_MSG_RESULT(no) | |
71c0fb50 | 415 | fi |
7ea487bc | 416 | |
ca776988 | 417 | if test "${enable_irdp}" = "yes"; then |
418 | AC_DEFINE(HAVE_IRDP,, IRDP ) | |
419 | fi | |
420 | ||
0b02a1b4 JAG |
421 | if test x"${enable_user}" = x"no"; then |
422 | enable_user="" | |
423 | else | |
424 | if test x"${enable_user}" = x"yes" || test x"${enable_user}" = x""; then | |
425 | enable_user="quagga" | |
426 | fi | |
427 | AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User) | |
edd7c245 | 428 | fi |
edd7c245 | 429 | |
0b02a1b4 JAG |
430 | if test x"${enable_group}" = x"no"; then |
431 | enable_group="" | |
432 | else | |
433 | if test x"${enable_group}" = x"yes" || test x"${enable_group}" = x""; then | |
434 | enable_group="quagga" | |
435 | fi | |
436 | AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group) | |
edd7c245 | 437 | fi |
edd7c245 | 438 | |
439 | if test x"${enable_vty_group}" = x"yes" ; then | |
8d4aee5d | 440 | AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes]) |
79cb2169 | 441 | elif test x"${enable_vty_group}" != x""; then |
8d4aee5d | 442 | if test x"${enable_vty_group}" != x"no"; then |
edd7c245 | 443 | AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group) |
444 | fi | |
445 | fi | |
26275b05 | 446 | AC_SUBST([enable_user]) |
447 | AC_SUBST([enable_group]) | |
448 | AC_SUBST([enable_vty_group]) | |
edd7c245 | 449 | |
aa593d5e | 450 | enable_configfile_mask=${enable_configfile_mask:-0600} |
451 | AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files) | |
452 | ||
453 | enable_logfile_mask=${enable_logfile_mask:-0600} | |
454 | AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files) | |
455 | ||
7a6da5ba | 456 | MPATH_NUM=1 |
7ea487bc | 457 | |
458 | case "${enable_multipath}" in | |
7c5d2b76 | 459 | 0) |
7a6da5ba | 460 | MPATH_NUM=64 |
7c5d2b76 | 461 | ;; |
90fb3e13 | 462 | [[1-9]|[1-9][0-9]|[1-9][0-9][0-9]]) |
7a6da5ba | 463 | MPATH_NUM="${enable_multipath}" |
7ea487bc | 464 | ;; |
465 | "") | |
466 | ;; | |
467 | *) | |
6f0e3f6e | 468 | AC_MSG_FAILURE([Please specify digit to enable multipath ARG]) |
7ea487bc | 469 | ;; |
470 | esac | |
471 | ||
7a6da5ba | 472 | AC_DEFINE_UNQUOTED(MULTIPATH_NUM, $MPATH_NUM, Maximum number of paths for a route) |
7ea487bc | 473 | |
1080c13f JN |
474 | dnl ----------------------------------- |
475 | dnl Add extra version string to package | |
476 | dnl name, string and version fields. | |
477 | dnl ----------------------------------- | |
478 | if test "x${EXTRAVERSION}" != "x" ; then | |
0be793e6 DL |
479 | VERSION="${VERSION}${EXTRAVERSION}" |
480 | PACKAGE_VERSION="${PACKAGE_VERSION}${EXTRAVERSION}" | |
481 | PACKAGE_STRING="${PACKAGE_STRING}${EXTRAVERSION}" | |
1080c13f JN |
482 | fi |
483 | ||
a16dcf7c DL |
484 | if test "x$with_pkg_git_version" = "xyes"; then |
485 | if test -d "${srcdir}/.git"; then | |
486 | AC_DEFINE(GIT_VERSION, [1], [include git version info]) | |
487 | else with_pkg_git_version="no" | |
488 | AC_MSG_WARN([--with-pkg-git-version given, but this is not a git checkout]) | |
489 | fi | |
490 | fi | |
491 | AM_CONDITIONAL([GIT_VERSION], [test "x$with_pkg_git_version" = "xyes"]) | |
0be793e6 | 492 | |
6f0e3f6e PJ |
493 | dnl ------------------------------------ |
494 | dnl Check C keywords and standard types | |
495 | dnl ------------------------------------ | |
496 | AC_C_CONST | |
497 | AC_C_INLINE | |
6f0e3f6e | 498 | AC_C_VOLATILE |
dc7a2bf1 | 499 | AC_HEADER_STDC |
6f0e3f6e PJ |
500 | dnl AC_TYPE_PID_T |
501 | AC_TYPE_UID_T | |
502 | AC_TYPE_MODE_T | |
503 | AC_TYPE_SIZE_T | |
6f0e3f6e | 504 | AC_STRUCT_TM |
dc7a2bf1 | 505 | |
6f0e3f6e PJ |
506 | dnl ------------------------- |
507 | dnl Check other header files. | |
508 | dnl ------------------------- | |
24f5e2fc DL |
509 | AC_CHECK_HEADERS([stropts.h sys/ksym.h \ |
510 | linux/version.h asm/types.h \ | |
511 | sys/cdefs.h]) | |
6f0e3f6e PJ |
512 | |
513 | dnl Utility macro to avoid retyping includes all the time | |
514 | m4_define([QUAGGA_INCLUDES], | |
515 | [#ifdef SUNOS_5 | |
516 | #define _XPG4_2 | |
517 | #define __EXTENSIONS__ | |
518 | #endif | |
519 | #include <stdio.h> | |
24f5e2fc DL |
520 | #include <stdlib.h> |
521 | #include <stddef.h> | |
522 | #include <sys/types.h> | |
6f0e3f6e | 523 | /* sys/conf.h depends on param.h on FBSD at least */ |
24f5e2fc | 524 | #include <sys/param.h> |
6f0e3f6e | 525 | /* Required for MAXSIG */ |
24f5e2fc DL |
526 | #include <signal.h> |
527 | #include <sys/socket.h> | |
ea057677 HT |
528 | #ifdef __APPLE__ |
529 | # define __APPLE_USE_RFC_3542 | |
530 | #endif | |
24f5e2fc DL |
531 | #include <netinet/in.h> |
532 | #include <sys/time.h> | |
533 | #include <time.h> | |
534 | #include <net/if.h> | |
2b43bf23 DO |
535 | ])dnl |
536 | ||
537 | dnl Same applies for HAVE_NET_IF_VAR_H, which HAVE_NETINET6_ND6_H and | |
538 | dnl HAVE_NETINET_IN_VAR_H depend upon. But if_var.h depends on if.h, hence | |
539 | dnl an additional round for it. | |
540 | ||
541 | AC_CHECK_HEADERS([net/if_var.h], [], [], QUAGGA_INCLUDES) | |
542 | ||
543 | m4_define([QUAGGA_INCLUDES], | |
544 | QUAGGA_INCLUDES | |
545 | [#if HAVE_NET_IF_VAR_H | |
546 | # include <net/if_var.h> | |
547 | #endif | |
548 | ])dnl | |
549 | ||
24f5e2fc DL |
550 | AC_CHECK_HEADERS([netinet/in_var.h \ |
551 | net/if_dl.h net/netopt.h \ | |
552 | inet/nd.h netinet/ip_icmp.h \ | |
6f0e3f6e PJ |
553 | sys/sysctl.h sys/sockio.h kvm.h sys/conf.h], |
554 | [], [], QUAGGA_INCLUDES) | |
555 | ||
556 | AC_CHECK_HEADERS([ucontext.h], [], [], | |
557 | [#ifndef __USE_GNU | |
558 | #define __USE_GNU | |
559 | #endif /* __USE_GNU */ | |
560 | QUAGGA_INCLUDES | |
561 | ]) | |
562 | ||
bccbd141 JT |
563 | m4_define([UCONTEXT_INCLUDES], |
564 | [#include <ucontext.h>])dnl | |
565 | ||
566 | AC_CHECK_MEMBERS([ucontext_t.uc_mcontext.uc_regs], | |
567 | [], [], [UCONTEXT_INCLUDES]) | |
568 | AC_CHECK_MEMBERS([ucontext_t.uc_mcontext.regs], | |
569 | [AC_CHECK_MEMBERS([ucontext_t.uc_mcontext.regs.nip], | |
570 | [], [], [UCONTEXT_INCLUDES])], | |
571 | [], [UCONTEXT_INCLUDES]) | |
572 | AC_CHECK_MEMBERS([ucontext_t.uc_mcontext.gregs], | |
573 | [], [], [UCONTEXT_INCLUDES]) | |
574 | ||
6f0e3f6e PJ |
575 | m4_define([QUAGGA_INCLUDES], |
576 | QUAGGA_INCLUDES | |
24f5e2fc DL |
577 | [ |
578 | #include <sys/un.h> | |
579 | #include <netinet/in_systm.h> | |
6f0e3f6e PJ |
580 | #if HAVE_NETINET_IN_VAR_H |
581 | # include <netinet/in_var.h> | |
582 | #endif | |
583 | #if HAVE_NET_IF_DL_H | |
584 | # include <net/if_dl.h> | |
585 | #endif | |
6f0e3f6e PJ |
586 | #if HAVE_NET_NETOPT_H |
587 | # include <net/netopt.h> | |
588 | #endif | |
24f5e2fc | 589 | #include <net/route.h> |
6f0e3f6e PJ |
590 | #if HAVE_INET_ND_H |
591 | # include <inet/nd.h> | |
592 | #endif | |
24f5e2fc | 593 | #include <arpa/inet.h> |
11770e10 PJ |
594 | /* Required for IDRP */ |
595 | #if HAVE_NETINET_IP_ICMP_H | |
596 | # include <netinet/ip_icmp.h> | |
597 | #endif | |
6f0e3f6e | 598 | ])dnl |
dc7a2bf1 | 599 | |
fa3232e1 | 600 | dnl V6 headers are checked below, after we check for v6 |
7ea487bc | 601 | |
7ea487bc | 602 | dnl Some systems (Solaris 2.x) require libnsl (Network Services Library) |
603 | case "$host" in | |
afd8a129 | 604 | [*-sunos5.[6-7]*] | [*-solaris2.[6-7]*]) |
7ea487bc | 605 | opsys=sol2-6 |
afd8a129 | 606 | AC_DEFINE(SUNOS_56, 1, SunOS 5.6 to 5.7) |
19877dd2 | 607 | AC_DEFINE(SUNOS_5, 1, SunOS 5) |
7ea487bc | 608 | AC_CHECK_LIB(xnet, main) |
609 | CURSES=-lcurses | |
a77d2023 | 610 | SOLARIS="solaris" |
7ea487bc | 611 | ;; |
1b73de8b | 612 | [*-sunos5.[8-9]] \ |
613 | | [*-sunos5.1[0-9]] \ | |
614 | | [*-sunos5.1[0-9].[0-9]] \ | |
615 | | [*-solaris2.[8-9]] \ | |
616 | | [*-solaris2.1[0-9]] \ | |
617 | | [*-solaris2.1[0-9].[0-9]]) | |
afd8a129 | 618 | opsys=sol8 |
fb66b29c PJ |
619 | AC_DEFINE(SUNOS_59, 1, [SunOS 5.8 up]) |
620 | AC_DEFINE(SUNOS_5, 1, [SunOS 5]) | |
19877dd2 | 621 | AC_CHECK_LIB(socket, main) |
622 | AC_CHECK_LIB(nsl, main) | |
1b73de8b | 623 | AC_CHECK_LIB(umem, main) |
fb66b29c PJ |
624 | AC_CHECK_FUNCS([printstack], |
625 | [AC_DEFINE([HAVE_PRINTSTACK],1,[Solaris printstack]) | |
626 | AC_DEFINE([HAVE_STACK_TRACE],1,[Stack symbols decode functionality]) | |
627 | ]) | |
19877dd2 | 628 | CURSES=-lcurses |
a77d2023 | 629 | SOLARIS="solaris" |
19877dd2 | 630 | ;; |
7ea487bc | 631 | *-sunos5* | *-solaris2*) |
19877dd2 | 632 | AC_DEFINE(SUNOS_5,,SunOS 5, Unknown SunOS) |
7ea487bc | 633 | AC_CHECK_LIB(socket, main) |
634 | AC_CHECK_LIB(nsl, main) | |
635 | CURSES=-lcurses | |
a77d2023 | 636 | SOLARIS="solaris" |
7ea487bc | 637 | ;; |
c45eb839 | 638 | *-linux*) |
7ea487bc | 639 | opsys=gnu-linux |
640 | AC_DEFINE(GNU_LINUX,,GNU Linux) | |
641 | ;; | |
7ea487bc | 642 | *-openbsd*) |
643 | opsys=openbsd | |
644 | AC_DEFINE(OPEN_BSD,,OpenBSD) | |
645 | ;; | |
7ea487bc | 646 | esac |
647 | ||
62c9f504 PJ |
648 | AC_SYS_LARGEFILE |
649 | ||
7ea487bc | 650 | dnl --------------------- |
651 | dnl Integrated VTY option | |
652 | dnl --------------------- | |
653 | case "${enable_vtysh}" in | |
f0646db0 DS |
654 | "no") VTYSH="";; |
655 | *) VTYSH="vtysh"; | |
7ea487bc | 656 | AC_DEFINE(VTYSH,,VTY shell) |
fc9d0745 | 657 | dnl Vtysh uses libreadline, which looks for termcap functions at |
6f0e3f6e | 658 | dnl configure time. We follow readlines search order. |
fc9d0745 | 659 | dnl The required procedures are in libtermcap on NetBSD, in |
660 | dnl [TODO] on Linux, and in [TODO] on Solaris. | |
c0689394 | 661 | AC_CHECK_LIB(termcap, tputs, LIBREADLINE="$LIBREADLINE -ltermcap", |
a969459c | 662 | [AC_CHECK_LIB(tinfo, tputs, LIBREADLINE="$LIBREADLINE -ltinfo", |
663 | [AC_CHECK_LIB(curses, tputs, LIBREADLINE="$LIBREADLINE -lcurses", | |
664 | [AC_CHECK_LIB(ncurses, tputs, | |
665 | LIBREADLINE="$LIBREADLINE -lncurses")] | |
666 | )] | |
667 | )] | |
668 | ) | |
4c2f8e95 | 669 | AC_CHECK_LIB(readline, main, LIBREADLINE="-lreadline $LIBREADLINE",, |
a969459c | 670 | "$LIBREADLINE") |
7ea487bc | 671 | if test $ac_cv_lib_readline_main = no; then |
fc9d0745 | 672 | AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.]) |
7ea487bc | 673 | fi |
674 | AC_CHECK_HEADER(readline/history.h) | |
675 | if test $ac_cv_header_readline_history_h = no;then | |
676 | AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.]) | |
677 | fi | |
a969459c | 678 | AC_CHECK_LIB(readline, rl_completion_matches, |
679 | LIBREADLINE="$LIBREADLINE",, "$LIBREADLINE") | |
3d3de8c4 | 680 | if test $ac_cv_lib_readline_rl_completion_matches = no; then |
681 | AC_DEFINE(rl_completion_matches,completion_matches,Old readline) | |
682 | fi | |
683 | ;; | |
7ea487bc | 684 | esac |
c0689394 | 685 | AC_SUBST(LIBREADLINE) |
f027d331 | 686 | AM_CONDITIONAL(VTYSH, test "x$VTYSH" = "xvtysh") |
7ea487bc | 687 | |
688 | dnl ---------- | |
689 | dnl PAM module | |
6159928d DO |
690 | dnl |
691 | dnl Quagga detects the PAM library it is built against by checking for a | |
692 | dnl functional pam_misc.h (Linux-PAM) or openpam.h (OpenPAM) header. pam_misc.h | |
693 | dnl is known to #include pam_appl.h, the standard header of a PAM library, and | |
694 | dnl openpam.h doesn't do that, although depends on the header too. Hence a | |
695 | dnl little assistance to AC_CHECK_HEADER is necessary for the proper detection | |
696 | dnl of OpenPAM. | |
7ea487bc | 697 | dnl ---------- |
24cd435b | 698 | if test "$with_libpam" = "yes"; then |
6f0e3f6e PJ |
699 | AC_CHECK_HEADER([security/pam_misc.h], |
700 | [AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h) | |
701 | AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv) | |
702 | pam_conv_func="misc_conv" | |
703 | ], | |
704 | [], QUAGGA_INCLUDES) | |
705 | AC_CHECK_HEADER([security/openpam.h], | |
706 | [AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h) | |
707 | AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv) | |
708 | pam_conv_func="openpam_ttyconv" | |
709 | ], | |
6159928d | 710 | [], QUAGGA_INCLUDES[#include <security/pam_appl.h>]) |
24cd435b | 711 | if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then |
712 | AC_MSG_WARN([*** pam support will not be built ***]) | |
713 | with_libpam="no" | |
714 | fi | |
715 | fi | |
716 | ||
7ea487bc | 717 | if test "$with_libpam" = "yes"; then |
6f0e3f6e | 718 | dnl took this test from proftpds configure.in and suited to our needs |
7ea487bc | 719 | dnl ------------------------------------------------------------------------- |
720 | dnl | |
721 | dnl This next check looks funky due to a linker problem with some versions | |
722 | dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library | |
723 | dnl omitted requiring libdl linking information. PAM-0.72 or better ships | |
724 | dnl with RedHat 6.2 and Debian 2.2 or better. | |
725 | AC_CHECK_LIB(pam, pam_start, | |
24cd435b | 726 | [AC_CHECK_LIB(pam, $pam_conv_func, |
7ea487bc | 727 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
728 | LIBPAM="-lpam"], | |
729 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) | |
730 | LIBPAM="-lpam -lpam_misc"] | |
731 | ) | |
732 | ], | |
733 | ||
734 | [AC_CHECK_LIB(pam, pam_end, | |
24cd435b | 735 | [AC_CHECK_LIB(pam, $pam_conv_func, |
a159ed93 | 736 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
7ea487bc | 737 | LIBPAM="-lpam -ldl"], |
a159ed93 | 738 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
7ea487bc | 739 | LIBPAM="-lpam -ldl -lpam_misc"] |
740 | ) | |
741 | ],AC_MSG_WARN([*** pam support will not be built ***]), | |
742 | [-ldl]) | |
743 | ] | |
744 | ) | |
745 | fi | |
746 | AC_SUBST(LIBPAM) | |
747 | ||
748 | dnl ------------------------------- | |
749 | dnl Endian-ness check | |
750 | dnl ------------------------------- | |
751 | AC_WORDS_BIGENDIAN | |
752 | ||
753 | dnl ------------------------------- | |
754 | dnl check the size in byte of the C | |
755 | dnl ------------------------------- | |
756 | dnl AC_CHECK_SIZEOF(char) | |
757 | dnl AC_CHECK_SIZEOF(int) | |
758 | dnl AC_CHECK_SIZEOF(short) | |
759 | dnl AC_CHECK_SIZEOF(long) | |
760 | ||
761 | dnl ---------------------------- | |
762 | dnl check existance of functions | |
763 | dnl ---------------------------- | |
6f0e3f6e PJ |
764 | AC_FUNC_FNMATCH |
765 | AC_FUNC_FORK | |
6f0e3f6e | 766 | AC_FUNC_MKTIME |
6f0e3f6e | 767 | AC_FUNC_STAT |
6f0e3f6e PJ |
768 | |
769 | dnl ------------------------------- | |
770 | dnl bgpd needs pow() and hence libm | |
771 | dnl ------------------------------- | |
772 | TMPLIBS="$LIBS" | |
773 | AC_CHECK_HEADER([math.h], | |
774 | [AC_CHECK_LIB([m], [pow], | |
775 | [LIBM="-lm" | |
776 | LIBS="$LIBS $LIBM" | |
777 | AC_DEFINE(HAVE_LIBM,, Have libm) | |
778 | AC_CHECK_FUNCS(pow,[],[LIBM=""]) | |
779 | ]) | |
780 | ]) | |
781 | if test x"$LIBM" = x ; then | |
782 | AC_MSG_WARN([Unable to find working pow function - bgpd may not link]) | |
783 | fi | |
784 | LIBS="$TMPLIBS" | |
785 | AC_SUBST(LIBM) | |
786 | ||
787 | dnl --------------- | |
788 | dnl other functions | |
789 | dnl --------------- | |
24f5e2fc DL |
790 | AC_CHECK_FUNCS([ \ |
791 | strlcat strlcpy \ | |
792 | getgrouplist \ | |
793 | pledge]) | |
6f0e3f6e | 794 | |
13460c44 FL |
795 | AC_CHECK_HEADER([asm-generic/unistd.h], |
796 | [AC_CHECK_DECL(__NR_setns, | |
797 | AC_DEFINE(HAVE_NETNS,, Have netns),, | |
798 | QUAGGA_INCLUDES [#include <asm-generic/unistd.h> | |
799 | ]) | |
428cd73f | 800 | AC_CHECK_FUNCS(setns)] |
13460c44 FL |
801 | ) |
802 | ||
7ea487bc | 803 | dnl ------------------------------------ |
804 | dnl Determine routing get and set method | |
805 | dnl ------------------------------------ | |
806 | AC_MSG_CHECKING(zebra between kernel interface method) | |
807 | if test x"$opsys" = x"gnu-linux"; then | |
35c4bf71 DL |
808 | AC_MSG_RESULT(netlink) |
809 | RT_METHOD=rt_netlink.o | |
1fdc9eae | 810 | KERNEL_METHOD=kernel_netlink.o |
35c4bf71 DL |
811 | AC_DEFINE(HAVE_NETLINK,,netlink) |
812 | netlink=yes | |
813 | AC_CHECK_DECLS([IFLA_INFO_SLAVE_KIND], [], [], [#include <linux/if_link.h>]) | |
865730ab | 814 | else |
19877dd2 | 815 | AC_MSG_RESULT(Route socket) |
816 | KERNEL_METHOD="kernel_socket.o" | |
817 | RT_METHOD="rt_socket.o" | |
7ea487bc | 818 | fi |
819 | AC_SUBST(RT_METHOD) | |
820 | AC_SUBST(KERNEL_METHOD) | |
5adc2528 | 821 | AM_CONDITIONAL([HAVE_NETLINK], [test "x$netlink" = "xyes"]) |
7ea487bc | 822 | |
238497fc PJ |
823 | dnl -------------------------- |
824 | dnl Determine IS-IS I/O method | |
825 | dnl -------------------------- | |
745bf05f DL |
826 | AC_DEFINE(ISIS_METHOD_PFPACKET, 1, [ constant value for isis method pfpacket ]) |
827 | AC_DEFINE(ISIS_METHOD_DLPI, 2, [ constant value for isis method dlpi ]) | |
828 | AC_DEFINE(ISIS_METHOD_BPF, 3, [ constant value for isis method bpf ]) | |
238497fc PJ |
829 | AC_CHECK_HEADER(net/bpf.h) |
830 | AC_CHECK_HEADER(sys/dlpi.h) | |
831 | AC_MSG_CHECKING(zebra IS-IS I/O method) | |
832 | if test x"$opsys" = x"gnu-linux"; then | |
833 | AC_MSG_RESULT(pfpacket) | |
745bf05f | 834 | ISIS_METHOD_MACRO="ISIS_METHOD_PFPACKET" |
238497fc PJ |
835 | elif test x"$opsys" = x"sol2-6" -o x"$opsys" = x"sol8"; then |
836 | AC_MSG_RESULT(DLPI) | |
745bf05f | 837 | ISIS_METHOD_MACRO="ISIS_METHOD_DLPI" |
238497fc PJ |
838 | else |
839 | if test $ac_cv_header_net_bpf_h = no; then | |
840 | if test $ac_cv_header_sys_dlpi_h = no; then | |
841 | AC_MSG_RESULT(none) | |
842 | AC_MSG_WARN([*** IS-IS support will not be built ***]) | |
843 | ISISD="" | |
844 | else | |
845 | AC_MSG_RESULT(DLPI) | |
846 | fi | |
745bf05f | 847 | ISIS_METHOD_MACRO="ISIS_METHOD_DLPI" |
238497fc PJ |
848 | else |
849 | AC_MSG_RESULT(BPF) | |
745bf05f | 850 | ISIS_METHOD_MACRO="ISIS_METHOD_BPF" |
238497fc PJ |
851 | fi |
852 | fi | |
745bf05f | 853 | AC_DEFINE_UNQUOTED(ISIS_METHOD, $ISIS_METHOD_MACRO, [ selected method for isis, == one of the constants ]) |
238497fc | 854 | |
b99760ab | 855 | dnl ------------------------------------ |
856 | dnl check for broken CMSG_FIRSTHDR macro | |
857 | dnl ------------------------------------ | |
6c20046f | 858 | AC_MSG_CHECKING(for broken CMSG_FIRSTHDR) |
5b087528 | 859 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
b99760ab | 860 | #ifdef SUNOS_5 |
861 | #define _XPG4_2 | |
862 | #define __EXTENSIONS__ | |
863 | #endif | |
24f5e2fc | 864 | #include <stdlib.h> |
b99760ab | 865 | #include <sys/types.h> |
866 | #include <sys/socket.h> | |
867 | ||
868 | main() | |
869 | { | |
870 | struct msghdr msg; | |
871 | char buf[4]; | |
872 | ||
873 | msg.msg_control = buf; | |
874 | msg.msg_controllen = 0; | |
875 | ||
876 | if (CMSG_FIRSTHDR(&msg) != NULL) | |
877 | exit(0); | |
878 | exit (1); | |
5b087528 | 879 | }]])],[AC_MSG_RESULT(yes - using workaround) AC_DEFINE(HAVE_BROKEN_CMSG_FIRSTHDR,,Broken CMSG_FIRSTHDR)], |
d33e8d7b | 880 | [AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)]) |
b99760ab | 881 | |
7ea487bc | 882 | dnl ------------------------------ |
883 | dnl check kernel route read method | |
884 | dnl ------------------------------ | |
5589ffa7 JJ |
885 | AC_CACHE_CHECK([route read method], [quagga_cv_rtread_method], |
886 | [if test "x$netlink" = xyes; then | |
887 | quagga_cv_rtread_method="netlink" | |
7ea487bc | 888 | else |
35c4bf71 | 889 | for quagga_cv_rtread_method in /dev/ip /dev/null; |
7ea487bc | 890 | do |
5589ffa7 | 891 | test x`ls $quagga_cv_rtread_method 2>/dev/null` = x"$quagga_cv_rtread_method" && break |
7ea487bc | 892 | done |
5589ffa7 | 893 | case $quagga_cv_rtread_method in |
9c30ab6b | 894 | "/dev/ip") |
895 | case "$host" in | |
5589ffa7 JJ |
896 | *-freebsd*) quagga_cv_rtread_method="sysctl";; |
897 | *) quagga_cv_rtread_method="getmsg";; | |
9c30ab6b | 898 | esac;; |
5589ffa7 JJ |
899 | *) |
900 | quagga_cv_rtread_method="sysctl";; | |
7ea487bc | 901 | esac |
902 | fi]) | |
5589ffa7 | 903 | RTREAD_METHOD=rtread_${quagga_cv_rtread_method}.o |
7ea487bc | 904 | AC_SUBST(RTREAD_METHOD) |
905 | ||
906 | dnl ----------------------------- | |
907 | dnl check interface lookup method | |
908 | dnl ----------------------------- | |
19877dd2 | 909 | IOCTL_METHOD=ioctl.o |
7ea487bc | 910 | AC_MSG_CHECKING(interface looking up method) |
911 | if test "$netlink" = yes; then | |
912 | AC_MSG_RESULT(netlink) | |
913 | IF_METHOD=if_netlink.o | |
19877dd2 | 914 | elif test "$opsys" = "sol2-6";then |
915 | AC_MSG_RESULT(Solaris GIF) | |
916 | IF_METHOD=if_ioctl.o | |
afd8a129 | 917 | elif test "$opsys" = "sol8";then |
19877dd2 | 918 | AC_MSG_RESULT(Solaris GLIF) |
919 | IF_METHOD=if_ioctl_solaris.o | |
920 | IOCTL_METHOD=ioctl_solaris.o | |
19877dd2 | 921 | elif test "$opsys" = "openbsd";then |
922 | AC_MSG_RESULT(openbsd) | |
923 | IF_METHOD=if_ioctl.o | |
924 | elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then | |
925 | AC_MSG_RESULT(sysctl) | |
7ea487bc | 926 | IF_METHOD=if_sysctl.o |
927 | AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST) | |
19877dd2 | 928 | else |
7ea487bc | 929 | AC_MSG_RESULT(ioctl) |
930 | IF_METHOD=if_ioctl.o | |
7ea487bc | 931 | fi |
932 | AC_SUBST(IF_METHOD) | |
19877dd2 | 933 | AC_SUBST(IOCTL_METHOD) |
7ea487bc | 934 | |
42c98199 | 935 | dnl --------------------------------------------------------------- |
936 | dnl figure out how to specify an interface in multicast sockets API | |
937 | dnl --------------------------------------------------------------- | |
6f0e3f6e | 938 | AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [], [], QUAGGA_INCLUDES) |
42c98199 | 939 | |
b3f2bf7c | 940 | AC_CHECK_HEADERS([linux/mroute.h], [], [],[ |
24f5e2fc DL |
941 | #include <sys/socket.h> |
942 | #include <netinet/in.h> | |
b3f2bf7c RW |
943 | #define _LINUX_IN_H /* For Linux <= 2.6.25 */ |
944 | #include <linux/types.h> | |
945 | ]) | |
946 | ||
947 | m4_define([QUAGGA_INCLUDES], | |
948 | QUAGGA_INCLUDES | |
949 | [#if HAVE_LINUX_MROUTE_H | |
950 | # include <linux/mroute.h> | |
951 | #endif | |
952 | ])dnl | |
953 | ||
954 | AC_CHECK_HEADERS([netinet/ip_mroute.h], [], [],[ | |
24f5e2fc DL |
955 | #include <sys/socket.h> |
956 | #include <sys/types.h> | |
957 | #include <netinet/in.h> | |
958 | #include <net/route.h> | |
b3f2bf7c RW |
959 | ]) |
960 | ||
961 | m4_define([QUAGGA_INCLUDES], | |
962 | QUAGGA_INCLUDES | |
963 | [#if HAVE_NETINET_IP_MROUTE_H | |
964 | # include <netinet/ip_mroute.h> | |
965 | #endif | |
966 | ])dnl | |
967 | ||
42c98199 | 968 | AC_MSG_CHECKING([for BSD struct ip_mreq hack]) |
24f5e2fc DL |
969 | AC_TRY_COMPILE([#include <sys/param.h>], |
970 | [#if (defined(__FreeBSD__) && ((__FreeBSD_version >= 500022 && __FreeBSD_version < 700000) || (__FreeBSD_version < 500000 && __FreeBSD_version >= 440000))) || (defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 106010000) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__sun) | |
42c98199 | 971 | return (0); |
972 | #else | |
973 | #error No support for BSD struct ip_mreq hack detected | |
974 | #endif],[AC_MSG_RESULT(yes) | |
975 | AC_DEFINE(HAVE_BSD_STRUCT_IP_MREQ_HACK,,[Can pass ifindex in struct ip_mreq])], | |
976 | AC_MSG_RESULT(no)) | |
977 | ||
10d04cdb DT |
978 | AC_MSG_CHECKING([for RFC3678 protocol-independed API]) |
979 | AC_TRY_COMPILE([ | |
980 | #include <sys/types.h> | |
981 | #include <netinet/in.h> | |
982 | ], [struct group_req gr; int sock; setsockopt(sock, IPPROTO_IP, MCAST_JOIN_GROUP, (void*)&gr, sizeof(gr)); | |
983 | ], [AC_MSG_RESULT(yes) | |
984 | AC_DEFINE(HAVE_RFC3678,1,[Have RFC3678 protocol-independed API])], | |
985 | AC_MSG_RESULT(no)) | |
986 | ||
c543a173 AS |
987 | dnl --------------------------------------------------------------- |
988 | dnl figure out how to check link-state | |
989 | dnl --------------------------------------------------------------- | |
24f5e2fc DL |
990 | AC_CHECK_HEADER( [net/if_media.h], |
991 | [m4_define([LINK_DETECT_INCLUDES], | |
992 | QUAGGA_INCLUDES | |
993 | [#include <net/if_media.h> | |
994 | ]) | |
995 | AC_CHECK_MEMBERS( [struct ifmediareq.ifm_status], | |
996 | AC_DEFINE(HAVE_BSD_LINK_DETECT,,[BSD link-detect]), | |
997 | [], LINK_DETECT_INCLUDES)], | |
998 | [], | |
999 | QUAGGA_INCLUDES) | |
c543a173 | 1000 | |
9234b382 DV |
1001 | dnl --------------------------------------------------------------- |
1002 | dnl Additional, newer way to check link-state using ifi_link_state. | |
1003 | dnl Not available in all BSD's when ifmediareq available | |
1004 | dnl --------------------------------------------------------------- | |
24f5e2fc DL |
1005 | AC_CHECK_MEMBERS([struct if_data.ifi_link_state], |
1006 | AC_DEFINE(HAVE_BSD_IFI_LINK_STATE,,[BSD ifi_link_state available]), | |
1007 | [], QUAGGA_INCLUDES) | |
9234b382 | 1008 | |
0df7c91f PJ |
1009 | dnl ------------------------ |
1010 | dnl TCP_MD5SIG socket option | |
1011 | dnl ------------------------ | |
1012 | ||
1013 | AC_CHECK_HEADER([netinet/tcp.h], | |
1014 | [m4_define([MD5_INCLUDES], | |
1015 | QUAGGA_INCLUDES | |
1016 | [#include <netinet/tcp.h> | |
1017 | ]) | |
1018 | AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)], | |
1019 | [], | |
1020 | QUAGGA_INCLUDES) | |
1021 | if test $ac_cv_have_decl_TCP_MD5SIG = no; then | |
1022 | AC_CHECK_HEADER([linux/tcp.h], | |
1023 | [m4_define([MD5_INCLUDES], | |
1024 | QUAGGA_INCLUDES | |
1025 | [#include <linux/tcp.h> | |
1026 | ]) | |
1027 | AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)]) | |
1028 | fi | |
1029 | ||
7ea487bc | 1030 | dnl ----------------------------- |
1031 | dnl check ipforward detect method | |
1032 | dnl ----------------------------- | |
5589ffa7 | 1033 | AC_CACHE_CHECK([ipforward method], [quagga_cv_ipforward_method], |
ca9f342c DL |
1034 | [if test x$cross_compiling = xyes; then |
1035 | if test x"$opsys" = x"gnu-linux"; then | |
1036 | quagga_cv_ipforward_method=/proc/net/snmp | |
1037 | else | |
1038 | quagga_cv_ipforward_method=/dev/ip | |
1039 | fi | |
1040 | else | |
1041 | for quagga_cv_ipforward_method in /proc/net/snmp /dev/ip /dev/null; | |
1042 | do | |
1043 | test x`ls $quagga_cv_ipforward_method 2>/dev/null` = x"$quagga_cv_ipforward_method" && break | |
1044 | done | |
1045 | fi | |
5589ffa7 JJ |
1046 | case $quagga_cv_ipforward_method in |
1047 | "/proc/net/snmp") quagga_cv_ipforward_method="proc";; | |
7ea487bc | 1048 | "/dev/ip") |
1049 | case "$host" in | |
5589ffa7 JJ |
1050 | *-freebsd*) quagga_cv_ipforward_method="sysctl";; |
1051 | *) quagga_cv_ipforward_method="solaris";; | |
7ea487bc | 1052 | esac;; |
5589ffa7 | 1053 | *) quagga_cv_ipforward_method="sysctl";; |
7ea487bc | 1054 | esac]) |
5589ffa7 | 1055 | IPFORWARD=ipforward_${quagga_cv_ipforward_method}.o |
7ea487bc | 1056 | AC_SUBST(IPFORWARD) |
1057 | ||
60060acc RW |
1058 | dnl ---------------------------------------------------------------------------- |
1059 | dnl figure out if domainname is available in the utsname struct (GNU extension). | |
1060 | dnl ---------------------------------------------------------------------------- | |
1061 | AC_CHECK_MEMBERS([struct utsname.domainname], [], [], [#include <sys/utsname.h>]) | |
1062 | ||
7ea487bc | 1063 | dnl ---------- |
1064 | dnl IPv6 check | |
1065 | dnl ---------- | |
1066 | AC_MSG_CHECKING(whether does this OS have IPv6 stack) | |
7ea487bc | 1067 | dnl --------- |
1068 | dnl KAME IPv6 | |
1069 | dnl --------- | |
1cbb5dfc | 1070 | if grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then |
a159ed93 | 1071 | AC_DEFINE(KAME,1,KAME IPv6) |
a159ed93 | 1072 | AC_MSG_RESULT(KAME) |
19877dd2 | 1073 | dnl ------------------------------------ |
1074 | dnl Solaris 9, 10 and potentially higher | |
1075 | dnl ------------------------------------ | |
afd8a129 | 1076 | elif test x"$opsys" = x"sol8"; then |
19877dd2 | 1077 | AC_DEFINE(SOLARIS_IPV6, 1, Solaris IPv6) |
19877dd2 | 1078 | AC_MSG_RESULT(Solaris IPv6) |
7ea487bc | 1079 | dnl ---------- |
1080 | dnl Linux IPv6 | |
1081 | dnl ---------- | |
42bb3dfd | 1082 | elif test x"$opsys" = x"gnu-linux"; then |
3ef0b877 | 1083 | AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack) |
d8dc5257 DS |
1084 | dnl Linux has a compilation problem with mixing |
1085 | dnl netinet/in.h and linux/in6.h they are not | |
1086 | dnl compatible. There has been discussion on | |
1087 | dnl how to fix it but no real progress on implementation | |
1088 | dnl when they fix it, remove this | |
1089 | AC_DEFINE(IPV6_MINHOPCOUNT, 73, Linux ipv6 Min Hop Count) | |
42bb3dfd DL |
1090 | AC_MSG_RESULT(Linux IPv6) |
1091 | else | |
80ec006d | 1092 | AC_MSG_ERROR([Failed to detect IPv6 stack]) |
a159ed93 | 1093 | fi |
7ea487bc | 1094 | |
80ec006d DL |
1095 | dnl this is unconditial, for compatibility |
1096 | AC_DEFINE(HAVE_IPV6,1,IPv6) | |
7ea487bc | 1097 | |
fa3232e1 | 1098 | dnl ------------------ |
1099 | dnl IPv6 header checks | |
1100 | dnl ------------------ | |
24f5e2fc | 1101 | AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h \ |
6f0e3f6e PJ |
1102 | netinet6/in6_var.h netinet6/nd6.h], [], [], |
1103 | QUAGGA_INCLUDES) | |
fa3232e1 | 1104 | |
6f0e3f6e PJ |
1105 | m4_define([QUAGGA_INCLUDES],dnl |
1106 | QUAGGA_INCLUDES | |
1107 | [#if HAVE_NETINET6_IN6_H | |
1108 | #include <netinet6/in6.h> | |
1109 | #endif | |
1110 | #if HAVE_NETINET_IN6_VAR_H | |
1111 | #include <netinet/in6_var.h> | |
1112 | #endif | |
24f5e2fc | 1113 | #include <netinet/icmp6.h> |
6f0e3f6e PJ |
1114 | #if HAVE_NETINET6_IN6_VAR_H |
1115 | # include <netinet6/in6_var.h> | |
1116 | #endif | |
1117 | #if HAVE_NETINET6_ND6_H | |
fbf24544 | 1118 | # include <netinet6/nd6.h> |
6f0e3f6e PJ |
1119 | #endif |
1120 | ])dnl | |
1121 | ||
cbcd9bfc JT |
1122 | dnl disable doc check |
1123 | if test "${enable_doc}" = "no";then | |
1124 | DOC="" | |
1125 | else | |
1126 | DOC="doc" | |
1127 | fi | |
1128 | ||
7ea487bc | 1129 | dnl -------------------- |
1130 | dnl Daemon disable check | |
1131 | dnl -------------------- | |
1132 | if test "${enable_zebra}" = "no";then | |
1133 | ZEBRA="" | |
1134 | else | |
1135 | ZEBRA="zebra" | |
1136 | fi | |
f027d331 | 1137 | AM_CONDITIONAL(ZEBRA, test "x$ZEBRA" = "xzebra") |
7ea487bc | 1138 | |
1139 | if test "${enable_bgpd}" = "no";then | |
1140 | BGPD="" | |
1141 | else | |
1142 | BGPD="bgpd" | |
1143 | fi | |
f027d331 | 1144 | AM_CONDITIONAL(BGPD, test "x$BGPD" = "xbgpd") |
7ea487bc | 1145 | |
1146 | if test "${enable_ripd}" = "no";then | |
1147 | RIPD="" | |
1148 | else | |
1149 | RIPD="ripd" | |
1150 | fi | |
f027d331 | 1151 | AM_CONDITIONAL(RIPD, test "x$RIPD" = "xripd") |
7ea487bc | 1152 | |
1153 | if test "${enable_ospfd}" = "no";then | |
1154 | OSPFD="" | |
1155 | else | |
1156 | OSPFD="ospfd" | |
1157 | fi | |
f027d331 | 1158 | AM_CONDITIONAL(OSPFD, test "x$OSPFD" = "xospfd") |
7ea487bc | 1159 | |
eac6e3f0 RW |
1160 | if test "${enable_ldpd}" = "yes";then |
1161 | LDPD="ldpd" | |
87ab4aec | 1162 | AC_DEFINE(HAVE_LDPD, 1, ldpd) |
eac6e3f0 RW |
1163 | else |
1164 | LDPD="" | |
1165 | fi | |
1166 | AM_CONDITIONAL(LDPD, test "x$LDPD" = "xldpd") | |
1167 | ||
d0199430 | 1168 | if test "${enable_watchquagga}" = "no";then |
1169 | WATCHQUAGGA="" | |
1170 | else | |
1171 | WATCHQUAGGA="watchquagga" | |
1172 | fi | |
f027d331 | 1173 | AM_CONDITIONAL(WATCHQUAGGA, test "x$WATCHQUAGGA" = "xwatchquagga") |
d0199430 | 1174 | |
1ef74ef7 | 1175 | OSPFCLIENT="" |
cd66cd4c | 1176 | if test "${enable_ospfapi}" != "no";then |
9a569848 | 1177 | AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI) |
1ef74ef7 | 1178 | |
cd66cd4c | 1179 | if test "${enable_ospfclient}" != "no";then |
1ef74ef7 | 1180 | OSPFCLIENT="ospfclient" |
1ef74ef7 | 1181 | fi |
7ea487bc | 1182 | fi |
cd66cd4c | 1183 | |
f027d331 | 1184 | AM_CONDITIONAL(OSPFCLIENT, test "x$OSPFCLIENT" = "xospfclient") |
7ea487bc | 1185 | |
1186 | case "${enable_ripngd}" in | |
7ea487bc | 1187 | "no" ) RIPNGD="";; |
80ec006d | 1188 | * ) RIPNGD="ripngd";; |
7ea487bc | 1189 | esac |
f027d331 | 1190 | AM_CONDITIONAL(RIPNGD, test "x$RIPNGD" = "xripngd") |
7ea487bc | 1191 | |
1192 | case "${enable_ospf6d}" in | |
7ea487bc | 1193 | "no" ) OSPF6D="";; |
80ec006d | 1194 | * ) OSPF6D="ospf6d";; |
7ea487bc | 1195 | esac |
f027d331 | 1196 | AM_CONDITIONAL(OSPF6D, test "x$OSPF6D" = "xospf6d") |
7ea487bc | 1197 | |
9e867fe6 | 1198 | case "${enable_isisd}" in |
9e867fe6 | 1199 | "no" ) ISISD="";; |
c3a9461e | 1200 | * ) ISISD="isisd";; |
9e867fe6 | 1201 | esac |
f027d331 | 1202 | AM_CONDITIONAL(ISISD, test "x$ISISD" = "xisisd") |
9e867fe6 | 1203 | |
12e41d03 | 1204 | case "${enable_pimd}" in |
12e41d03 | 1205 | "no" ) PIMD="";; |
f0646db0 | 1206 | * ) PIMD="pimd";; |
12e41d03 DL |
1207 | esac |
1208 | AM_CONDITIONAL(PIMD, test "x$PIMD" = "xpimd") | |
1209 | ||
7ea487bc | 1210 | if test "${enable_bgp_announce}" = "no";then |
750e8146 PJ |
1211 | AC_DEFINE(DISABLE_BGP_ANNOUNCE,1,Disable BGP installation to zebra) |
1212 | else | |
1213 | AC_DEFINE(DISABLE_BGP_ANNOUNCE,0,Disable BGP installation to zebra) | |
7ea487bc | 1214 | fi |
1215 | ||
65efcfce LB |
1216 | if test "${with_rfp_path}" = "yes" || test x"${with_rfp_path}" = x""; then |
1217 | with_rfp_path="bgpd/rfp-example" | |
1218 | fi | |
1219 | if test "${with_rfp_path}" != "no"; then | |
1220 | VNC_RFP_PATH="${with_rfp_path}" | |
1221 | AC_SUBST(VNC_RFP_PATH) | |
1222 | fi | |
1223 | ||
f95f2ad9 | 1224 | if test "${enable_bgp_vnc}" != "no";then |
65efcfce LB |
1225 | AC_DEFINE(ENABLE_BGP_VNC,1,Enable BGP VNC support) |
1226 | RFPTEST="${with_rfp_path}/rfptest" | |
1227 | LIBRFP="${with_rfp_path}/librfp" | |
1228 | RFPINC="${with_rfp_path}/librfp" | |
1229 | else | |
1230 | RFPTEST= | |
1231 | LIBRFP= | |
1232 | RFPINC="bgpd/rfp-example/librfp" | |
1233 | fi | |
1234 | # set | |
f95f2ad9 | 1235 | AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno]) |
65efcfce | 1236 | |
cbcd9bfc | 1237 | AC_SUBST(DOC) |
7ea487bc | 1238 | AC_SUBST(ZEBRA) |
65efcfce LB |
1239 | AC_SUBST(RFPTEST) |
1240 | AC_SUBST(LIBRFP) | |
1241 | AC_SUBST(RFPINC) | |
7ea487bc | 1242 | AC_SUBST(BGPD) |
1243 | AC_SUBST(RIPD) | |
1244 | AC_SUBST(RIPNGD) | |
1245 | AC_SUBST(OSPFD) | |
1246 | AC_SUBST(OSPF6D) | |
eac6e3f0 | 1247 | AC_SUBST(LDPD) |
d0199430 | 1248 | AC_SUBST(WATCHQUAGGA) |
9e867fe6 | 1249 | AC_SUBST(ISISD) |
12e41d03 | 1250 | AC_SUBST(PIMD) |
97cee877 | 1251 | AC_SUBST(SOLARIS) |
7ea487bc | 1252 | AC_SUBST(VTYSH) |
7ea487bc | 1253 | AC_SUBST(CURSES) |
1254 | AC_SUBST(OSPFCLIENT) | |
1ef74ef7 | 1255 | AC_SUBST(OSPFAPI) |
7ea487bc | 1256 | AC_CHECK_LIB(crypt, crypt) |
1257 | AC_CHECK_LIB(resolv, res_init) | |
7ea487bc | 1258 | |
25f45887 JJ |
1259 | dnl --------------------------- |
1260 | dnl check system has PCRE regexp | |
1261 | dnl --------------------------- | |
1262 | if test "x$enable_pcreposix" = "xyes"; then | |
1263 | AC_CHECK_LIB(pcreposix, pcreposix_regexec, ,[enable_pcreposix=no | |
1264 | AC_MSG_WARN([*** falling back to other regex library ***]) ]) | |
1265 | fi | |
25f45887 | 1266 | AC_SUBST(HAVE_LIBPCREPOSIX) |
7ea487bc | 1267 | |
1268 | dnl ------------------ | |
b1fc9acb | 1269 | dnl check Net-SNMP library |
7ea487bc | 1270 | dnl ------------------ |
d6be5fb9 | 1271 | if test "${enable_snmp}" != ""; then |
08d7f653 VB |
1272 | AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], [no]) |
1273 | if test x"$NETSNMP_CONFIG" = x"no"; then | |
1274 | AC_MSG_ERROR([--enable-snmp given but unable to find net-snmp-config]) | |
1275 | fi | |
1276 | LIBS="$LIBS `${NETSNMP_CONFIG} --agent-libs`" | |
1277 | CFLAGS="`${NETSNMP_CONFIG} --base-cflags` $CFLAGS" | |
1278 | AC_MSG_CHECKING([whether we can link to Net-SNMP]) | |
1279 | AC_LINK_IFELSE([AC_LANG_PROGRAM([ | |
1280 | int main(void); | |
1281 | ], | |
1282 | [ | |
1283 | { | |
1284 | return 0; | |
1285 | } | |
1286 | ])],[AC_MSG_RESULT(yes)],[ | |
1287 | AC_MSG_RESULT(no) | |
1288 | AC_MSG_ERROR([--enable-snmp given but not usable])]) | |
1289 | AC_DEFINE(HAVE_SNMP,,SNMP) | |
d6be5fb9 VB |
1290 | case "${enable_snmp}" in |
1291 | yes) | |
1292 | SNMP_METHOD=agentx | |
1293 | ;; | |
1294 | smux|agentx) | |
1295 | SNMP_METHOD="${enable_snmp}" | |
1296 | ;; | |
1297 | *) | |
1298 | AC_MSG_ERROR([--enable-snmp given with an unknown method (${enable_snmp}). Use smux or agentx]) | |
1299 | ;; | |
1300 | esac | |
1301 | AH_TEMPLATE([SNMP_SMUX], [Use SNMP SMUX to interface with snmpd]) | |
1302 | AH_TEMPLATE([SNMP_AGENTX], [Use SNMP AgentX to interface with snmpd]) | |
1303 | AC_DEFINE_UNQUOTED(AS_TR_CPP(SNMP_${SNMP_METHOD}),,SNMP method to interface with snmpd) | |
6cf9df08 | 1304 | fi |
1305 | ||
7ea487bc | 1306 | dnl --------------------------- |
6f0e3f6e | 1307 | dnl sockaddr and netinet checks |
7ea487bc | 1308 | dnl --------------------------- |
24f5e2fc DL |
1309 | AC_CHECK_TYPES([ |
1310 | struct sockaddr_dl, | |
1311 | struct vifctl, struct mfcctl, struct sioc_sg_req, | |
12e41d03 | 1312 | vifi_t, struct sioc_vif_req, struct igmpmsg, |
6f0e3f6e PJ |
1313 | struct ifaliasreq, struct if6_aliasreq, struct in6_aliasreq, |
1314 | struct nd_opt_adv_interval, struct rt_addrinfo, | |
11770e10 | 1315 | struct nd_opt_homeagent_info, struct nd_opt_adv_interval], |
6f0e3f6e PJ |
1316 | [], [], QUAGGA_INCLUDES) |
1317 | ||
1318 | AC_CHECK_MEMBERS([struct sockaddr.sa_len, | |
1319 | struct sockaddr_in.sin_len, struct sockaddr_un.sun_len, | |
ca3ccd87 | 1320 | struct sockaddr_dl.sdl_len, |
6f0e3f6e PJ |
1321 | struct if6_aliasreq.ifra_lifetime, |
1322 | struct nd_opt_adv_interval.nd_opt_ai_type], | |
1323 | [], [], QUAGGA_INCLUDES) | |
29c4c9bd | 1324 | |
6f0e3f6e | 1325 | dnl --------------------------- |
11770e10 | 1326 | dnl IRDP/pktinfo/icmphdr checks |
6f0e3f6e PJ |
1327 | dnl --------------------------- |
1328 | AC_CHECK_TYPES([struct in_pktinfo], | |
11770e10 PJ |
1329 | [AC_CHECK_TYPES([struct icmphdr], |
1330 | [if test "${enable_irdp}" != "no"; then | |
1331 | AC_DEFINE(HAVE_IRDP,, IRDP) | |
1332 | fi], | |
1333 | [if test "${enable_irdp}" = "yes"; then | |
1334 | AC_MSG_ERROR(['IRDP requires in_pktinfo at the moment!']) | |
1335 | fi], [QUAGGA_INCLUDES])], | |
6f0e3f6e PJ |
1336 | [if test "${enable_irdp}" = "yes"; then |
1337 | AC_MSG_ERROR(['IRDP requires in_pktinfo at the moment!']) | |
1338 | fi], [QUAGGA_INCLUDES]) | |
29c4c9bd | 1339 | |
12e41d03 DL |
1340 | dnl ----------------------- |
1341 | dnl checking for IP_PKTINFO | |
1342 | dnl ----------------------- | |
1343 | AC_MSG_CHECKING(for IP_PKTINFO) | |
1344 | AC_TRY_COMPILE([#include <netdb.h>], [ | |
1345 | int opt = IP_PKTINFO; | |
1346 | ], [ | |
1347 | AC_MSG_RESULT(yes) | |
1348 | AC_DEFINE(HAVE_IP_PKTINFO, 1, [Have IP_PKTINFO]) | |
1349 | ], [ | |
1350 | AC_MSG_RESULT(no) | |
1351 | ]) | |
1352 | ||
1353 | dnl --------------------------- | |
1354 | dnl checking for IP_RECVDSTADDR | |
1355 | dnl --------------------------- | |
1356 | AC_MSG_CHECKING(for IP_RECVDSTADDR) | |
1357 | AC_TRY_COMPILE([#include <netinet/in.h>], [ | |
1358 | int opt = IP_RECVDSTADDR; | |
1359 | ], [ | |
1360 | AC_MSG_RESULT(yes) | |
1361 | AC_DEFINE(HAVE_IP_RECVDSTADDR, 1, [Have IP_RECVDSTADDR]) | |
1362 | ], [ | |
1363 | AC_MSG_RESULT(no) | |
1364 | ]) | |
1365 | ||
1366 | dnl ---------------------- | |
1367 | dnl checking for IP_RECVIF | |
1368 | dnl ---------------------- | |
1369 | AC_MSG_CHECKING(for IP_RECVIF) | |
1370 | AC_TRY_COMPILE([#include <netinet/in.h>], [ | |
1371 | int opt = IP_RECVIF; | |
1372 | ], [ | |
1373 | AC_MSG_RESULT(yes) | |
1374 | AC_DEFINE(HAVE_IP_RECVIF, 1, [Have IP_RECVIF]) | |
1375 | ], [ | |
1376 | AC_MSG_RESULT(no) | |
1377 | ]) | |
1378 | ||
eac6e3f0 RW |
1379 | dnl ---------------------- |
1380 | dnl checking for SO_BINDANY | |
1381 | dnl ---------------------- | |
1382 | AC_MSG_CHECKING(for SO_BINDANY) | |
1383 | AC_TRY_COMPILE([#include <sys/socket.h>], [ | |
1384 | int opt = SO_BINDANY; | |
1385 | ], [ | |
1386 | AC_MSG_RESULT(yes) | |
1387 | AC_DEFINE(HAVE_SO_BINDANY, 1, [Have SO_BINDANY]) | |
1388 | ], [ | |
1389 | AC_MSG_RESULT(no) | |
1390 | ]) | |
1391 | ||
1392 | dnl ---------------------- | |
1393 | dnl checking for IP_FREEBIND | |
1394 | dnl ---------------------- | |
1395 | AC_MSG_CHECKING(for IP_FREEBIND) | |
1396 | AC_TRY_COMPILE([#include <netinet/in.h>], [ | |
1397 | int opt = IP_FREEBIND; | |
1398 | ], [ | |
1399 | AC_MSG_RESULT(yes) | |
1400 | AC_DEFINE(HAVE_IP_FREEBIND, 1, [Have IP_FREEBIND]) | |
1401 | ], [ | |
1402 | AC_MSG_RESULT(no) | |
1403 | ]) | |
1404 | ||
c4376c9d SH |
1405 | dnl -------------------------------------- |
1406 | dnl checking for clock_time monotonic struct and call | |
1407 | dnl -------------------------------------- | |
6511cab2 PJ |
1408 | AC_CHECK_DECL(CLOCK_MONOTONIC, |
1409 | [AC_CHECK_LIB(rt, clock_gettime, [LIBS="$LIBS -lrt"]) | |
9964fcfc | 1410 | AC_DEFINE(HAVE_CLOCK_MONOTONIC,, Have monotonic clock) |
6511cab2 | 1411 | ], [AC_MSG_RESULT(no)], [QUAGGA_INCLUDES]) |
c4376c9d | 1412 | |
bbf5ffa0 QY |
1413 | dnl -------------------------------------- |
1414 | dnl checking for flex and bison | |
1415 | dnl -------------------------------------- | |
1416 | AM_PROG_LEX | |
1417 | if test "x$LEX" != xflex; then | |
1418 | LEX="$SHELL $missing_dir/missing flex" | |
1419 | AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) | |
1420 | AC_SUBST([LEXLIB], ['']) | |
1421 | fi | |
1422 | AC_PROG_YACC | |
1423 | ||
edd7c245 | 1424 | dnl ------------------- |
1425 | dnl capabilities checks | |
1426 | dnl ------------------- | |
41d3fc96 | 1427 | if test "${enable_capabilities}" != "no"; then |
1428 | AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available) | |
1429 | AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);], | |
1430 | [AC_MSG_RESULT(yes) | |
1431 | AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl) | |
1432 | quagga_ac_keepcaps="yes"], | |
1433 | AC_MSG_RESULT(no) | |
edd7c245 | 1434 | ) |
41d3fc96 | 1435 | if test x"${quagga_ac_keepcaps}" = x"yes"; then |
1436 | AC_CHECK_HEADERS(sys/capability.h) | |
1437 | fi | |
1438 | if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then | |
1439 | AC_CHECK_LIB(cap, cap_init, | |
1440 | [AC_DEFINE(HAVE_LCAPS,1,Capabilities) | |
1441 | LIBCAP="-lcap" | |
ceacedba | 1442 | quagga_ac_lcaps="yes"] |
41d3fc96 | 1443 | ) |
ceacedba | 1444 | else |
1445 | AC_CHECK_HEADERS(priv.h, | |
1446 | [AC_MSG_CHECKING(Solaris style privileges are available) | |
1447 | AC_TRY_COMPILE([#include <priv.h>],[getpflags(PRIV_AWARE);], | |
1448 | [AC_MSG_RESULT(yes) | |
1449 | AC_DEFINE(HAVE_SOLARIS_CAPABILITIES,1,getpflags) | |
1450 | quagga_ac_scaps="yes"], | |
1451 | AC_MSG_RESULT(no) | |
1452 | ) | |
1453 | ] | |
1454 | ) | |
1455 | fi | |
1456 | if test x"${quagga_ac_scaps}" = x"yes" \ | |
1457 | -o x"${quagga_ac_lcaps}" = x"yes"; then | |
1458 | AC_DEFINE(HAVE_CAPABILITIES,1,capabilities) | |
41d3fc96 | 1459 | fi |
edd7c245 | 1460 | fi |
1461 | AC_SUBST(LIBCAP) | |
1462 | ||
fb2d1502 | 1463 | dnl --------------------------- |
1464 | dnl check for glibc 'backtrace' | |
1465 | dnl --------------------------- | |
8c99b4c1 DL |
1466 | if test x"${enable_backtrace}" != x"no" ; then |
1467 | backtrace_ok=no | |
1468 | AC_CHECK_HEADER([execinfo.h], [ | |
1469 | AC_SEARCH_LIBS([backtrace], [execinfo], [ | |
1470 | AC_DEFINE(HAVE_GLIBC_BACKTRACE,,[Glibc backtrace]) | |
1471 | AC_DEFINE(HAVE_STACK_TRACE,,[Stack symbol decoding]) | |
1472 | backtrace_ok=yes | |
1473 | ],, [-lm]) | |
eda3529e | 1474 | ]) |
8c99b4c1 DL |
1475 | |
1476 | if test x"${enable_backtrace}" = x"yes" -a x"${backtrace_ok}" = x"no"; then | |
1477 | dnl user explicitly requested backtrace but we failed to find support | |
1478 | AC_MSG_FAILURE([failed to find backtrace support]) | |
1479 | fi | |
1480 | fi | |
fb2d1502 | 1481 | |
41be32bf PJ |
1482 | dnl ----------------------------------------- |
1483 | dnl check for malloc mallinfo struct and call | |
1484 | dnl this must try and link using LIBS, in | |
1485 | dnl order to check no alternative allocator | |
1486 | dnl has been specified, which might not provide | |
1487 | dnl mallinfo, e.g. such as Umem on Solaris. | |
1488 | dnl ----------------------------------------- | |
6f0e3f6e | 1489 | AC_CHECK_HEADER([malloc.h], |
41be32bf PJ |
1490 | [AC_MSG_CHECKING(whether mallinfo is available) |
1491 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]], | |
1492 | [[struct mallinfo ac_x; ac_x = mallinfo ();]])], | |
1493 | [AC_MSG_RESULT(yes) | |
1494 | AC_DEFINE(HAVE_MALLINFO,,mallinfo)], | |
1495 | AC_MSG_RESULT(no) | |
1496 | ) | |
6f0e3f6e | 1497 | ], [], QUAGGA_INCLUDES) |
41be32bf | 1498 | |
408ad943 | 1499 | dnl ---------- |
1500 | dnl configure date | |
1501 | dnl ---------- | |
1502 | CONFDATE=`date '+%Y%m%d'` | |
1503 | AC_SUBST(CONFDATE) | |
1504 | ||
f281ab97 DL |
1505 | dnl ------- |
1506 | dnl DejaGNU | |
1507 | dnl ------- | |
1508 | if test x"$DEJAGNU" = x | |
1509 | then | |
1510 | DEJAGNU="\$(top_srcdir)/tests/global-conf.exp" | |
1511 | fi | |
1512 | RUNTESTDEFAULTFLAGS="-x --tool \$\$tool" | |
1513 | ||
1514 | AC_SUBST(DEJAGNU) | |
1515 | AC_SUBST(RUNTESTDEFAULTFLAGS) | |
1516 | ||
7ea487bc | 1517 | dnl ------------------------------ |
a159ed93 | 1518 | dnl set paths for state directory |
23bd12c3 | 1519 | dnl ------------------------------ |
e84999d9 | 1520 | AC_MSG_CHECKING(directory to use for state file) |
23bd12c3 | 1521 | if test "${prefix}" = "NONE"; then |
e8f2984c | 1522 | quagga_statedir_prefix=""; |
23bd12c3 | 1523 | else |
e8f2984c | 1524 | quagga_statedir_prefix=${prefix} |
23bd12c3 | 1525 | fi |
1526 | if test "${localstatedir}" = '${prefix}/var'; then | |
e84999d9 | 1527 | for QUAGGA_STATE_DIR in ${quagga_statedir_prefix}/var/run dnl |
e8f2984c | 1528 | ${quagga_statedir_prefix}/var/adm dnl |
1529 | ${quagga_statedir_prefix}/etc dnl | |
a159ed93 | 1530 | /var/run dnl |
1531 | /var/adm dnl | |
1532 | /etc dnl | |
1533 | /dev/null; | |
23bd12c3 | 1534 | do |
e8f2984c | 1535 | test -d $QUAGGA_STATE_DIR && break |
23bd12c3 | 1536 | done |
e84999d9 | 1537 | quagga_statedir=$QUAGGA_STATE_DIR |
23bd12c3 | 1538 | else |
e8f2984c | 1539 | quagga_statedir=${localstatedir} |
a159ed93 | 1540 | fi |
e8f2984c | 1541 | if test $quagga_statedir = "/dev/null"; then |
a159ed93 | 1542 | AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!') |
1543 | fi | |
e84999d9 JJ |
1544 | AC_MSG_RESULT(${quagga_statedir}) |
1545 | AC_SUBST(quagga_statedir) | |
a159ed93 | 1546 | |
e8f2984c | 1547 | AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$quagga_statedir/zebra.pid",zebra PID) |
1548 | AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$quagga_statedir/ripd.pid",ripd PID) | |
1549 | AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$quagga_statedir/ripngd.pid",ripngd PID) | |
1550 | AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$quagga_statedir/bgpd.pid",bgpd PID) | |
1551 | AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID) | |
1552 | AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID) | |
eac6e3f0 RW |
1553 | AC_DEFINE_UNQUOTED(PATH_LDPD_PID, "$quagga_statedir/ldpd.pid",ldpd PID) |
1554 | AC_DEFINE_UNQUOTED(LDPD_SOCKET, "$quagga_statedir/ldpd.sock",ldpd control socket) | |
9e867fe6 | 1555 | AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$quagga_statedir/isisd.pid",isisd PID) |
12e41d03 | 1556 | AC_DEFINE_UNQUOTED(PATH_PIMD_PID, "$quagga_statedir/pimd.pid",pimd PID) |
d0199430 | 1557 | AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$quagga_statedir/watchquagga.pid",watchquagga PID) |
e8f2984c | 1558 | AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket) |
1559 | AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket) | |
1560 | AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket) | |
1561 | AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$quagga_statedir/ripngd.vty",ripng vty socket) | |
1562 | AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$quagga_statedir/bgpd.vty",bgpd vty socket) | |
1563 | AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$quagga_statedir/ospfd.vty",ospfd vty socket) | |
1564 | AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty socket) | |
eac6e3f0 | 1565 | AC_DEFINE_UNQUOTED(LDP_VTYSH_PATH, "$quagga_statedir/ldpd.vty",ldpd vty socket) |
9e867fe6 | 1566 | AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$quagga_statedir/isisd.vty",isisd vty socket) |
12e41d03 | 1567 | AC_DEFINE_UNQUOTED(PIM_VTYSH_PATH, "$quagga_statedir/pimd.vty",pimd vty socket) |
4a96e944 | 1568 | AC_DEFINE_UNQUOTED(WATCHQUAGGA_VTYSH_PATH, "$quagga_statedir/watchquagga.vty",watchquagga vty socket) |
515210bd | 1569 | AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$quagga_statedir",daemon vty directory) |
7ea487bc | 1570 | |
95c4aff2 DL |
1571 | dnl autoconf does this, but it does it too late... |
1572 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
1573 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
1574 | ||
1575 | dnl get the full path, recursing through variables... | |
1576 | vtysh_bin="$bindir/vtysh" | |
1577 | for I in 1 2 3 4 5 6 7 8 9 10; do | |
1578 | eval vtysh_bin="\"$vtysh_bin\"" | |
1579 | done | |
1580 | AC_DEFINE_UNQUOTED(VTYSH_BIN_PATH, "$vtysh_bin",path to vtysh binary) | |
1581 | ||
1eb8ef25 | 1582 | dnl ------------------------------- |
1583 | dnl Quagga sources should always be | |
1584 | dnl current wrt interfaces. Dont | |
1585 | dnl allow deprecated interfaces to | |
1586 | dnl be exposed. | |
1587 | dnl ------------------------------- | |
1588 | AC_DEFINE(QUAGGA_NO_DEPRECATED_INTERFACES, 1, Hide deprecated interfaces) | |
1589 | ||
7ea487bc | 1590 | dnl --------------------------- |
1591 | dnl Check htonl works correctly | |
1592 | dnl --------------------------- | |
1593 | AC_MSG_CHECKING(for working htonl) | |
6f0e3f6e PJ |
1594 | AC_CACHE_VAL(ac_cv_htonl_works, |
1595 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([QUAGGA_INCLUDES],[htonl (0);])], | |
1596 | [ac_cv_htonl_works=yes], [ac_cv_htonl_works=no]) | |
1597 | ] | |
1598 | ) | |
7ea487bc | 1599 | AC_MSG_RESULT($ac_cv_htonl_works) |
1600 | ||
dad253b4 | 1601 | AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile |
d0199430 | 1602 | ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile |
eac6e3f0 | 1603 | ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile |
f281ab97 | 1604 | doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile |
12e41d03 | 1605 | pimd/Makefile |
5bb7e4d1 | 1606 | tests/bgpd.tests/Makefile |
c69905b6 | 1607 | tests/libzebra.tests/Makefile |
f281ab97 | 1608 | redhat/Makefile |
1018422a DS |
1609 | tools/Makefile |
1610 | cumulus/Makefile | |
69f1fc22 | 1611 | pkgsrc/Makefile |
93c7bed1 | 1612 | fpm/Makefile |
670bbf19 | 1613 | redhat/quagga.spec |
b7a97f82 | 1614 | lib/version.h |
14c17fd8 | 1615 | doc/defines.texi |
cbd04084 | 1616 | pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh |
f31293af | 1617 | pkgsrc/ripd.sh pkgsrc/ripngd.sh pkgsrc/zebra.sh]) |
65efcfce | 1618 | |
f95f2ad9 | 1619 | if test "${enable_bgp_vnc}" != "no"; then |
65efcfce LB |
1620 | if test "${with_rfp_path}" = "bgpd/rfp-example" ; then |
1621 | AC_CONFIG_FILES([bgpd/rfp-example/rfptest/Makefile bgpd/rfp-example/librfp/Makefile]) | |
1622 | else | |
1623 | AC_CONFIG_FILES([${with_rfp_path}/rfptest/Makefile ${with_rfp_path}/librfp/Makefile]) | |
1624 | fi | |
1625 | fi | |
1626 | ||
26275b05 | 1627 | AC_CONFIG_FILES([solaris/Makefile]) |
1628 | ||
670bbf19 | 1629 | AC_CONFIG_FILES([vtysh/extract.pl],[chmod +x vtysh/extract.pl]) |
65efcfce | 1630 | |
48577196 | 1631 | ## Hack, but working solution to avoid rebuilding of quagga.info. |
1632 | ## It's already in CVS until texinfo 4.7 is more common. | |
14c17fd8 | 1633 | AC_OUTPUT |
7ea487bc | 1634 | |
1635 | echo " | |
c89f6494 | 1636 | Quagga configuration |
1637 | -------------------- | |
1638 | quagga version : ${PACKAGE_VERSION} | |
1080c13f | 1639 | host operating system : ${host_os} |
7ea487bc | 1640 | source code location : ${srcdir} |
1641 | compiler : ${CC} | |
1642 | compiler flags : ${CFLAGS} | |
6f0e3f6e | 1643 | make : ${MAKE-make} |
6f0e3f6e | 1644 | linker flags : ${LDFLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE} ${LIBM} |
e8f2984c | 1645 | state file directory : ${quagga_statedir} |
dc7a2bf1 | 1646 | config file directory : `eval echo \`echo ${sysconfdir}\`` |
d6b72f7a | 1647 | example directory : `eval echo \`echo ${exampledir}\`` |
8d4aee5d | 1648 | user to run as : ${enable_user} |
1649 | group to run as : ${enable_group} | |
1650 | group for vty sockets : ${enable_vty_group} | |
aa593d5e | 1651 | config file mask : ${enable_configfile_mask} |
1652 | log file mask : ${enable_logfile_mask} | |
dad253b4 | 1653 | zebra protobuf enabled : ${have_protobuf:-no} |
dc7a2bf1 | 1654 | |
1655 | The above user and group must have read/write access to the state file | |
105b8239 | 1656 | directory and to the config files in the config file directory." |