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