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.
This commit is contained in:
parent
9b63e3a58a
commit
c817b9916f
1 changed files with 28 additions and 6 deletions
34
configure.in
34
configure.in
|
@ -7,9 +7,11 @@ AC_INIT(conf/confbase.Y)
|
||||||
AC_CONFIG_AUX_DIR(tools)
|
AC_CONFIG_AUX_DIR(tools)
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,[ --enable-debug enable internal debugging routines (default: enabled)],,enable_debug=yes)
|
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(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(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])
|
AC_ARG_WITH(sysinclude,[ --with-sysinclude=PATH search for system includes on specified place])
|
||||||
|
|
||||||
if test "$srcdir" = . ; then
|
if test "$srcdir" = . ; then
|
||||||
|
@ -34,6 +36,18 @@ AC_SUBST(objdir)
|
||||||
AC_SUBST(exedir)
|
AC_SUBST(exedir)
|
||||||
AC_SUBST(srcdir_rel_mf)
|
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_CANONICAL_HOST
|
||||||
AC_MSG_CHECKING([which OS configuration should we use])
|
AC_MSG_CHECKING([which OS configuration should we use])
|
||||||
if test -n "$with_sysconfig" -a "$with_sysconfig" != no ; then
|
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
|
elif test -f sysconfig.h ; then
|
||||||
sysdesc=sysconfig
|
sysdesc=sysconfig
|
||||||
else
|
else
|
||||||
case "$host_os" in
|
case "$ip:$host_os" in
|
||||||
linux*) case `uname -r` in
|
ipv4:linux*) case `uname -r` in
|
||||||
1.*|2.0.*) sysdesc=linux-20 ;;
|
1.*|2.0.*) sysdesc=linux-20 ;;
|
||||||
*) sysdesc=linux-22 ;;
|
*) sysdesc=linux-22 ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
ipv6:linux*) sysdesc=linux-v6
|
||||||
|
;;
|
||||||
*) AC_MSG_RESULT(unknown)
|
*) AC_MSG_RESULT(unknown)
|
||||||
AC_MSG_ERROR([Cannot determine correct system configuration.])
|
AC_MSG_ERROR([Cannot determine correct system configuration.])
|
||||||
;;
|
;;
|
||||||
|
@ -91,7 +107,12 @@ if test -z "$GCC" ; then
|
||||||
fi
|
fi
|
||||||
AC_MSG_CHECKING([what CFLAGS should we use])
|
AC_MSG_CHECKING([what CFLAGS should we use])
|
||||||
if test "$ac_test_CFLAGS" != set ; then
|
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
|
fi
|
||||||
if test "$with_sysinclude" != no -a -n "$with_sysinclude"; then
|
if test "$with_sysinclude" != no -a -n "$with_sysinclude"; then
|
||||||
CPPFLAGS="$CPPFLAGS -I$with_sysinclude"
|
CPPFLAGS="$CPPFLAGS -I$with_sysinclude"
|
||||||
|
@ -109,8 +130,9 @@ if test -z "$FLEX" -o -z "$BISON" -o -z "$M4" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $sysdesc in
|
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
|
esac
|
||||||
|
|
||||||
AC_CHECK_HEADER(syslog.h, [AC_DEFINE(HAVE_SYSLOG)])
|
AC_CHECK_HEADER(syslog.h, [AC_DEFINE(HAVE_SYSLOG)])
|
||||||
|
|
Loading…
Reference in a new issue