ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = \
+ $(LIBYANG_CFLAGS) \
+ $(SQLITE3_CFLAGS) \
$(UNWIND_CFLAGS) \
$(SAN_FLAGS) \
$(WERROR) \
$(SAN_FLAGS) \
# end
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
-LIBCAP = @LIBCAP@
AR_FLAGS = @AR_FLAGS@
ARFLAGS = @ARFLAGS@
# end
babeld_babeld_SOURCES = babeld/babel_main.c
-babeld_babeld_LDADD = babeld/libbabel.a lib/libfrr.la @LIBCAP@
+babeld_babeld_LDADD = babeld/libbabel.a lib/libfrr.la $(LIBCAP)
if ENABLE_BGP_VNC
bgpd_bgpd_SOURCES += bgpd/rfapi/rfapi_descriptor_rfp_utils.c
-bgpd_bgpd_CFLAGS = -Irfapi -I@top_srcdir@/$(RFPINC)
+bgpd_bgpd_CFLAGS = $(AM_CFLAGS) -Irfapi -I@top_srcdir@/$(RFPINC)
bgpd_bgp_btoa_SOURCES += bgpd/rfapi/rfapi_descriptor_rfp_utils.c
-bgpd_bgp_btoa_CFLAGS = -Irfapi -I@top_srcdir@/$(RFPINC)
+bgpd_bgp_btoa_CFLAGS = $(AM_CFLAGS) -Irfapi -I@top_srcdir@/$(RFPINC)
endif
# RFPLDADD is set in bgpd/rfp-example/librfp/subdir.am
-bgpd_bgpd_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la @LIBCAP@ @LIBM@
-bgpd_bgp_btoa_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la @LIBCAP@ @LIBM@
+bgpd_bgpd_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la $(LIBCAP) $(LIBM)
+bgpd_bgp_btoa_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la $(LIBCAP) $(LIBM)
bgpd_bgpd_snmp_la_SOURCES = bgpd/bgp_snmp.c
bgpd_bgpd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
dnl ---------------
dnl libyang
dnl ---------------
-PKG_CHECK_MODULES([libyang], [libyang >= 0.16.7], , [
+PKG_CHECK_MODULES([LIBYANG], [libyang >= 0.16.7], , [
AC_MSG_ERROR([libyang (>= 0.16.7) was not found on your system.])
])
+ac_cflags_save="$CFLAGS"
+CFLAGS="$CFLAGS $LIBYANG_CFLAGS"
AC_CHECK_MEMBER([struct lyd_node.priv], [], [
AC_MSG_ERROR([m4_normalize([
libyang needs to be compiled with ENABLE_LYD_PRIV=ON.
See http://docs.frrouting.org/projects/dev-guide/en/latest/building-libyang.html for details.])
])
], [[#include <libyang/libyang.h>]])
+CFLAGS="$ac_cflags_save"
ac_libs_save="$LIBS"
-LIBS="$LIBS $libyang_LIBS"
+LIBS="$LIBS $LIBYANG_LIBS"
AC_CHECK_FUNC([ly_register_types], [
libyang_ext_builtin=true
AC_DEFINE([LIBYANG_EXT_BUILTIN], [1], [have ly_register_types()])
dnl ---------------
SQLITE3=false
if test "$enable_config_rollbacks" = "yes"; then
- PKG_CHECK_MODULES([sqlite3], [sqlite3], [
+ PKG_CHECK_MODULES([SQLITE3], [sqlite3], [
AC_DEFINE([HAVE_CONFIG_ROLLBACKS], [1], [Enable configuration rollbacks])
AC_DEFINE([HAVE_SQLITE3], [1], [Enable sqlite3 database])
SQLITE3=true
dnl sysrepo
dnl ---------------
if test "$enable_sysrepo" = "yes"; then
- PKG_CHECK_MODULES([sysrepo], [libsysrepo],
+ PKG_CHECK_MODULES([SYSREPO], [libsysrepo],
[AC_DEFINE([HAVE_SYSREPO], [1], [Enable sysrepo integration])
SYSREPO=true],
[SYSREPO=false
# end
eigrpd_eigrpd_SOURCES = eigrpd/eigrp_main.c
-eigrpd_eigrpd_LDADD = eigrpd/libeigrp.a lib/libfrr.la @LIBCAP@
+eigrpd_eigrpd_LDADD = eigrpd/libeigrp.a lib/libfrr.la $(LIBCAP)
isisd/isis_pfpacket.c \
# end
-ISIS_LDADD_COMMON = lib/libfrr.la @LIBCAP@
+ISIS_LDADD_COMMON = lib/libfrr.la $(LIBCAP)
# Building isisd
# end
ldpd_ldpd_SOURCES = ldpd/ldpd.c
-ldpd_ldpd_LDADD = ldpd/libldp.a lib/libfrr.la @LIBCAP@
+ldpd_ldpd_LDADD = ldpd/libldp.a lib/libfrr.la $(LIBCAP)
#
lib_LTLIBRARIES += lib/libfrr.la
lib_libfrr_la_LDFLAGS = -version-info 0:0:0 -Xlinker -e_libfrr_version
-lib_libfrr_la_LIBADD = @LIBCAP@ $(UNWIND_LIBS) -lyang
+lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS)
lib_libfrr_la_SOURCES = \
lib/agg_table.c \
vtysh_scan += $(top_srcdir)/lib/agentx.c
if SQLITE3
-lib_libfrr_la_LIBADD += -lsqlite3
+lib_libfrr_la_LIBADD += $(SQLITE3_LIBS)
lib_libfrr_la_SOURCES += lib/db.c
endif
lib_confd_la_CFLAGS = $(WERROR) $(CONFD_CFLAGS)
lib_confd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
-lib_confd_la_LIBADD = lib/libfrr.la -lconfd
+lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS)
lib_confd_la_SOURCES = lib/northbound_confd.c
#
module_LTLIBRARIES += lib/sysrepo.la
endif
-lib_sysrepo_la_CFLAGS = $(WERROR)
+lib_sysrepo_la_CFLAGS = $(WERROR) $(SYSREPO_CFLAGS)
lib_sysrepo_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
-lib_sysrepo_la_LIBADD = lib/libfrr.la -lsysrepo
+lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS)
lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c
#
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
lib/command_lex.lo: lib/command_parse.h
lib/command_parse.lo: lib/command_lex.h
+lib/clippy-command_lex.$(OBJEXT): lib/command_parse.h
+lib/clippy-command_parse.$(OBJEXT): lib/command_lex.h
lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
- @PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
+ $(PERL) $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
DISTCLEANFILES += lib/route_types.h
if GIT_VERSION
.SILENT: lib/gitversion.h lib/gitversion.h.tmp
GITH=lib/gitversion.h
lib/gitversion.h.tmp: $(top_srcdir)/.git
- @PERL@ $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
+ $(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
lib/gitversion.h: lib/gitversion.h.tmp
{ test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
man8 += $(MANBUILD)/nhrpd.8
endif
-nhrpd_nhrpd_LDADD = lib/libfrr.la @LIBCAP@ @CARES_LIBS@
-nhrpd_nhrpd_CFLAGS = $(AM_CFLAGS) @CARES_CFLAGS@
+nhrpd_nhrpd_LDADD = lib/libfrr.la $(LIBCAP) $(CARES_LIBS)
+nhrpd_nhrpd_CFLAGS = $(AM_CFLAGS) $(CARES_CFLAGS)
nhrpd_nhrpd_SOURCES = \
nhrpd/linux.c \
nhrpd/netlink_arp.c \
ospf6d/ospf6d.h \
# end
-ospf6d_ospf6d_LDADD = ospf6d/libospf6.a lib/libfrr.la @LIBCAP@
+ospf6d_ospf6d_LDADD = ospf6d/libospf6.a lib/libfrr.la $(LIBCAP)
ospf6d_ospf6d_SOURCES = \
ospf6d/ospf6_main.c \
# end
ospfclient_ospfclient_LDADD = \
ospfclient/libfrrospfapiclient.la \
- @LIBCAP@ \
+ $(LIBCAP) \
# end
if STATIC_BIN
ospfd/ospf_zebra.h \
# end
-ospfd_ospfd_LDADD = ospfd/libfrrospf.a lib/libfrr.la @LIBCAP@ @LIBM@
+ospfd_ospfd_LDADD = ospfd/libfrrospf.a lib/libfrr.la $(LIBCAP) $(LIBM)
ospfd_ospfd_SOURCES = ospfd/ospf_main.c
ospfd_ospfd_snmp_la_SOURCES = ospfd/ospf_snmp.c
pbrd/pbr_debug.$(OBJEXT): pbrd/pbr_debug_clippy.c
pbrd_pbrd_SOURCES = pbrd/pbr_main.c
-pbrd_pbrd_LDADD = pbrd/libpbr.a lib/libfrr.la @LIBCAP@
+pbrd_pbrd_LDADD = pbrd/libpbr.a lib/libfrr.la $(LIBCAP)
pimd/mtracebis_routeget.h \
# end
-pimd_pimd_LDADD = pimd/libpim.a lib/libfrr.la @LIBCAP@
+pimd_pimd_LDADD = pimd/libpim.a lib/libfrr.la $(LIBCAP)
pimd_pimd_SOURCES = pimd/pim_main.c
pimd_test_igmpv3_join_LDADD = lib/libfrr.la
ripd/ripd.h \
# end
-ripd_ripd_LDADD = ripd/librip.a lib/libfrr.la @LIBCAP@
+ripd_ripd_LDADD = ripd/librip.a lib/libfrr.la $(LIBCAP)
ripd_ripd_SOURCES = \
ripd/rip_main.c \
# end
ripngd/ripngd.h \
# end
-ripngd_ripngd_LDADD = ripngd/libripng.a lib/libfrr.la @LIBCAP@
+ripngd_ripngd_LDADD = ripngd/libripng.a lib/libfrr.la $(LIBCAP)
ripngd_ripngd_SOURCES = \
ripngd/ripng_main.c \
# end
sharpd/sharp_vty.$(OBJEXT): sharpd/sharp_vty_clippy.c
sharpd_sharpd_SOURCES = sharpd/sharp_main.c
-sharpd_sharpd_LDADD = sharpd/libsharp.a lib/libfrr.la @LIBCAP@
+sharpd_sharpd_LDADD = sharpd/libsharp.a lib/libfrr.la $(LIBCAP)
staticd/static_vty.$(OBJEXT): staticd/static_vty_clippy.c
staticd_staticd_SOURCES = staticd/static_main.c
-staticd_staticd_LDADD = staticd/libstatic.a lib/libfrr.la @LIBCAP@
+staticd_staticd_LDADD = staticd/libstatic.a lib/libfrr.la $(LIBCAP)
-I$(top_srcdir)/tests/helpers/c \
-I$(top_builddir)/tests/helpers/c \
# end
-TESTS_CFLAGS = $(SAN_FLAGS)
+TESTS_CFLAGS = \
+ $(LIBYANG_CFLAGS) \
+ $(SAN_FLAGS) \
+ # end
# note no -Werror
-ALL_TESTS_LDADD = lib/libfrr.la @LIBCAP@
+ALL_TESTS_LDADD = lib/libfrr.la $(LIBCAP)
BGP_TEST_LDADD = bgpd/libbgp.a $(RFPLDADD) $(ALL_TESTS_LDADD) -lm
ISISD_TEST_LDADD = isisd/libisis.a $(ALL_TESTS_LDADD)
OSPF6_TEST_LDADD = ospf6d/libospf6.a $(ALL_TESTS_LDADD)
tools_permutations_LDADD = lib/libfrr.la
tools_gen_northbound_callbacks_SOURCES = tools/gen_northbound_callbacks.c
-tools_gen_northbound_callbacks_LDADD = lib/libfrr.la -lyang
+tools_gen_northbound_callbacks_LDADD = lib/libfrr.la $(LIBYANG_LIBS)
tools_gen_yang_deviations_SOURCES = tools/gen_yang_deviations.c
-tools_gen_yang_deviations_LDADD = lib/libfrr.la -lyang
+tools_gen_yang_deviations_LDADD = lib/libfrr.la $(LIBYANG_LIBS)
tools_ssd_SOURCES = tools/start-stop-daemon.c
vtysh/vtysh_user.h \
# end
-vtysh_vtysh_LDADD = lib/libfrr.la @LIBCAP@ @LIBREADLINE@ @LIBS@ @LIBPAM@
+vtysh_vtysh_LDADD = lib/libfrr.la $(LIBCAP) $(LIBREADLINE) $(LIBS) $(LIBPAM)
AM_V_EXTRACT = $(am__v_EXTRACT_$(V))
am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY))
watchfrr/watchfrr_errors.h \
# end
-watchfrr_watchfrr_LDADD = lib/libfrr.la @LIBCAP@
+watchfrr_watchfrr_LDADD = lib/libfrr.la $(LIBCAP)
watchfrr_watchfrr_SOURCES = \
watchfrr/watchfrr.c \
watchfrr/watchfrr_errors.c \
libyang_plugins_LTLIBRARIES += yang/libyang_plugins/frr_user_types.la
endif
-yang_libyang_plugins_frr_user_types_la_CFLAGS = $(WERROR)
+yang_libyang_plugins_frr_user_types_la_CFLAGS = $(WERROR) $(LIBYANG_CFLAGS)
yang_libyang_plugins_frr_user_types_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
yang_libyang_plugins_frr_user_types_la_LIBADD =
yang_libyang_plugins_frr_user_types_la_SOURCES = yang/libyang_plugins/frr_user_types.c