]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge branch 'master' into int-new
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 9 May 2017 12:07:14 +0000 (14:07 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 9 May 2017 12:48:21 +0000 (14:48 +0200)
1  2 
configure.ac
sysdep/config.h
sysdep/unix/log.c

diff --cc configure.ac
index a661734a3309483a8ae90693e8c9e5757aa32d50,2180bcdf1e57b5141e23fe15fc8c31747c2009ca..52bca08554161548f5e6ca0a3a6ee3490f04508a
@@@ -88,21 -101,6 +80,20 @@@ if test "$enable_pthreads" != no ; the
        fi
  fi
  
-               AC_DEFINE(HAVE_LIBSSH)
 +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
 +      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 <linux/rtnetlink.h>])
- AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len)
- AC_TRY_COMPILE([#include <sys/types.h>
-   #include <sys/socket.h>
-   ], [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 <linux/lwtunnel.h> header file.])])
++AC_CHECK_MEMBERS([struct rtvia.rtvia_family], [AC_DEFINE([HAVE_STRUCT_RTVIA], [1], [Define to 1 if you have rtvia structure.])],,[#include <linux/rtnetlink.h>])
  
- 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 <sys/types.h>
+       #include <sys/socket.h>
+     ]],
+     [[
+       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 <execinfo.h> 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 <<EOF
 -rm -f $objdir/sysdep/paths.h
--
- BIRD was configured with the following options:
-       Source directory:       $srcdir
-       Object directory:       $objdir
-       Iproute2 directory:     $iproutedir
-       System configuration:   $sysdesc
-       Debugging:              $enable_debug
-       POSIX threads:          $enable_pthreads
-       Routing protocols:      $protocols
-       Client:                 $enable_client
- EOF
+ AC_MSG_RESULT()
+ AC_MSG_RESULT([BIRD was configured with the following options:])
+ AC_MSG_RESULT([        Source directory:      $srcdir])
+ AC_MSG_RESULT([        Object directory:      $objdir])
+ AC_MSG_RESULT([        Iproute2 directory:    $iproutedir])
+ AC_MSG_RESULT([        System configuration:  $sysdesc])
+ AC_MSG_RESULT([        Debugging:             $enable_debug])
+ AC_MSG_RESULT([        POSIX threads:         $enable_pthreads])
+ AC_MSG_RESULT([        Routing protocols:     $protocols])
+ AC_MSG_RESULT([        Client:                        $enable_client])
++
  rm -f $objdir/.*-stamp
diff --cc sysdep/config.h
index 2ec3150052f4817d967a284c8e4a016ca91c077f,e529cd861ba3c04a0abebf9849a0d26f0ab927e0..d740ff06655da050a3cc46c5d82043f8c7512a0b
  #include "sysdep/paths.h"
  
  /* Types */
- typedef signed INTEGER_8 s8;
- typedef unsigned INTEGER_8 u8;
- typedef INTEGER_16 s16;
- typedef unsigned INTEGER_16 u16;
- typedef INTEGER_32 s32;
- typedef unsigned INTEGER_32 u32;
- typedef INTEGER_64 s64;
- typedef unsigned INTEGER_64 u64;
- typedef u8 byte;
- typedef u16 word;
 -
+ #include <stdint.h>
+ 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
Simple merge