Commit 72b2db8d authored by Ondrej Filip's avatar Ondrej Filip
Browse files

Merge branch 'master' of ssh://git.nic.cz/bird

parents 2795700c 95616c82
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -133,23 +133,6 @@ if test "$bird_cv_struct_ip_mreqn" = yes ; then
fi
])

AC_DEFUN(BIRD_CHECK_LINUX_VERSION,
[AC_CACHE_CHECK([Linux kernel version], bird_cv_sys_linux_version, [
AC_REQUIRE_CPP()dnl
cat > conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
#include <linux/version.h>
VERSION: UTS_RELEASE
EOF
bird_cv_sys_linux_version=`eval "$ac_cpp conftest.$ac_ext" 2>&AC_FD_CC | sed '/^VERSION/!d;s/^VERSION: "//;s/".*//'`
rm -rf conftest*
if test -z "$bird_cv_sys_linux_version" ; then
	AC_MSG_RESULT([unknown])
	AC_MSG_ERROR([Cannot determine kernel version])
fi
])])

AC_DEFUN(BIRD_CHECK_GCC_OPTIONS,
[AC_CACHE_VAL(bird_cv_c_option_no_pointer_sign, [
cat >conftest.c <<EOF
+10 −2
Original line number Diff line number Diff line
@@ -135,6 +135,14 @@ submit_server_command(char *cmd)
  num_lines = 2;
}

static void
add_history_dedup(char *cmd)
{
  /* Add history line if it differs from the last one */
  HIST_ENTRY *he = history_get(history_length);
  if (!he || strcmp(he->line, cmd))
    add_history(cmd);
}

static void
got_line(char *cmd_buffer)
@@ -151,7 +159,7 @@ got_line(char *cmd_buffer)
      cmd = cmd_expand(cmd_buffer);
      if (cmd)
	{
	  add_history(cmd);
	  add_history_dedup(cmd);

	  if (!handle_internal_command(cmd))
	    submit_server_command(cmd);
@@ -159,7 +167,7 @@ got_line(char *cmd_buffer)
	  free(cmd);
	}
      else
	add_history(cmd_buffer);
	add_history_dedup(cmd_buffer);
    }
  free(cmd_buffer);
}
+35 −25
Original line number Diff line number Diff line
@@ -10,14 +10,17 @@ AC_ARG_ENABLE(debug,[ --enable-debug enable internal debugging routine
AC_ARG_ENABLE(memcheck,	[  --enable-memcheck       check memory allocations when debugging (default: enabled)],,enable_memcheck=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(suffix,	[  --with-suffix=STRING    use specified suffix for BIRD files (default: 6 for IPv6 version)],[given_suffix="yes"])
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(runtimedir,	[  --with-runtimedir=PATH  path for runtime files (default: $(localstatedir)/run)],[runtimedir="$with_runtimedir"],[runtimedir="\$(localstatedir)/run"])
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])


if test "$srcdir" = . ; then
	# Building in current directory => create obj directory holding all objects
	objdir=obj
@@ -39,21 +42,37 @@ esac
AC_SUBST(objdir)
AC_SUBST(exedir)
AC_SUBST(srcdir_rel_mf)
AC_SUBST(runtimedir)

if test "$enable_ipv6" = yes ; then
	ip=ipv6
	SUFFIX6=6
	SUFFIX=6
	all_protocols=bgp,ospf,pipe,radv,rip,static
else
	ip=ipv4
	SUFFIX6=""
	SUFFIX=""
	all_protocols=bgp,ospf,pipe,rip,static
fi

if test "$given_suffix" = yes ; then
   	SUFFIX="$with_suffix"
fi
AC_SUBST(SUFFIX)

if test "$with_protocols" = all ; then
	with_protocols="$all_protocols"
fi

if test "$enable_debug" = yes ; then
	CONFIG_FILE="bird$SUFFIX.conf"
	CONTROL_SOCKET="bird$SUFFIX.ctl"
else
	CONFIG_FILE="\$(sysconfdir)/bird$SUFFIX.conf"
	CONTROL_SOCKET="$runtimedir/bird$SUFFIX.ctl"
fi
AC_SUBST(CONFIG_FILE)
AC_SUBST(CONTROL_SOCKET)

AC_SEARCH_LIBS(clock_gettime,[c rt posix4])

AC_CANONICAL_HOST
@@ -105,19 +124,11 @@ elif test -f sysconfig.h ; then
	sysdesc=sysconfig
else
	case "$ip:$host_os" in
		ipv4:linux*)	BIRD_CHECK_LINUX_VERSION
		ipv6:linux*)	sysdesc=linux-v6
				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
		ipv4:linux*)	sysdesc=linux
				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 ;;
					esac
				;;
		ipv6:netbsd*)	sysdesc=bsd-v6
				CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
