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
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],
])
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 ------
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
------------------------------