]> git.proxmox.com Git - mirror_frr.git/blobdiff - configure.ac
Merge pull request #7210 from idryzhov/route-types-disable-daemon
[mirror_frr.git] / configure.ac
index 8e86ba87ff78190bcffdde39e7c9ba05c0268851..0b09e8db089844f29313b2c8964a77a90ea4a614 100755 (executable)
@@ -451,6 +451,11 @@ fi
 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
@@ -566,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],
@@ -1851,6 +1860,30 @@ if test "$enable_grpc" = "yes"; then
   ])
 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 ------
@@ -2467,19 +2500,6 @@ AC_CONFIG_FILES([tools/watchfrr.sh], [chmod +x tools/watchfrr.sh])
 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"
@@ -2499,6 +2519,14 @@ AS_IF([test "$with_pkg_git_version" = "yes"], [
 ## 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
 ------------------------------