X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=58bba54c6e14fda164521fe9e589890d9dcfc709;hp=ae5a6b5a30919a63a7aac63f661fa719ca07af9f;hb=d96e629fd7a29323ab19917d5afeb05adc62b373;hpb=6bf6f402b67b51d55765cbf3d1c7cb707a346969 diff --git a/configure.ac b/configure.ac index ae5a6b5a3..58bba54c6 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([systemd], - [211], + [212], [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], [systemd], [http://www.freedesktop.org/wiki/Software/systemd]) @@ -114,6 +114,23 @@ AS_IF([test "x$enable_address_sanitizer" = "xyes"], [ address_sanitizer_ldflags="-Wc,-fsanitize=address" ]) +undefined_sanitizer_cflags= +undefined_sanitizer_cppflags= +undefined_sanitizer_ldflags= +AC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined])) +AS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [ + CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined]) + AS_IF([test -z "$with_us_cflags"], + [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])]) + undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1" + undefined_sanitizer_cppflags="-DVALGRIND=1" + undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined" + ]) + +sanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags" +sanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags" +sanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags" + CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -pipe \ -Wall \ @@ -156,18 +173,19 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -ffunction-sections \ -fdata-sections \ -fstack-protector \ + -fstack-protector-strong \ --param=ssp-buffer-size=4]) AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -flto])], [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) -AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags") +AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags") AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ -Wp,-D_FORTIFY_SOURCE=2])], [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) -AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $address_sanitizer_cppflags") +AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags") CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ -Wl,--as-needed \ @@ -176,7 +194,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ -Wl,-z,relro \ -Wl,-z,now \ -Wl,-fuse-ld=gold]) -AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags") +AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags") AC_CHECK_SIZEOF(pid_t) AC_CHECK_SIZEOF(uid_t) @@ -241,11 +259,12 @@ LIBS="$save_LIBS" AC_CHECK_FUNCS([fanotify_init fanotify_mark]) AC_CHECK_FUNCS([__secure_getenv secure_getenv]) -AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns], [], [], [[#include +AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], [], [], [[#include #include #include #include -#include ]]) +#include +#include ]]) # This makes sure pkg.m4 is available. m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) @@ -429,32 +448,6 @@ if test "x$enable_xz" != "xno"; then fi AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"]) -# ------------------------------------------------------------------------------ -AC_ARG_ENABLE([tcpwrap], - AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]), - [case "${enableval}" in - yes) have_tcpwrap=yes ;; - no) have_tcpwrap=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;; - esac], - [have_tcpwrap=auto]) - -if test "x${have_tcpwrap}" != xno ; then - ACX_LIBWRAP - if test "x${LIBWRAP_LIBS}" = x ; then - if test "x$have_tcpwrap" = xyes ; then - AC_MSG_ERROR([*** TCP wrappers support not found.]) - fi - have_tcpwrap=no - else - M4_DEFINES="$M4_DEFINES -DHAVE_LIBWRAP" - have_tcpwrap=yes - fi -else - LIBWRAP_LIBS= -fi -AC_SUBST(LIBWRAP_LIBS) - # ------------------------------------------------------------------------------ AC_ARG_ENABLE([pam], AS_HELP_STRING([--disable-pam],[Disable optional PAM support]), @@ -700,7 +693,7 @@ AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"]) have_microhttpd=no AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) if test "x$enable_microhttpd" != "xno"; then - PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5], + PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33], [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no) if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) @@ -708,6 +701,18 @@ if test "x$enable_microhttpd" != "xno"; then fi AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) +# ------------------------------------------------------------------------------ +have_gnutls=no +AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support])) +if test "x$enable_gnutls" != "xno"; then + PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4], + [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no) + if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then + AC_MSG_ERROR([*** gnutls support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"]) + # ------------------------------------------------------------------------------ have_binfmt=no AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) @@ -1117,7 +1122,6 @@ AC_MSG_RESULT([ $PACKAGE_NAME $VERSION libcryptsetup: ${have_libcryptsetup} - tcpwrap: ${have_tcpwrap} PAM: ${have_pam} AUDIT: ${have_audit} IMA: ${have_ima} @@ -1132,6 +1136,7 @@ AC_MSG_RESULT([ QRENCODE: ${have_qrencode} MICROHTTPD: ${have_microhttpd} CHKCONFIG: ${have_chkconfig} + GNUTLS: ${have_gnutls} binfmt: ${have_binfmt} vconsole: ${have_vconsole} readahead: ${have_readahead}