[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - config_host.mk.in configure.ac

Luboš Luňák l.lunak at suse.cz
Fri Jun 28 07:08:18 PDT 2013


 config_host.mk.in |    1 +
 configure.ac      |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 892a0921f23bddd83a8c9066bfcb4c7338150dd3
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Jun 28 16:03:05 2013 +0200

    detect -isystem
    
    The base part of 151abb8b2b9d3a22229b98cec12e29484d12109b (and follow-up)
    fixes, for other commits using ISYSTEM.
    
    Change-Id: I9ab1ef95ec02ad30f943084161f76da1b2985b88
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/config_host.mk.in b/config_host.mk.in
index 17ab6a6..bcb016d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -258,6 +258,7 @@ export INPATH_FOR_BUILD=@INPATH_FOR_BUILD@
 export INSTALLDIR=@INSTALLDIR@
 export INSTALLDIRNAME=@INSTALLDIRNAME@
 export INTRO_BITMAP=@INTRO_BITMAP@
+export ISYSTEM=@ISYSTEM@
 export JAVAIFLAGS=@JAVAIFLAGS@
 export JAVAINTERPRETER=@JAVAINTERPRETER@
 export JAVACISGCJ=@JAVACISGCJ@
diff --git a/configure.ac b/configure.ac
index 06e7954..e97379d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2860,6 +2860,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 ===================================================================


More information about the Libreoffice-commits mailing list