paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 1 | ## |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 2 | ## Configure template file for Quagga. |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 3 | ## autoconf will generate configure script. |
| 4 | ## |
| 5 | ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org> |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 6 | ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st> |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 7 | ## |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 8 | AC_PREREQ(2.53) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 9 | |
hasso | eb26037 | 2004-02-20 18:40:38 +0000 | [diff] [blame] | 10 | AC_INIT(quagga, 0.96.4, [http://bugzilla.quagga.net]) |
paul | fa1253d | 2003-09-24 05:09:26 +0000 | [diff] [blame] | 11 | AC_CONFIG_SRCDIR(lib/zebra.h) |
gdt | 1666d35 | 2004-03-30 13:45:58 +0000 | [diff] [blame] | 12 | AM_INIT_AUTOMAKE(1.7) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 13 | AM_CONFIG_HEADER(config.h) |
| 14 | |
gdt | d6b72f7 | 2003-12-03 17:24:27 +0000 | [diff] [blame] | 15 | dnl default is to match previous behavior |
gdt | c4f0efe | 2003-12-04 15:39:25 +0000 | [diff] [blame] | 16 | exampledir=${sysconfdir} |
gdt | d6b72f7 | 2003-12-03 17:24:27 +0000 | [diff] [blame] | 17 | AC_ARG_ENABLE([exampledir], |
| 18 | AC_HELP_STRING([--enable-exampledir], |
| 19 | [specify alternate directory for examples]), |
| 20 | exampledir="$enableval",) |
gdt | c4f0efe | 2003-12-04 15:39:25 +0000 | [diff] [blame] | 21 | dnl XXX add --exampledir to autoconf standard directory list somehow |
gdt | d6b72f7 | 2003-12-03 17:24:27 +0000 | [diff] [blame] | 22 | AC_SUBST(exampledir) |
| 23 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 24 | dnl ----------------------------------- |
| 25 | dnl Get hostname and other information. |
| 26 | dnl ----------------------------------- |
| 27 | AC_CANONICAL_HOST |
| 28 | |
| 29 | dnl ------------ |
| 30 | dnl Check CFLAGS |
| 31 | dnl ------------ |
| 32 | AC_ARG_WITH(cflags, |
| 33 | [ --with-cflags Set CFLAGS for use in compilation.]) |
| 34 | if test "x$with_cflags" != "x" ; then |
| 35 | CFLAGS="$with_cflags" ; cflags_specified=yes ; |
| 36 | elif test -n "$CFLAGS" ; then |
| 37 | cflags_specified=yes ; |
| 38 | fi |
| 39 | |
| 40 | dnl -------- |
| 41 | dnl Check CC |
| 42 | dnl -------- |
| 43 | AC_PROG_CC |
| 44 | |
| 45 | dnl ----------------------------------------- |
| 46 | dnl If CLFAGS doesn\'t exist set default value |
| 47 | dnl ----------------------------------------- |
| 48 | if test "x$cflags_specified" = "x" ; then |
| 49 | CFLAGS="$CFLAGS -Wall" |
| 50 | fi |
| 51 | |
| 52 | dnl -------------- |
| 53 | dnl Check programs |
| 54 | dnl -------------- |
| 55 | AC_PROG_CPP |
| 56 | AC_PROG_INSTALL |
| 57 | AC_PROG_MAKE_SET |
| 58 | AC_CHECK_TOOL(AR, ar) |
| 59 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 60 | |
| 61 | dnl --------- |
| 62 | dnl AIX check |
| 63 | dnl --------- |
| 64 | AC_AIX |
| 65 | |
| 66 | dnl ---------------------- |
| 67 | dnl Packages configuration |
| 68 | dnl ---------------------- |
| 69 | AC_ARG_ENABLE(vtysh, |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 70 | [ --enable-vtysh, Make integrated vty shell for Quagga]) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 71 | AC_ARG_ENABLE(ipv6, |
| 72 | [ --disable-ipv6 turn off IPv6 related features and daemons]) |
| 73 | AC_ARG_ENABLE(zebra, |
| 74 | [ --disable-zebra do not build zebra daemon]) |
| 75 | AC_ARG_ENABLE(bgpd, |
| 76 | [ --disable-bgpd do not build bgpd]) |
| 77 | AC_ARG_ENABLE(ripd, |
| 78 | [ --disable-ripd do not build ripd]) |
| 79 | AC_ARG_ENABLE(ripngd, |
| 80 | [ --disable-ripngd do not build ripngd]) |
| 81 | AC_ARG_ENABLE(ospfd, |
| 82 | [ --disable-ospfd do not build ospfd]) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 83 | AC_ARG_ENABLE(ospf6d, |
| 84 | [ --disable-ospf6d do not build ospf6d]) |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 85 | AC_ARG_ENABLE(isisd, |
| 86 | [ --disable-isisd do not build isisd]) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 87 | AC_ARG_ENABLE(bgp-announce, |
| 88 | [ --disable-bgp-announce, turn off BGP route announcement]) |
| 89 | AC_ARG_ENABLE(netlink, |
| 90 | [ --enable-netlink force to use Linux netlink interface]) |
| 91 | AC_ARG_ENABLE(broken-aliases, |
| 92 | [ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X]) |
| 93 | AC_ARG_ENABLE(snmp, |
| 94 | [ --enable-snmp enable SNMP support]) |
| 95 | AC_ARG_WITH(libpam, |
| 96 | [ --with-libpam use libpam for PAM support in vtysh]) |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 97 | AC_ARG_ENABLE(tcp-zebra, |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 98 | [ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon]) |
| 99 | dnl Temporary option until OSPF NSSA implementation complete |
| 100 | AC_ARG_ENABLE(nssa, |
| 101 | [ --enable-nssa enable OSPF NSSA option]) |
| 102 | AC_ARG_ENABLE(opaque-lsa, |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 103 | [ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)]) |
| 104 | AC_ARG_ENABLE(ospfapi, |
| 105 | [ --disable-ospfapi do not build OSPFAPI to access the OSPF LSA Database, |
| 106 | (this is the default if --enable-opaque-lsa is not set)]) |
| 107 | AC_ARG_ENABLE(ospfclient, |
| 108 | [ --disable-ospfclient do not build OSPFAPI client for OSPFAPI, |
| 109 | (this is the default if --disable-ospfapi is set)]) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 110 | AC_ARG_ENABLE(ospf-te, |
| 111 | [ --enable-ospf-te enable Traffic Engineering Extension to OSPF]) |
| 112 | AC_ARG_ENABLE(multipath, |
| 113 | [ --enable-multipath=ARG enable multipath function, ARG must be digit]) |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 114 | AC_ARG_ENABLE(quagga_user, |
| 115 | [ --enable-user=ARG user to run Quagga suite as (default quagga)]) |
| 116 | AC_ARG_ENABLE(quagga_group, |
| 117 | [ --enable-group=ARG group to run Quagga suite as (default quagga)]) |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 118 | AC_ARG_ENABLE(vty_group, |
| 119 | [ --enable-vty-group=ARG set vty sockets to have specified group as owner]) |
gdt | aa593d5 | 2003-12-22 20:15:53 +0000 | [diff] [blame] | 120 | AC_ARG_ENABLE(configfile_mask, |
| 121 | [ --enable-configfile-mask=ARG set mask for config files]) |
| 122 | AC_ARG_ENABLE(logfile_mask, |
| 123 | [ --enable-logfile-mask=ARG set mask for log files]) |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 124 | |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 125 | AC_ARG_ENABLE(rtadv, |
gdt | d2a0ccc | 2003-12-03 18:13:48 +0000 | [diff] [blame] | 126 | [ --disable-rtadv disable IPV6 router advertisement feature]) |
hasso | 41d3fc9 | 2004-04-06 11:59:00 +0000 | [diff] [blame^] | 127 | AC_ARG_ENABLE(capabilities, |
| 128 | [ --disable-capabilities disable using POSIX capabilities]) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 129 | |
| 130 | if test "${enable_broken_aliases}" = "yes"; then |
| 131 | if test "${enable_netlink}" = "yes" |
| 132 | then |
| 133 | echo "Sorry, you can't use netlink with broken aliases" |
| 134 | exit 1 |
| 135 | fi |
| 136 | AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias) |
| 137 | enable_netlink=no |
| 138 | fi |
| 139 | |
| 140 | if test "${enable_tcp_zebra}" = "yes"; then |
| 141 | AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication) |
| 142 | fi |
| 143 | |
| 144 | if test "${enable_nssa}" = "yes"; then |
| 145 | AC_DEFINE(HAVE_NSSA,,OSPF NSSA) |
| 146 | fi |
| 147 | |
| 148 | if test "${enable_opaque_lsa}" = "yes"; then |
| 149 | AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA) |
| 150 | fi |
| 151 | |
| 152 | if test "${enable_ospf_te}" = "yes"; then |
| 153 | AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA) |
| 154 | AC_DEFINE(HAVE_OSPF_TE,,OSPF TE) |
| 155 | fi |
| 156 | |
gdt | d2a0ccc | 2003-12-03 18:13:48 +0000 | [diff] [blame] | 157 | AC_MSG_CHECKING(if zebra should be configurable to send Route Advertisements) |
| 158 | if test "${enable_rtadv}" != "no"; then |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 159 | AC_MSG_RESULT(yes) |
gdt | d2a0ccc | 2003-12-03 18:13:48 +0000 | [diff] [blame] | 160 | AC_DEFINE(HAVE_RTADV,,Enable IPv6 Routing Advertisement support) |
paul | 2487bea | 2003-05-25 23:51:31 +0000 | [diff] [blame] | 161 | else |
| 162 | AC_MSG_RESULT(no) |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 163 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 164 | |
paul | 79cb216 | 2003-06-06 12:19:53 +0000 | [diff] [blame] | 165 | if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 166 | enable_user="quagga" |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 167 | elif test "${enable_user}" = "no"; then |
| 168 | enable_user="root" |
| 169 | fi |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 170 | AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User) |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 171 | |
paul | 79cb216 | 2003-06-06 12:19:53 +0000 | [diff] [blame] | 172 | if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 173 | enable_group="quagga" |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 174 | elif test "${enable_group}" = "no"; then |
| 175 | enable_group="root" |
| 176 | fi |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 177 | AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group) |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 178 | |
| 179 | if test x"${enable_vty_group}" = x"yes" ; then |
paul | 8d4aee5 | 2003-06-06 00:30:35 +0000 | [diff] [blame] | 180 | AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes]) |
paul | 79cb216 | 2003-06-06 12:19:53 +0000 | [diff] [blame] | 181 | elif test x"${enable_vty_group}" != x""; then |
paul | 8d4aee5 | 2003-06-06 00:30:35 +0000 | [diff] [blame] | 182 | if test x"${enable_vty_group}" != x"no"; then |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 183 | AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group) |
| 184 | fi |
| 185 | fi |
| 186 | |
gdt | aa593d5 | 2003-12-22 20:15:53 +0000 | [diff] [blame] | 187 | enable_configfile_mask=${enable_configfile_mask:-0600} |
| 188 | AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files) |
| 189 | |
| 190 | enable_logfile_mask=${enable_logfile_mask:-0600} |
| 191 | AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files) |
| 192 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 193 | changequote(, )dnl |
| 194 | |
| 195 | MULTIPATH_NUM=1 |
| 196 | |
| 197 | case "${enable_multipath}" in |
| 198 | [0-9]|[1-9][0-9]) |
| 199 | MULTIPATH_NUM="${enable_multipath}" |
| 200 | ;; |
| 201 | "") |
| 202 | ;; |
| 203 | *) |
| 204 | echo "Please specify digit to --enable-multipath ARG." |
| 205 | exit 1 |
| 206 | ;; |
| 207 | esac |
| 208 | |
| 209 | changequote([, ])dnl |
| 210 | |
| 211 | AC_SUBST(MULTIPATH_NUM) |
| 212 | |
| 213 | dnl ------------------- |
| 214 | dnl Check header files. |
| 215 | dnl ------------------- |
paul | dc7a2bf | 2003-10-22 00:07:44 +0000 | [diff] [blame] | 216 | AC_HEADER_STDC |
| 217 | AC_CHECK_HEADERS([string.h stropts.h sys/conf.h sys/ksym.h sys/time.h \ |
| 218 | sys/times.h sys/select.h sys/sysctl.h sys/sockio.h \ |
| 219 | sys/types.h linux/version.h kvm.h netdb.h asm/types.h \ |
| 220 | libutil.h limits.h]) |
| 221 | |
paul | 835b7f1 | 2003-10-30 21:59:57 +0000 | [diff] [blame] | 222 | AC_CHECK_HEADERS([sys/socket.h netinet/in_systm.h netinet/in.h \ |
paul | f3bd1a7 | 2003-11-02 07:29:11 +0000 | [diff] [blame] | 223 | net/if_dl.h net/netopt.h inet/nd.h net/route.h \ |
paul | 835b7f1 | 2003-10-30 21:59:57 +0000 | [diff] [blame] | 224 | net/if.h net/if_var.h netinet/in_var.h]) |
paul | dc7a2bf | 2003-10-22 00:07:44 +0000 | [diff] [blame] | 225 | |
gdt | fa3232e | 2003-12-03 17:52:30 +0000 | [diff] [blame] | 226 | dnl V6 headers are checked below, after we check for v6 |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 227 | |
| 228 | dnl check some types |
| 229 | AC_C_CONST |
| 230 | dnl AC_TYPE_PID_T |
| 231 | AC_TYPE_SIGNAL |
| 232 | |
| 233 | dnl Some systems (Solaris 2.x) require libnsl (Network Services Library) |
| 234 | case "$host" in |
| 235 | *-sunos5.6* | *-solaris2.6*) |
| 236 | opsys=sol2-6 |
| 237 | AC_DEFINE(SUNOS_5,,SunOS 5) |
| 238 | AC_CHECK_LIB(xnet, main) |
| 239 | CURSES=-lcurses |
| 240 | ;; |
| 241 | *-sunos5* | *-solaris2*) |
| 242 | AC_DEFINE(SUNOS_5,,SunOS 5) |
| 243 | AC_CHECK_LIB(socket, main) |
| 244 | AC_CHECK_LIB(nsl, main) |
| 245 | CURSES=-lcurses |
| 246 | ;; |
| 247 | *-linux-*) |
| 248 | opsys=gnu-linux |
| 249 | AC_DEFINE(GNU_LINUX,,GNU Linux) |
| 250 | ;; |
| 251 | *-nec-sysv4*) |
| 252 | AC_CHECK_LIB(nsl, gethostbyname) |
| 253 | AC_CHECK_LIB(socket, socket) |
| 254 | ;; |
| 255 | *-freebsd3.2) |
| 256 | AC_DEFINE(FREEBSD_32,,FreeBSD 3.2) |
| 257 | ;; |
| 258 | *-openbsd*) |
| 259 | opsys=openbsd |
| 260 | AC_DEFINE(OPEN_BSD,,OpenBSD) |
| 261 | ;; |
| 262 | *-bsdi*) |
| 263 | opsys=bsdi |
| 264 | OTHER_METHOD="mtu_kvm.o" |
| 265 | AC_CHECK_LIB(kvm, main) |
| 266 | ;; |
paul | 49e3b3c | 2003-10-23 20:39:50 +0000 | [diff] [blame] | 267 | *-irix6.5) |
paul | dc7a2bf | 2003-10-22 00:07:44 +0000 | [diff] [blame] | 268 | opsys=irix |
| 269 | AC_DEFINE(IRIX_65,,IRIX 6.5) |
| 270 | ;; |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 271 | esac |
| 272 | |
| 273 | dnl --------------------- |
| 274 | dnl Integrated VTY option |
| 275 | dnl --------------------- |
| 276 | case "${enable_vtysh}" in |
| 277 | "yes") VTYSH="vtysh"; |
| 278 | AC_DEFINE(VTYSH,,VTY shell) |
| 279 | AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs)) |
| 280 | AC_CHECK_LIB(readline, main) |
| 281 | if test $ac_cv_lib_readline_main = no; then |
| 282 | AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.]) |
| 283 | fi |
| 284 | AC_CHECK_HEADER(readline/history.h) |
| 285 | if test $ac_cv_header_readline_history_h = no;then |
| 286 | AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.]) |
| 287 | fi |
paul | 3d3de8c | 2003-05-23 10:33:49 +0000 | [diff] [blame] | 288 | AC_CHECK_LIB(readline, rl_completion_matches) |
| 289 | if test $ac_cv_lib_readline_rl_completion_matches = no; then |
| 290 | AC_DEFINE(rl_completion_matches,completion_matches,Old readline) |
| 291 | fi |
| 292 | ;; |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 293 | "no" ) VTYSH="";; |
| 294 | * ) ;; |
| 295 | esac |
| 296 | |
| 297 | dnl ---------- |
| 298 | dnl PAM module |
| 299 | dnl ---------- |
| 300 | if test "$with_libpam" = "yes"; then |
paul | 24cd435 | 2003-05-06 12:16:27 +0000 | [diff] [blame] | 301 | AC_CHECK_HEADER(security/pam_misc.h) |
| 302 | if test "$ac_cv_header_security_pam_misc_h" = yes; then |
| 303 | AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h) |
| 304 | AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv) |
| 305 | pam_conv_func="misc_conv" |
paul | 24cd435 | 2003-05-06 12:16:27 +0000 | [diff] [blame] | 306 | fi |
paul | 24cd435 | 2003-05-06 12:16:27 +0000 | [diff] [blame] | 307 | AC_CHECK_HEADER(security/openpam.h) |
| 308 | if test "$ac_cv_header_security_openpam_h" = yes; then |
| 309 | AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h) |
| 310 | AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv) |
| 311 | pam_conv_func="openpam_ttyconv" |
paul | 24cd435 | 2003-05-06 12:16:27 +0000 | [diff] [blame] | 312 | fi |
| 313 | if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then |
| 314 | AC_MSG_WARN([*** pam support will not be built ***]) |
| 315 | with_libpam="no" |
| 316 | fi |
| 317 | fi |
| 318 | |
| 319 | if test "$with_libpam" = "yes"; then |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 320 | dnl took this test from proftpd's configure.in and suited to our needs |
| 321 | dnl ------------------------------------------------------------------------- |
| 322 | dnl |
| 323 | dnl This next check looks funky due to a linker problem with some versions |
| 324 | dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library |
| 325 | dnl omitted requiring libdl linking information. PAM-0.72 or better ships |
| 326 | dnl with RedHat 6.2 and Debian 2.2 or better. |
| 327 | AC_CHECK_LIB(pam, pam_start, |
paul | 24cd435 | 2003-05-06 12:16:27 +0000 | [diff] [blame] | 328 | [AC_CHECK_LIB(pam, $pam_conv_func, |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 329 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
| 330 | LIBPAM="-lpam"], |
| 331 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
| 332 | LIBPAM="-lpam -lpam_misc"] |
| 333 | ) |
| 334 | ], |
| 335 | |
| 336 | [AC_CHECK_LIB(pam, pam_end, |
paul | 24cd435 | 2003-05-06 12:16:27 +0000 | [diff] [blame] | 337 | [AC_CHECK_LIB(pam, $pam_conv_func, |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 338 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 339 | LIBPAM="-lpam -ldl"], |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 340 | [AC_DEFINE(USE_PAM,,Use PAM for authentication) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 341 | LIBPAM="-lpam -ldl -lpam_misc"] |
| 342 | ) |
| 343 | ],AC_MSG_WARN([*** pam support will not be built ***]), |
| 344 | [-ldl]) |
| 345 | ] |
| 346 | ) |
| 347 | fi |
| 348 | AC_SUBST(LIBPAM) |
| 349 | |
| 350 | dnl ------------------------------- |
| 351 | dnl Endian-ness check |
| 352 | dnl ------------------------------- |
| 353 | AC_WORDS_BIGENDIAN |
| 354 | |
| 355 | dnl ------------------------------- |
| 356 | dnl check the size in byte of the C |
| 357 | dnl ------------------------------- |
| 358 | dnl AC_CHECK_SIZEOF(char) |
| 359 | dnl AC_CHECK_SIZEOF(int) |
| 360 | dnl AC_CHECK_SIZEOF(short) |
| 361 | dnl AC_CHECK_SIZEOF(long) |
| 362 | |
| 363 | dnl ---------------------------- |
| 364 | dnl check existance of functions |
| 365 | dnl ---------------------------- |
paul | 49e3b3c | 2003-10-23 20:39:50 +0000 | [diff] [blame] | 366 | AC_CHECK_FUNCS(memset memcpy strerror inet_aton daemon snprintf vsnprintf \ |
paul | 04bd484 | 2003-10-24 04:24:39 +0000 | [diff] [blame] | 367 | strlcat strlcpy if_nametoindex if_indextoname getifaddrs \ |
| 368 | fcntl) |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 369 | AC_CHECK_FUNCS(setproctitle, , |
| 370 | [AC_CHECK_LIB(util, setproctitle, |
| 371 | [LIBS="$LIBS -lutil" |
| 372 | AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle) |
| 373 | ] |
| 374 | ) |
| 375 | ] |
| 376 | ) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 377 | |
| 378 | dnl ------------------------------------ |
| 379 | dnl Determine routing get and set method |
| 380 | dnl ------------------------------------ |
| 381 | AC_MSG_CHECKING(zebra between kernel interface method) |
| 382 | if test x"$opsys" = x"gnu-linux"; then |
| 383 | if test "${enable_netlink}" = "yes";then |
| 384 | AC_MSG_RESULT(netlink) |
| 385 | RT_METHOD=rt_netlink.o |
| 386 | AC_DEFINE(HAVE_NETLINK,,netlink) |
| 387 | netlink=yes |
| 388 | elif test "${enable_netlink}" = "no"; then |
| 389 | AC_MSG_RESULT(ioctl) |
| 390 | RT_METHOD=rt_ioctl.o |
| 391 | netlink=no |
| 392 | else |
| 393 | AC_MSG_RESULT(netlink) |
| 394 | RT_METHOD=rt_netlink.o |
| 395 | AC_DEFINE(HAVE_NETLINK,,netlink) |
| 396 | netlink=yes |
| 397 | fi |
| 398 | else |
| 399 | if test "$opsys" = "sol2-6";then |
| 400 | AC_MSG_RESULT(solaris) |
| 401 | KERNEL_METHOD="kernel_socket.o" |
| 402 | RT_METHOD="rt_socket.o" |
paul | 49e3b3c | 2003-10-23 20:39:50 +0000 | [diff] [blame] | 403 | elif test "$opsys" = "irix" ; then |
| 404 | AC_MSG_RESULT(irix) |
| 405 | KERNEL_METHOD="kernel_socket.o" |
| 406 | RT_METHOD="rt_socket.o" |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 407 | else |
| 408 | AC_TRY_RUN([#include <errno.h> |
| 409 | #include <sys/types.h> |
| 410 | #include <sys/socket.h> |
| 411 | |
| 412 | main () |
| 413 | { |
| 414 | int ac_sock; |
| 415 | |
| 416 | ac_sock = socket (AF_ROUTE, SOCK_RAW, 0); |
| 417 | if (ac_sock < 0 && errno == EINVAL) |
| 418 | exit (1); |
| 419 | exit (0); |
| 420 | }], |
| 421 | [KERNEL_METHOD=kernel_socket.o |
| 422 | RT_METHOD=rt_socket.o |
| 423 | AC_MSG_RESULT(socket)], |
| 424 | [RT_METHOD=rt_ioctl.o |
| 425 | AC_MSG_RESULT(ioctl)], |
| 426 | [KERNEL_METHOD=kernel_socket.o |
| 427 | RT_METHOD=rt_socket.o |
| 428 | AC_MSG_RESULT(socket)]) |
| 429 | fi |
| 430 | fi |
| 431 | AC_SUBST(RT_METHOD) |
| 432 | AC_SUBST(KERNEL_METHOD) |
| 433 | AC_SUBST(OTHER_METHOD) |
| 434 | |
| 435 | dnl ------------------------------ |
| 436 | dnl check kernel route read method |
| 437 | dnl ------------------------------ |
| 438 | AC_CACHE_CHECK(route read method check, zebra_rtread, |
| 439 | [if test "$netlink" = yes; then |
| 440 | RTREAD_METHOD="rtread_netlink.o" |
| 441 | zebra_rtread="netlink" |
| 442 | else |
| 443 | for zebra_rtread in /proc/net/route /dev/ip /dev/null; |
| 444 | do |
| 445 | test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break |
| 446 | done |
| 447 | case $zebra_rtread in |
| 448 | "/proc/net/route") RTREAD_METHOD="rtread_proc.o" |
| 449 | zebra_rtread="proc";; |
paul | 9c30ab6 | 2003-07-08 08:36:17 +0000 | [diff] [blame] | 450 | "/dev/ip") |
| 451 | case "$host" in |
| 452 | *-freebsd*) RTREAD_METHOD=rtread_sysctl.o |
| 453 | zebra_rtread="sysctl";; |
| 454 | *) RTREAD_METHOD="rtread_getmsg.o" |
| 455 | zebra_rtread="getmsg";; |
| 456 | esac;; |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 457 | *) RTREAD_METHOD="rtread_sysctl.o" |
| 458 | zebra_rtread="sysctl";; |
| 459 | esac |
| 460 | fi]) |
| 461 | AC_SUBST(RTREAD_METHOD) |
| 462 | |
| 463 | dnl ----------------------------- |
| 464 | dnl check interface lookup method |
| 465 | dnl ----------------------------- |
| 466 | AC_MSG_CHECKING(interface looking up method) |
| 467 | if test "$netlink" = yes; then |
| 468 | AC_MSG_RESULT(netlink) |
| 469 | IF_METHOD=if_netlink.o |
| 470 | else |
| 471 | if test "$opsys" = "sol2-6";then |
| 472 | AC_MSG_RESULT(solaris) |
| 473 | IF_METHOD=if_ioctl.o |
paul | 49e3b3c | 2003-10-23 20:39:50 +0000 | [diff] [blame] | 474 | elif test "$opsys" = "irix" ; then |
| 475 | AC_MSG_RESULT(irix) |
| 476 | IF_METHOD=if_ioctl.o |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 477 | elif test "$opsys" = "openbsd";then |
| 478 | AC_MSG_RESULT(openbsd) |
| 479 | IF_METHOD=if_ioctl.o |
| 480 | elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then |
| 481 | AC_MSG_RESULT(sysctl) |
| 482 | IF_METHOD=if_sysctl.o |
| 483 | AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST) |
| 484 | else |
| 485 | AC_MSG_RESULT(ioctl) |
| 486 | IF_METHOD=if_ioctl.o |
| 487 | fi |
| 488 | fi |
| 489 | AC_SUBST(IF_METHOD) |
| 490 | |
| 491 | dnl ----------------------- |
| 492 | dnl check proc file system. |
| 493 | dnl ----------------------- |
| 494 | if test -r /proc/net/dev; then |
| 495 | AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev) |
| 496 | IF_PROC=if_proc.o |
| 497 | fi |
| 498 | |
| 499 | if test -r /proc/net/if_inet6; then |
| 500 | AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6) |
| 501 | IF_PROC=if_proc.o |
| 502 | fi |
| 503 | AC_SUBST(IF_PROC) |
| 504 | |
| 505 | dnl ----------------------------- |
| 506 | dnl check ipforward detect method |
| 507 | dnl ----------------------------- |
| 508 | AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path, |
| 509 | [for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null; |
| 510 | do |
| 511 | test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break |
| 512 | done |
| 513 | case $zebra_ipforward_path in |
| 514 | "/proc/net/snmp") IPFORWARD=ipforward_proc.o |
| 515 | zebra_ipforward_path="proc";; |
| 516 | "/dev/ip") |
| 517 | case "$host" in |
| 518 | *-nec-sysv4*) IPFORWARD=ipforward_ews.o |
| 519 | zebra_ipforward_path="ews";; |
paul | 9c30ab6 | 2003-07-08 08:36:17 +0000 | [diff] [blame] | 520 | *-freebsd*) IPFORWARD=ipforward_sysctl.o |
| 521 | zebra_ipforward_path="sysctl";; |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 522 | *) IPFORWARD=ipforward_solaris.o |
| 523 | zebra_ipforward_path="solaris";; |
| 524 | esac;; |
| 525 | *) IPFORWARD=ipforward_sysctl.o |
| 526 | zebra_ipforward_path="sysctl";; |
| 527 | esac]) |
| 528 | AC_SUBST(IPFORWARD) |
| 529 | |
| 530 | AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no]) |
| 531 | |
| 532 | dnl ---------- |
| 533 | dnl IPv6 check |
| 534 | dnl ---------- |
| 535 | AC_MSG_CHECKING(whether does this OS have IPv6 stack) |
| 536 | if test "${enable_ipv6}" = "no"; then |
| 537 | AC_MSG_RESULT(disabled) |
| 538 | else |
| 539 | dnl ---------- |
| 540 | dnl INRIA IPv6 |
| 541 | dnl ---------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 542 | if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then |
| 543 | zebra_cv_ipv6=yes |
| 544 | AC_DEFINE(HAVE_IPV6,1,INRIA IPv6) |
| 545 | AC_DEFINE(INRIA_IPV6,1,INRIA IPv6) |
| 546 | RIPNGD="ripngd" |
| 547 | OSPF6D="ospf6d" |
| 548 | LIB_IPV6="" |
| 549 | AC_MSG_RESULT(INRIA IPv6) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 550 | dnl --------- |
| 551 | dnl KAME IPv6 |
| 552 | dnl --------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 553 | elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then |
| 554 | zebra_cv_ipv6=yes |
| 555 | AC_DEFINE(HAVE_IPV6,1,KAME IPv6) |
| 556 | AC_DEFINE(KAME,1,KAME IPv6) |
| 557 | RIPNGD="ripngd" |
| 558 | OSPF6D="ospf6d" |
| 559 | if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 560 | LIB_IPV6="-L/usr/local/v6/lib -linet6" |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 561 | fi |
| 562 | AC_MSG_RESULT(KAME) |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 563 | dnl ------------------------- |
| 564 | dnl MUSICA IPv6 |
| 565 | dnl default host check |
| 566 | dnl It is not used by Kheops |
| 567 | dnl ------------------------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 568 | elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then |
| 569 | zebra_cv_ipv6=yes |
| 570 | AC_DEFINE(HAVE_IPV6,1,Musicia IPv6) |
| 571 | AC_DEFINE(MUSICA,1,Musica IPv6 stack) |
| 572 | AC_DEFINE(KAME,1,KAME IPv6 stack) |
| 573 | RIPNGD="ripngd" |
| 574 | OSPF6D="ospf6d" |
| 575 | if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 576 | LIB_IPV6="-L/usr/local/v6/lib -linet6" |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 577 | fi |
| 578 | AC_MSG_RESULT(MUSICA) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 579 | dnl --------- |
| 580 | dnl NRL check |
| 581 | dnl --------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 582 | elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then |
| 583 | zebra_cv_ipv6=yes |
| 584 | AC_DEFINE(HAVE_IPV6,1,NRL IPv6) |
| 585 | AC_DEFINE(NRL,1,NRL) |
| 586 | RIPNGD="ripngd" |
| 587 | OSPF6D="ospf6d" |
| 588 | if test x"$opsys" = x"bsdi";then |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 589 | AC_DEFINE(BSDI_NRL,,BSDI) |
| 590 | AC_MSG_RESULT(BSDI_NRL) |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 591 | else |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 592 | AC_MSG_RESULT(NRL) |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 593 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 594 | dnl ---------- |
| 595 | dnl Linux IPv6 |
| 596 | dnl ---------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 597 | elif test "${enable_ipv6}" = "yes"; then |
| 598 | AC_EGREP_CPP(yes, [ |
| 599 | #include <linux/version.h> |
| 600 | /* 2.1.128 or later */ |
| 601 | #if LINUX_VERSION_CODE >= 0x020180 |
| 602 | yes |
| 603 | #endif], |
| 604 | [zebra_cv_ipv6=yes |
| 605 | zebra_cv_linux_ipv6=yes |
| 606 | AC_MSG_RESULT(Linux IPv6)]) |
| 607 | else |
| 608 | if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route" |
| 609 | then |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 610 | zebra_cv_ipv6=yes |
| 611 | zebra_cv_linux_ipv6=yes |
| 612 | AC_MSG_RESULT(Linux IPv6) |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 613 | fi |
| 614 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 615 | |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 616 | if test "$zebra_cv_linux_ipv6" = "yes";then |
| 617 | AC_MSG_CHECKING(for GNU libc >= 2.1) |
| 618 | AC_DEFINE(HAVE_IPV6,1,Linux IPv6) |
| 619 | AC_EGREP_CPP(yes, [ |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 620 | #include <features.h> |
| 621 | #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 |
| 622 | yes |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 623 | #endif], |
| 624 | [glibc=yes |
| 625 | AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack) |
| 626 | AC_MSG_RESULT(yes)], |
| 627 | AC_MSG_RESULT(no) |
| 628 | ) |
| 629 | RIPNGD="ripngd" |
| 630 | OSPF6D="ospf6d" |
| 631 | if test "$glibc" != "yes"; then |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 632 | INCLUDES="-I/usr/inet6/include" |
| 633 | if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then |
| 634 | LIB_IPV6="-L/usr/inet6/lib -linet6" |
| 635 | fi |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 636 | fi |
| 637 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 638 | |
| 639 | dnl ----------------------- |
| 640 | dnl Set IPv6 related values |
| 641 | dnl ----------------------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 642 | LIBS="$LIB_IPV6 $LIBS" |
| 643 | AC_SUBST(LIB_IPV6) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 644 | |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 645 | if test x"$RIPNGD" = x""; then |
| 646 | AC_MSG_RESULT(IPv4 only) |
| 647 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 648 | fi |
| 649 | |
gdt | fa3232e | 2003-12-03 17:52:30 +0000 | [diff] [blame] | 650 | dnl ------------------ |
| 651 | dnl IPv6 header checks |
| 652 | dnl ------------------ |
| 653 | if test "x${zebra_cv_ipv6}" = "xyes"; then |
| 654 | AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \ |
| 655 | netinet6/in6_var.h netinet6/nd6.h]) |
| 656 | fi |
| 657 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 658 | dnl -------------------- |
| 659 | dnl Daemon disable check |
| 660 | dnl -------------------- |
| 661 | if test "${enable_zebra}" = "no";then |
| 662 | ZEBRA="" |
| 663 | else |
| 664 | ZEBRA="zebra" |
| 665 | fi |
| 666 | |
| 667 | if test "${enable_bgpd}" = "no";then |
| 668 | BGPD="" |
| 669 | else |
| 670 | BGPD="bgpd" |
| 671 | fi |
| 672 | |
| 673 | if test "${enable_ripd}" = "no";then |
| 674 | RIPD="" |
| 675 | else |
| 676 | RIPD="ripd" |
| 677 | fi |
| 678 | |
| 679 | if test "${enable_ospfd}" = "no";then |
| 680 | OSPFD="" |
| 681 | else |
| 682 | OSPFD="ospfd" |
| 683 | fi |
| 684 | |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 685 | OSPFCLIENT="" |
| 686 | if test "${enable_opaque_lsa}" = "yes"; then |
| 687 | if test "${enable_ospfapi}" != "no";then |
paul | 9a56984 | 2003-03-28 01:45:13 +0000 | [diff] [blame] | 688 | AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI) |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 689 | |
| 690 | if test "${enable_ospfclient}" != "no";then |
| 691 | OSPFCLIENT="ospfclient" |
| 692 | fi |
| 693 | fi |
| 694 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 695 | fi |
| 696 | |
| 697 | case "${enable_ripngd}" in |
| 698 | "yes") RIPNGD="ripngd";; |
| 699 | "no" ) RIPNGD="";; |
| 700 | * ) ;; |
| 701 | esac |
| 702 | |
| 703 | case "${enable_ospf6d}" in |
| 704 | "yes") OSPF6D="ospf6d";; |
| 705 | "no" ) OSPF6D="";; |
| 706 | * ) ;; |
| 707 | esac |
| 708 | |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 709 | case "${enable_isisd}" in |
| 710 | "yes") ISISD="isisd";; |
| 711 | "no" ) ISISD="";; |
| 712 | * ) ISISD="isisd";; |
| 713 | esac |
| 714 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 715 | if test "${enable_bgp_announce}" = "no";then |
| 716 | AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra) |
| 717 | fi |
| 718 | |
| 719 | AC_SUBST(ZEBRA) |
| 720 | AC_SUBST(BGPD) |
| 721 | AC_SUBST(RIPD) |
| 722 | AC_SUBST(RIPNGD) |
| 723 | AC_SUBST(OSPFD) |
| 724 | AC_SUBST(OSPF6D) |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 725 | AC_SUBST(ISISD) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 726 | AC_SUBST(VTYSH) |
| 727 | AC_SUBST(INCLUDES) |
| 728 | AC_SUBST(CURSES) |
| 729 | AC_SUBST(OSPFCLIENT) |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 730 | AC_SUBST(OSPFAPI) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 731 | AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)]) |
| 732 | AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)]) |
| 733 | AC_CHECK_LIB(crypt, crypt) |
| 734 | AC_CHECK_LIB(resolv, res_init) |
| 735 | AC_CHECK_LIB(m, main) |
| 736 | |
| 737 | dnl --------------------------------------------------- |
| 738 | dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY |
| 739 | dnl --------------------------------------------------- |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 740 | AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop)) |
| 741 | AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton)) |
| 742 | AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton)) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 743 | |
| 744 | dnl --------------------------- |
| 745 | dnl check system has GNU regexp |
| 746 | dnl --------------------------- |
| 747 | dnl AC_MSG_CHECKING(whether system has GNU regex) |
| 748 | AC_CHECK_LIB(c, regexec, |
| 749 | [AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library) |
| 750 | LIB_REGEX=""], |
| 751 | [LIB_REGEX="regex.o"]) |
| 752 | AC_SUBST(LIB_REGEX) |
| 753 | |
| 754 | dnl ------------------ |
| 755 | dnl check SNMP library |
| 756 | dnl ------------------ |
| 757 | if test "${enable_snmp}" = "yes";then |
| 758 | dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 759 | if test "${HAVE_SNMP}" = ""; then |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 760 | old_libs="${LIBS}" |
| 761 | LIBS="-L/usr/lib" |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 762 | unset ac_cv_lib_snmp_asn_parse_int |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 763 | AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, ) |
| 764 | if test "${NEED_CRYPTO}" = ""; then |
| 765 | AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ]) |
| 766 | else |
| 767 | AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto") |
| 768 | fi |
| 769 | LIBS="${old_libs}" |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 770 | fi |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 771 | if test "${HAVE_SNMP}" = ""; then |
| 772 | old_libs="${LIBS}" |
| 773 | LIBS="-L/usr/lib" |
| 774 | unset ac_cv_lib_snmp_asn_parse_int |
| 775 | AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, ) |
| 776 | if test "${HAVE_SNMP}" = ""; then |
| 777 | unset ac_cv_lib_snmp_asn_parse_int |
| 778 | AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, ) |
| 779 | if test "${NEED_CRYPTO}" = "yes"; then |
| 780 | AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto") |
| 781 | fi |
| 782 | fi |
| 783 | LIBS="${old_libs}" |
| 784 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 785 | |
| 786 | if test "${HAVE_SNMP}" = ""; then |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 787 | old_libs="${LIBS}" |
| 788 | LIBS="-L/usr/local/lib" |
| 789 | unset ac_cv_lib_snmp_asn_parse_int |
| 790 | AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes) |
| 791 | if test "${HAVE_SNMP}" = ""; then |
| 792 | unset ac_cv_lib_snmp_asn_parse_int |
| 793 | AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, ) |
| 794 | if test "${NEED_CRYPTO}" = "yes"; then |
| 795 | AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto") |
| 796 | fi |
| 797 | fi |
| 798 | LIBS="${old_libs}" |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 799 | fi |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 800 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 801 | if test "${HAVE_SNMP}" = "yes"; then |
| 802 | for ac_snmp in /usr/include/net-snmp/library/asn1.h /usr/include/ucd-snmp/asn1.h /usr/local/include/ucd-snmp/asn1.h /dev/null |
| 803 | do |
| 804 | test -f "${ac_snmp}" && break |
| 805 | done |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 806 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 807 | case ${ac_snmp} in |
| 808 | /usr/include/net-snmp/*) |
| 809 | AC_DEFINE(HAVE_SNMP,,SNMP) |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 810 | AC_DEFINE(HAVE_NETSNMP,,SNMP) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 811 | AC_DEFINE(UCD_COMPATIBLE,,SNMP) |
paul | ac7c4bb | 2003-03-19 04:25:08 +0000 | [diff] [blame] | 812 | CFLAGS="${CFLAGS} -I/usr/include/net-snmp -I/usr/include/net-snmp/library" |
| 813 | if test "${HAVE_NETSNMP}" = "yes"; then |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 814 | LIBS="${LIBS} -lnetsnmp" |
paul | ac7c4bb | 2003-03-19 04:25:08 +0000 | [diff] [blame] | 815 | else |
paul | 1ef74ef | 2003-03-21 15:16:05 +0000 | [diff] [blame] | 816 | LIBS="${LIBS} -lsnmp" |
paul | ac7c4bb | 2003-03-19 04:25:08 +0000 | [diff] [blame] | 817 | fi |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 818 | ;; |
| 819 | /usr/include/ucd-snmp/*) |
| 820 | AC_DEFINE(HAVE_SNMP,,SNMP) |
| 821 | CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp" |
| 822 | LIBS="${LIBS} -lsnmp" |
| 823 | ;; |
| 824 | /usr/local/include/ucd-snmp/*) |
| 825 | AC_DEFINE(HAVE_SNMP,,SNMP) |
| 826 | CFLAGS="${CFLAGS} -I/usr/local/include/ucd-snmp" |
| 827 | LIBS="${LIBS} -L/usr/local/lib -lsnmp" |
| 828 | ;; |
paul | f3bd1a7 | 2003-11-02 07:29:11 +0000 | [diff] [blame] | 829 | /usr/local/include/net-snmp/*) |
| 830 | AC_DEFINE(HAVE_SNMP,,SNMP) |
| 831 | AC_DEFINE(HAVE_NET_SNMP,,SNMP) |
| 832 | AC_DEFINE(UCD_COMPATIBLE,,SNMP) |
| 833 | CFLAGS="${CFLAGS} -I/usr/local/include/net-snmp" |
| 834 | LIBS="${LIBS} -L/usr/local/lib -lnetsnmp" |
| 835 | ;; |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 836 | esac |
| 837 | if test "${NEED_CRYPTO}" = "yes"; then |
| 838 | LIBS="${LIBS} -lcrypto" |
| 839 | fi |
| 840 | fi |
| 841 | fi |
| 842 | |
| 843 | dnl ---------------------------- |
| 844 | dnl check sa_len of sockaddr |
| 845 | dnl ---------------------------- |
| 846 | AC_MSG_CHECKING(whether struct sockaddr has a sa_len field) |
| 847 | AC_TRY_COMPILE([#include <sys/types.h> |
| 848 | #include <sys/socket.h> |
| 849 | ],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);], |
| 850 | [AC_MSG_RESULT(yes) |
| 851 | AC_DEFINE(HAVE_SA_LEN,,sa_len)], |
| 852 | AC_MSG_RESULT(no)) |
| 853 | |
| 854 | dnl ---------------------------- |
| 855 | dnl check sin_len of sockaddr_in |
| 856 | dnl ---------------------------- |
| 857 | AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field) |
| 858 | AC_TRY_COMPILE([#include <sys/types.h> |
| 859 | #include <netinet/in.h> |
| 860 | ],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);], |
| 861 | [AC_MSG_RESULT(yes) |
| 862 | AC_DEFINE(HAVE_SIN_LEN,,sin_len)], |
| 863 | AC_MSG_RESULT(no)) |
| 864 | |
| 865 | dnl ---------------------------- |
| 866 | dnl check sun_len of sockaddr_un |
| 867 | dnl ---------------------------- |
| 868 | AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field) |
| 869 | AC_TRY_COMPILE([#include <sys/types.h> |
| 870 | #include <sys/un.h> |
| 871 | ],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);], |
| 872 | [AC_MSG_RESULT(yes) |
| 873 | AC_DEFINE(HAVE_SUN_LEN,,sun_len)], |
| 874 | AC_MSG_RESULT(no)) |
| 875 | |
| 876 | dnl ----------------------------------- |
| 877 | dnl check sin6_scope_id of sockaddr_in6 |
| 878 | dnl ----------------------------------- |
| 879 | if test "$zebra_cv_ipv6" = yes; then |
| 880 | AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field) |
| 881 | AC_TRY_COMPILE([#include <sys/types.h> |
| 882 | #include <netinet/in.h> |
| 883 | ],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);], |
| 884 | [AC_MSG_RESULT(yes) |
| 885 | AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)], |
| 886 | AC_MSG_RESULT(no)) |
| 887 | fi |
| 888 | |
| 889 | dnl ---------------------------- |
| 890 | dnl check socklen_t exist or not |
| 891 | dnl ---------------------------- |
| 892 | AC_MSG_CHECKING(whther socklen_t is defined) |
| 893 | AC_TRY_COMPILE([#include <sys/types.h> |
| 894 | #include <sys/socket.h> |
| 895 | #include <netinet/in.h> |
| 896 | ],[socklen_t ac_x;], |
| 897 | [AC_MSG_RESULT(yes) |
| 898 | AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)], |
| 899 | AC_MSG_RESULT(no)) |
| 900 | |
| 901 | dnl ------------------------ |
| 902 | dnl check struct sockaddr_dl |
| 903 | dnl ------------------------ |
| 904 | AC_MSG_CHECKING(whether struct sockaddr_dl exist) |
| 905 | AC_EGREP_HEADER(sockaddr_dl, |
| 906 | net/if_dl.h, |
| 907 | [AC_MSG_RESULT(yes) |
| 908 | AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)], |
| 909 | AC_MSG_RESULT(no)) |
| 910 | |
| 911 | dnl -------------------------- |
| 912 | dnl check structure ifaliasreq |
| 913 | dnl -------------------------- |
| 914 | AC_MSG_CHECKING(whether struct ifaliasreq exist) |
| 915 | AC_EGREP_HEADER(ifaliasreq, |
| 916 | net/if.h, |
| 917 | [AC_MSG_RESULT(yes) |
| 918 | AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)], |
| 919 | AC_MSG_RESULT(no)) |
| 920 | |
| 921 | dnl ---------------------------- |
| 922 | dnl check structure in6_aliasreq |
| 923 | dnl ---------------------------- |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 924 | AC_MSG_CHECKING(whether struct in6_aliasreq exist) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 925 | AC_EGREP_HEADER(in6_aliasreq, |
| 926 | netinet6/in6_var.h, |
| 927 | [AC_MSG_RESULT(yes) |
| 928 | AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)], |
| 929 | AC_MSG_RESULT(no)) |
| 930 | |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 931 | dnl ----------------------------------- |
| 932 | dnl check ifra_lifetime of in6_aliasreq |
| 933 | dnl ----------------------------------- |
| 934 | AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist) |
| 935 | AC_TRY_COMPILE([#include <sys/types.h> |
| 936 | #include <netinet6/in6_var.h> |
| 937 | ],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);], |
| 938 | [AC_MSG_RESULT(yes) |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 939 | AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)], |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 940 | AC_MSG_RESULT(no)) |
| 941 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 942 | dnl --------------------------- |
| 943 | dnl check structure rt_addrinfo |
| 944 | dnl --------------------------- |
| 945 | AC_MSG_CHECKING(whether struct rt_addrinfo exist) |
| 946 | AC_EGREP_HEADER(rt_addrinfo, |
| 947 | net/route.h, |
| 948 | [AC_MSG_RESULT(yes) |
| 949 | AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)], |
| 950 | AC_MSG_RESULT(no)) |
| 951 | |
| 952 | dnl -------------------------- |
| 953 | dnl check structure in_pktinfo |
| 954 | dnl -------------------------- |
| 955 | AC_MSG_CHECKING(whether struct in_pktinfo exist) |
| 956 | AC_TRY_COMPILE([#include <netinet/in.h> |
| 957 | ],[struct in_pktinfo ac_x;], |
| 958 | [AC_MSG_RESULT(yes) |
| 959 | AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)], |
| 960 | AC_MSG_RESULT(no)) |
| 961 | |
| 962 | dnl -------------------------------------- |
| 963 | dnl checking for getrusage struct and call |
| 964 | dnl -------------------------------------- |
| 965 | AC_MSG_CHECKING(whether getrusage is available) |
| 966 | AC_TRY_COMPILE([#include <sys/resource.h> |
| 967 | ],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);], |
| 968 | [AC_MSG_RESULT(yes) |
| 969 | AC_DEFINE(HAVE_RUSAGE,,rusage)], |
| 970 | AC_MSG_RESULT(no)) |
| 971 | |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 972 | dnl ------------------- |
| 973 | dnl capabilities checks |
| 974 | dnl ------------------- |
hasso | 41d3fc9 | 2004-04-06 11:59:00 +0000 | [diff] [blame^] | 975 | if test "${enable_capabilities}" != "no"; then |
| 976 | AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available) |
| 977 | AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);], |
| 978 | [AC_MSG_RESULT(yes) |
| 979 | AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl) |
| 980 | quagga_ac_keepcaps="yes"], |
| 981 | AC_MSG_RESULT(no) |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 982 | ) |
hasso | 41d3fc9 | 2004-04-06 11:59:00 +0000 | [diff] [blame^] | 983 | if test x"${quagga_ac_keepcaps}" = x"yes"; then |
| 984 | AC_CHECK_HEADERS(sys/capability.h) |
| 985 | fi |
| 986 | if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then |
| 987 | AC_CHECK_LIB(cap, cap_init, |
| 988 | [AC_DEFINE(HAVE_LCAPS,1,Capabilities) |
| 989 | LIBCAP="-lcap" |
| 990 | ] |
| 991 | ) |
| 992 | fi |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 993 | fi |
| 994 | AC_SUBST(LIBCAP) |
| 995 | |
paul | fb2d150 | 2003-06-04 09:40:54 +0000 | [diff] [blame] | 996 | dnl --------------------------- |
| 997 | dnl check for glibc 'backtrace' |
| 998 | dnl --------------------------- |
| 999 | if test "${glibc}" = "yes"; then |
| 1000 | AC_CHECK_HEADER(execinfo.h) |
| 1001 | fi |
| 1002 | if test x"${ac_cv_header_execinfo_h}" = x"yes"; then |
| 1003 | AC_CHECK_FUNC(backtrace, |
| 1004 | [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)] |
| 1005 | ) |
| 1006 | fi |
| 1007 | |
paul | 408ad94 | 2003-05-20 00:03:33 +0000 | [diff] [blame] | 1008 | dnl ---------- |
| 1009 | dnl configure date |
| 1010 | dnl ---------- |
| 1011 | CONFDATE=`date '+%Y%m%d'` |
| 1012 | AC_SUBST(CONFDATE) |
| 1013 | |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 1014 | dnl ------------------------------ |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 1015 | dnl set paths for state directory |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1016 | dnl ------------------------------ |
| 1017 | if test "${prefix}" = "NONE"; then |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1018 | quagga_statedir_prefix=""; |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1019 | else |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1020 | quagga_statedir_prefix=${prefix} |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1021 | fi |
| 1022 | if test "${localstatedir}" = '${prefix}/var'; then |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 1023 | AC_CACHE_CHECK(state directory,ac_statedir, |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1024 | [for QUAGGA_STATE_DIR in ${quagga_statedir_prefix}/var/run dnl |
| 1025 | ${quagga_statedir_prefix}/var/adm dnl |
| 1026 | ${quagga_statedir_prefix}/etc dnl |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 1027 | /var/run dnl |
| 1028 | /var/adm dnl |
| 1029 | /etc dnl |
| 1030 | /dev/null; |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1031 | do |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1032 | test -d $QUAGGA_STATE_DIR && break |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1033 | done |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1034 | quagga_statedir=$QUAGGA_STATE_DIR]) |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1035 | else |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1036 | quagga_statedir=${localstatedir} |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 1037 | AC_MSG_CHECKING(directory to use for state file) |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1038 | AC_MSG_RESULT(${quagga_statedir}) |
paul | 23bd12c | 2003-04-07 06:11:09 +0000 | [diff] [blame] | 1039 | fi |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1040 | if test $quagga_statedir = "/dev/null"; then |
paul | a159ed9 | 2003-06-04 11:01:45 +0000 | [diff] [blame] | 1041 | AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!') |
| 1042 | fi |
| 1043 | |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1044 | AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$quagga_statedir/zebra.pid",zebra PID) |
| 1045 | AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$quagga_statedir/ripd.pid",ripd PID) |
| 1046 | AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$quagga_statedir/ripngd.pid",ripngd PID) |
| 1047 | AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$quagga_statedir/bgpd.pid",bgpd PID) |
| 1048 | AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID) |
| 1049 | AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID) |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 1050 | AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$quagga_statedir/isisd.pid",isisd PID) |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1051 | AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket) |
| 1052 | AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket) |
| 1053 | AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket) |
| 1054 | AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$quagga_statedir/ripngd.vty",ripng vty socket) |
| 1055 | AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$quagga_statedir/bgpd.vty",bgpd vty socket) |
| 1056 | AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$quagga_statedir/ospfd.vty",ospfd vty socket) |
| 1057 | AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty socket) |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 1058 | AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$quagga_statedir/isisd.vty",isisd vty socket) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 1059 | |
| 1060 | dnl --------------------------- |
| 1061 | dnl Check htonl works correctly |
| 1062 | dnl --------------------------- |
| 1063 | AC_MSG_CHECKING(for working htonl) |
| 1064 | AC_CACHE_VAL(ac_cv_htonl_works, [ |
| 1065 | AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H |
| 1066 | #include <sys/types.h> |
| 1067 | #endif |
| 1068 | #ifdef HAVE_NETDB_H |
| 1069 | #include <netdb.h> |
| 1070 | #endif |
| 1071 | #ifdef HAVE_NETINET_IN_H |
| 1072 | #include <netinet/in.h> |
| 1073 | #endif], |
| 1074 | [htonl (0);], |
| 1075 | ac_cv_htonl_works=yes, |
| 1076 | ac_cv_htonl_works=no)]) |
| 1077 | AC_MSG_RESULT($ac_cv_htonl_works) |
| 1078 | |
paul | 6382b6f | 2003-05-20 00:17:45 +0000 | [diff] [blame] | 1079 | AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile |
| 1080 | ripngd/Makefile bgpd/Makefile ospfd/Makefile |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 1081 | ospf6d/Makefile isisd/Makefile vtysh/Makefile doc/Makefile |
paul | 6382b6f | 2003-05-20 00:17:45 +0000 | [diff] [blame] | 1082 | ospfclient/Makefile |
jardin | a4d2a0d | 2004-01-10 20:42:35 +0000 | [diff] [blame] | 1083 | redhat/Makefile redhat/quagga.spec |
paul | fa1253d | 2003-09-24 05:09:26 +0000 | [diff] [blame] | 1084 | lib/version.h) |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 1085 | |
| 1086 | echo " |
| 1087 | zebra configuration |
| 1088 | ------------------- |
paul | fa1253d | 2003-09-24 05:09:26 +0000 | [diff] [blame] | 1089 | quagga version : ${PACKAGE_VERSION} |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 1090 | host operationg system : ${host_os} |
| 1091 | source code location : ${srcdir} |
| 1092 | compiler : ${CC} |
| 1093 | compiler flags : ${CFLAGS} |
hasso | 71c0fb5 | 2003-05-25 20:18:13 +0000 | [diff] [blame] | 1094 | linker flags : ${LDFLAGS} ${LIBS} |
paul | e8f2984 | 2003-08-12 13:08:31 +0000 | [diff] [blame] | 1095 | state file directory : ${quagga_statedir} |
paul | dc7a2bf | 2003-10-22 00:07:44 +0000 | [diff] [blame] | 1096 | config file directory : `eval echo \`echo ${sysconfdir}\`` |
gdt | d6b72f7 | 2003-12-03 17:24:27 +0000 | [diff] [blame] | 1097 | example directory : `eval echo \`echo ${exampledir}\`` |
paul | 8d4aee5 | 2003-06-06 00:30:35 +0000 | [diff] [blame] | 1098 | user to run as : ${enable_user} |
| 1099 | group to run as : ${enable_group} |
| 1100 | group for vty sockets : ${enable_vty_group} |
gdt | aa593d5 | 2003-12-22 20:15:53 +0000 | [diff] [blame] | 1101 | config file mask : ${enable_configfile_mask} |
| 1102 | log file mask : ${enable_logfile_mask} |
paul | dc7a2bf | 2003-10-22 00:07:44 +0000 | [diff] [blame] | 1103 | |
| 1104 | The above user and group must have read/write access to the state file |
| 1105 | directory and to the config files in the config file directory. |
paul | 7ea487b | 2003-03-17 02:05:07 +0000 | [diff] [blame] | 1106 | " |