X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=configure.ac;h=3566dac830a1d00bfc4eb24f3f0a535950c76015;hb=f4ddacbd4de0f159ec598f8ad690466a84787ec5;hp=7a3cd8751123a90439b8d1e9d9b35e2fecc7a68a;hpb=dee4c244254bb49d1ffa8bd7171ae9cce596d2d0;p=elogind.git 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], [\