Skip to content

Commit c65923b

Browse files
committed
configure: move to AC_COMPILE_IFELSE
from AC_PREPROC_IFELSE which is strongly discouraged. Our detection system was very weak and recent versions of clang did show that PREPROC_IFELFE (cpp) would enable warning options that the compiler does not support (clang). Use a full compilation test to detect what works and what doesn't. Based on knet patch 88491f27375a9e8aceb946853a1abf4d23ebb8f3. Signed-off-by: Jan Friesse <[email protected]> Reviewed-by: Fabio M. Di Nitto <[email protected]>
1 parent d146bfa commit c65923b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ cc_supports_flag() {
112112
BACKUP="$CPPFLAGS"
113113
CPPFLAGS="$CPPFLAGS $@ $unknown_warnings_as_errors"
114114
AC_MSG_CHECKING([whether $CC supports "$@"])
115-
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
115+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
116116
[RC=0; AC_MSG_RESULT([yes])],
117117
[RC=1; AC_MSG_RESULT([no])])
118118
CPPFLAGS="$BACKUP"

0 commit comments

Comments
 (0)