forked from Mirror/frr
build: improve clippy options
* adds a `--with-clippy=...` option to use a prebuilt clippy binary * limits the autoconf tests done for `--enable-clippy-only` (e.g. no libyang) Fixes: #3921 Fixes: #4006 Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
102f26e611
commit
a71c5039ad
|
@ -40,6 +40,12 @@ shvar-%:
|
||||||
var-%:
|
var-%:
|
||||||
@echo "$($*)" >&$(VARFD)
|
@echo "$($*)" >&$(VARFD)
|
||||||
|
|
||||||
|
if ONLY_CLIPPY
|
||||||
|
.DEFAULT_GOAL := clippy-only
|
||||||
|
endif
|
||||||
|
clippy-only: Makefile lib/clippy config.h
|
||||||
|
.PHONY: clippy-only
|
||||||
|
|
||||||
# overwriting these vars breaks cross-compilation. let's be helpful and warn.
|
# overwriting these vars breaks cross-compilation. let's be helpful and warn.
|
||||||
#
|
#
|
||||||
# note: "#AUTODERP# " will be removed from Makefile by configure. These are
|
# note: "#AUTODERP# " will be removed from Makefile by configure. These are
|
||||||
|
|
314
configure.ac
314
configure.ac
|
@ -25,9 +25,25 @@ dnl -----------------------------------
|
||||||
AC_CANONICAL_BUILD()
|
AC_CANONICAL_BUILD()
|
||||||
AC_CANONICAL_HOST()
|
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
|
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
|
fi
|
||||||
test -d hosttools || mkdir hosttools
|
test -d hosttools || mkdir hosttools
|
||||||
abssrc="`cd \"${srcdir}\"; pwd`"
|
abssrc="`cd \"${srcdir}\"; pwd`"
|
||||||
|
@ -40,20 +56,24 @@ AS_IF([test "$host" != "$build"], [
|
||||||
( CPPFLAGS="$HOST_CPPFLAGS"; \
|
( CPPFLAGS="$HOST_CPPFLAGS"; \
|
||||||
CFLAGS="$HOST_CFLAGS"; \
|
CFLAGS="$HOST_CFLAGS"; \
|
||||||
LDFLAGS="$HOST_LDFLAGS"; \
|
LDFLAGS="$HOST_LDFLAGS"; \
|
||||||
cd hosttools; "${abssrc}/configure" "--host=$build" "--build=$build" "--enable-clippy-only" "--disable-nhrpd" "--disable-vtysh"; )
|
cd hosttools; "${abssrc}/configure" "--host=$build" "--build=$build" "--enable-clippy-only" "--disable-nhrpd" "--disable-vtysh"; ) || exit 1
|
||||||
|
|
||||||
AC_MSG_NOTICE([...])
|
AC_MSG_NOTICE([...])
|
||||||
AC_MSG_NOTICE([... cross-compilation: finished self-configuring for build platform tools])
|
AC_MSG_NOTICE([... cross-compilation: finished self-configuring for build platform tools])
|
||||||
AC_MSG_NOTICE([...])
|
AC_MSG_NOTICE([...])
|
||||||
|
|
||||||
build_clippy="false"
|
build_clippy="false"
|
||||||
HOSTTOOLS="hosttools/"
|
hosttools_clippy="true"
|
||||||
], [
|
CLIPPY="hosttools/lib/clippy"
|
||||||
build_clippy="true"
|
|
||||||
HOSTTOOLS=""
|
dnl case 3: normal build internal clippy
|
||||||
])
|
else
|
||||||
AC_SUBST([HOSTTOOLS])
|
CLIPPY="lib/clippy\$(EXEEXT)"
|
||||||
|
fi
|
||||||
|
AC_SUBST([CLIPPY])
|
||||||
AM_CONDITIONAL([BUILD_CLIPPY], [$build_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
|
# Disable portability warnings -- our automake code (in particular
|
||||||
# common.am) uses some constructs specific to gmake.
|
# common.am) uses some constructs specific to gmake.
|
||||||
|
@ -398,6 +418,8 @@ AC_ARG_WITH([pkg-extra-version],
|
||||||
AC_ARG_WITH([pkg-git-version],
|
AC_ARG_WITH([pkg-git-version],
|
||||||
AS_HELP_STRING([--with-pkg-git-version], [add git information to MOTD and build version string]),
|
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" ])
|
[ 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],
|
AC_ARG_WITH([vtysh_pager],
|
||||||
AS_HELP_STRING([--with-vtysh-pager=PAGER], [control what pager is compiled in as default]),
|
AS_HELP_STRING([--with-vtysh-pager=PAGER], [control what pager is compiled in as default]),
|
||||||
VTYSH_PAGER=$withval, VTYSH_PAGER="more")
|
VTYSH_PAGER=$withval, VTYSH_PAGER="more")
|
||||||
|
@ -603,8 +625,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])
|
AC_DEFINE([HAVE_SHELL_ACCESS], [1], [Allow user to use ssh/telnet/bash, be aware this is considered insecure])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([FPM], [test "x$enable_fpm" = "xyes"])
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Python for clippy
|
# Python for clippy
|
||||||
#
|
#
|
||||||
|
@ -634,31 +654,6 @@ FRR_PYTHON_MOD_EXEC([sphinx], [--version], [
|
||||||
])
|
])
|
||||||
AC_SUBST([PYSPHINX])
|
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.
|
# Logic for old vpn commands support.
|
||||||
#
|
#
|
||||||
|
@ -1094,7 +1089,48 @@ if test "${enable_realms}" = "yes"; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
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 ---------------------
|
||||||
dnl Integrated VTY option
|
dnl Integrated VTY option
|
||||||
|
@ -1143,7 +1179,6 @@ case "${enable_vtysh}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST([LIBREADLINE])
|
AC_SUBST([LIBREADLINE])
|
||||||
AM_CONDITIONAL([VTYSH], test "x$VTYSH" = "xvtysh")
|
|
||||||
|
|
||||||
dnl ----------
|
dnl ----------
|
||||||
dnl PAM module
|
dnl PAM module
|
||||||
|
@ -1205,11 +1240,6 @@ AC_CHECK_LIB([pam], [pam_start],
|
||||||
fi
|
fi
|
||||||
AC_SUBST([LIBPAM])
|
AC_SUBST([LIBPAM])
|
||||||
|
|
||||||
dnl -------------------------------
|
|
||||||
dnl Endian-ness check
|
|
||||||
dnl -------------------------------
|
|
||||||
AC_WORDS_BIGENDIAN
|
|
||||||
|
|
||||||
dnl -------------------------------
|
dnl -------------------------------
|
||||||
dnl bgpd needs pow() and hence libm
|
dnl bgpd needs pow() and hence libm
|
||||||
dnl -------------------------------
|
dnl -------------------------------
|
||||||
|
@ -1230,13 +1260,6 @@ AC_CHECK_FUNCS([pollts], [
|
||||||
AC_DEFINE([HAVE_POLLTS], [1], [have NetBSD 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_HEADER([asm-generic/unistd.h],
|
||||||
[AC_CHECK_DECL(__NR_setns,
|
[AC_CHECK_DECL(__NR_setns,
|
||||||
AC_DEFINE([HAVE_NETNS], [1], [Have netns]),,
|
AC_DEFINE([HAVE_NETNS], [1], [Have netns]),,
|
||||||
|
@ -1381,6 +1404,28 @@ if test $ac_cv_have_decl_TCP_MD5SIG = no; then
|
||||||
AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)])
|
AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)])
|
||||||
fi
|
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 ----------------------------------------------------------------------------
|
||||||
dnl figure out if domainname is available in the utsname struct (GNU extension).
|
dnl figure out if domainname is available in the utsname struct (GNU extension).
|
||||||
dnl ----------------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------------
|
||||||
|
@ -1413,18 +1458,6 @@ FRR_INCLUDES
|
||||||
dnl --------------------
|
dnl --------------------
|
||||||
dnl Daemon disable check
|
dnl Daemon disable check
|
||||||
dnl --------------------
|
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"], [
|
AS_IF([test "${enable_ldpd}" != "no"], [
|
||||||
AC_DEFINE([HAVE_LDPD], [1], [ldpd])
|
AC_DEFINE([HAVE_LDPD], [1], [ldpd])
|
||||||
|
@ -1448,8 +1481,6 @@ else
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([BFDD], [test "x$BFDD" = "xbfdd"])
|
|
||||||
|
|
||||||
if test "$ac_cv_lib_json_c_json_object_get" = no -a "x$BFDD" = "xbfdd"; then
|
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"])
|
AC_MSG_ERROR(["you must use json-c library to use bfdd"])
|
||||||
fi
|
fi
|
||||||
|
@ -1467,16 +1498,12 @@ case "$host_os" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL([NHRPD], [test "x$NHRPD" = "xnhrpd"])
|
|
||||||
|
|
||||||
AM_CONDITIONAL([EIGRPD], [test "${enable_eigrpd}" != "no"])
|
|
||||||
|
|
||||||
if test "${enable_watchfrr}" = "no";then
|
if test "${enable_watchfrr}" = "no";then
|
||||||
WATCHFRR=""
|
WATCHFRR=""
|
||||||
else
|
else
|
||||||
WATCHFRR="watchfrr"
|
WATCHFRR="watchfrr"
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([WATCHFRR], [test "x$WATCHFRR" = "xwatchfrr"])
|
|
||||||
|
|
||||||
OSPFCLIENT=""
|
OSPFCLIENT=""
|
||||||
if test "${enable_ospfapi}" != "no";then
|
if test "${enable_ospfapi}" != "no";then
|
||||||
|
@ -1487,18 +1514,6 @@ if test "${enable_ospfapi}" != "no";then
|
||||||
fi
|
fi
|
||||||
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
|
if test "${enable_bgp_announce}" = "no";then
|
||||||
AC_DEFINE([DISABLE_BGP_ANNOUNCE], [1], [Disable BGP installation to zebra])
|
AC_DEFINE([DISABLE_BGP_ANNOUNCE], [1], [Disable BGP installation to zebra])
|
||||||
else
|
else
|
||||||
|
@ -1508,22 +1523,11 @@ fi
|
||||||
if test "${enable_bgp_vnc}" != "no";then
|
if test "${enable_bgp_vnc}" != "no";then
|
||||||
AC_DEFINE([ENABLE_BGP_VNC], [1], [Enable BGP VNC support])
|
AC_DEFINE([ENABLE_BGP_VNC], [1], [Enable BGP VNC support])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno])
|
|
||||||
|
|
||||||
AC_SUBST([SOLARIS])
|
dnl ##########################################################################
|
||||||
AC_CHECK_LIB([crypt], [crypt], [],
|
dnl LARGE if block
|
||||||
[AC_CHECK_LIB([crypto], [DES_crypt])])
|
if test "${enable_clippy_only}" != "yes"; then
|
||||||
AC_CHECK_LIB([resolv], [res_init])
|
dnl ##########################################################################
|
||||||
|
|
||||||
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 ------------------
|
||||||
dnl check C-Ares library
|
dnl check C-Ares library
|
||||||
|
@ -1575,7 +1579,6 @@ int main(void);
|
||||||
AH_TEMPLATE([SNMP_AGENTX], [Use SNMP AgentX to interface with snmpd])
|
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])
|
AC_DEFINE_UNQUOTED(AS_TR_CPP(SNMP_${SNMP_METHOD}),,[SNMP method to interface with snmpd])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([SNMP], [test "x${SNMP_METHOD}" != "x"])
|
|
||||||
AC_SUBST([SNMP_LIBS])
|
AC_SUBST([SNMP_LIBS])
|
||||||
AC_SUBST([SNMP_CFLAGS])
|
AC_SUBST([SNMP_CFLAGS])
|
||||||
|
|
||||||
|
@ -1608,7 +1611,6 @@ if test "$enable_config_rollbacks" = "yes"; then
|
||||||
AC_MSG_ERROR([--enable-config-rollbacks given but sqlite3 was not found on your system.])
|
AC_MSG_ERROR([--enable-config-rollbacks given but sqlite3 was not found on your system.])
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([SQLITE3], [$SQLITE3])
|
|
||||||
|
|
||||||
dnl ---------------
|
dnl ---------------
|
||||||
dnl confd
|
dnl confd
|
||||||
|
@ -1624,7 +1626,6 @@ if test "$enable_confd" != "" -a "$enable_confd" != "no"; then
|
||||||
AC_SUBST([CONFD_LIBS])
|
AC_SUBST([CONFD_LIBS])
|
||||||
AC_DEFINE([HAVE_CONFD], [1], [Enable confd integration])
|
AC_DEFINE([HAVE_CONFD], [1], [Enable confd integration])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([CONFD], [test "x$enable_confd" != "x"])
|
|
||||||
|
|
||||||
dnl ---------------
|
dnl ---------------
|
||||||
dnl sysrepo
|
dnl sysrepo
|
||||||
|
@ -1637,7 +1638,6 @@ if test "$enable_sysrepo" = "yes"; then
|
||||||
AC_MSG_ERROR([sysrepo was not found on your system.])]
|
AC_MSG_ERROR([sysrepo was not found on your system.])]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([SYSREPO], [test "x$enable_sysrepo" = "xyes"])
|
|
||||||
|
|
||||||
dnl ---------------
|
dnl ---------------
|
||||||
dnl gRPC
|
dnl gRPC
|
||||||
|
@ -1656,7 +1656,42 @@ if test "$enable_grpc" = "yes"; then
|
||||||
AC_MSG_ERROR([grpc/grpc++ were not found on your system.])
|
AC_MSG_ERROR([grpc/grpc++ were not found on your system.])
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([GRPC], [test "x$enable_grpc" = "xyes"])
|
|
||||||
|
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 ---------------
|
||||||
dnl dlopen & dlinfo
|
dnl dlopen & dlinfo
|
||||||
|
@ -1707,7 +1742,11 @@ if test "$frr_cv_rtld_di_linkmap" = yes; then
|
||||||
AC_DEFINE([HAVE_DLINFO_LINKMAP], [1], [Have dlinfo RTLD_DI_LINKMAP])
|
AC_DEFINE([HAVE_DLINFO_LINKMAP], [1], [Have dlinfo RTLD_DI_LINKMAP])
|
||||||
fi
|
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 ---------------------------
|
||||||
dnl sockaddr and netinet checks
|
dnl sockaddr and netinet checks
|
||||||
|
@ -1752,7 +1791,6 @@ no)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AM_CONDITIONAL([IRDP], [$IRDP])
|
|
||||||
|
|
||||||
dnl -----------------------
|
dnl -----------------------
|
||||||
dnl checking for IP_PKTINFO
|
dnl checking for IP_PKTINFO
|
||||||
|
@ -2040,21 +2078,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 ----------
|
||||||
dnl configure date
|
dnl configure date
|
||||||
dnl ----------
|
dnl ----------
|
||||||
|
@ -2140,28 +2163,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([LIBYANG_PLUGINS_PATH], ["$CFG_LIBYANG_PLUGINS"], [path to libyang plugins])
|
||||||
AC_DEFINE_UNQUOTED([WATCHFRR_SH_PATH], ["${CFG_SBIN%/}/watchfrr.sh"], [path to watchfrr.sh])
|
AC_DEFINE_UNQUOTED([WATCHFRR_SH_PATH], ["${CFG_SBIN%/}/watchfrr.sh"], [path to watchfrr.sh])
|
||||||
|
|
||||||
dnl ------------------------------------
|
dnl various features
|
||||||
dnl Enable RPKI and add librtr to libs
|
AM_CONDITIONAL([SUPPORT_REALMS], [test "${enable_realms}" = "yes"])
|
||||||
dnl ------------------------------------
|
AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno])
|
||||||
if test "${enable_rpki}" = "yes"; then
|
dnl northbound
|
||||||
PKG_CHECK_MODULES([RTRLIB], [rtrlib >= 0.5.0],
|
AM_CONDITIONAL([SQLITE3], [$SQLITE3])
|
||||||
[RPKI=true],
|
AM_CONDITIONAL([CONFD], [test "x$enable_confd" != "x"])
|
||||||
[RPKI=false
|
AM_CONDITIONAL([SYSREPO], [test "x$enable_sysrepo" = "xyes"])
|
||||||
AC_MSG_ERROR([rtrlib was not found on your system or is too old.])]
|
AM_CONDITIONAL([GRPC], [test "x$enable_grpc" = "xyes"])
|
||||||
)
|
AM_CONDITIONAL([ZEROMQ], [test "x$ZEROMQ" = "xtrue"])
|
||||||
fi
|
dnl plugins
|
||||||
AM_CONDITIONAL([RPKI], [test "x$RPKI" = "xtrue"])
|
AM_CONDITIONAL([RPKI], [test "x$RPKI" = "xtrue"])
|
||||||
|
AM_CONDITIONAL([SNMP], [test "x$SNMP_METHOD" = "xagentx"])
|
||||||
dnl ------------------------------------------
|
AM_CONDITIONAL([IRDP], [$IRDP])
|
||||||
dnl Check whether rtrlib was build with ssh support
|
AM_CONDITIONAL([FPM], [test "x$enable_fpm" = "xyes"])
|
||||||
dnl ------------------------------------------
|
AM_CONDITIONAL([HAVE_PROTOBUF], [test "x$enable_protobuf" = "xyes"])
|
||||||
AC_MSG_CHECKING([whether the RTR Library is compiled with SSH])
|
dnl daemons
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rtrlib/rtrlib.h"]],
|
AM_CONDITIONAL([VTYSH], [test "x$VTYSH" = "xvtysh"])
|
||||||
[[struct tr_ssh_config config;]])],
|
AM_CONDITIONAL([ZEBRA], [test "${enable_zebra}" != "no"])
|
||||||
[AC_MSG_RESULT([yes])
|
AM_CONDITIONAL([BGPD], [test "x${enable_bgpd}" != "no"])
|
||||||
AC_DEFINE([FOUND_SSH], [1], [found_ssh])],
|
AM_CONDITIONAL([RIPD], [test "${enable_ripd}" != "no"])
|
||||||
AC_MSG_RESULT([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])
|
AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile])
|
||||||
|
|
||||||
|
|
|
@ -340,8 +340,10 @@ noinst_PROGRAMS += \
|
||||||
if BUILD_CLIPPY
|
if BUILD_CLIPPY
|
||||||
noinst_PROGRAMS += lib/clippy
|
noinst_PROGRAMS += lib/clippy
|
||||||
else
|
else
|
||||||
$(HOSTTOOLS)lib/clippy:
|
if HOSTTOOLS_CLIPPY
|
||||||
@$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/route_types.h lib/clippy
|
$(CLIPPY):
|
||||||
|
@$(MAKE) -C $(top_builddir)/hosttools lib/route_types.h lib/clippy
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lib_grammar_sandbox_SOURCES = \
|
lib_grammar_sandbox_SOURCES = \
|
||||||
|
@ -372,13 +374,11 @@ am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
|
||||||
am__v_CLIPPY_0 = @echo " CLIPPY " $@;
|
am__v_CLIPPY_0 = @echo " CLIPPY " $@;
|
||||||
am__v_CLIPPY_1 =
|
am__v_CLIPPY_1 =
|
||||||
|
|
||||||
CLIPPY_DEPS = $(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py
|
CLIPPY_DEPS = $(CLIPPY) $(top_srcdir)/python/clidef.py
|
||||||
|
|
||||||
SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h .pb.cc .grpc.pb.cc
|
SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h .pb.cc .grpc.pb.cc
|
||||||
.c_clippy.c:
|
.c_clippy.c:
|
||||||
@{ test -x $(top_builddir)/$(HOSTTOOLS)lib/clippy || \
|
$(AM_V_CLIPPY) $(CLIPPY) $(top_srcdir)/python/clidef.py -o $@ $<
|
||||||
$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy; }
|
|
||||||
$(AM_V_CLIPPY) $(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py -o $@ $<
|
|
||||||
|
|
||||||
## automake's "ylwrap" is a great piece of GNU software... not.
|
## automake's "ylwrap" is a great piece of GNU software... not.
|
||||||
.l.c:
|
.l.c:
|
||||||
|
|
Loading…
Reference in a new issue