X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=540bfa47a5fc1a8f316246b0f69461ac8561d506;hp=7a3cd8751123a90439b8d1e9d9b35e2fecc7a68a;hb=f4ce2b3e5ce93b83f14f8785e205ebb5a9b8c1df;hpb=dee4c244254bb49d1ffa8bd7171ae9cce596d2d0 diff --git a/configure.ac b/configure.ac index 7a3cd8751..540bfa47a 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" || test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"], [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])]) +SD_CHECK_MAX_INT_SIZE([time_t], [#include ]) LT_PREREQ(2.2) LT_INIT([disable-static]) @@ -167,8 +168,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ --param=ssp-buffer-size=4]) AC_SUBST([OUR_CFLAGS], $with_cflags) -CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ - -Wp,-D_FORTIFY_SOURCE=2]) +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) CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\