@@ -180,7 +191,7 @@ AC_MSG_RESULT(ok)
AC_SUBST(protocols)

case $sysdesc in
	*/linux-22*|*/linux-v6*)
	*/linux*|*/linux-v6*)
		AC_CHECK_HEADER(linux/rtnetlink.h,,[AC_MSG_ERROR([Appropriate version of Linux kernel headers not found.])],[
#include <asm/types.h>
#include <sys/socket.h>
@@ -233,7 +244,6 @@ if test "$enable_client" = yes ; then
fi
AC_SUBST(CLIENT)
AC_SUBST(CLIENT_LIBS)
AC_SUBST(SUFFIX6)

mkdir -p $objdir/sysdep
AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in])
+10 −1
Original line number Diff line number Diff line
@@ -1072,7 +1072,16 @@ undefined value is regarded as empty clist for most purposes.
	routes). Read-only.

	<tag><m/enum/ dest</tag>
	Type of destination the packets should be sent to (<cf/RTD_ROUTER/ for forwarding to a neighboring router, <cf/RTD_DEVICE/ for routing to a directly-connected network, <cf/RTD_BLACKHOLE/ for packets to be silently discarded, <cf/RTD_UNREACHABLE/, <cf/RTD_PROHIBIT/ for packets that should be returned with ICMP host unreachable / ICMP administratively prohibited messages). Read-only.
	Type of destination the packets should be sent to
	(<cf/RTD_ROUTER/ for forwarding to a neighboring router,
	<cf/RTD_DEVICE/ for routing to a directly-connected network,
	<cf/RTD_MULTIPATH/ for multipath destinations,
	<cf/RTD_BLACKHOLE/ for packets to be silently discarded,
	<cf/RTD_UNREACHABLE/, <cf/RTD_PROHIBIT/ for packets that
	should be returned with ICMP host unreachable / ICMP
	administratively prohibited messages). Can be changed, but
	only to <cf/RTD_BLACKHOLE/, <cf/RTD_UNREACHABLE/ or
	<cf/RTD_PROHIBIT/.

	<tag><m/int/ igp_metric</tag>
	The optional attribute that can be used to specify a distance
+1 −1
Original line number Diff line number Diff line
@@ -703,7 +703,7 @@ static_attr:
 | SOURCE  { $$ = f_new_inst(); $$->aux = T_ENUM_RTS;   $$->a2.i = OFFSETOF(struct rta, source); }
 | SCOPE   { $$ = f_new_inst(); $$->aux = T_ENUM_SCOPE; $$->a2.i = OFFSETOF(struct rta, scope);  $$->a1.i = 1; }
 | CAST    { $$ = f_new_inst(); $$->aux = T_ENUM_RTC;   $$->a2.i = OFFSETOF(struct rta, cast); }
 | DEST    { $$ = f_new_inst(); $$->aux = T_ENUM_RTD;   $$->a2.i = OFFSETOF(struct rta, dest); }
 | DEST    { $$ = f_new_inst(); $$->aux = T_ENUM_RTD;   $$->a2.i = OFFSETOF(struct rta, dest);   $$->a1.i = 1; }
 ;

term:
Loading