enable_largefile
enable_strict_dependencies
enable_werror
+enable_llvm_address_sanitizer
enable_openssl_version_check
with_rlm_FOO_lib_dir
with_rlm_FOO_include_dir
--disable-largefile omit support for large files
--enable-strict-dependencies fail configure on lack of module dependancy.
--enable-werror causes the build to fail if any warnings are generated.
+ --enable-llvm-address-sanitizer
+ build with support for LLVM's address sanitizer (if
+ building with clang).
--disable-openssl-version-check
disable vulnerable OpenSSL version check
fi
+# Check whether --enable-llvm-address-sanitizer was given.
+if test "${enable_llvm_address_sanitizer+set}" = set; then :
+ enableval=$enable_llvm_address_sanitizer; case "$enableval" in
+ no)
+ llvm_address_sanitizer=no
+ ;;
+ *)
+ llvm_address_sanitizer=yes
+ esac
+
+fi
+
+
# Check whether --enable-openssl-version-check was given.
if test "${enable_openssl_version_check+set}" = set; then :
enableval=$enable_openssl_version_check;
fi
fi
+ if test "x$llvm_address_sanitizer" = "xyes" && test "x$ax_cv_cc_clang" = "xyes"; then
+ devcflags="$devcflags -fsanitize=address -fno-omit-frame-pointer"
+ devldflags="$devldflags -fsanitize=address"
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devcflags\"" >&5
$as_echo "$as_me: Developer CFLAGS are \"$devcflags\"" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Developer LDFLAGS are \"$devldflags\"" >&5
$as_echo "$as_me: Developer LDFLAGS are \"$devldflags\"" >&6;}
CFLAGS="$CFLAGS $devcflags"
+ LDFLAGS="$LDFLAGS $devldflags"
+
if test "x$EXPERIMENTAL" != "xno"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5
$as_echo "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;}
esac ]
)
+dnl #
+dnl # Enable the -fsanitize=address and link in the address sanitizer
+dnl # libraries.
+dnl #
+AC_ARG_ENABLE(llvm-address-sanitizer,
+[AS_HELP_STRING([--enable-llvm-address-sanitizer],
+ [build with support for LLVM's address sanitizer (if building with clang).])],
+[ case "$enableval" in
+ no)
+ llvm_address_sanitizer=no
+ ;;
+ *)
+ llvm_address_sanitizer=yes
+ esac ]
+)
+
dnl #
dnl # extra argument: --disable-openssl-version-check
dnl #
fi
fi
+ dnl #
+ dnl # If running with clang, add in ASAN
+ dnl #
+ if test "x$llvm_address_sanitizer" = "xyes" && test "x$ax_cv_cc_clang" = "xyes"; then
+ devcflags="$devcflags -fsanitize=address -fno-omit-frame-pointer"
+ devldflags="$devldflags -fsanitize=address"
+ fi
+
AC_MSG_NOTICE([Developer CFLAGS are "$devcflags"])
AC_MSG_NOTICE([Developer LDFLAGS are "$devldflags"])
CFLAGS="$CFLAGS $devcflags"
+ LDFLAGS="$LDFLAGS $devldflags"
+
dnl #
dnl # Enable experimental modules (we want to know if code changes breaks one of them)
dnl #
#!/bin/sh -e
+enable_llvm_address_sanitizer=""
+
#
# If this Travis matrix element does not require the build, we still need to run
# configure to make sure any autoconf generated files (tls-h et al) are still
exit 0
fi
+#
+# Enable address sanitizer for the clang builds
+#
+if $CC -v 2>&1 | grep clang > /dev/null; then
+ enable_address_sanitizer="--enable-llvm-address-sanitizer"
+else
+ enable_address_sanitizer=""
+fi
+
#
# Configure the server as per the build matrix
#
-# We specify -with-rlm-python-bin because Otherwise travis picks up
+# We specify -with-rlm-python-bin because Otherwise travis picks up
# /opt/python, which doesn't have .so available
#
echo "Performing full configuration"
CFLAGS="${BUILD_CFLAGS}" ./configure -C \
--enable-werror \
+ $enable_address_sanitizer \
--prefix=$HOME/freeradius \
--with-shared-libs=$LIBS_SHARED \
--with-threads=$LIBS_OPTIONAL \