]> git.proxmox.com Git - mirror_frr.git/blobdiff - configure.ac
bgpd: disallow importing a vrf into itself
[mirror_frr.git] / configure.ac
index a3b38559e55fa054d5fd14fc6aa20de3ffd32a7e..53a80e790f3de79d4c1e6d3a87ae0014612b9a00 100755 (executable)
@@ -7,7 +7,7 @@
 ##
 AC_PREREQ(2.60)
 
-AC_INIT(frr, 3.1-dev, [https://github.com/frrouting/frr/issues])
+AC_INIT(frr, 4.1-dev, [https://github.com/frrouting/frr/issues])
 PACKAGE_URL="https://frrouting.org/"
 AC_SUBST(PACKAGE_URL)
 PACKAGE_FULLNAME="FRRouting"
@@ -185,6 +185,37 @@ CC="${CC% -std=c99}"
 
 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)
@@ -396,6 +427,8 @@ AC_ARG_ENABLE(rpki,
   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)
@@ -647,6 +680,14 @@ AC_DEFINE_UNQUOTED(MULTIPATH_NUM, $MPATH_NUM, Maximum number of paths for a rout
 
 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.
@@ -1336,6 +1377,7 @@ AM_CONDITIONAL(BABELD, test "${enable_babeld}" != "no")
 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)
@@ -1872,26 +1914,10 @@ AC_CONFIG_FILES([Makefile
          redhat/frr.spec
          debianpkg/Makefile
          debianpkg/changelog
+         alpine/APKBUILD
          snapcraft/snapcraft.yaml
          lib/version.h
          tests/lib/cli/test_cli.refout
-         doc/defines.texi
-         doc/bgpd.8
-         doc/isisd.8
-         doc/ospf6d.8
-         doc/ospfclient.8
-         doc/ospfd.8
-         doc/ldpd.8
-         doc/ripd.8
-         doc/eigrpd.8
-         doc/ripngd.8
-         doc/pimd.8
-         doc/nhrpd.8
-         doc/vtysh.1
-         doc/watchfrr.8
-         doc/zebra.8
-         doc/frr.1
-         doc/frr-args.8
          pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
          pkgsrc/ripd.sh pkgsrc/ripngd.sh pkgsrc/zebra.sh
          pkgsrc/eigrpd.sh])