2003-03-17 03:05:07 +01:00
|
|
|
##
|
2003-08-12 15:08:31 +02:00
|
|
|
## Configure template file for Quagga.
|
2003-03-17 03:05:07 +01:00
|
|
|
## autoconf will generate configure script.
|
|
|
|
##
|
|
|
|
## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
|
2003-08-12 15:08:31 +02:00
|
|
|
## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
|
2003-03-17 03:05:07 +01:00
|
|
|
##
|
2005-04-07 Paul Jakma <paul.jakma@sun.com>
* (global): Fix up list loops to match changes in lib/linklist,
and some basic auditing of usage.
* configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES
* HACKING: Add notes about deprecating interfaces and commands.
* lib/linklist.h: Add usage comments.
Rename getdata macro to listgetdata.
Rename nextnode to listnextnode and fix its odd behaviour to be
less dangerous.
Make listgetdata macro assert node is not null, NULL list entries
should be bug condition.
ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use
with for loop, Suggested by Jim Carlson of Sun.
Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the
"safety" of previous macro.
LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to
distinguish from the similarly named functions, and reflect their
effect better.
Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section
with the old defines which were modified above,
for backwards compatibility - guarded to prevent Quagga using it..
* lib/linklist.c: fix up for linklist.h changes.
* ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single
scan of the area list, rather than scanning all areas first for
INTER_ROUTER and then again for INTER_NETWORK. According to
16.2, the scan should be area specific anyway, and further
ospf6d does not seem to implement 16.3 anyway.
2005-04-07 09:30:20 +02:00
|
|
|
## $Id: configure.ac,v 1.99 2005/04/07 07:30:20 paul Exp $
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_PREREQ(2.53)
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2005-01-24 11:24:31 +01:00
|
|
|
AC_INIT(Quagga, 0.99.0, [http://bugzilla.quagga.net])
|
2003-09-24 07:09:26 +02:00
|
|
|
AC_CONFIG_SRCDIR(lib/zebra.h)
|
2004-04-08 00:48:47 +02:00
|
|
|
AM_INIT_AUTOMAKE(1.6)
|
2003-03-17 03:05:07 +01:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
2003-12-03 18:24:27 +01:00
|
|
|
dnl default is to match previous behavior
|
2003-12-04 16:39:25 +01:00
|
|
|
exampledir=${sysconfdir}
|
2003-12-03 18:24:27 +01:00
|
|
|
AC_ARG_ENABLE([exampledir],
|
|
|
|
AC_HELP_STRING([--enable-exampledir],
|
|
|
|
[specify alternate directory for examples]),
|
|
|
|
exampledir="$enableval",)
|
2003-12-04 16:39:25 +01:00
|
|
|
dnl XXX add --exampledir to autoconf standard directory list somehow
|
2003-12-03 18:24:27 +01:00
|
|
|
AC_SUBST(exampledir)
|
|
|
|
|
2004-08-31 20:16:36 +02:00
|
|
|
dnl default is to match previous behavior
|
|
|
|
pkgsrcrcdir=""
|
|
|
|
pkgsrcdir=""
|
|
|
|
AC_ARG_ENABLE([pkgsrcrcdir],
|
|
|
|
AC_HELP_STRING([--enable-pkgsrcrcdir],
|
|
|
|
[specify directory for rc.d scripts]),
|
|
|
|
pkgsrcrcdir="$enableval"; pkgsrcdir="pkgsrc",)
|
|
|
|
dnl XXX add --pkgsrcrcdir to autoconf standard directory list somehow
|
|
|
|
AC_SUBST(pkgsrcdir)
|
|
|
|
AC_SUBST(pkgsrcrcdir)
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl -----------------------------------
|
|
|
|
dnl Get hostname and other information.
|
|
|
|
dnl -----------------------------------
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
dnl ------------
|
|
|
|
dnl Check CFLAGS
|
|
|
|
dnl ------------
|
|
|
|
AC_ARG_WITH(cflags,
|
|
|
|
[ --with-cflags Set CFLAGS for use in compilation.])
|
|
|
|
if test "x$with_cflags" != "x" ; then
|
|
|
|
CFLAGS="$with_cflags" ; cflags_specified=yes ;
|
|
|
|
elif test -n "$CFLAGS" ; then
|
|
|
|
cflags_specified=yes ;
|
|
|
|
fi
|
|
|
|
|
2005-03-27 15:07:23 +02:00
|
|
|
dnl --------------------
|
|
|
|
dnl Check CC and friends
|
|
|
|
dnl --------------------
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_PROG_CC
|
2005-03-27 15:07:23 +02:00
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_EGREP
|
|
|
|
|
|
|
|
dnl ------------------------------------------------------------------
|
|
|
|
dnl Intel compiler check. Although Intel tries really hard to make icc
|
|
|
|
dnl look like gcc, there are some differences. It's very verbose with
|
|
|
|
dnl -Wall and it doesn't support the individual -W options.
|
|
|
|
dnl ------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING([whether we are using the Intel compiler])
|
|
|
|
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
|
|
|
|
ICC="no"
|
|
|
|
AC_MSG_RESULT([no]),
|
|
|
|
ICC="yes"
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
)
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2004-09-30 08:08:58 +02:00
|
|
|
dnl ---------------------------------------------
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl If CLFAGS doesn\'t exist set default value
|
2004-09-30 08:08:58 +02:00
|
|
|
dnl AC_PROG_CC will have set minimal default
|
|
|
|
dnl already, eg "-O2 -g" for gcc, "-g" for others
|
2004-07-22 20:16:59 +02:00
|
|
|
dnl (Wall is gcc specific... have to make sure
|
|
|
|
dnl gcc is being used before setting it)
|
2005-03-27 15:07:23 +02:00
|
|
|
dnl Intel icc 8.0 also sets __GNUC__, but
|
|
|
|
dnl doesn't support all these fancy -W options.
|
2004-09-30 08:08:58 +02:00
|
|
|
dnl ---------------------------------------------
|
2004-07-22 20:16:59 +02:00
|
|
|
dnl
|
2003-03-17 03:05:07 +01:00
|
|
|
if test "x$cflags_specified" = "x" ; then
|
2005-03-27 15:07:23 +02:00
|
|
|
if test "x${GCC}" = "xyes" && test "x${ICC}" = "xno"; then
|
2004-10-07 15:53:29 +02:00
|
|
|
CFLAGS="-Os -g -Wall -Wsign-compare -Wpointer-arith"
|
2004-10-05 16:15:17 +02:00
|
|
|
CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings"
|
2004-09-30 08:08:58 +02:00
|
|
|
fi
|
2004-10-07 15:53:29 +02:00
|
|
|
# TODO: conditionally addd -Wpacked if handled
|
2003-03-17 03:05:07 +01:00
|
|
|
fi
|
|
|
|
|
2005-03-27 15:07:23 +02:00
|
|
|
dnl ---------------------------------------------------------------------
|
|
|
|
dnl Intel compiler warnings we ignore:
|
|
|
|
dnl 279: controlling expression is constant.
|
|
|
|
dnl 869: parameter "xxx" was never referenced - to avoid massive warnings
|
|
|
|
dnl about "self", "vty", "argc" and "argv" never referenced in DEFUN
|
|
|
|
dnl macro.
|
|
|
|
dnl 981: operands are evaluated in unspecified order.
|
|
|
|
dnl ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
if test "$ICC" = "yes"; then
|
|
|
|
CFLAGS="-Os -g -Wall -wd 279,869,981"
|
|
|
|
fi
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl --------------
|
|
|
|
dnl Check programs
|
|
|
|
dnl --------------
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_CHECK_TOOL(AR, ar)
|
|
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
|
|
|
|
|
|
|
dnl ---------
|
|
|
|
dnl AIX check
|
|
|
|
dnl ---------
|
|
|
|
AC_AIX
|
|
|
|
|
2004-06-30 19:36:11 +02:00
|
|
|
dnl -------
|
|
|
|
dnl libtool
|
|
|
|
dnl -------
|
2004-08-19 06:41:21 +02:00
|
|
|
AC_PROG_LIBTOOL
|
2004-06-30 19:36:11 +02:00
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ----------------------
|
|
|
|
dnl Packages configuration
|
|
|
|
dnl ----------------------
|
|
|
|
AC_ARG_ENABLE(vtysh,
|
2004-06-30 16:25:12 +02:00
|
|
|
[ --enable-vtysh include integrated vty shell for Quagga])
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
[ --disable-ipv6 turn off IPv6 related features and daemons])
|
|
|
|
AC_ARG_ENABLE(zebra,
|
|
|
|
[ --disable-zebra do not build zebra daemon])
|
|
|
|
AC_ARG_ENABLE(bgpd,
|
|
|
|
[ --disable-bgpd do not build bgpd])
|
|
|
|
AC_ARG_ENABLE(ripd,
|
|
|
|
[ --disable-ripd do not build ripd])
|
|
|
|
AC_ARG_ENABLE(ripngd,
|
|
|
|
[ --disable-ripngd do not build ripngd])
|
|
|
|
AC_ARG_ENABLE(ospfd,
|
|
|
|
[ --disable-ospfd do not build ospfd])
|
|
|
|
AC_ARG_ENABLE(ospf6d,
|
|
|
|
[ --disable-ospf6d do not build ospf6d])
|
2004-12-22 15:03:52 +01:00
|
|
|
AC_ARG_ENABLE(watchquagga,
|
|
|
|
[ --disable-watchquagga do not build watchquagga])
|
2003-12-23 09:56:18 +01:00
|
|
|
AC_ARG_ENABLE(isisd,
|
2004-09-13 22:22:18 +02:00
|
|
|
[ --enable-isisd build isisd])
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_ARG_ENABLE(bgp-announce,
|
|
|
|
[ --disable-bgp-announce, turn off BGP route announcement])
|
|
|
|
AC_ARG_ENABLE(netlink,
|
|
|
|
[ --enable-netlink force to use Linux netlink interface])
|
|
|
|
AC_ARG_ENABLE(broken-aliases,
|
|
|
|
[ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
|
|
|
|
AC_ARG_ENABLE(snmp,
|
|
|
|
[ --enable-snmp enable SNMP support])
|
|
|
|
AC_ARG_WITH(libpam,
|
|
|
|
[ --with-libpam use libpam for PAM support in vtysh])
|
2003-05-25 22:18:13 +02:00
|
|
|
AC_ARG_ENABLE(tcp-zebra,
|
2003-03-17 03:05:07 +01:00
|
|
|
[ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon])
|
|
|
|
AC_ARG_ENABLE(opaque-lsa,
|
2003-03-21 16:16:05 +01:00
|
|
|
[ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)])
|
|
|
|
AC_ARG_ENABLE(ospfapi,
|
|
|
|
[ --disable-ospfapi do not build OSPFAPI to access the OSPF LSA Database,
|
|
|
|
(this is the default if --enable-opaque-lsa is not set)])
|
|
|
|
AC_ARG_ENABLE(ospfclient,
|
|
|
|
[ --disable-ospfclient do not build OSPFAPI client for OSPFAPI,
|
|
|
|
(this is the default if --disable-ospfapi is set)])
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_ARG_ENABLE(ospf-te,
|
|
|
|
[ --enable-ospf-te enable Traffic Engineering Extension to OSPF])
|
|
|
|
AC_ARG_ENABLE(multipath,
|
|
|
|
[ --enable-multipath=ARG enable multipath function, ARG must be digit])
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_ARG_ENABLE(quagga_user,
|
|
|
|
[ --enable-user=ARG user to run Quagga suite as (default quagga)])
|
|
|
|
AC_ARG_ENABLE(quagga_group,
|
|
|
|
[ --enable-group=ARG group to run Quagga suite as (default quagga)])
|
2003-06-04 15:59:38 +02:00
|
|
|
AC_ARG_ENABLE(vty_group,
|
2004-10-22 06:55:05 +02:00
|
|
|
[ --enable-vty-group=ARG set vty sockets to have specified group as owner])
|
2003-12-22 21:15:53 +01:00
|
|
|
AC_ARG_ENABLE(configfile_mask,
|
|
|
|
[ --enable-configfile-mask=ARG set mask for config files])
|
|
|
|
AC_ARG_ENABLE(logfile_mask,
|
|
|
|
[ --enable-logfile-mask=ARG set mask for log files])
|
2003-06-04 15:59:38 +02:00
|
|
|
|
2003-05-25 22:18:13 +02:00
|
|
|
AC_ARG_ENABLE(rtadv,
|
2004-10-22 06:55:05 +02:00
|
|
|
[ --disable-rtadv disable IPV6 router advertisement feature])
|
2004-06-12 16:33:05 +02:00
|
|
|
AC_ARG_ENABLE(irdp,
|
2004-10-22 06:55:05 +02:00
|
|
|
[ --enable-irdp enable IRDP server support in zebra])
|
2005-04-02 21:03:39 +02:00
|
|
|
AC_ARG_ENABLE(isis_topology,
|
|
|
|
[ --enable-isis-topology enable IS-IS topology generator])
|
2004-04-06 13:59:00 +02:00
|
|
|
AC_ARG_ENABLE(capabilities,
|
|
|
|
[ --disable-capabilities disable using POSIX capabilities])
|
2004-10-22 06:55:05 +02:00
|
|
|
AC_ARG_ENABLE(gcc_ultra_verbose,
|
|
|
|
[ --enable-gcc-ultra-verbose enable ultra verbose GCC warnings])
|
2004-12-29 18:50:22 +01:00
|
|
|
AC_ARG_ENABLE(gcc-rdynamic,
|
|
|
|
[ --enable-gcc-rdynamic enable gcc linking with -rdynamic for better backtraces])
|
2004-10-22 06:55:05 +02:00
|
|
|
|
|
|
|
if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then
|
|
|
|
CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
|
|
|
|
CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn"
|
|
|
|
CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code"
|
|
|
|
CFLAGS="${CFLAGS} -Wpacked -Wpadded"
|
|
|
|
fi
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2004-12-29 18:50:22 +01:00
|
|
|
if test x"${enable_gcc_rdynamic}" = x"yes" ; then
|
|
|
|
LDFLAGS="${LDFLAGS} -rdynamic"
|
|
|
|
fi
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
if test "${enable_broken_aliases}" = "yes"; then
|
|
|
|
if test "${enable_netlink}" = "yes"
|
|
|
|
then
|
|
|
|
echo "Sorry, you can't use netlink with broken aliases"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias)
|
|
|
|
enable_netlink=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${enable_tcp_zebra}" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${enable_opaque_lsa}" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${enable_ospf_te}" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
|
|
|
|
AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
|
|
|
|
fi
|
|
|
|
|
2003-12-03 19:13:48 +01:00
|
|
|
AC_MSG_CHECKING(if zebra should be configurable to send Route Advertisements)
|
|
|
|
if test "${enable_rtadv}" != "no"; then
|
2003-05-25 22:18:13 +02:00
|
|
|
AC_MSG_RESULT(yes)
|
2003-12-03 19:13:48 +01:00
|
|
|
AC_DEFINE(HAVE_RTADV,,Enable IPv6 Routing Advertisement support)
|
2003-05-26 01:51:31 +02:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2003-05-25 22:18:13 +02:00
|
|
|
fi
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2004-06-12 16:33:05 +02:00
|
|
|
if test "${enable_irdp}" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_IRDP,, IRDP )
|
|
|
|
fi
|
|
|
|
|
2005-04-02 21:03:39 +02:00
|
|
|
if test "${enable_isisd}" = "yes" && test "${enable_isis_topology}" = yes; then
|
|
|
|
AC_DEFINE(TOPOLOGY_GENERATE,,Enable IS-IS topology generator code)
|
|
|
|
ISIS_TOPOLOGY_INCLUDES="-I./topology"
|
|
|
|
ISIS_TOPOLOGY_DIR="topology"
|
|
|
|
ISIS_TOPOLOGY_LIB="./topology/libtopology.a"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ISIS_TOPOLOGY_INCLUDES)
|
|
|
|
AC_SUBST(ISIS_TOPOLOGY_DIR)
|
|
|
|
AC_SUBST(ISIS_TOPOLOGY_LIB)
|
|
|
|
|
2003-06-06 14:19:53 +02:00
|
|
|
if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
|
2003-08-12 15:08:31 +02:00
|
|
|
enable_user="quagga"
|
2003-06-04 15:59:38 +02:00
|
|
|
elif test "${enable_user}" = "no"; then
|
|
|
|
enable_user="root"
|
|
|
|
fi
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User)
|
2003-06-04 15:59:38 +02:00
|
|
|
|
2003-06-06 14:19:53 +02:00
|
|
|
if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
|
2003-08-12 15:08:31 +02:00
|
|
|
enable_group="quagga"
|
2003-06-04 15:59:38 +02:00
|
|
|
elif test "${enable_group}" = "no"; then
|
|
|
|
enable_group="root"
|
|
|
|
fi
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group)
|
2003-06-04 15:59:38 +02:00
|
|
|
|
|
|
|
if test x"${enable_vty_group}" = x"yes" ; then
|
2003-06-06 02:30:35 +02:00
|
|
|
AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes])
|
2003-06-06 14:19:53 +02:00
|
|
|
elif test x"${enable_vty_group}" != x""; then
|
2003-06-06 02:30:35 +02:00
|
|
|
if test x"${enable_vty_group}" != x"no"; then
|
2003-06-04 15:59:38 +02:00
|
|
|
AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-12-22 21:15:53 +01:00
|
|
|
enable_configfile_mask=${enable_configfile_mask:-0600}
|
|
|
|
AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files)
|
|
|
|
|
|
|
|
enable_logfile_mask=${enable_logfile_mask:-0600}
|
|
|
|
AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files)
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
changequote(, )dnl
|
|
|
|
|
|
|
|
MULTIPATH_NUM=1
|
|
|
|
|
|
|
|
case "${enable_multipath}" in
|
|
|
|
[0-9]|[1-9][0-9])
|
|
|
|
MULTIPATH_NUM="${enable_multipath}"
|
|
|
|
;;
|
|
|
|
"")
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Please specify digit to --enable-multipath ARG."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
changequote([, ])dnl
|
|
|
|
|
|
|
|
AC_SUBST(MULTIPATH_NUM)
|
|
|
|
|
|
|
|
dnl -------------------
|
|
|
|
dnl Check header files.
|
|
|
|
dnl -------------------
|
2003-10-22 02:07:44 +02:00
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS([string.h stropts.h sys/conf.h sys/ksym.h sys/time.h \
|
|
|
|
sys/times.h sys/select.h sys/sysctl.h sys/sockio.h \
|
|
|
|
sys/types.h linux/version.h kvm.h netdb.h asm/types.h \
|
|
|
|
libutil.h limits.h])
|
|
|
|
|
2003-10-30 22:59:57 +01:00
|
|
|
AC_CHECK_HEADERS([sys/socket.h netinet/in_systm.h netinet/in.h \
|
2003-11-02 08:29:11 +01:00
|
|
|
net/if_dl.h net/netopt.h inet/nd.h net/route.h \
|
2003-10-30 22:59:57 +01:00
|
|
|
net/if.h net/if_var.h netinet/in_var.h])
|
2003-10-22 02:07:44 +02:00
|
|
|
|
2003-12-03 18:52:30 +01:00
|
|
|
dnl V6 headers are checked below, after we check for v6
|
2003-03-17 03:05:07 +01:00
|
|
|
|
|
|
|
dnl check some types
|
|
|
|
AC_C_CONST
|
|
|
|
dnl AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
|
|
|
|
dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
|
|
|
|
case "$host" in
|
2005-03-12 07:36:10 +01:00
|
|
|
[*-sunos5.[6-7]*] | [*-solaris2.[6-7]*])
|
2003-03-17 03:05:07 +01:00
|
|
|
opsys=sol2-6
|
2005-03-12 07:36:10 +01:00
|
|
|
AC_DEFINE(SUNOS_56, 1, SunOS 5.6 to 5.7)
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_DEFINE(SUNOS_5, 1, SunOS 5)
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_CHECK_LIB(xnet, main)
|
|
|
|
CURSES=-lcurses
|
|
|
|
;;
|
2004-05-11 12:49:35 +02:00
|
|
|
[*-sunos5.[8-9]] | [*-sunos5.1[0-9]] \
|
|
|
|
| [*-solaris2.[8-9]] | [*-solaris2.1[0-9]])
|
2005-03-12 07:36:10 +01:00
|
|
|
opsys=sol8
|
|
|
|
AC_DEFINE(SUNOS_59,,SunOS 5.8 up)
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_DEFINE(SUNOS_5, 1, SunOS 5)
|
|
|
|
AC_CHECK_LIB(socket, main)
|
|
|
|
AC_CHECK_LIB(nsl, main)
|
|
|
|
CURSES=-lcurses
|
|
|
|
;;
|
2003-03-17 03:05:07 +01:00
|
|
|
*-sunos5* | *-solaris2*)
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_DEFINE(SUNOS_5,,SunOS 5, Unknown SunOS)
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_CHECK_LIB(socket, main)
|
|
|
|
AC_CHECK_LIB(nsl, main)
|
|
|
|
CURSES=-lcurses
|
|
|
|
;;
|
2005-02-19 14:58:06 +01:00
|
|
|
*-linux*)
|
2003-03-17 03:05:07 +01:00
|
|
|
opsys=gnu-linux
|
|
|
|
AC_DEFINE(GNU_LINUX,,GNU Linux)
|
|
|
|
;;
|
|
|
|
*-nec-sysv4*)
|
|
|
|
AC_CHECK_LIB(nsl, gethostbyname)
|
|
|
|
AC_CHECK_LIB(socket, socket)
|
|
|
|
;;
|
|
|
|
*-freebsd3.2)
|
|
|
|
AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
|
|
|
|
;;
|
|
|
|
*-openbsd*)
|
|
|
|
opsys=openbsd
|
|
|
|
AC_DEFINE(OPEN_BSD,,OpenBSD)
|
|
|
|
;;
|
|
|
|
*-bsdi*)
|
|
|
|
opsys=bsdi
|
|
|
|
OTHER_METHOD="mtu_kvm.o"
|
|
|
|
AC_CHECK_LIB(kvm, main)
|
|
|
|
;;
|
2003-10-23 22:39:50 +02:00
|
|
|
*-irix6.5)
|
2003-10-22 02:07:44 +02:00
|
|
|
opsys=irix
|
|
|
|
AC_DEFINE(IRIX_65,,IRIX 6.5)
|
|
|
|
;;
|
2003-03-17 03:05:07 +01:00
|
|
|
esac
|
|
|
|
|
|
|
|
dnl ---------------------
|
|
|
|
dnl Integrated VTY option
|
|
|
|
dnl ---------------------
|
|
|
|
case "${enable_vtysh}" in
|
|
|
|
"yes") VTYSH="vtysh";
|
|
|
|
AC_DEFINE(VTYSH,,VTY shell)
|
2004-06-30 16:25:12 +02:00
|
|
|
AC_PATH_PROG(PERL, perl)
|
|
|
|
dnl Vtysh uses libreadline, which looks for termcap functions at
|
|
|
|
dnl configure time. We follow readline's search order.
|
|
|
|
dnl The required procedures are in libtermcap on NetBSD, in
|
|
|
|
dnl [TODO] on Linux, and in [TODO] on Solaris.
|
|
|
|
AC_CHECK_LIB(termcap, tputs, ,
|
|
|
|
AC_CHECK_LIB(tinfo, tputs, ,
|
|
|
|
AC_CHECK_LIB(curses, tputs, ,
|
|
|
|
AC_CHECK_LIB(ncurses, tputs))))
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_CHECK_LIB(readline, main)
|
|
|
|
if test $ac_cv_lib_readline_main = no; then
|
2004-06-30 16:25:12 +02:00
|
|
|
AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.])
|
2003-03-17 03:05:07 +01:00
|
|
|
fi
|
|
|
|
AC_CHECK_HEADER(readline/history.h)
|
|
|
|
if test $ac_cv_header_readline_history_h = no;then
|
|
|
|
AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
|
|
|
|
fi
|
2003-05-23 12:33:49 +02:00
|
|
|
AC_CHECK_LIB(readline, rl_completion_matches)
|
|
|
|
if test $ac_cv_lib_readline_rl_completion_matches = no; then
|
|
|
|
AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
|
|
|
|
fi
|
|
|
|
;;
|
2003-03-17 03:05:07 +01:00
|
|
|
"no" ) VTYSH="";;
|
|
|
|
* ) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl ----------
|
|
|
|
dnl PAM module
|
|
|
|
dnl ----------
|
2003-05-06 14:16:27 +02:00
|
|
|
if test "$with_libpam" = "yes"; then
|
|
|
|
AC_CHECK_HEADER(security/pam_misc.h)
|
|
|
|
if test "$ac_cv_header_security_pam_misc_h" = yes; then
|
|
|
|
AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
|
|
|
|
AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
|
|
|
|
pam_conv_func="misc_conv"
|
|
|
|
fi
|
|
|
|
AC_CHECK_HEADER(security/openpam.h)
|
|
|
|
if test "$ac_cv_header_security_openpam_h" = yes; then
|
|
|
|
AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
|
|
|
|
AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
|
|
|
|
pam_conv_func="openpam_ttyconv"
|
|
|
|
fi
|
|
|
|
if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
|
|
|
|
AC_MSG_WARN([*** pam support will not be built ***])
|
|
|
|
with_libpam="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
if test "$with_libpam" = "yes"; then
|
|
|
|
dnl took this test from proftpd's configure.in and suited to our needs
|
|
|
|
dnl -------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl This next check looks funky due to a linker problem with some versions
|
|
|
|
dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
|
|
|
|
dnl omitted requiring libdl linking information. PAM-0.72 or better ships
|
|
|
|
dnl with RedHat 6.2 and Debian 2.2 or better.
|
|
|
|
AC_CHECK_LIB(pam, pam_start,
|
2003-05-06 14:16:27 +02:00
|
|
|
[AC_CHECK_LIB(pam, $pam_conv_func,
|
2003-03-17 03:05:07 +01:00
|
|
|
[AC_DEFINE(USE_PAM,,Use PAM for authentication)
|
|
|
|
LIBPAM="-lpam"],
|
|
|
|
[AC_DEFINE(USE_PAM,,Use PAM for authentication)
|
|
|
|
LIBPAM="-lpam -lpam_misc"]
|
|
|
|
)
|
|
|
|
],
|
|
|
|
|
|
|
|
[AC_CHECK_LIB(pam, pam_end,
|
2003-05-06 14:16:27 +02:00
|
|
|
[AC_CHECK_LIB(pam, $pam_conv_func,
|
2003-06-04 13:01:45 +02:00
|
|
|
[AC_DEFINE(USE_PAM,,Use PAM for authentication)
|
2003-03-17 03:05:07 +01:00
|
|
|
LIBPAM="-lpam -ldl"],
|
2003-06-04 13:01:45 +02:00
|
|
|
[AC_DEFINE(USE_PAM,,Use PAM for authentication)
|
2003-03-17 03:05:07 +01:00
|
|
|
LIBPAM="-lpam -ldl -lpam_misc"]
|
|
|
|
)
|
|
|
|
],AC_MSG_WARN([*** pam support will not be built ***]),
|
|
|
|
[-ldl])
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
AC_SUBST(LIBPAM)
|
|
|
|
|
|
|
|
dnl -------------------------------
|
|
|
|
dnl Endian-ness check
|
|
|
|
dnl -------------------------------
|
|
|
|
AC_WORDS_BIGENDIAN
|
|
|
|
|
|
|
|
dnl -------------------------------
|
|
|
|
dnl check the size in byte of the C
|
|
|
|
dnl -------------------------------
|
|
|
|
dnl AC_CHECK_SIZEOF(char)
|
|
|
|
dnl AC_CHECK_SIZEOF(int)
|
|
|
|
dnl AC_CHECK_SIZEOF(short)
|
|
|
|
dnl AC_CHECK_SIZEOF(long)
|
|
|
|
|
|
|
|
dnl ----------------------------
|
|
|
|
dnl check existance of functions
|
|
|
|
dnl ----------------------------
|
2003-10-23 22:39:50 +02:00
|
|
|
AC_CHECK_FUNCS(memset memcpy strerror inet_aton daemon snprintf vsnprintf \
|
2003-10-24 06:24:39 +02:00
|
|
|
strlcat strlcpy if_nametoindex if_indextoname getifaddrs \
|
2005-04-02 18:01:05 +02:00
|
|
|
fcntl strnlen)
|
2003-06-04 13:01:45 +02:00
|
|
|
AC_CHECK_FUNCS(setproctitle, ,
|
|
|
|
[AC_CHECK_LIB(util, setproctitle,
|
|
|
|
[LIBS="$LIBS -lutil"
|
|
|
|
AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2003-03-17 03:05:07 +01:00
|
|
|
|
|
|
|
dnl ------------------------------------
|
|
|
|
dnl Determine routing get and set method
|
|
|
|
dnl ------------------------------------
|
|
|
|
AC_MSG_CHECKING(zebra between kernel interface method)
|
|
|
|
if test x"$opsys" = x"gnu-linux"; then
|
|
|
|
if test "${enable_netlink}" = "yes";then
|
|
|
|
AC_MSG_RESULT(netlink)
|
|
|
|
RT_METHOD=rt_netlink.o
|
|
|
|
AC_DEFINE(HAVE_NETLINK,,netlink)
|
|
|
|
netlink=yes
|
|
|
|
elif test "${enable_netlink}" = "no"; then
|
|
|
|
AC_MSG_RESULT(ioctl)
|
|
|
|
RT_METHOD=rt_ioctl.o
|
|
|
|
netlink=no
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(netlink)
|
|
|
|
RT_METHOD=rt_netlink.o
|
|
|
|
AC_DEFINE(HAVE_NETLINK,,netlink)
|
|
|
|
netlink=yes
|
|
|
|
fi
|
2004-05-11 12:49:35 +02:00
|
|
|
elif test x"$opsys" = x"sol2-6";then
|
|
|
|
AC_MSG_RESULT(Route socket)
|
|
|
|
KERNEL_METHOD="kernel_socket.o"
|
|
|
|
RT_METHOD="rt_socket.o"
|
2005-03-12 07:36:10 +01:00
|
|
|
elif test x"$opsys" = x"sol8";then
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_MSG_RESULT(Route socket)
|
|
|
|
KERNEL_METHOD="kernel_socket.o"
|
|
|
|
RT_METHOD="rt_socket.o"
|
|
|
|
elif test "$opsys" = "irix" ; then
|
|
|
|
AC_MSG_RESULT(Route socket)
|
|
|
|
KERNEL_METHOD="kernel_socket.o"
|
|
|
|
RT_METHOD="rt_socket.o"
|
2003-03-17 03:05:07 +01:00
|
|
|
else
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_TRY_RUN([#include <errno.h>
|
2003-03-17 03:05:07 +01:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
main ()
|
|
|
|
{
|
|
|
|
int ac_sock;
|
|
|
|
|
|
|
|
ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
|
|
|
|
if (ac_sock < 0 && errno == EINVAL)
|
|
|
|
exit (1);
|
|
|
|
exit (0);
|
|
|
|
}],
|
|
|
|
[KERNEL_METHOD=kernel_socket.o
|
|
|
|
RT_METHOD=rt_socket.o
|
|
|
|
AC_MSG_RESULT(socket)],
|
|
|
|
[RT_METHOD=rt_ioctl.o
|
|
|
|
AC_MSG_RESULT(ioctl)],
|
|
|
|
[KERNEL_METHOD=kernel_socket.o
|
|
|
|
RT_METHOD=rt_socket.o
|
|
|
|
AC_MSG_RESULT(socket)])
|
|
|
|
fi
|
|
|
|
AC_SUBST(RT_METHOD)
|
|
|
|
AC_SUBST(KERNEL_METHOD)
|
|
|
|
AC_SUBST(OTHER_METHOD)
|
|
|
|
|
2005-01-04 17:24:43 +01:00
|
|
|
dnl ------------------------------------
|
|
|
|
dnl check for broken CMSG_FIRSTHDR macro
|
|
|
|
dnl ------------------------------------
|
2005-01-04 18:02:48 +01:00
|
|
|
AC_MSG_CHECKING(for broken CMSG_FIRSTHDR)
|
2005-04-04 01:46:37 +02:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2005-01-04 17:24:43 +01:00
|
|
|
#ifdef SUNOS_5
|
|
|
|
#define _XPG4_2
|
|
|
|
#define __EXTENSIONS__
|
|
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
main()
|
|
|
|
{
|
|
|
|
struct msghdr msg;
|
|
|
|
char buf[4];
|
|
|
|
|
|
|
|
msg.msg_control = buf;
|
|
|
|
msg.msg_controllen = 0;
|
|
|
|
|
|
|
|
if (CMSG_FIRSTHDR(&msg) != NULL)
|
|
|
|
exit(0);
|
|
|
|
exit (1);
|
2005-04-04 01:46:37 +02:00
|
|
|
}]])],[AC_MSG_RESULT(yes - using workaround) AC_DEFINE(HAVE_BROKEN_CMSG_FIRSTHDR,,Broken CMSG_FIRSTHDR)],
|
2005-04-03 15:07:21 +02:00
|
|
|
[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
|
2005-01-04 17:24:43 +01:00
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ------------------------------
|
|
|
|
dnl check kernel route read method
|
|
|
|
dnl ------------------------------
|
|
|
|
AC_CACHE_CHECK(route read method check, zebra_rtread,
|
|
|
|
[if test "$netlink" = yes; then
|
|
|
|
RTREAD_METHOD="rtread_netlink.o"
|
|
|
|
zebra_rtread="netlink"
|
|
|
|
else
|
|
|
|
for zebra_rtread in /proc/net/route /dev/ip /dev/null;
|
|
|
|
do
|
|
|
|
test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
|
|
|
|
done
|
|
|
|
case $zebra_rtread in
|
|
|
|
"/proc/net/route") RTREAD_METHOD="rtread_proc.o"
|
|
|
|
zebra_rtread="proc";;
|
2003-07-08 10:36:17 +02:00
|
|
|
"/dev/ip")
|
|
|
|
case "$host" in
|
|
|
|
*-freebsd*) RTREAD_METHOD=rtread_sysctl.o
|
|
|
|
zebra_rtread="sysctl";;
|
|
|
|
*) RTREAD_METHOD="rtread_getmsg.o"
|
|
|
|
zebra_rtread="getmsg";;
|
|
|
|
esac;;
|
2003-03-17 03:05:07 +01:00
|
|
|
*) RTREAD_METHOD="rtread_sysctl.o"
|
|
|
|
zebra_rtread="sysctl";;
|
|
|
|
esac
|
|
|
|
fi])
|
|
|
|
AC_SUBST(RTREAD_METHOD)
|
|
|
|
|
|
|
|
dnl -----------------------------
|
|
|
|
dnl check interface lookup method
|
|
|
|
dnl -----------------------------
|
2004-05-11 12:49:35 +02:00
|
|
|
IOCTL_METHOD=ioctl.o
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_MSG_CHECKING(interface looking up method)
|
|
|
|
if test "$netlink" = yes; then
|
|
|
|
AC_MSG_RESULT(netlink)
|
|
|
|
IF_METHOD=if_netlink.o
|
2004-05-11 12:49:35 +02:00
|
|
|
elif test "$opsys" = "sol2-6";then
|
|
|
|
AC_MSG_RESULT(Solaris GIF)
|
|
|
|
IF_METHOD=if_ioctl.o
|
2005-03-12 07:36:10 +01:00
|
|
|
elif test "$opsys" = "sol8";then
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_MSG_RESULT(Solaris GLIF)
|
|
|
|
IF_METHOD=if_ioctl_solaris.o
|
|
|
|
IOCTL_METHOD=ioctl_solaris.o
|
|
|
|
elif test "$opsys" = "irix" ; then
|
|
|
|
AC_MSG_RESULT(IRIX)
|
|
|
|
IF_METHOD=if_ioctl.o
|
|
|
|
elif test "$opsys" = "openbsd";then
|
|
|
|
AC_MSG_RESULT(openbsd)
|
|
|
|
IF_METHOD=if_ioctl.o
|
|
|
|
elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
|
|
|
|
AC_MSG_RESULT(sysctl)
|
2003-03-17 03:05:07 +01:00
|
|
|
IF_METHOD=if_sysctl.o
|
|
|
|
AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
|
2004-05-11 12:49:35 +02:00
|
|
|
else
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_MSG_RESULT(ioctl)
|
|
|
|
IF_METHOD=if_ioctl.o
|
|
|
|
fi
|
|
|
|
AC_SUBST(IF_METHOD)
|
2004-05-11 12:49:35 +02:00
|
|
|
AC_SUBST(IOCTL_METHOD)
|
2003-03-17 03:05:07 +01:00
|
|
|
|
|
|
|
dnl -----------------------
|
|
|
|
dnl check proc file system.
|
|
|
|
dnl -----------------------
|
|
|
|
if test -r /proc/net/dev; then
|
|
|
|
AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
|
|
|
|
IF_PROC=if_proc.o
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -r /proc/net/if_inet6; then
|
|
|
|
AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
|
|
|
|
IF_PROC=if_proc.o
|
|
|
|
fi
|
|
|
|
AC_SUBST(IF_PROC)
|
|
|
|
|
|
|
|
dnl -----------------------------
|
|
|
|
dnl check ipforward detect method
|
|
|
|
dnl -----------------------------
|
|
|
|
AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
|
|
|
|
[for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
|
|
|
|
do
|
|
|
|
test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
|
|
|
|
done
|
|
|
|
case $zebra_ipforward_path in
|
|
|
|
"/proc/net/snmp") IPFORWARD=ipforward_proc.o
|
|
|
|
zebra_ipforward_path="proc";;
|
|
|
|
"/dev/ip")
|
|
|
|
case "$host" in
|
|
|
|
*-nec-sysv4*) IPFORWARD=ipforward_ews.o
|
|
|
|
zebra_ipforward_path="ews";;
|
2003-07-08 10:36:17 +02:00
|
|
|
*-freebsd*) IPFORWARD=ipforward_sysctl.o
|
|
|
|
zebra_ipforward_path="sysctl";;
|
2003-03-17 03:05:07 +01:00
|
|
|
*) IPFORWARD=ipforward_solaris.o
|
|
|
|
zebra_ipforward_path="solaris";;
|
|
|
|
esac;;
|
|
|
|
*) IPFORWARD=ipforward_sysctl.o
|
|
|
|
zebra_ipforward_path="sysctl";;
|
|
|
|
esac])
|
|
|
|
AC_SUBST(IPFORWARD)
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
|
|
|
|
|
|
|
|
dnl ----------
|
|
|
|
dnl IPv6 check
|
|
|
|
dnl ----------
|
|
|
|
AC_MSG_CHECKING(whether does this OS have IPv6 stack)
|
|
|
|
if test "${enable_ipv6}" = "no"; then
|
|
|
|
AC_MSG_RESULT(disabled)
|
|
|
|
else
|
|
|
|
dnl ----------
|
|
|
|
dnl INRIA IPv6
|
|
|
|
dnl ----------
|
2003-06-04 13:01:45 +02:00
|
|
|
if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
|
|
|
|
zebra_cv_ipv6=yes
|
|
|
|
AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
|
|
|
|
AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
|
|
|
|
RIPNGD="ripngd"
|
|
|
|
OSPF6D="ospf6d"
|
|
|
|
LIB_IPV6=""
|
|
|
|
AC_MSG_RESULT(INRIA IPv6)
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ---------
|
|
|
|
dnl KAME IPv6
|
|
|
|
dnl ---------
|
2003-06-04 13:01:45 +02:00
|
|
|
elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
|
|
|
|
zebra_cv_ipv6=yes
|
|
|
|
AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
|
|
|
|
AC_DEFINE(KAME,1,KAME IPv6)
|
|
|
|
RIPNGD="ripngd"
|
|
|
|
OSPF6D="ospf6d"
|
|
|
|
if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
|
2003-03-17 03:05:07 +01:00
|
|
|
LIB_IPV6="-L/usr/local/v6/lib -linet6"
|
2003-06-04 13:01:45 +02:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(KAME)
|
2003-05-25 22:18:13 +02:00
|
|
|
dnl -------------------------
|
|
|
|
dnl MUSICA IPv6
|
|
|
|
dnl default host check
|
|
|
|
dnl It is not used by Kheops
|
|
|
|
dnl -------------------------
|
2003-06-04 13:01:45 +02:00
|
|
|
elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
|
|
|
|
zebra_cv_ipv6=yes
|
|
|
|
AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
|
|
|
|
AC_DEFINE(MUSICA,1,Musica IPv6 stack)
|
|
|
|
AC_DEFINE(KAME,1,KAME IPv6 stack)
|
|
|
|
RIPNGD="ripngd"
|
|
|
|
OSPF6D="ospf6d"
|
|
|
|
if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
|
2003-05-25 22:18:13 +02:00
|
|
|
LIB_IPV6="-L/usr/local/v6/lib -linet6"
|
2003-06-04 13:01:45 +02:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(MUSICA)
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ---------
|
|
|
|
dnl NRL check
|
|
|
|
dnl ---------
|
2003-06-04 13:01:45 +02:00
|
|
|
elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
|
|
|
|
zebra_cv_ipv6=yes
|
|
|
|
AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
|
|
|
|
AC_DEFINE(NRL,1,NRL)
|
|
|
|
RIPNGD="ripngd"
|
|
|
|
OSPF6D="ospf6d"
|
|
|
|
if test x"$opsys" = x"bsdi";then
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_DEFINE(BSDI_NRL,,BSDI)
|
|
|
|
AC_MSG_RESULT(BSDI_NRL)
|
2003-06-04 13:01:45 +02:00
|
|
|
else
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_MSG_RESULT(NRL)
|
2003-06-04 13:01:45 +02:00
|
|
|
fi
|
2004-05-11 12:49:35 +02:00
|
|
|
dnl ------------------------------------
|
|
|
|
dnl Solaris 9, 10 and potentially higher
|
|
|
|
dnl ------------------------------------
|
2005-03-12 07:36:10 +01:00
|
|
|
elif test x"$opsys" = x"sol8"; then
|
2004-05-11 12:49:35 +02:00
|
|
|
zebra_cv_ipv6=yes;
|
|
|
|
AC_DEFINE(HAVE_IPV6, 1, IPv6)
|
|
|
|
AC_DEFINE(SOLARIS_IPV6, 1, Solaris IPv6)
|
|
|
|
RIPNGD="ripngd"
|
|
|
|
OSPF6D="ospf6d"
|
|
|
|
AC_MSG_RESULT(Solaris IPv6)
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ----------
|
|
|
|
dnl Linux IPv6
|
|
|
|
dnl ----------
|
2003-06-04 13:01:45 +02:00
|
|
|
elif test "${enable_ipv6}" = "yes"; then
|
|
|
|
AC_EGREP_CPP(yes, [
|
|
|
|
#include <linux/version.h>
|
|
|
|
/* 2.1.128 or later */
|
|
|
|
#if LINUX_VERSION_CODE >= 0x020180
|
|
|
|
yes
|
|
|
|
#endif],
|
|
|
|
[zebra_cv_ipv6=yes
|
|
|
|
zebra_cv_linux_ipv6=yes
|
|
|
|
AC_MSG_RESULT(Linux IPv6)])
|
|
|
|
else
|
|
|
|
if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
|
|
|
|
then
|
2003-03-17 03:05:07 +01:00
|
|
|
zebra_cv_ipv6=yes
|
|
|
|
zebra_cv_linux_ipv6=yes
|
|
|
|
AC_MSG_RESULT(Linux IPv6)
|
2003-06-04 13:01:45 +02:00
|
|
|
fi
|
|
|
|
fi
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2003-06-04 13:01:45 +02:00
|
|
|
if test "$zebra_cv_linux_ipv6" = "yes";then
|
|
|
|
AC_MSG_CHECKING(for GNU libc >= 2.1)
|
|
|
|
AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
|
|
|
|
AC_EGREP_CPP(yes, [
|
2003-03-17 03:05:07 +01:00
|
|
|
#include <features.h>
|
|
|
|
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
|
|
|
|
yes
|
2003-06-04 13:01:45 +02:00
|
|
|
#endif],
|
|
|
|
[glibc=yes
|
|
|
|
AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
RIPNGD="ripngd"
|
|
|
|
OSPF6D="ospf6d"
|
|
|
|
if test "$glibc" != "yes"; then
|
2003-03-17 03:05:07 +01:00
|
|
|
INCLUDES="-I/usr/inet6/include"
|
|
|
|
if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
|
|
|
|
LIB_IPV6="-L/usr/inet6/lib -linet6"
|
|
|
|
fi
|
2003-06-04 13:01:45 +02:00
|
|
|
fi
|
|
|
|
fi
|
2003-03-17 03:05:07 +01:00
|
|
|
|
|
|
|
dnl -----------------------
|
|
|
|
dnl Set IPv6 related values
|
|
|
|
dnl -----------------------
|
2003-06-04 13:01:45 +02:00
|
|
|
LIBS="$LIB_IPV6 $LIBS"
|
|
|
|
AC_SUBST(LIB_IPV6)
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2003-06-04 13:01:45 +02:00
|
|
|
if test x"$RIPNGD" = x""; then
|
|
|
|
AC_MSG_RESULT(IPv4 only)
|
|
|
|
fi
|
2003-03-17 03:05:07 +01:00
|
|
|
fi
|
|
|
|
|
2003-12-03 18:52:30 +01:00
|
|
|
dnl ------------------
|
|
|
|
dnl IPv6 header checks
|
|
|
|
dnl ------------------
|
|
|
|
if test "x${zebra_cv_ipv6}" = "xyes"; then
|
|
|
|
AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \
|
|
|
|
netinet6/in6_var.h netinet6/nd6.h])
|
|
|
|
fi
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl --------------------
|
|
|
|
dnl Daemon disable check
|
|
|
|
dnl --------------------
|
|
|
|
if test "${enable_zebra}" = "no";then
|
|
|
|
ZEBRA=""
|
|
|
|
else
|
|
|
|
ZEBRA="zebra"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${enable_bgpd}" = "no";then
|
|
|
|
BGPD=""
|
|
|
|
else
|
|
|
|
BGPD="bgpd"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${enable_ripd}" = "no";then
|
|
|
|
RIPD=""
|
|
|
|
else
|
|
|
|
RIPD="ripd"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${enable_ospfd}" = "no";then
|
|
|
|
OSPFD=""
|
|
|
|
else
|
|
|
|
OSPFD="ospfd"
|
|
|
|
fi
|
|
|
|
|
2004-12-22 15:03:52 +01:00
|
|
|
if test "${enable_watchquagga}" = "no";then
|
|
|
|
WATCHQUAGGA=""
|
|
|
|
else
|
|
|
|
WATCHQUAGGA="watchquagga"
|
|
|
|
fi
|
|
|
|
|
2003-03-21 16:16:05 +01:00
|
|
|
OSPFCLIENT=""
|
|
|
|
if test "${enable_opaque_lsa}" = "yes"; then
|
|
|
|
if test "${enable_ospfapi}" != "no";then
|
2003-03-28 02:45:13 +01:00
|
|
|
AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
|
2003-03-21 16:16:05 +01:00
|
|
|
|
|
|
|
if test "${enable_ospfclient}" != "no";then
|
|
|
|
OSPFCLIENT="ospfclient"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
case "${enable_ripngd}" in
|
|
|
|
"yes") RIPNGD="ripngd";;
|
|
|
|
"no" ) RIPNGD="";;
|
|
|
|
* ) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "${enable_ospf6d}" in
|
|
|
|
"yes") OSPF6D="ospf6d";;
|
|
|
|
"no" ) OSPF6D="";;
|
|
|
|
* ) ;;
|
|
|
|
esac
|
|
|
|
|
2003-12-23 09:56:18 +01:00
|
|
|
case "${enable_isisd}" in
|
|
|
|
"yes") ISISD="isisd";;
|
|
|
|
"no" ) ISISD="";;
|
2004-09-13 22:22:18 +02:00
|
|
|
* ) ;;
|
2003-12-23 09:56:18 +01:00
|
|
|
esac
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
if test "${enable_bgp_announce}" = "no";then
|
|
|
|
AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ZEBRA)
|
|
|
|
AC_SUBST(BGPD)
|
|
|
|
AC_SUBST(RIPD)
|
|
|
|
AC_SUBST(RIPNGD)
|
|
|
|
AC_SUBST(OSPFD)
|
|
|
|
AC_SUBST(OSPF6D)
|
2004-12-22 15:03:52 +01:00
|
|
|
AC_SUBST(WATCHQUAGGA)
|
2003-12-23 09:56:18 +01:00
|
|
|
AC_SUBST(ISISD)
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_SUBST(VTYSH)
|
|
|
|
AC_SUBST(INCLUDES)
|
|
|
|
AC_SUBST(CURSES)
|
|
|
|
AC_SUBST(OSPFCLIENT)
|
2003-03-21 16:16:05 +01:00
|
|
|
AC_SUBST(OSPFAPI)
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
|
|
|
|
AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
|
|
|
|
AC_CHECK_LIB(crypt, crypt)
|
|
|
|
AC_CHECK_LIB(resolv, res_init)
|
|
|
|
AC_CHECK_LIB(m, main)
|
|
|
|
|
|
|
|
dnl ---------------------------------------------------
|
|
|
|
dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
|
|
|
|
dnl ---------------------------------------------------
|
2003-06-04 13:01:45 +02:00
|
|
|
AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
|
|
|
|
AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
|
|
|
|
AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
|
2003-03-17 03:05:07 +01:00
|
|
|
|
|
|
|
dnl ---------------------------
|
|
|
|
dnl check system has GNU regexp
|
|
|
|
dnl ---------------------------
|
|
|
|
dnl AC_MSG_CHECKING(whether system has GNU regex)
|
|
|
|
AC_CHECK_LIB(c, regexec,
|
|
|
|
[AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
|
|
|
|
LIB_REGEX=""],
|
|
|
|
[LIB_REGEX="regex.o"])
|
|
|
|
AC_SUBST(LIB_REGEX)
|
|
|
|
|
|
|
|
dnl ------------------
|
|
|
|
dnl check SNMP library
|
|
|
|
dnl ------------------
|
|
|
|
if test "${enable_snmp}" = "yes";then
|
|
|
|
dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
|
|
|
|
if test "${HAVE_SNMP}" = ""; then
|
2003-03-21 16:16:05 +01:00
|
|
|
old_libs="${LIBS}"
|
|
|
|
LIBS="-L/usr/lib"
|
2003-03-17 03:05:07 +01:00
|
|
|
unset ac_cv_lib_snmp_asn_parse_int
|
2003-03-21 16:16:05 +01:00
|
|
|
AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
|
|
|
|
if test "${NEED_CRYPTO}" = ""; then
|
|
|
|
AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ])
|
|
|
|
else
|
|
|
|
AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
|
|
|
|
fi
|
|
|
|
LIBS="${old_libs}"
|
2003-03-17 03:05:07 +01:00
|
|
|
fi
|
|
|
|
if test "${HAVE_SNMP}" = ""; then
|
2003-03-21 16:16:05 +01:00
|
|
|
old_libs="${LIBS}"
|
|
|
|
LIBS="-L/usr/lib"
|
|
|
|
unset ac_cv_lib_snmp_asn_parse_int
|
|
|
|
AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
|
|
|
|
if test "${HAVE_SNMP}" = ""; then
|
|
|
|
unset ac_cv_lib_snmp_asn_parse_int
|
|
|
|
AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
|
|
|
|
if test "${NEED_CRYPTO}" = "yes"; then
|
|
|
|
AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
LIBS="${old_libs}"
|
2003-03-17 03:05:07 +01:00
|
|
|
fi
|
2003-03-21 16:16:05 +01:00
|
|
|
|
2003-03-19 05:25:08 +01:00
|
|
|
if test "${HAVE_SNMP}" = ""; then
|
2003-03-21 16:16:05 +01:00
|
|
|
old_libs="${LIBS}"
|
|
|
|
LIBS="-L/usr/local/lib"
|
|
|
|
unset ac_cv_lib_snmp_asn_parse_int
|
|
|
|
AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
|
|
|
|
if test "${HAVE_SNMP}" = ""; then
|
|
|
|
unset ac_cv_lib_snmp_asn_parse_int
|
|
|
|
AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
|
|
|
|
if test "${NEED_CRYPTO}" = "yes"; then
|
|
|
|
AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
LIBS="${old_libs}"
|
2003-03-19 05:25:08 +01:00
|
|
|
fi
|
2003-03-21 16:16:05 +01:00
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
if test "${HAVE_SNMP}" = "yes"; then
|
|
|
|
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
|
|
|
|
do
|
|
|
|
test -f "${ac_snmp}" && break
|
|
|
|
done
|
2003-03-21 16:16:05 +01:00
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
case ${ac_snmp} in
|
|
|
|
/usr/include/net-snmp/*)
|
|
|
|
AC_DEFINE(HAVE_SNMP,,SNMP)
|
2003-03-21 16:16:05 +01:00
|
|
|
AC_DEFINE(HAVE_NETSNMP,,SNMP)
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_DEFINE(UCD_COMPATIBLE,,SNMP)
|
2005-03-28 17:29:07 +02:00
|
|
|
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/include/net-snmp -I/usr/include/net-snmp/library"
|
2003-03-19 05:25:08 +01:00
|
|
|
if test "${HAVE_NETSNMP}" = "yes"; then
|
2003-03-21 16:16:05 +01:00
|
|
|
LIBS="${LIBS} -lnetsnmp"
|
2003-03-19 05:25:08 +01:00
|
|
|
else
|
2003-03-21 16:16:05 +01:00
|
|
|
LIBS="${LIBS} -lsnmp"
|
2003-03-19 05:25:08 +01:00
|
|
|
fi
|
2003-03-17 03:05:07 +01:00
|
|
|
;;
|
|
|
|
/usr/include/ucd-snmp/*)
|
|
|
|
AC_DEFINE(HAVE_SNMP,,SNMP)
|
2005-03-28 17:29:07 +02:00
|
|
|
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/include/ucd-snmp"
|
2003-03-17 03:05:07 +01:00
|
|
|
LIBS="${LIBS} -lsnmp"
|
|
|
|
;;
|
|
|
|
/usr/local/include/ucd-snmp/*)
|
|
|
|
AC_DEFINE(HAVE_SNMP,,SNMP)
|
2005-03-28 17:29:07 +02:00
|
|
|
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/local/include/ucd-snmp"
|
2003-03-17 03:05:07 +01:00
|
|
|
LIBS="${LIBS} -L/usr/local/lib -lsnmp"
|
|
|
|
;;
|
2003-11-02 08:29:11 +01:00
|
|
|
/usr/local/include/net-snmp/*)
|
|
|
|
AC_DEFINE(HAVE_SNMP,,SNMP)
|
|
|
|
AC_DEFINE(HAVE_NET_SNMP,,SNMP)
|
|
|
|
AC_DEFINE(UCD_COMPATIBLE,,SNMP)
|
2005-03-28 17:29:07 +02:00
|
|
|
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/local/include/net-snmp"
|
2003-11-02 08:29:11 +01:00
|
|
|
LIBS="${LIBS} -L/usr/local/lib -lnetsnmp"
|
|
|
|
;;
|
2003-03-17 03:05:07 +01:00
|
|
|
esac
|
|
|
|
if test "${NEED_CRYPTO}" = "yes"; then
|
|
|
|
LIBS="${LIBS} -lcrypto"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-01-12 17:52:55 +01:00
|
|
|
if test "${enable_snmp}" = "yes" -a "${HAVE_SNMP}" != "yes"; then
|
|
|
|
AC_MSG_ERROR([--enable-snmp given, but cannot find support for SNMP])
|
|
|
|
fi
|
|
|
|
|
2005-03-28 17:29:07 +02:00
|
|
|
AC_SUBST(SNMP_INCLUDES)
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ----------------------------
|
|
|
|
dnl check sa_len of sockaddr
|
|
|
|
dnl ----------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SA_LEN,,sa_len)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl ----------------------------
|
|
|
|
dnl check sin_len of sockaddr_in
|
|
|
|
dnl ----------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl ----------------------------
|
|
|
|
dnl check sun_len of sockaddr_un
|
|
|
|
dnl ----------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
|
|
#include <sys/un.h>
|
|
|
|
],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl -----------------------------------
|
|
|
|
dnl check sin6_scope_id of sockaddr_in6
|
|
|
|
dnl -----------------------------------
|
|
|
|
if test "$zebra_cv_ipv6" = yes; then
|
|
|
|
AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ----------------------------
|
|
|
|
dnl check socklen_t exist or not
|
|
|
|
dnl ----------------------------
|
|
|
|
AC_MSG_CHECKING(whther socklen_t is defined)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
],[socklen_t ac_x;],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl ------------------------
|
|
|
|
dnl check struct sockaddr_dl
|
|
|
|
dnl ------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct sockaddr_dl exist)
|
|
|
|
AC_EGREP_HEADER(sockaddr_dl,
|
|
|
|
net/if_dl.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl --------------------------
|
|
|
|
dnl check structure ifaliasreq
|
|
|
|
dnl --------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct ifaliasreq exist)
|
|
|
|
AC_EGREP_HEADER(ifaliasreq,
|
|
|
|
net/if.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl ----------------------------
|
|
|
|
dnl check structure in6_aliasreq
|
|
|
|
dnl ----------------------------
|
2003-05-25 22:18:13 +02:00
|
|
|
AC_MSG_CHECKING(whether struct in6_aliasreq exist)
|
2003-03-17 03:05:07 +01:00
|
|
|
AC_EGREP_HEADER(in6_aliasreq,
|
|
|
|
netinet6/in6_var.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
2003-05-25 22:18:13 +02:00
|
|
|
dnl -----------------------------------
|
|
|
|
dnl check ifra_lifetime of in6_aliasreq
|
|
|
|
dnl -----------------------------------
|
|
|
|
AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
|
|
#include <netinet6/in6_var.h>
|
|
|
|
],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
2003-06-04 13:01:45 +02:00
|
|
|
AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)],
|
2003-05-25 22:18:13 +02:00
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ---------------------------
|
|
|
|
dnl check structure rt_addrinfo
|
|
|
|
dnl ---------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct rt_addrinfo exist)
|
|
|
|
AC_EGREP_HEADER(rt_addrinfo,
|
|
|
|
net/route.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl --------------------------
|
|
|
|
dnl check structure in_pktinfo
|
|
|
|
dnl --------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct in_pktinfo exist)
|
|
|
|
AC_TRY_COMPILE([#include <netinet/in.h>
|
|
|
|
],[struct in_pktinfo ac_x;],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
2005-03-25 14:05:47 +01:00
|
|
|
dnl ----------------------------------
|
|
|
|
dnl check struct nd_opt_homeagent_info
|
|
|
|
dnl ----------------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct nd_opt_homeagent_info exist)
|
|
|
|
AC_EGREP_HEADER(nd_opt_homeagent_info,
|
|
|
|
netinet/icmp6.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_ND_OPT_HOMEAGENT_INFO,,nd_opt_homeagent_info)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl --------------------------------
|
|
|
|
dnl check struct nd_opt_adv_interval
|
|
|
|
dnl --------------------------------
|
|
|
|
AC_MSG_CHECKING(whether struct nd_opt_adv_interval exist)
|
|
|
|
AC_EGREP_HEADER(nd_opt_adv_interval,
|
|
|
|
netinet/icmp6.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_ND_OPT_ADV_INTERVAL,,nd_opt_adv_interval)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
dnl ------------------------------------
|
|
|
|
dnl check fields in nd_opt_adv_interval
|
|
|
|
dnl ------------------------------------
|
|
|
|
AC_MSG_CHECKING(whether nd_opt_ai_type field exist)
|
|
|
|
AC_EGREP_HEADER(nd_opt_ai_type,
|
|
|
|
netinet/icmp6.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_ND_OPT_ADV_INTERVAL_AI_FIELDS,,nd_opt_ai_type)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl --------------------------------------
|
|
|
|
dnl checking for getrusage struct and call
|
|
|
|
dnl --------------------------------------
|
|
|
|
AC_MSG_CHECKING(whether getrusage is available)
|
|
|
|
AC_TRY_COMPILE([#include <sys/resource.h>
|
|
|
|
],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_RUSAGE,,rusage)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
2003-06-04 15:59:38 +02:00
|
|
|
dnl -------------------
|
|
|
|
dnl capabilities checks
|
|
|
|
dnl -------------------
|
2004-04-06 13:59:00 +02:00
|
|
|
if test "${enable_capabilities}" != "no"; then
|
|
|
|
AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
|
|
|
|
AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
|
|
|
|
quagga_ac_keepcaps="yes"],
|
|
|
|
AC_MSG_RESULT(no)
|
2003-06-04 15:59:38 +02:00
|
|
|
)
|
2004-04-06 13:59:00 +02:00
|
|
|
if test x"${quagga_ac_keepcaps}" = x"yes"; then
|
|
|
|
AC_CHECK_HEADERS(sys/capability.h)
|
|
|
|
fi
|
|
|
|
if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
|
|
|
|
AC_CHECK_LIB(cap, cap_init,
|
|
|
|
[AC_DEFINE(HAVE_LCAPS,1,Capabilities)
|
|
|
|
LIBCAP="-lcap"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
2003-06-04 15:59:38 +02:00
|
|
|
fi
|
|
|
|
AC_SUBST(LIBCAP)
|
|
|
|
|
2005-01-12 18:27:27 +01:00
|
|
|
dnl -------------------
|
|
|
|
dnl test for ucontext.h
|
|
|
|
dnl -------------------
|
|
|
|
AC_CHECK_HEADERS(ucontext.h)
|
|
|
|
|
2003-06-04 11:40:54 +02:00
|
|
|
dnl ---------------------------
|
|
|
|
dnl check for glibc 'backtrace'
|
|
|
|
dnl ---------------------------
|
|
|
|
if test "${glibc}" = "yes"; then
|
|
|
|
AC_CHECK_HEADER(execinfo.h)
|
|
|
|
fi
|
|
|
|
if test x"${ac_cv_header_execinfo_h}" = x"yes"; then
|
|
|
|
AC_CHECK_FUNC(backtrace,
|
|
|
|
[AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2003-05-20 02:03:33 +02:00
|
|
|
dnl ----------
|
|
|
|
dnl configure date
|
|
|
|
dnl ----------
|
|
|
|
CONFDATE=`date '+%Y%m%d'`
|
|
|
|
AC_SUBST(CONFDATE)
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ------------------------------
|
2003-06-04 13:01:45 +02:00
|
|
|
dnl set paths for state directory
|
2003-04-07 08:11:09 +02:00
|
|
|
dnl ------------------------------
|
|
|
|
if test "${prefix}" = "NONE"; then
|
2003-08-12 15:08:31 +02:00
|
|
|
quagga_statedir_prefix="";
|
2003-04-07 08:11:09 +02:00
|
|
|
else
|
2003-08-12 15:08:31 +02:00
|
|
|
quagga_statedir_prefix=${prefix}
|
2003-04-07 08:11:09 +02:00
|
|
|
fi
|
|
|
|
if test "${localstatedir}" = '${prefix}/var'; then
|
2003-06-04 13:01:45 +02:00
|
|
|
AC_CACHE_CHECK(state directory,ac_statedir,
|
2003-08-12 15:08:31 +02:00
|
|
|
[for QUAGGA_STATE_DIR in ${quagga_statedir_prefix}/var/run dnl
|
|
|
|
${quagga_statedir_prefix}/var/adm dnl
|
|
|
|
${quagga_statedir_prefix}/etc dnl
|
2003-06-04 13:01:45 +02:00
|
|
|
/var/run dnl
|
|
|
|
/var/adm dnl
|
|
|
|
/etc dnl
|
|
|
|
/dev/null;
|
2003-04-07 08:11:09 +02:00
|
|
|
do
|
2003-08-12 15:08:31 +02:00
|
|
|
test -d $QUAGGA_STATE_DIR && break
|
2003-04-07 08:11:09 +02:00
|
|
|
done
|
2003-08-12 15:08:31 +02:00
|
|
|
quagga_statedir=$QUAGGA_STATE_DIR])
|
2003-04-07 08:11:09 +02:00
|
|
|
else
|
2003-08-12 15:08:31 +02:00
|
|
|
quagga_statedir=${localstatedir}
|
2003-06-04 13:01:45 +02:00
|
|
|
AC_MSG_CHECKING(directory to use for state file)
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_MSG_RESULT(${quagga_statedir})
|
2003-06-04 13:01:45 +02:00
|
|
|
fi
|
2003-08-12 15:08:31 +02:00
|
|
|
if test $quagga_statedir = "/dev/null"; then
|
2003-06-04 13:01:45 +02:00
|
|
|
AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
|
|
|
|
fi
|
|
|
|
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$quagga_statedir/zebra.pid",zebra PID)
|
|
|
|
AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$quagga_statedir/ripd.pid",ripd PID)
|
|
|
|
AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$quagga_statedir/ripngd.pid",ripngd PID)
|
|
|
|
AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$quagga_statedir/bgpd.pid",bgpd PID)
|
|
|
|
AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID)
|
|
|
|
AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID)
|
2003-12-23 09:56:18 +01:00
|
|
|
AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$quagga_statedir/isisd.pid",isisd PID)
|
2004-12-22 15:03:52 +01:00
|
|
|
AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$quagga_statedir/watchquagga.pid",watchquagga PID)
|
2003-08-12 15:08:31 +02:00
|
|
|
AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket)
|
|
|
|
AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket)
|
|
|
|
AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket)
|
|
|
|
AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$quagga_statedir/ripngd.vty",ripng vty socket)
|
|
|
|
AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$quagga_statedir/bgpd.vty",bgpd vty socket)
|
|
|
|
AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$quagga_statedir/ospfd.vty",ospfd vty socket)
|
|
|
|
AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty socket)
|
2003-12-23 09:56:18 +01:00
|
|
|
AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$quagga_statedir/isisd.vty",isisd vty socket)
|
2004-12-22 16:35:12 +01:00
|
|
|
AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$quagga_statedir",daemon vty directory)
|
2003-03-17 03:05:07 +01:00
|
|
|
|
2005-04-07 Paul Jakma <paul.jakma@sun.com>
* (global): Fix up list loops to match changes in lib/linklist,
and some basic auditing of usage.
* configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES
* HACKING: Add notes about deprecating interfaces and commands.
* lib/linklist.h: Add usage comments.
Rename getdata macro to listgetdata.
Rename nextnode to listnextnode and fix its odd behaviour to be
less dangerous.
Make listgetdata macro assert node is not null, NULL list entries
should be bug condition.
ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use
with for loop, Suggested by Jim Carlson of Sun.
Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the
"safety" of previous macro.
LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to
distinguish from the similarly named functions, and reflect their
effect better.
Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section
with the old defines which were modified above,
for backwards compatibility - guarded to prevent Quagga using it..
* lib/linklist.c: fix up for linklist.h changes.
* ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single
scan of the area list, rather than scanning all areas first for
INTER_ROUTER and then again for INTER_NETWORK. According to
16.2, the scan should be area specific anyway, and further
ospf6d does not seem to implement 16.3 anyway.
2005-04-07 09:30:20 +02:00
|
|
|
dnl -------------------------------
|
|
|
|
dnl Quagga sources should always be
|
|
|
|
dnl current wrt interfaces. Dont
|
|
|
|
dnl allow deprecated interfaces to
|
|
|
|
dnl be exposed.
|
|
|
|
dnl -------------------------------
|
|
|
|
AC_DEFINE(QUAGGA_NO_DEPRECATED_INTERFACES, 1, Hide deprecated interfaces)
|
|
|
|
|
2003-03-17 03:05:07 +01:00
|
|
|
dnl ---------------------------
|
|
|
|
dnl Check htonl works correctly
|
|
|
|
dnl ---------------------------
|
|
|
|
AC_MSG_CHECKING(for working htonl)
|
|
|
|
AC_CACHE_VAL(ac_cv_htonl_works, [
|
|
|
|
AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETDB_H
|
|
|
|
#include <netdb.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif],
|
|
|
|
[htonl (0);],
|
|
|
|
ac_cv_htonl_works=yes,
|
|
|
|
ac_cv_htonl_works=no)])
|
|
|
|
AC_MSG_RESULT($ac_cv_htonl_works)
|
|
|
|
|
2004-11-07 23:34:23 +01:00
|
|
|
AC_CONFIG_FILES([Makefile lib/Makefile zebra/Makefile ripd/Makefile
|
2004-12-22 15:03:52 +01:00
|
|
|
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile
|
2003-12-23 09:56:18 +01:00
|
|
|
ospf6d/Makefile isisd/Makefile vtysh/Makefile doc/Makefile
|
2004-11-07 23:34:23 +01:00
|
|
|
ospfclient/Makefile tests/Makefile m4/Makefile redhat/Makefile
|
2004-08-27 17:57:35 +02:00
|
|
|
pkgsrc/Makefile
|
2004-11-12 10:05:00 +01:00
|
|
|
redhat/quagga.spec
|
2004-07-23 18:23:56 +02:00
|
|
|
lib/version.h
|
2004-11-07 23:34:23 +01:00
|
|
|
doc/defines.texi
|
2005-04-02 21:03:39 +02:00
|
|
|
isisd/topology/Makefile
|
2004-08-31 20:16:36 +02:00
|
|
|
pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
|
2004-11-12 10:27:04 +01:00
|
|
|
pkgsrc/ripd.sh pkgsrc/ripngd.sh pkgsrc/zebra.sh])
|
2004-11-12 10:05:00 +01:00
|
|
|
AC_CONFIG_FILES([vtysh/extract.pl],[chmod +x vtysh/extract.pl])
|
2004-11-19 07:41:49 +01:00
|
|
|
## Hack, but working solution to avoid rebuilding of quagga.info.
|
|
|
|
## It's already in CVS until texinfo 4.7 is more common.
|
|
|
|
AC_CONFIG_COMMANDS([info-time],[touch doc/quagga.info])
|
2004-11-07 23:34:23 +01:00
|
|
|
AC_OUTPUT
|
2003-03-17 03:05:07 +01:00
|
|
|
|
|
|
|
echo "
|
2004-08-26 14:21:28 +02:00
|
|
|
Quagga configuration
|
|
|
|
--------------------
|
|
|
|
quagga version : ${PACKAGE_VERSION}
|
2003-03-17 03:05:07 +01:00
|
|
|
host operationg system : ${host_os}
|
|
|
|
source code location : ${srcdir}
|
|
|
|
compiler : ${CC}
|
|
|
|
compiler flags : ${CFLAGS}
|
2005-03-28 17:29:07 +02:00
|
|
|
includes : ${INCLUDES} ${SNMP_INCLUDES}
|
2003-05-25 22:18:13 +02:00
|
|
|
linker flags : ${LDFLAGS} ${LIBS}
|
2003-08-12 15:08:31 +02:00
|
|
|
state file directory : ${quagga_statedir}
|
2003-10-22 02:07:44 +02:00
|
|
|
config file directory : `eval echo \`echo ${sysconfdir}\``
|
2003-12-03 18:24:27 +01:00
|
|
|
example directory : `eval echo \`echo ${exampledir}\``
|
2003-06-06 02:30:35 +02:00
|
|
|
user to run as : ${enable_user}
|
|
|
|
group to run as : ${enable_group}
|
|
|
|
group for vty sockets : ${enable_vty_group}
|
2003-12-22 21:15:53 +01:00
|
|
|
config file mask : ${enable_configfile_mask}
|
|
|
|
log file mask : ${enable_logfile_mask}
|
2003-10-22 02:07:44 +02:00
|
|
|
|
|
|
|
The above user and group must have read/write access to the state file
|
|
|
|
directory and to the config files in the config file directory.
|
2003-03-17 03:05:07 +01:00
|
|
|
"
|