]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #7210 from idryzhov/route-types-disable-daemon
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 19 Nov 2020 00:38:14 +0000 (19:38 -0500)
committerGitHub <noreply@github.com>
Thu, 19 Nov 2020 00:38:14 +0000 (19:38 -0500)
lib: respect --disable-daemon flags in route_types.h

1  2 
configure.ac
lib/subdir.am

diff --combined configure.ac
index 237552c1408b0c2c380ea94e857f9b8b2bee445f,be062446f57edda9c7cebf39e73be9fe012daf8a..0b09e8db089844f29313b2c8964a77a90ea4a614
@@@ -139,13 -139,6 +139,13 @@@ AC_ARG_WITH([yangmodelsdir], [AS_HELP_S
  ])
  AC_SUBST([yangmodelsdir])
  
 +AC_ARG_WITH([vici-socket], [AS_HELP_STRING([--with-vici-socket=PATH], [vici-socket (/var/run/charon.vici)])], [
 +      vici_socket="$withval"
 +], [
 +      vici_socket="/var/run/charon.vici"
 +])
 +AC_DEFINE_UNQUOTED([VICI_SOCKET], ["$vici_socket"], [StrongSWAN vici socket path])
 +
  AC_ARG_ENABLE(tcmalloc,
        AS_HELP_STRING([--enable-tcmalloc], [Turn on tcmalloc]),
  [case "${enableval}" in
  AC_SUBST([AC_LDFLAGS])
  AM_CONDITIONAL([STATIC_BIN], [test "$enable_static_bin" = "yes"])
  
 +AC_ARG_ENABLE([rpath],
 +  [AS_HELP_STRING([--enable-rpath], [set hardcoded rpaths in the executable @<:@default=yes@:>@])],
 +  [],
 +  [enable_rpath=yes])
 +
  dnl $AR and $RANLIB are set by LT_INIT above
  AC_MSG_CHECKING([whether $AR supports D option])
  if $AR crD conftest.a >/dev/null 2>/dev/null; then
@@@ -571,10 -559,6 +571,10 @@@ AC_ARG_ENABLE([grpc]
    AS_HELP_STRING([--enable-grpc], [enable the gRPC northbound plugin]))
  AC_ARG_ENABLE([zeromq],
    AS_HELP_STRING([--enable-zeromq], [enable ZeroMQ handler (libfrrzmq)]))
 +AC_ARG_ENABLE([lttng],
 +  AS_HELP_STRING([--enable-lttng], [enable LTTng tracing]))
 +AC_ARG_ENABLE([usdt],
 +  AS_HELP_STRING([--enable-usdt], [enable USDT probes]))
  AC_ARG_WITH([libpam],
    AS_HELP_STRING([--with-libpam], [use libpam for PAM support in vtysh]))
  AC_ARG_ENABLE([ospfapi],
@@@ -1860,30 -1844,6 +1860,30 @@@ if test "$enable_grpc" = "yes"; the
    ])
  fi
  
 +dnl -----
 +dnl LTTng
 +dnl -----
 +if test "$enable_lttng" = "yes"; then
 +  PKG_CHECK_MODULES([UST], [lttng-ust >= 2.12.0], [
 +    AC_DEFINE([HAVE_LTTNG], [1], [Enable LTTng support])
 +    LTTNG=true
 +  ], [
 +    AC_MSG_ERROR([configuration specifies --enable-lttng but lttng-ust was not found])
 +  ])
 +fi
 +
 +dnl ----
 +dnl USDT
 +dnl ----
 +if test "$enable_usdt" = "yes"; then
 +  AC_CHECK_HEADERS([sys/sdt.h], [
 +    AC_DEFINE([HAVE_USDT], [1], [Enable USDT probes])
 +    USDT=true
 +  ], [
 +    AC_MSG_ERROR([configuration specifies --enable-usdt but no USDT kernel headers (sys/sdt.h) found])
 +  ])
 +fi
 +
  dnl ------
  dnl ZeroMQ
  dnl ------
@@@ -2500,19 -2460,6 +2500,6 @@@ AC_CONFIG_FILES([tools/watchfrr.sh], [c
  AC_CONFIG_FILES([tools/frrinit.sh], [chmod +x tools/frrinit.sh])
  AC_CONFIG_FILES([tools/frrcommon.sh])
  
- AC_CONFIG_COMMANDS([lib/route_types.h], [
-       dst="${ac_abs_top_builddir}/lib/route_types.h"
-       ${PERL} "${ac_abs_top_srcdir}/lib/route_types.pl" \
-               < "${ac_abs_top_srcdir}/lib/route_types.txt" \
-               > "${dst}.tmp"
-       test -f "$dst" \
-               && diff "${dst}.tmp" "${dst}" >/dev/null 2>/dev/null \
-               && rm "${dst}.tmp" \
-               || mv "${dst}.tmp" "${dst}"
- ], [
-       PERL="$PERL"
- ])
  AS_IF([test "$with_pkg_git_version" = "yes"], [
      AC_CONFIG_COMMANDS([lib/gitversion.h], [
        dst="${ac_abs_top_builddir}/lib/gitversion.h"
  ## It's already in CVS until texinfo 4.7 is more common.
  AC_OUTPUT
  
 +if test "$enable_rpath" = "yes" ; then
 +      true
 +else
 +      # See https://old-en.opensuse.org/openSUSE:Packaging_Guidelines#Removing_Rpath
 +      sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
 +      sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 +fi
 +
  echo "
  FRRouting configuration
  ------------------------------
@@@ -2560,7 -2499,6 +2547,7 @@@ group for vty sockets   : ${enable_vty_
  config file mask        : ${enable_configfile_mask}
  log file mask           : ${enable_logfile_mask}
  zebra protobuf enabled  : ${enable_protobuf:-no}
 +vici socket path        : ${vici_socket}
  
  The above user and group must have read/write access to the state file
  directory and to the config files in the config file directory."
diff --combined lib/subdir.am
index ed3c30799d9afd57eb6c65ffc3456ae4209823ba,3c57c5aeac99533e9d9f4e843793c8546dfa6ee4..038282a99b918015ff1d5c61141eac7f30b36b24
@@@ -3,7 -3,7 +3,7 @@@
  #
  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) $(LIBYANG_LIBS) $(LUA_LIB) $(LIBM)
 +lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(UST_LIBS) $(LIBM)
  
  lib_libfrr_la_SOURCES = \
        lib/agg_table.c \
@@@ -46,7 -46,6 +46,7 @@@
        lib/lib_errors.c \
        lib/lib_vty.c \
        lib/libfrr.c \
 +      lib/libfrr_trace.c \
        lib/linklist.c \
        lib/log.c \
        lib/log_filter.c \
@@@ -124,7 -123,6 +124,7 @@@ nodist_lib_libfrr_la_SOURCES = 
        yang/frr-nexthop.yang.c \
        yang/ietf/ietf-routing-types.yang.c \
        yang/ietf/ietf-interfaces.yang.c \
 +      yang/ietf/ietf-bgp-types.yang.c \
        yang/frr-module-translator.yang.c \
        yang/frr-nexthop.yang.c \
        # end
@@@ -205,7 -203,6 +205,7 @@@ pkginclude_HEADERS += 
        lib/lib_errors.h \
        lib/lib_vty.h \
        lib/libfrr.h \
 +      lib/libfrr_trace.h \
        lib/libospf.h \
        lib/linklist.h \
        lib/log.h \
        lib/table.h \
        lib/termtable.h \
        lib/thread.h \
 +      lib/trace.h \
        lib/typerb.h \
        lib/typesafe.h \
        lib/vector.h \
@@@ -404,7 -400,7 +404,7 @@@ lib_grammar_sandbox_LDADD = 
  
  lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY
  lib_clippy_CFLAGS = $(PYTHON_CFLAGS)
 -lib_clippy_LDADD = $(PYTHON_LIBS)
 +lib_clippy_LDADD = $(PYTHON_LIBS) $(UST_LIBS)
  lib_clippy_LDFLAGS = -export-dynamic
  lib_clippy_SOURCES = \
        lib/clippy.c \
        lib/command_py.c \
        lib/defun_lex.l \
        lib/graph.c \
 +      lib/libfrr_trace.c \
        lib/memory.c \
        lib/vector.c \
        # end
@@@ -470,8 -465,62 +470,62 @@@ lib/clippy-command_parse.$(OBJEXT): lib
  lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
  lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
  
+ rt_enabled =
+ if BABELD
+ rt_enabled += --enabled babeld
+ endif
+ if BFDD
+ rt_enabled += --enabled bfdd
+ endif
+ if BGPD
+ rt_enabled += --enabled bgpd
+ if ENABLE_BGP_VNC
+ rt_enabled += --enabled bgpd-vnc
+ endif
+ endif
+ if EIGRPD
+ rt_enabled += --enabled eigrpd
+ endif
+ if ISISD
+ rt_enabled += --enabled isisd
+ endif
+ if FABRICD
+ rt_enabled += --enabled fabricd
+ endif
+ if LDPD
+ rt_enabled += --enabled ldpd
+ endif
+ if NHRPD
+ rt_enabled += --enabled nhrpd
+ endif
+ if OSPFD
+ rt_enabled += --enabled ospfd
+ endif
+ if OSPF6D
+ rt_enabled += --enabled ospf6d
+ endif
+ if PBRD
+ rt_enabled += --enabled pbrd
+ endif
+ if PIMD
+ rt_enabled += --enabled pimd
+ endif
+ if RIPD
+ rt_enabled += --enabled ripd
+ endif
+ if RIPNGD
+ rt_enabled += --enabled ripngd
+ endif
+ if SHARPD
+ rt_enabled += --enabled sharpd
+ endif
+ if ZEBRA
+ rt_enabled += --enabled zebra
+ endif
  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 $(rt_enabled) < $(top_srcdir)/lib/route_types.txt > $@
  DISTCLEANFILES += lib/route_types.h
  
  if GIT_VERSION