X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=3566dac830a1d00bfc4eb24f3f0a535950c76015;hp=7a3cd8751123a90439b8d1e9d9b35e2fecc7a68a;hb=6a17986542912ed80d9fdc1b6eaa6d48fdd5d02d;hpb=b37844d3d72af3afbcb801476cf07c085519f392 diff --git a/configure.ac b/configure.ac index 7a3cd8751..3566dac83 100644 --- a/configure.ac +++ b/configure.ac @@ -167,8 +167,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], [\