X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=972fc2f6bf83d6141b3315b4ed196cf5a35746e2;hp=3ced6cf3d503d2f80aa95c9d533e115becd21637;hb=127dc4ea9487397b1ab70447e2f44d091e44ab5f;hpb=5f381b355a95b953654e46ba3ccdc81bdec165ea diff --git a/configure.ac b/configure.ac index 3ced6cf3d..972fc2f6b 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) @@ -430,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]), @@ -827,6 +819,31 @@ if test "x$enable_timedated" != "xno"; then fi AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"]) +# ------------------------------------------------------------------------------ +have_timesyncd=no +AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon])) +if test "x$enable_timesyncd" != "xno"; then + have_timesyncd=yes +fi +AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"]) + +AC_ARG_WITH(ntp-servers, + AS_HELP_STRING([--with-ntp-servers=NTPSERVERS], + [Space-separated list of default NTP servers]), + [NTP_SERVERS="$withval"], + [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"]) + +AC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers]) +AC_SUBST(NTP_SERVERS) + +AC_ARG_WITH(time-epoch, + AS_HELP_STRING([--with-time-epoch=SECONDS], + [TIme epoch for time clients]), + [TIME_EPOCH="$withval"], + [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"]) + +AC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch]) + # ------------------------------------------------------------------------------ have_localed=no AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon])) @@ -1130,7 +1147,6 @@ AC_MSG_RESULT([ $PACKAGE_NAME $VERSION libcryptsetup: ${have_libcryptsetup} - tcpwrap: ${have_tcpwrap} PAM: ${have_pam} AUDIT: ${have_audit} IMA: ${have_ima} @@ -1159,6 +1175,9 @@ AC_MSG_RESULT([ machined: ${have_machined} hostnamed: ${have_hostnamed} timedated: ${have_timedated} + timesyncd: ${have_timesyncd} + default NTP servers: ${NTP_SERVERS} + time epoch: ${TIME_EPOCH} localed: ${have_localed} networkd: ${have_networkd} coredump: ${have_coredump}