chiark / gitweb /
logind: make VT numbers unsigned
[elogind.git] / configure.ac
index 7794541964c4e9e215171c7d81fa84759f7c76ea..f1b00c5aee7b3e38f4d05a784a91dc6e45383da6 100644 (file)
@@ -128,7 +128,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wold-style-definition \
         -Wpointer-arith \
         -Winit-self \
-        -Wdeclaration-after-statement \
         -Wfloat-equal \
         -Wmissing-prototypes \
         -Wstrict-prototypes \
@@ -156,6 +155,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -fdata-sections \
         -fstack-protector \
         --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")
 
 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],