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