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