From: Ondrej Zajicek (work) Date: Tue, 9 May 2017 12:07:14 +0000 (+0200) Subject: Merge branch 'master' into int-new X-Git-Tag: v2.0.0~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=525a88d87930d01d4301e2723dda3dca208cd3d4;p=thirdparty%2Fbird.git Merge branch 'master' into int-new --- 525a88d87930d01d4301e2723dda3dca208cd3d4 diff --cc configure.ac index a661734a3,2180bcdf1..52bca0855 --- a/configure.ac +++ b/configure.ac @@@ -88,21 -101,6 +80,20 @@@ if test "$enable_pthreads" != no ; the fi fi +if test "$enable_libssh" != no ; then + AC_CHECK_LIB(ssh, ssh_connect) + if test $ac_cv_lib_ssh_ssh_connect = yes ; then + proto_rpki=rpki + enable_libssh=yes - AC_DEFINE(HAVE_LIBSSH) + else + if test "$enable_libssh" = yes ; then + AC_MSG_ERROR([LibSSH not available.]) + else + enable_libssh=no + fi + fi +fi + if test "$bird_cflags_default" = yes ; then BIRD_CHECK_GCC_OPTION(bird_cv_c_option_wno_pointer_sign, -Wno-pointer-sign, -Wall) BIRD_CHECK_GCC_OPTION(bird_cv_c_option_wno_missing_init, -Wno-missing-field-initializers, -Wall -Wextra) @@@ -170,10 -183,10 +161,10 @@@ if ! test -f $sysdesc ; the AC_MSG_ERROR([The system configuration file is missing.]) fi sysname=`echo $sysdesc | sed 's/\.h$//'` - AC_DEFINE_UNQUOTED(SYSCONF_INCLUDE, "$sysdesc") + AC_DEFINE_UNQUOTED([SYSCONF_INCLUDE], ["$sysdesc"], [Which sysdep header to include]) AC_MSG_CHECKING([system-dependent directories]) -sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '` lib" +sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '`" AC_MSG_RESULT($sysdep_dirs) AC_SUBST(sysdep_dirs) @@@ -194,6 -209,15 +185,16 @@@ if test "$with_protocols" = all ; the with_protocols="$all_protocols" fi + AH_TEMPLATE([CONFIG_BABEL], [Babel protocol]) + AH_TEMPLATE([CONFIG_BFD], [BFD protocol]) + AH_TEMPLATE([CONFIG_BGP], [BGP protocol]) + AH_TEMPLATE([CONFIG_OSPF], [OSPF protocol]) + AH_TEMPLATE([CONFIG_PIPE], [Pipe protocol]) + AH_TEMPLATE([CONFIG_RADV], [RAdv protocol]) + AH_TEMPLATE([CONFIG_RIP], [RIP protocol]) ++AH_TEMPLATE([CONFIG_RPKI], [RPKI protocol]) + AH_TEMPLATE([CONFIG_STATIC], [Static protocol]) + AC_MSG_CHECKING([protocols]) protocols=`echo "$with_protocols" | sed 's/,/ /g'` if test "$protocols" = no ; then protocols= ; fi @@@ -216,31 -240,38 +217,43 @@@ case $sysdesc i ;; esac - AC_CHECK_HEADER(syslog.h, [AC_DEFINE(HAVE_SYSLOG)]) - AC_CHECK_HEADER(alloca.h, [AC_DEFINE(HAVE_ALLOCA_H)]) - AC_CHECK_HEADER([linux/lwtunnel.h], [AC_DEFINE(HAVE_LWTUNNEL)]) - AC_CHECK_MEMBERS([struct rtvia.rtvia_family], [AC_DEFINE(HAVE_STRUCT_RTVIA)],,[#include ]) - AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len) - AC_TRY_COMPILE([#include - #include - ], [static struct sockaddr sa; int i = sizeof(sa.sa_len);], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SIN_LEN,,sin_len)], - AC_MSG_RESULT(no)) + AC_CHECK_HEADERS_ONCE([alloca.h syslog.h]) ++AC_CHECK_HEADER([linux/lwtunnel.h], [AC_DEFINE([HAVE_LWTUNNEL], [1], [Define to 1 if you have the header file.])]) ++AC_CHECK_MEMBERS([struct rtvia.rtvia_family], [AC_DEFINE([HAVE_STRUCT_RTVIA], [1], [Define to 1 if you have rtvia structure.])],,[#include ]) - AC_C_BIGENDIAN([AC_DEFINE(CPU_BIG_ENDIAN)], [AC_DEFINE(CPU_LITTLE_ENDIAN)], - [AC_MSG_ERROR([Cannot determine CPU endianity.])]) + AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [[ + #include + #include + ]], + [[ + static struct sockaddr sa; + int i = sizeof(sa.sa_len); + ]] + )], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SIN_LEN,,sin_len) + ], + [AC_MSG_RESULT(no)] + ) + + AC_C_BIGENDIAN( + [AC_DEFINE([CPU_BIG_ENDIAN], [1], [Define to 1 if cpu is big endian])], + [AC_DEFINE([CPU_LITTLE_ENDIAN], [1], [Define to 1 if cpu is little endian])], + [AC_MSG_ERROR([Cannot determine CPU endianity.])] + ) - BIRD_CHECK_INTEGERS BIRD_CHECK_STRUCT_ALIGN BIRD_CHECK_TIME_T - BIRD_CHECK_STRUCT_IP_MREQN if test "$enable_debug" = yes ; then - AC_DEFINE(DEBUGGING) - AC_CHECK_HEADER(execinfo.h, [AC_SEARCH_LIBS([backtrace, backtrace_symbols], [c execinfo], [AC_DEFINE(HAVE_EXECINFO_H)])]) + AC_DEFINE([DEBUGGING], [1], [Define to 1 if debugging is enabled]) ++ AC_CHECK_HEADER(execinfo.h, [AC_SEARCH_LIBS([backtrace, backtrace_symbols], [c execinfo], [AC_DEFINE([HAVE_EXECINFO_H], [1], [Define to 1 if you have the header file.])])]) + LDFLAGS="$LDFLAGS -rdynamic" + CFLAGS="$CFLAGS -O0 -ggdb -g3 -gdwarf-4" if test "$enable_memcheck" = yes ; then AC_CHECK_LIB(dmalloc, dmalloc_debug) if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then @@@ -273,19 -301,25 +286,18 @@@ AC_SUBST(CLIENT_LIBS mkdir -p $objdir/sysdep AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in]) -AC_CONFIG_COMMANDS([merge],[[export CPP="$CPP" -$srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs]], - [[srcdir=$srcdir] - [srcdir_rel=$srcdir_rel] - [objdir=$objdir] - [sysdep_dirs="$sysdep_dirs"]]) -AC_CONFIG_FILES($makefiles) +AC_CONFIG_FILES(Makefile:Makefile.in) AC_OUTPUT - cat >&AC_FD_MSG < + typedef int8_t s8; + typedef uint8_t u8; + typedef int16_t s16; + typedef uint16_t u16; + typedef int32_t s32; + typedef uint32_t u32; + typedef int64_t s64; + typedef uint64_t u64; + typedef uint8_t byte; + typedef uint16_t word; typedef unsigned int uint; #endif