diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-06-28 16:03:05 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-06-28 16:03:05 +0200 |
commit | 6c5a33501453e7e76cb5c1ad836a7ad4f0a69bf5 (patch) | |
tree | e34bff14ad66c192a4e354b667dd135d7c7407a5 /configure.ac | |
parent | 833db52c5cb38c0ae61f80db98191eea08e2f6f3 (diff) |
detect -isystem
The base part of 151abb8b2b9d3a22229b98cec12e29484d12109b (and follow-up)
fixes, for other commits using ISYSTEM.
Change-Id: I9ab1ef95ec02ad30f943084161f76da1b2985b88
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e4c6827059ce..e05fc8184f23 100644 --- a/configure.ac +++ b/configure.ac @@ -2883,6 +2883,26 @@ AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED) AC_SUBST(XCRUN) AC_SUBST(MACOSX_CODESIGNING_IDENTITY) +# Use -isystem (gcc) if possible, to avoid warnigs in 3rd party headers. +ISYSTEM= +if test "$GCC" = "yes"; then + AC_MSG_CHECKING( for -isystem ) + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM=-isystem ],[]) + CFLAGS=$save_CFLAGS + if test -n "$ISYSTEM"; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi +fi +if test -z "$ISYSTEM"; then + # fall back to using -I + ISYSTEM=-I +fi +AC_SUBST(ISYSTEM) + dnl =================================================================== dnl Windows specific tests and stuff dnl =================================================================== |