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)
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)
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
;;
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
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