From: Ondrej Zajicek (work) Date: Wed, 17 May 2017 12:38:04 +0000 (+0200) Subject: Merge branch 'master' into int-new X-Git-Tag: v2.0.0~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=144c10fad1ed6a2520abd1c43501ce00ea2699db;p=thirdparty%2Fbird.git Merge branch 'master' into int-new --- 144c10fad1ed6a2520abd1c43501ce00ea2699db diff --cc configure.ac index 1e5ce894d,2569a766e..afadac2e9 --- a/configure.ac +++ b/configure.ac @@@ -232,8 -266,10 +218,29 @@@ f AC_SUBST([iproutedir]) -all_protocols="$proto_bfd bgp ospf pipe $proto_radv rip static" -if test "$ip" = ipv6 ; then - all_protocols="$all_protocols babel" ++DAEMON_LIBS= ++AC_SUBST(DAEMON_LIBS) ++ ++if test "$enable_libssh" != no ; then ++ AC_CHECK_HEADER([libssh/libssh.h], [ ], [fail=yes], [ ]) ++ AC_CHECK_LIB([ssh], [ssh_connect], [ ], [fail=yes]) ++ ++ if test "$fail" != yes ; then ++ AC_DEFINE([HAVE_LIBSSH], [1], [Define to 1 if you have the `ssh' library (-lssh).]) ++ DAEMON_LIBS="-lssh $DAEMON_LIBS" ++ 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 ++ +all_protocols="$proto_bfd babel bgp ospf pipe radv rip $proto_rpki static" + all_protocols=`echo $all_protocols | sed 's/ /,/g'` if test "$with_protocols" = all ; then @@@ -279,16 -311,6 +283,18 @@@ esa AC_CHECK_HEADERS_ONCE([alloca.h syslog.h]) AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#include ]) - AC_CHECK_HEADER([linux/lwtunnel.h], - [AC_DEFINE([HAVE_LWTUNNEL], [1], [Define to 1 if you have the header file.])] ++AC_CHECK_HEADERS([linux/lwtunnel.h], ++ [AC_DEFINE([HAVE_LWTUNNEL], [1], [Define to 1 if you have the header file.])], ++ [], ++ [] dnl Force new AC_CHECK_HEADER semantics +) + +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], [1], [Define to 1 if cpu is big endian])], [AC_DEFINE([CPU_LITTLE_ENDIAN], [1], [Define to 1 if cpu is little endian])], @@@ -318,30 -327,39 +324,39 @@@ if test "$enable_debug" = yes ; the fi fi - DAEMON_LIBS= - AC_SUBST(DAEMON_LIBS) - -CLIENT= +CLIENT=birdcl CLIENT_LIBS= if test "$enable_client" = yes ; then - CLIENT=birdc + CLIENT="$CLIENT birdc" - AC_CHECK_LIB([history], [add_history], [CLIENT_LIBS="-lhistory"]) - AC_CHECK_LIB([ncurses], [tgetent], [USE_TERMCAP_LIB=-lncurses], - AC_CHECK_LIB([curses], [tgetent], [USE_TERMCAP_LIB=-lcurses], - AC_CHECK_LIB([tinfow], [tgetent], [USE_TERMCAP_LIB=-ltinfow], - AC_CHECK_LIB([tinfo], [tgetent], [USE_TERMCAP_LIB=-ltinfo], - AC_CHECK_LIB([termcap], [tgetent], [USE_TERMCAP_LIB=-ltermcap], - [AC_MSG_ERROR([The client requires ncurses library. Either install the library or use --disable-client to compile without the client.])] - ) - ) - ) - ) + BASE_LIBS="$LIBS" + LIBS="" + + AC_CHECK_HEADERS([curses.h], + [], + [AC_MSG_ERROR([The client requires ncurses library. Either install the library or use --disable-client to compile without the client.])], + [] dnl Force new AC_CHECK_HEADER semantics ) - AC_CHECK_LIB([readline], [rl_callback_read_char], - [CLIENT_LIBS="-lreadline $CLIENT_LIBS $USE_TERMCAP_LIB"], - [AC_MSG_ERROR([The client requires GNU readline library 2.1 or newer. Either install the library or use --disable-client to compile without the client.])], - [$USE_TERMCAP_LIB] + AC_SEARCH_LIBS([tgetent], [tinfo tinfow ncurses curses termcap], + [TINFO_LIBS="$LIBS"; LIBS=""], + [AC_MSG_ERROR([The client requires ncurses library. Either install the library or use --disable-client to compile without the client.])], + ) + + AC_CHECK_HEADERS([readline/readline.h readline/history.h], + [], + [AC_MSG_ERROR([The client requires GNU Readline library. Either install the library or use --disable-client to compile without the client.])], + [] dnl Force new AC_CHECK_HEADER semantics + ) + + AC_SEARCH_LIBS([add_history], [history], + [HISTORY_LIBS="$LIBS"; LIBS=""], + [AC_MSG_ERROR([The client requires GNU Readline library. Either install the library or use --disable-client to compile without the client.])], + ) + + AC_SEARCH_LIBS([rl_callback_read_char], [readline], + [READLINE_LIBS="$LIBS"; LIBS=""], + [AC_MSG_ERROR([The client requires GNU Readline library. Either install the library or use --disable-client to compile without the client.])], + [$TINFO_LIBS] ) AC_CHECK_LIB([readline], [rl_crlf],