AC_C_FLAG([-std=gnu11], [CC="$ac_cc"], [CC="$CC -std=gnu11"])
+dnl AddressSanitizer support
+AC_ARG_ENABLE([address-sanitizer], AS_HELP_STRING([--enable-address-sanitizer], \
+ [enabled AddressSanitizer support for detecting a wide variety of \
+ memory allocation and deallocation errors]), \
+ [AC_DEFINE(HAVE_ADDRESS_SANITIZER, 1, [enable AddressSanitizer])
+ CFLAGS="$CFLAGS -fsanitize=address"
+ CXXFLAGS="$CXXFLAGS -fsanitize=address"
+ AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Address Sanitizer Enabled])],
+ [AC_MSG_ERROR([Address Sanitizer not available])])
+ ])
+
+dnl ThreadSanitizer support
+AC_ARG_ENABLE([thread-sanitizer], AS_HELP_STRING([--enable-thread-sanitizer], \
+ [enabled ThreadSanitizer support for detecting data races]), \
+ [AC_DEFINE(HAVE_THREAD_SANITIZER, 1, [enable ThreadSanitizer])
+ CFLAGS="$CFLAGS -fsanitize=thread"
+ CXXFLAGS="$CXXFLAGS -fsanitize=thread"
+ AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Thread Sanitizer Enabled])],
+ [AC_MSG_ERROR([Thread Sanitizer not available])])
+ ])
+
+dnl MemorySanitizer support
+AC_ARG_ENABLE([memory-sanitizer], AS_HELP_STRING([--enable-memory-sanitizer], \
+ [enabled MemorySanitizer support for detecting uninitialized memory reads]), \
+ [AC_DEFINE(HAVE_THREAD_SANITIZER, 1, [enable MemorySanitizer])
+ CFLAGS="$CFLAGS -fsanitize=memory -fPIE -pie"
+ CXXFLAGS="$CXXFLAGS -fsanitize=memory -fPIE -pie"
+ AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Memory Sanitizer Enabled])],
+ [AC_MSG_ERROR([Memory Sanitizer not available])])
+ ])
+
dnl if the user has specified any CFLAGS, override our settings
if test "x${enable_dev_build}" = "xyes"; then
AC_DEFINE(DEV_BUILD,,Build for development)
AS_HELP_STRING([--enable-rpki], [enable RPKI prefix validation support]))
AC_ARG_ENABLE([clippy-only],
AS_HELP_STRING([--enable-clippy-only], [Only build clippy]))
+AC_ARG_ENABLE([numeric_version],
+ AS_HELP_STRING([--enable-numeric-version], [Only numeric digits allowed in version (for Alpine)]))
AS_IF([test "${enable_clippy_only}" != "yes"], [
AC_CHECK_HEADERS(json-c/json.h)
AC_DEFINE_UNQUOTED(VTYSH_PAGER, "$VTYSH_PAGER", [What pager to use])
+dnl ------------------------------------
+dnl Alpine only accepts numeric versions
+dnl ------------------------------------
+if test "x${enable_numeric_version}" != "x" ; then
+ VERSION="`echo ${VERSION} | tr -c -d '[[.0-9]]'`"
+ PACKAGE_VERSION="`echo ${PACKAGE_VERSION} | tr -c -d '[[.0-9]]'`"
+fi
+
dnl -----------------------------------
dnl Add extra version string to package
dnl name, string and version fields.
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")
if test "${enable_bgp_announce}" = "no";then
AC_DEFINE(DISABLE_BGP_ANNOUNCE,1,Disable BGP installation to zebra)
redhat/frr.spec
debianpkg/Makefile
debianpkg/changelog
+ alpine/APKBUILD
snapcraft/snapcraft.yaml
lib/version.h
tests/lib/cli/test_cli.refout