From c817b9916f1134f687ba53220d607e6e193cf651 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 4 May 2000 20:18:46 +0000 Subject: [PATCH] Added --enable-ipv6 which tells configure to select the right configuration for IPv6 automatically. Added --enable-warnings which turns off some more warnings. Default protocol list now depends on --enable-ipv6. --- configure.in | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index a01ceba7..fd98570b 100644 --- a/configure.in +++ b/configure.in @@ -7,9 +7,11 @@ AC_INIT(conf/confbase.Y) AC_CONFIG_AUX_DIR(tools) AC_ARG_ENABLE(debug,[ --enable-debug enable internal debugging routines (default: enabled)],,enable_debug=yes) +AC_ARG_ENABLE(warnings,[ --enable-warnings enable extra warnings (default: disabled)],,enable_warnings=no) AC_ARG_ENABLE(client,[ --enable-client enable building of BIRD client (default: enabled)],,enable_client=yes) +AC_ARG_ENABLE(ipv6,[ --enable-ipv6 enable building of IPv6 version (default: disabled)],,enable_ipv6=no) AC_ARG_WITH(sysconfig,[ --with-sysconfig=FILE use specified BIRD system configuration file]) -AC_ARG_WITH(protocols,[ --with-protocols=LIST include specified routing protocols (default: rip,static,pipe,bgp,ospf)],,[with_protocols="rip,static,pipe,bgp,ospf"]) +AC_ARG_WITH(protocols,[ --with-protocols=LIST include specified routing protocols (default: all)],,[with_protocols="all"]) AC_ARG_WITH(sysinclude,[ --with-sysinclude=PATH search for system includes on specified place]) if test "$srcdir" = . ; then @@ -34,6 +36,18 @@ AC_SUBST(objdir) AC_SUBST(exedir) AC_SUBST(srcdir_rel_mf) +if test "$enable_ipv6" = yes ; then + ip=ipv6 + if test "$with_protocols" = all ; then + with_protocols=bgp,pipe,rip,static + fi +else + ip=ipv4 + if test "$with_protocols" = all ; then + with_protocols=bgp,ospf,pipe,rip,static + fi +fi + AC_CANONICAL_HOST AC_MSG_CHECKING([which OS configuration should we use]) if test -n "$with_sysconfig" -a "$with_sysconfig" != no ; then @@ -48,12 +62,14 @@ if test -n "$with_sysconfig" -a "$with_sysconfig" != no ; then elif test -f sysconfig.h ; then sysdesc=sysconfig else - case "$host_os" in - linux*) case `uname -r` in + case "$ip:$host_os" in + ipv4:linux*) case `uname -r` in 1.*|2.0.*) sysdesc=linux-20 ;; *) sysdesc=linux-22 ;; esac ;; + ipv6:linux*) sysdesc=linux-v6 + ;; *) AC_MSG_RESULT(unknown) AC_MSG_ERROR([Cannot determine correct system configuration.]) ;; @@ -91,7 +107,12 @@ if test -z "$GCC" ; then fi AC_MSG_CHECKING([what CFLAGS should we use]) if test "$ac_test_CFLAGS" != set ; then - CFLAGS="$CFLAGS -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses" + if test "$enable_warnings" = yes ; then + WARNS="" + else + WARNS=" -Wno-unused" + fi + CFLAGS="$CFLAGS -Wall -W -Wstrict-prototypes -Wno-parentheses$WARNS" fi if test "$with_sysinclude" != no -a -n "$with_sysinclude"; then CPPFLAGS="$CPPFLAGS -I$with_sysinclude" @@ -109,8 +130,9 @@ if test -z "$FLEX" -o -z "$BISON" -o -z "$M4" ; then fi case $sysdesc in - */linux-22*) AC_CHECK_HEADER(linux/rtnetlink.h,,[AC_MSG_ERROR([Appropriate version of Linux kernel headers not found.])]) - ;; + */linux-22*|*/linux-v6*) + AC_CHECK_HEADER(linux/rtnetlink.h,,[AC_MSG_ERROR([Appropriate version of Linux kernel headers not found.])]) + ;; esac AC_CHECK_HEADER(syslog.h, [AC_DEFINE(HAVE_SYSLOG)])