##
AC_PREREQ([2.60])
-AC_INIT([frr], [7.4-dev], [https://github.com/frrouting/frr/issues])
+AC_INIT([frr], [7.5-dev], [https://github.com/frrouting/frr/issues])
PACKAGE_URL="https://frrouting.org/"
AC_SUBST([PACKAGE_URL])
PACKAGE_FULLNAME="FRRouting"
AC_USE_SYSTEM_EXTENSIONS
AC_DEFUN([AC_C_FLAG], [{
- m4_pushdef([cachename],[m4_translit([frr_cv_$1],[ =-+],[____])])
+ m4_pushdef([cachename],[m4_translit([frr_cv_$1],[ =-+/{}$],[________])])
AC_CACHE_CHECK([[whether $CC supports $1]], cachename, [
AC_LANG_PUSH([C])
ac_c_flag_save="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]])],
+ [AC_LANG_PROGRAM([[$4]])],
[
cachename=yes
], [
AC_C_FLAG([-Wpointer-arith])
AC_C_FLAG([-Wbad-function-cast])
AC_C_FLAG([-Wwrite-strings])
+AC_C_FLAG([-Wundef])
if test "$enable_gcc_ultra_verbose" = "yes" ; then
AC_C_FLAG([-Wcast-qual])
AC_C_FLAG([-Wstrict-prototypes])
fi
AC_SUBST([SAN_FLAGS])
+dnl frr-format.so
+if test "$with_frr_format" != "no" -a "$with_frr_format" != "yes" -a -n "$with_frr_format"; then
+ AC_C_FLAG([-fplugin=${with_frr_format}], [
+ AC_MSG_ERROR([specified frr-format plugin ($with_frr_format) does not work])
+ ],,[
+#ifndef _FRR_ATTRIBUTE_PRINTFRR
+#error plugin not loaded
+#endif
+#if _FRR_ATTRIBUTE_PRINTFRR < 0x10000
+#error plugin too old
+#endif
+ ])
+elif test "$with_frr_format" = "no"; then
+ : #nothing
+else
+ AC_C_FLAG([-fplugin=tools/gcc-plugins/frr-format.so],[
+ AC_C_FLAG([-fplugin=frr-format],[
+ if test "$with_frr_format" = "yes"; then
+ AC_MSG_ERROR([frr-format plugin requested but not found])
+ fi
+ ],,[
+#ifndef _FRR_ATTRIBUTE_PRINTFRR
+#error plugin not loaded
+#endif
+#if _FRR_ATTRIBUTE_PRINTFRR < 0x10000
+#error plugin too old
+#endif
+ ])
+ ],,[
+#ifndef _FRR_ATTRIBUTE_PRINTFRR
+#error plugin not loaded
+#endif
+#if _FRR_ATTRIBUTE_PRINTFRR < 0x10000
+#error plugin too old
+#endif
+ ])
+fi
+
dnl ----------
dnl Essentials
dnl ----------
_LT_CONFIG_LIBTOOL([
patch -N -i "${srcdir}/m4/libtool-whole-archive.patch" libtool >&AS_MESSAGE_LOG_FD || \
AC_MSG_WARN([Could not patch libtool for static linking support. Loading modules into a statically linked daemon will fail.])
+ sed -e 's%func_warning "relinking%true #\0%' -i libtool || true
+ sed -e 's%func_warning "remember to run%true #\0%' -i libtool || true
+ sed -e 's%func_warning ".*has not been installed in%true #\0%' -i libtool || true
])
if test "$enable_static_bin" = "yes"; then
AC_LDFLAGS="-static"
AS_HELP_STRING([--undefined-sanitizer], [enable UndefinedBehaviorSanitizer support for detecting undefined behavior]))
AC_ARG_WITH([crypto],
AS_HELP_STRING([--with-crypto=<internal|openssl>], [choose between different implementations of cryptographic functions(default value is --with-crypto=internal)]))
+AC_ARG_WITH([frr-format],
+ AS_HELP_STRING([--with-frr-format[=<.../frr-format.so>]], [use frr-format GCC plugin]))
#if openssl, else use the internal
AS_IF([test "$with_crypto" = "openssl"], [
enable_configfile_mask=${enable_configfile_mask:-0600}
AC_DEFINE_UNQUOTED([CONFIGFILE_MASK], [${enable_configfile_mask}], [Mask for config files])
+AC_SUBST([enable_configfile_mask])
enable_logfile_mask=${enable_logfile_mask:-0600}
AC_DEFINE_UNQUOTED([LOGFILE_MASK], [${enable_logfile_mask}], [Mask for log files])
AC_SUBST([EXTRAVERSION])
if test "$with_pkg_git_version" = "yes"; then
- if test -d "${srcdir}/.git"; then
+ if test -e "${srcdir}/.git"; then
AC_DEFINE([GIT_VERSION], [1], [include git version info])
else with_pkg_git_version="no"
AC_MSG_WARN([--with-pkg-git-version given, but this is not a git checkout])
AC_CHECK_HEADERS([pthread_np.h],,, [
#include <pthread.h>
])
-AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np])
+AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np pthread_getthreadid_np])
needsync=true
dnl ---------------
AC_CHECK_FUNCS([ \
strlcat strlcpy \
- getgrouplist])
+ getgrouplist \
+ openat \
+ unlinkat \
+ posix_fallocate \
+ ])
dnl ##########################################################################
dnl LARGE if block spans a lot of "configure"!
fi
if test "$backtrace_ok" = "no"; then
- case "$host_os" in
- sunos* | solaris2*)
- AC_CHECK_FUNCS([printstack], [
- AC_DEFINE([HAVE_PRINTSTACK], [1], [Solaris printstack])
+ AC_CHECK_HEADER([execinfo.h], [
+ AC_SEARCH_LIBS([backtrace], [execinfo], [
+ AC_DEFINE([HAVE_GLIBC_BACKTRACE], [1], [Glibc backtrace])
backtrace_ok=yes
- ])
- ;;
- esac
- if test "$backtrace_ok" = "no"; then
- AC_CHECK_HEADER([execinfo.h], [
- AC_SEARCH_LIBS([backtrace], [execinfo], [
- AC_DEFINE([HAVE_GLIBC_BACKTRACE], [1], [Glibc backtrace])
- backtrace_ok=yes
- ],, [-lm])
- ])
- fi
+ ],, [-lm])
+ ])
fi
if test "$enable_backtrace" = "yes" -a "$backtrace_ok" = "no"; then
AM_CONDITIONAL([FABRICD], [test "$enable_fabricd" != "no"])
AM_CONDITIONAL([VRRPD], [test "$enable_vrrpd" != "no"])
-AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile])
+AC_CONFIG_FILES([Makefile],[
+ test "$enable_dev_build" = "yes" && makefile_devbuild="--dev-build"
+ ${PYTHON} "${ac_abs_top_srcdir}/python/makefile.py" ${makefile_devbuild} || exit 1
+], [
+ PYTHON="$PYTHON"
+ enable_dev_build="$enable_dev_build"
+])
AC_CONFIG_FILES([
config.version