summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-04-28 00:31:37 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-04-28 00:31:37 +0200
commitacc93efd4c754cc995ee8edf52ce0bc45511062e (patch)
tree9e96b4b3b0801444d683770c5155acd27474d026 /configure.in
parent73272f04af40484b72451f541a986da996b0da58 (diff)
Use constants from /etc/iproute2/rt_* files.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 230b57b4..46a6ecd9 100644
--- a/configure.in
+++ b/configure.in
@@ -13,6 +13,7 @@ AC_ARG_ENABLE(ipv6,[ --enable-ipv6 enable building of IPv6 version (d
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: all)],,[with_protocols="all"])
AC_ARG_WITH(sysinclude,[ --with-sysinclude=PATH search for system includes on specified place])
+AC_ARG_WITH(iproutedir,[ --with-iproutedir=PATH path to iproute2 config files (default: /etc/iproute2)],[given_iproutedir="yes"])
AC_ARG_VAR([FLEX], [location of the Flex program])
AC_ARG_VAR([BISON], [location of the Bison program])
AC_ARG_VAR([M4], [location of the M4 program])
@@ -105,12 +106,14 @@ elif test -f sysconfig.h ; then
else
case "$ip:$host_os" in
ipv4:linux*) BIRD_CHECK_LINUX_VERSION
+ default_iproutedir="/etc/iproute2"
case $bird_cv_sys_linux_version in
1.*|2.0.*) sysdesc=linux-20 ;;
*) sysdesc=linux-22 ;;
esac
;;
ipv6:linux*) BIRD_CHECK_LINUX_VERSION
+ default_iproutedir="/etc/iproute2"
case $bird_cv_sys_linux_version in
1.*|2.0.*) AC_MSG_ERROR([This version of Linux doesn't support IPv6.]) ;;
*) sysdesc=linux-v6 ;;
@@ -154,6 +157,15 @@ sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '`
AC_MSG_RESULT($sysdep_dirs)
AC_SUBST(sysdep_dirs)
+if test "$with_iproutedir" = no ; then with_iproutedir= ; fi
+
+if test -n "$given_iproutedir"
+then iproutedir=$with_iproutedir
+else iproutedir=$default_iproutedir
+fi
+
+AC_SUBST(iproutedir)
+
AC_MSG_CHECKING([protocols])
protocols=`echo "$with_protocols" | sed 's/,/ /g'`
if test "$protocols" = no ; then protocols= ; fi
@@ -234,11 +246,14 @@ $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs]],
AC_CONFIG_FILES($makefiles)
AC_OUTPUT
+rm -f $objdir/sysdep/paths.h
+
cat >&AC_FD_MSG <<EOF
BIRD was configured with the following options:
Source directory: $srcdir
Object directory: $objdir
+ Iproute2 directory: $iproutedir
System configuration: $sysdesc
Debugging: $enable_debug
Routing protocols: $protocols