diff --git a/NEWS b/NEWS index 0c77f8dd7..b0217a429 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ Changes in 3.0.9 (since 3.0.8) (https://bugs.gnu.org/54198) ** psyntax honors source properties coming from read hash extensions (https://bugs.gnu.org/54003) +** ./configure checks whether the linker supports '-flto' (needed on macOS) Changes in 3.0.8 (since 3.0.7) diff --git a/configure.ac b/configure.ac index ad7ff12c6..30229489d 100644 --- a/configure.ac +++ b/configure.ac @@ -69,7 +69,7 @@ AC_MSG_CHECKING([whether the compiler supports -flto]) old_CFLAGS="$CFLAGS" LTO_CFLAGS="-flto" CFLAGS="$CFLAGS $LTO_CFLAGS" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo;])],, [LTO_CFLAGS=]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([int foo;], [])],, [LTO_CFLAGS=]) CFLAGS="$old_CFLAGS" if test -n "$LTO_CFLAGS"; then AC_MSG_RESULT([yes])