summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-06-13 21:06:24 +0200
committerGitHub <noreply@github.com>2019-06-13 21:06:24 +0200
commit42aac9b2abe62b3eae952ba690bdec855edc1ba7 (patch)
tree9b63a18ee4b099a6c5229f807e934d0b9c78fdb3 /configure.ac
parentMerge pull request #4509 from opensourcerouting/spanish-intquisition (diff)
parentlib/clippy: expand some macros (diff)
downloadfrr-42aac9b2abe62b3eae952ba690bdec855edc1ba7.tar.xz
frr-42aac9b2abe62b3eae952ba690bdec855edc1ba7.zip
Merge pull request #4500 from opensourcerouting/clippy-improve
clippy: batch of improvements
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac425
1 files changed, 218 insertions, 207 deletions
diff --git a/configure.ac b/configure.ac
index 2fa5d7874..828692c3e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -25,9 +25,25 @@ dnl -----------------------------------
AC_CANONICAL_BUILD()
AC_CANONICAL_HOST()
-AS_IF([test "$host" != "$build"], [
+hosttools_clippy="false"
+build_clippy="true"
+
+dnl case 1: external clippy
+if test -n "$with_clippy" -a "$with_clippy" != "no" -a "$with_clippy" != "yes"; then
+ if test "$enable_clippy_only" == "yes"; then
+ AC_MSG_ERROR([--enable-clippy-only does not make sense with --with-clippy])
+ fi
+
+ CLIPPY="$with_clippy"
+ build_clippy="false"
+ if test ! -x "$with_clippy"; then
+ AC_MSG_ERROR([clippy tool ($with_clippy) is not executable])
+ fi
+
+dnl case 2: cross-compiling internal clippy
+elif test "$host" != "$build"; then
if test "$srcdir" = "."; then
- AC_MSG_ERROR([cross-compilation is only possible with builddir separate from srcdir. create a separate directory and run as .../path-to-frr/configure.])
+ AC_MSG_ERROR([cross-compilation is only possible with builddir separate from srcdir or by building clippy separately and using the --with-clippy option. create a separate directory and run as .../path-to-frr/configure.])
fi
test -d hosttools || mkdir hosttools
abssrc="`cd \"${srcdir}\"; pwd`"
@@ -37,23 +53,47 @@ AS_IF([test "$host" != "$build"], [
AC_MSG_NOTICE([... use HOST_CPPFLAGS / HOST_CFLAGS / HOST_LDFLAGS if neccessary])
AC_MSG_NOTICE([...])
- ( CPPFLAGS="$HOST_CPPFLAGS"; \
- CFLAGS="$HOST_CFLAGS"; \
- LDFLAGS="$HOST_LDFLAGS"; \
- cd hosttools; "${abssrc}/configure" "--host=$build" "--build=$build" "--enable-clippy-only" "--disable-nhrpd" "--disable-vtysh"; )
+ (
+ for var in $ac_precious_vars; do
+ dnl special cases
+ case "$var" in
+ YACC|YFLAGS) continue;;
+ PYTHON*) retain=true;;
+ *) retain=false;
+ esac
+
+ eval "hostvar=\"\${HOST_$var}\""
+ eval "targetvar=\"\${$var}\""
+ if test -n "$hostvar"; then
+ eval "$var='$hostvar'"
+ _AS_ECHO_LOG([host $var='$hostvar'])
+ elif $retain; then
+ _AS_ECHO_LOG([host retain $var='$targetvar'])
+ else
+ eval "unset $var"
+ _AS_ECHO_LOG([host unset $var])
+ fi
+ done
+ cd hosttools
+ "${abssrc}/configure" "--host=$build" "--build=$build" "--enable-clippy-only" "--disable-nhrpd" "--disable-vtysh"
+ ) || exit 1
AC_MSG_NOTICE([...])
AC_MSG_NOTICE([... cross-compilation: finished self-configuring for build platform tools])
AC_MSG_NOTICE([...])
build_clippy="false"
- HOSTTOOLS="hosttools/"
-], [
- build_clippy="true"
- HOSTTOOLS=""
-])
-AC_SUBST([HOSTTOOLS])
+ hosttools_clippy="true"
+ CLIPPY="hosttools/lib/clippy"
+
+dnl case 3: normal build internal clippy
+else
+ CLIPPY="lib/clippy\$(EXEEXT)"
+fi
+AC_SUBST([CLIPPY])
AM_CONDITIONAL([BUILD_CLIPPY], [$build_clippy])
+AM_CONDITIONAL([HOSTTOOLS_CLIPPY], [$hosttools_clippy])
+AM_CONDITIONAL([ONLY_CLIPPY], [test "$enable_clippy_only" = "yes"])
# Disable portability warnings -- our automake code (in particular
# common.am) uses some constructs specific to gmake.
@@ -138,12 +178,11 @@ CXXFLAGS="$orig_cxxflags"
AC_PROG_CC_C99
dnl NB: see C11 below
-AC_PROG_EGREP
PKG_PROG_PKG_CONFIG
-dnl autoconf 2.59 appears not to support AC_PROG_SED
-dnl AC_PROG_SED
-AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
+dnl it's 2019, sed is sed.
+SED=sed
+AC_SUBST([SED])
dnl try and enable CFLAGS that are useful for FRR
dnl - specifically, options to control warnings
@@ -328,7 +367,6 @@ dnl Check programs
dnl --------------
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PROG_MAKE_SET
AC_CHECK_TOOL([AR], [ar])
dnl -------
@@ -398,6 +436,8 @@ AC_ARG_WITH([pkg-extra-version],
AC_ARG_WITH([pkg-git-version],
AS_HELP_STRING([--with-pkg-git-version], [add git information to MOTD and build version string]),
[ test "x$withval" != "xno" && with_pkg_git_version="yes" ])
+AC_ARG_WITH([clippy],
+ AS_HELP_STRING([--with-clippy=PATH], [use external clippy helper program]))
AC_ARG_WITH([vtysh_pager],
AS_HELP_STRING([--with-vtysh-pager=PAGER], [control what pager is compiled in as default]),
VTYSH_PAGER=$withval, VTYSH_PAGER="more")
@@ -603,8 +643,6 @@ if test "${enable_shell_access}" = "yes"; then
AC_DEFINE([HAVE_SHELL_ACCESS], [1], [Allow user to use ssh/telnet/bash, be aware this is considered insecure])
fi
-AM_CONDITIONAL([FPM], [test "x$enable_fpm" = "xyes"])
-
#
# Python for clippy
#
@@ -635,31 +673,6 @@ FRR_PYTHON_MOD_EXEC([sphinx], [--version], [
AC_SUBST([PYSPHINX])
#
-# Logic for protobuf support.
-#
-if test "$enable_protobuf" = "yes"; then
- # Check for protoc & protoc-c
-
- # protoc is not required, it's only for a "be nice" helper target
- AC_CHECK_PROGS([PROTOC], [protoc], [/bin/false])
-
- AC_CHECK_PROGS([PROTOC_C], [protoc-c], [/bin/false])
- if test "$PROTOC_C" = "/bin/false"; then
- AC_MSG_FAILURE([protobuf requested but protoc-c not found. Install protobuf-c.])
- fi
-
- PKG_CHECK_MODULES([PROTOBUF_C], [libprotobuf-c >= 0.14],, [
- AC_MSG_FAILURE([protobuf requested but libprotobuf-c not found. Install protobuf-c.])
- ])
- AC_CHECK_HEADER([google/protobuf-c/protobuf-c.h], [], [
- AC_MSG_FAILURE([protobuf requested but protobuf-c.h not found. Install protobuf-c.])
- ])
-
- AC_DEFINE([HAVE_PROTOBUF], [1], [protobuf])
-fi
-AM_CONDITIONAL([HAVE_PROTOBUF], [test "x$enable_protobuf" = "xyes"])
-
-#
# Logic for old vpn commands support.
#
if test "$enable_oldvpn_commands" = "yes"; then
@@ -783,25 +796,11 @@ if test -n "$frr_cv_interp"; then
AC_DEFINE_UNQUOTED([INTERP], ["$frr_cv_interp"], [.interp value])
fi
-dnl ------------------------------------
-dnl Check C keywords and standard types
-dnl ------------------------------------
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
-AC_HEADER_STDC
-dnl AC_TYPE_PID_T
-AC_TYPE_UID_T
-AC_TYPE_MODE_T
-AC_TYPE_SIZE_T
-AC_STRUCT_TM
-
dnl -------------------------
dnl Check other header files.
dnl -------------------------
AC_CHECK_HEADERS([stropts.h sys/ksym.h \
- linux/version.h asm/types.h \
- sys/cdefs.h])
+ linux/version.h asm/types.h])
ac_stdatomic_ok=false
AC_DEFINE([FRR_AUTOCONF_ATOMIC], [1], [did autoconf checks for atomic funcs])
@@ -988,7 +987,7 @@ FRR_INCLUDES
AC_CHECK_HEADERS([netinet/in_var.h \
net/if_dl.h net/netopt.h \
inet/nd.h netinet/ip_icmp.h \
- sys/sysctl.h sys/sockio.h kvm.h sys/conf.h],
+ sys/sysctl.h sys/sockio.h sys/conf.h],
[], [], [FRR_INCLUDES])
AC_CHECK_HEADERS([ucontext.h], [], [],
@@ -1108,7 +1107,48 @@ if test "${enable_realms}" = "yes"; then
;;
esac
fi
-AM_CONDITIONAL([SUPPORT_REALMS], [test "${enable_realms}" = "yes"])
+
+dnl -------------------------------
+dnl Endian-ness check
+dnl -------------------------------
+AC_WORDS_BIGENDIAN
+
+dnl ---------------
+dnl other functions
+dnl ---------------
+AC_CHECK_FUNCS([ \
+ strlcat strlcpy \
+ getgrouplist])
+
+dnl ##########################################################################
+dnl LARGE if block spans a lot of "configure"!
+if test "${enable_clippy_only}" != "yes"; then
+dnl ##########################################################################
+
+#
+# Logic for protobuf support.
+#
+if test "$enable_protobuf" = "yes"; then
+ # Check for protoc & protoc-c
+
+ # protoc is not required, it's only for a "be nice" helper target
+ AC_CHECK_PROGS([PROTOC], [protoc], [/bin/false])
+
+ AC_CHECK_PROGS([PROTOC_C], [protoc-c], [/bin/false])
+ if test "$PROTOC_C" = "/bin/false"; then
+ AC_MSG_FAILURE([protobuf requested but protoc-c not found. Install protobuf-c.])
+ fi
+
+ PKG_CHECK_MODULES([PROTOBUF_C], [libprotobuf-c >= 0.14],, [
+ AC_MSG_FAILURE([protobuf requested but libprotobuf-c not found. Install protobuf-c.])
+ ])
+ AC_CHECK_HEADER([google/protobuf-c/protobuf-c.h], [], [
+ AC_MSG_FAILURE([protobuf requested but protobuf-c.h not found. Install protobuf-c.])
+ ])
+
+ AC_DEFINE([HAVE_PROTOBUF], [1], [protobuf])
+fi
+
dnl ---------------------
dnl Integrated VTY option
@@ -1157,7 +1197,6 @@ case "${enable_vtysh}" in
;;
esac
AC_SUBST([LIBREADLINE])
-AM_CONDITIONAL([VTYSH], test "x$VTYSH" = "xvtysh")
dnl ----------
dnl PAM module
@@ -1220,42 +1259,16 @@ fi
AC_SUBST([LIBPAM])
dnl -------------------------------
-dnl Endian-ness check
-dnl -------------------------------
-AC_WORDS_BIGENDIAN
-
-dnl -------------------------------
-dnl check the size in byte of the C
-dnl -------------------------------
-dnl AC_CHECK_SIZEOF(char)
-dnl AC_CHECK_SIZEOF(int)
-dnl AC_CHECK_SIZEOF(short)
-dnl AC_CHECK_SIZEOF(long)
-
-dnl ----------------------------
-dnl check existance of functions
-dnl ----------------------------
-AC_FUNC_FNMATCH
-AC_FUNC_FORK
-AC_FUNC_MKTIME
-AC_FUNC_STAT
-
-dnl -------------------------------
dnl bgpd needs pow() and hence libm
dnl -------------------------------
TMPLIBS="$LIBS"
-AC_CHECK_HEADER([math.h],
- [AC_CHECK_LIB([m], [pow],
- [LIBM="-lm"
- LIBS="$LIBS $LIBM"
- AC_CHECK_FUNCS(pow,[],[LIBM=""])
- ])
-])
-if test x"$LIBM" = x ; then
+LIBS=""
+AC_SEARCH_LIBS([pow], [m], [
+ LIBM="$LIBS"
+], [
AC_MSG_WARN([Unable to find working pow function - bgpd may not link])
-fi
+])
LIBS="$TMPLIBS"
-
AC_SUBST([LIBM])
AC_CHECK_FUNCS([ppoll], [
@@ -1265,13 +1278,6 @@ AC_CHECK_FUNCS([pollts], [
AC_DEFINE([HAVE_POLLTS], [1], [have NetBSD pollts()])
])
-dnl ---------------
-dnl other functions
-dnl ---------------
-AC_CHECK_FUNCS([ \
- strlcat strlcpy \
- getgrouplist])
-
AC_CHECK_HEADER([asm-generic/unistd.h],
[AC_CHECK_DECL(__NR_setns,
AC_DEFINE([HAVE_NETNS], [1], [Have netns]),,
@@ -1416,6 +1422,28 @@ if test $ac_cv_have_decl_TCP_MD5SIG = no; then
AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)])
fi
+AC_SUBST([SOLARIS])
+AC_CHECK_LIB([crypt], [crypt], [],
+ [AC_CHECK_LIB([crypto], [DES_crypt])])
+AC_CHECK_LIB([resolv], [res_init])
+
+dnl ---------------------------
+dnl check system has PCRE regexp
+dnl ---------------------------
+if test "x$enable_pcreposix" = "xyes"; then
+ AC_CHECK_LIB([pcreposix], [regexec], [], [
+ AC_MSG_ERROR([--enable-pcreposix given but unable to find libpcreposix])
+ ])
+fi
+AC_SUBST([HAVE_LIBPCREPOSIX])
+
+dnl ##########################################################################
+dnl test "${enable_clippy_only}" != "yes"
+fi
+dnl END OF LARGE if block
+dnl ##########################################################################
+
+
dnl ----------------------------------------------------------------------------
dnl figure out if domainname is available in the utsname struct (GNU extension).
dnl ----------------------------------------------------------------------------
@@ -1448,18 +1476,6 @@ FRR_INCLUDES
dnl --------------------
dnl Daemon disable check
dnl --------------------
-AM_CONDITIONAL([ZEBRA], [test "${enable_zebra}" != "no"])
-
-if test "${enable_bgpd}" = "no";then
- BGPD=""
-else
- BGPD="bgpd"
-fi
-AM_CONDITIONAL([BGPD], [test "x$BGPD" = "xbgpd"])
-
-AM_CONDITIONAL([RIPD], [test "${enable_ripd}" != "no"])
-AM_CONDITIONAL([OSPFD], [test "${enable_ospfd}" != "no"])
-AM_CONDITIONAL([LDPD], [test "${enable_ldpd}" != "no"])
AS_IF([test "${enable_ldpd}" != "no"], [
AC_DEFINE([HAVE_LDPD], [1], [ldpd])
@@ -1483,8 +1499,6 @@ else
esac
fi
-AM_CONDITIONAL([BFDD], [test "x$BFDD" = "xbfdd"])
-
if test "$ac_cv_lib_json_c_json_object_get" = no -a "x$BFDD" = "xbfdd"; then
AC_MSG_ERROR(["you must use json-c library to use bfdd"])
fi
@@ -1502,16 +1516,12 @@ case "$host_os" in
fi
;;
esac
-AM_CONDITIONAL([NHRPD], [test "x$NHRPD" = "xnhrpd"])
-
-AM_CONDITIONAL([EIGRPD], [test "${enable_eigrpd}" != "no"])
if test "${enable_watchfrr}" = "no";then
WATCHFRR=""
else
WATCHFRR="watchfrr"
fi
-AM_CONDITIONAL([WATCHFRR], [test "x$WATCHFRR" = "xwatchfrr"])
OSPFCLIENT=""
if test "${enable_ospfapi}" != "no";then
@@ -1522,18 +1532,6 @@ if test "${enable_ospfapi}" != "no";then
fi
fi
-AM_CONDITIONAL([OSPFCLIENT], [test "x$OSPFCLIENT" = "xospfclient"])
-AM_CONDITIONAL([RIPNGD], [test "${enable_ripngd}" != "no"])
-AM_CONDITIONAL([BABELD], [test "${enable_babeld}" != "no"])
-AM_CONDITIONAL([OSPF6D], [test "${enable_ospf6d}" != "no"])
-AM_CONDITIONAL([ISISD], [test "${enable_isisd}" != "no"])
-AM_CONDITIONAL([PIMD], [test "${enable_pimd}" != "no"])
-AM_CONDITIONAL([PBRD], [test "${enable_pbrd}" != "no"])
-AM_CONDITIONAL([SHARPD], [test "${enable_sharpd}" = "yes"])
-AM_CONDITIONAL([STATICD], [test "${enable_staticd}" != "no"])
-AM_CONDITIONAL([FABRICD], [test "${enable_fabricd}" != "no"])
-AM_CONDITIONAL([VRRPD], [test "${enable_vrrpd}" != "no"])
-
if test "${enable_bgp_announce}" = "no";then
AC_DEFINE([DISABLE_BGP_ANNOUNCE], [1], [Disable BGP installation to zebra])
else
@@ -1543,22 +1541,11 @@ fi
if test "${enable_bgp_vnc}" != "no";then
AC_DEFINE([ENABLE_BGP_VNC], [1], [Enable BGP VNC support])
fi
-AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno])
-
-AC_SUBST([SOLARIS])
-AC_CHECK_LIB([crypt], [crypt], [],
- [AC_CHECK_LIB([crypto], [DES_crypt])])
-AC_CHECK_LIB([resolv], [res_init])
-dnl ---------------------------
-dnl check system has PCRE regexp
-dnl ---------------------------
-if test "x$enable_pcreposix" = "xyes"; then
- AC_CHECK_LIB([pcreposix], [regexec], [], [
- AC_MSG_ERROR([--enable-pcreposix given but unable to find libpcreposix])
- ])
-fi
-AC_SUBST([HAVE_LIBPCREPOSIX])
+dnl ##########################################################################
+dnl LARGE if block
+if test "${enable_clippy_only}" != "yes"; then
+dnl ##########################################################################
dnl ------------------
dnl check C-Ares library
@@ -1610,7 +1597,6 @@ int main(void);
AH_TEMPLATE([SNMP_AGENTX], [Use SNMP AgentX to interface with snmpd])
AC_DEFINE_UNQUOTED(AS_TR_CPP(SNMP_${SNMP_METHOD}),,[SNMP method to interface with snmpd])
fi
-AM_CONDITIONAL([SNMP], [test "x${SNMP_METHOD}" != "x"])
AC_SUBST([SNMP_LIBS])
AC_SUBST([SNMP_CFLAGS])
@@ -1643,7 +1629,6 @@ if test "$enable_config_rollbacks" = "yes"; then
AC_MSG_ERROR([--enable-config-rollbacks given but sqlite3 was not found on your system.])
])
fi
-AM_CONDITIONAL([SQLITE3], [$SQLITE3])
dnl ---------------
dnl confd
@@ -1659,7 +1644,6 @@ if test "$enable_confd" != "" -a "$enable_confd" != "no"; then
AC_SUBST([CONFD_LIBS])
AC_DEFINE([HAVE_CONFD], [1], [Enable confd integration])
fi
-AM_CONDITIONAL([CONFD], [test "x$enable_confd" != "x"])
dnl ---------------
dnl sysrepo
@@ -1672,7 +1656,6 @@ if test "$enable_sysrepo" = "yes"; then
AC_MSG_ERROR([sysrepo was not found on your system.])]
)
fi
-AM_CONDITIONAL([SYSREPO], [test "x$enable_sysrepo" = "xyes"])
dnl ---------------
dnl gRPC
@@ -1691,12 +1674,42 @@ if test "$enable_grpc" = "yes"; then
AC_MSG_ERROR([grpc/grpc++ were not found on your system.])
])
fi
-AM_CONDITIONAL([GRPC], [test "x$enable_grpc" = "xyes"])
-dnl ---------------
-dnl math
-dnl ---------------
-AC_SEARCH_LIBS([sqrt], [m])
+dnl ------
+dnl ZeroMQ
+dnl ------
+if test "x$enable_zeromq" != "xno"; then
+ PKG_CHECK_MODULES([ZEROMQ], [libzmq >= 4.0.0], [
+ AC_DEFINE([HAVE_ZEROMQ], [1], [Enable ZeroMQ support])
+ ZEROMQ=true
+ ], [
+ if test "x$enable_zeromq" = "xyes"; then
+ AC_MSG_ERROR([configuration specifies --enable-zeromq but libzmq was not found])
+ fi
+ ])
+fi
+
+dnl ------------------------------------
+dnl Enable RPKI and add librtr to libs
+dnl ------------------------------------
+if test "${enable_rpki}" = "yes"; then
+ PKG_CHECK_MODULES([RTRLIB], [rtrlib >= 0.5.0],
+ [RPKI=true],
+ [RPKI=false
+ AC_MSG_ERROR([rtrlib was not found on your system or is too old.])]
+ )
+fi
+
+dnl ------------------------------------------
+dnl Check whether rtrlib was build with ssh support
+dnl ------------------------------------------
+AC_MSG_CHECKING([whether the RTR Library is compiled with SSH])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rtrlib/rtrlib.h"]],
+ [[struct tr_ssh_config config;]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([FOUND_SSH], [1], [found_ssh])],
+ AC_MSG_RESULT([no])
+)
dnl ---------------
dnl dlopen & dlinfo
@@ -1747,7 +1760,11 @@ if test "$frr_cv_rtld_di_linkmap" = yes; then
AC_DEFINE([HAVE_DLINFO_LINKMAP], [1], [Have dlinfo RTLD_DI_LINKMAP])
fi
-AM_CONDITIONAL([SNMP], [test "x$SNMP_METHOD" = "xagentx"])
+dnl ##########################################################################
+dnl test "${enable_clippy_only}" != "yes"
+fi
+dnl END OF LARGE if block
+dnl ##########################################################################
dnl ---------------------------
dnl sockaddr and netinet checks
@@ -1757,7 +1774,7 @@ AC_CHECK_TYPES([
struct vifctl, struct mfcctl, struct sioc_sg_req,
vifi_t, struct sioc_vif_req, struct igmpmsg,
struct ifaliasreq, struct if6_aliasreq, struct in6_aliasreq,
- struct nd_opt_adv_interval, struct rt_addrinfo,
+ struct nd_opt_adv_interval,
struct nd_opt_homeagent_info, struct nd_opt_adv_interval,
struct nd_opt_rdnss, struct nd_opt_dnssl],
[], [], FRR_INCLUDES)
@@ -1792,7 +1809,6 @@ no)
;;
esac
-AM_CONDITIONAL([IRDP], [$IRDP])
dnl -----------------------
dnl checking for IP_PKTINFO
@@ -1899,7 +1915,7 @@ AC_MSG_CHECKING([version of bison])
frr_ac_bison_version="$(eval $YACC -V | grep bison | head -n 1)"
frr_ac_bison_version="${frr_ac_bison_version##* }"
frr_ac_bison_missing="false"
-case "x${frr_ac_bison_version}" in
+case "x${frr_ac_bison_version}x" in
x2.7*)
BISON_OPENBRACE='"'
BISON_CLOSEBRACE='"'
@@ -1916,11 +1932,17 @@ case "x${frr_ac_bison_version}" in
AC_MSG_WARN([could not determine bison version. Please install GNU bison 2.7.x or newer.])
frr_ac_bison_missing="true"
;;
- *)
+ x3.[012][^0-9]*)
BISON_OPENBRACE='{'
BISON_CLOSEBRACE='}'
BISON_VERBOSE='-Dparse.error=verbose'
- AC_MSG_RESULT([$frr_ac_bison_version - 3.0 or newer])
+ AC_MSG_RESULT([$frr_ac_bison_version - 3.0 to 3.2])
+ ;;
+ *)
+ BISON_OPENBRACE='{'
+ BISON_CLOSEBRACE='}'
+ BISON_VERBOSE='-Dparse.error=verbose -Wno-yacc'
+ AC_MSG_RESULT([$frr_ac_bison_version - 3.3 or newer])
;;
esac
AC_SUBST([BISON_OPENBRACE])
@@ -2074,21 +2096,6 @@ size_t ac_x; ac_x = malloc_size(NULL);
])
])
-dnl ------
-dnl ZeroMQ
-dnl ------
-if test "x$enable_zeromq" != "xno"; then
- PKG_CHECK_MODULES([ZEROMQ], [libzmq >= 4.0.0], [
- AC_DEFINE([HAVE_ZEROMQ], [1], [Enable ZeroMQ support])
- ZEROMQ=true
- ], [
- if test "x$enable_zeromq" = "xyes"; then
- AC_MSG_ERROR([configuration specifies --enable-zeromq but libzmq was not found])
- fi
- ])
-fi
-AM_CONDITIONAL([ZEROMQ], [test "x$ZEROMQ" = "xtrue"])
-
dnl ----------
dnl configure date
dnl ----------
@@ -2174,39 +2181,43 @@ AC_DEFINE_UNQUOTED([YANG_MODELS_PATH], ["$CFG_YANGMODELS"], [path to YANG data m
AC_DEFINE_UNQUOTED([LIBYANG_PLUGINS_PATH], ["$CFG_LIBYANG_PLUGINS"], [path to libyang plugins])
AC_DEFINE_UNQUOTED([WATCHFRR_SH_PATH], ["${CFG_SBIN%/}/watchfrr.sh"], [path to watchfrr.sh])
-dnl ------------------------------------
-dnl Enable RPKI and add librtr to libs
-dnl ------------------------------------
-if test "${enable_rpki}" = "yes"; then
- PKG_CHECK_MODULES([RTRLIB], [rtrlib >= 0.5.0],
- [RPKI=true],
- [RPKI=false
- AC_MSG_ERROR([rtrlib was not found on your system or is too old.])]
- )
-fi
+dnl various features
+AM_CONDITIONAL([SUPPORT_REALMS], [test "${enable_realms}" = "yes"])
+AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno])
+dnl northbound
+AM_CONDITIONAL([SQLITE3], [$SQLITE3])
+AM_CONDITIONAL([CONFD], [test "x$enable_confd" != "x"])
+AM_CONDITIONAL([SYSREPO], [test "x$enable_sysrepo" = "xyes"])
+AM_CONDITIONAL([GRPC], [test "x$enable_grpc" = "xyes"])
+AM_CONDITIONAL([ZEROMQ], [test "x$ZEROMQ" = "xtrue"])
+dnl plugins
AM_CONDITIONAL([RPKI], [test "x$RPKI" = "xtrue"])
-
-dnl ------------------------------------------
-dnl Check whether rtrlib was build with ssh support
-dnl ------------------------------------------
-AC_MSG_CHECKING([whether the RTR Library is compiled with SSH])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rtrlib/rtrlib.h"]],
- [[struct tr_ssh_config config;]])],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([FOUND_SSH], [1], [found_ssh])],
- AC_MSG_RESULT([no])
-)
-
-dnl ---------------------------
-dnl Check htonl works correctly
-dnl ---------------------------
-AC_MSG_CHECKING([for working htonl])
-AC_CACHE_VAL(ac_cv_htonl_works,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([FRR_INCLUDES],[htonl (0);])],
- [ac_cv_htonl_works=yes], [ac_cv_htonl_works=no])
- ]
-)
-AC_MSG_RESULT([$ac_cv_htonl_works])
+AM_CONDITIONAL([SNMP], [test "x$SNMP_METHOD" = "xagentx"])
+AM_CONDITIONAL([IRDP], [$IRDP])
+AM_CONDITIONAL([FPM], [test "x$enable_fpm" = "xyes"])
+AM_CONDITIONAL([HAVE_PROTOBUF], [test "x$enable_protobuf" = "xyes"])
+dnl daemons
+AM_CONDITIONAL([VTYSH], [test "x$VTYSH" = "xvtysh"])
+AM_CONDITIONAL([ZEBRA], [test "${enable_zebra}" != "no"])
+AM_CONDITIONAL([BGPD], [test "x${enable_bgpd}" != "no"])
+AM_CONDITIONAL([RIPD], [test "${enable_ripd}" != "no"])
+AM_CONDITIONAL([OSPFD], [test "${enable_ospfd}" != "no"])
+AM_CONDITIONAL([LDPD], [test "${enable_ldpd}" != "no"])
+AM_CONDITIONAL([BFDD], [test "x$BFDD" = "xbfdd"])
+AM_CONDITIONAL([NHRPD], [test "x$NHRPD" = "xnhrpd"])
+AM_CONDITIONAL([EIGRPD], [test "${enable_eigrpd}" != "no"])
+AM_CONDITIONAL([WATCHFRR], [test "x$WATCHFRR" = "xwatchfrr"])
+AM_CONDITIONAL([OSPFCLIENT], [test "x$OSPFCLIENT" = "xospfclient"])
+AM_CONDITIONAL([RIPNGD], [test "${enable_ripngd}" != "no"])
+AM_CONDITIONAL([BABELD], [test "${enable_babeld}" != "no"])
+AM_CONDITIONAL([OSPF6D], [test "${enable_ospf6d}" != "no"])
+AM_CONDITIONAL([ISISD], [test "${enable_isisd}" != "no"])
+AM_CONDITIONAL([PIMD], [test "${enable_pimd}" != "no"])
+AM_CONDITIONAL([PBRD], [test "${enable_pbrd}" != "no"])
+AM_CONDITIONAL([SHARPD], [test "${enable_sharpd}" = "yes"])
+AM_CONDITIONAL([STATICD], [test "${enable_staticd}" != "no"])
+AM_CONDITIONAL([FABRICD], [test "${enable_fabricd}" != "no"])
+AM_CONDITIONAL([VRRPD], [test "${enable_vrrpd}" != "no"])
AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile])