Commit c817b991 authored by Martin Mareš's avatar Martin Mareš

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.
parent 9b63e3a5
......@@ -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)])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment