diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2013-03-17 15:36:42 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2013-03-17 15:36:42 +0000 |
| commit | f8538abbd590cbc70de5d8d4177acd63a7f26a80 (patch) | |
| tree | 69c3a8d40f3f06c36800fe08022717872a26d336 | |
| parent | cppcheck (diff) | |
| download | inkscape-f8538abbd590cbc70de5d8d4177acd63a7f26a80.tar.gz inkscape-f8538abbd590cbc70de5d8d4177acd63a7f26a80.zip | |
Explicitly test for -Wno-unused-but-set-variable compiler option
(bzr r12219)
| -rw-r--r-- | configure.ac | 12 | ||||
| -rw-r--r-- | src/libgdl/Makefile_insert | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index cc2c19e8a..31c06fead 100644 --- a/configure.ac +++ b/configure.ac @@ -112,8 +112,18 @@ if test "$GCC" = "yes"; then CFLAGS="$ink_svd_CFLAGS" fi - AM_CONDITIONAL(CC_W_NO_SUPPORTED, test "$ink_opt_ok" = "yes") + # This Automake variable is only used to suppress warnings in our internal + # fork of GDL. Once we get rid of our GDL fork, we can delete this test + AC_MSG_CHECKING([compiler support for -Wno-unused-but-set-variable]) + ink_svd_CFLAGS="$CFLAGS" + CFLAGS="-Wno-unused-but-set-variable $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no]) + AC_MSG_RESULT([$ink_opt_ok]) + CFLAGS="$ink_svd_CFLAGS" + AM_CONDITIONAL(CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED, test "$ink_opt_ok" = "yes") + + #### # Linker flags... diff --git a/src/libgdl/Makefile_insert b/src/libgdl/Makefile_insert index e92223f0b..6669a28fa 100644 --- a/src/libgdl/Makefile_insert +++ b/src/libgdl/Makefile_insert @@ -44,12 +44,14 @@ libgdl/all: libgdl/libgdl.a libgdl/clean: rm -f libgdl/libgdl.a $(libgdl_gdl_a_OBJECTS) -if CC_W_NO_SUPPORTED # Suppress some non-critical warnings for libgdl. We will drop our forked copy # of GDL once we upgrade to Gtk+ 3 so it's more important to minimise the number # of changes we make to GDL than to fix these minor issues in trunk. +if CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED libgdl_libgdl_a_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-variable $(AM_CFLAGS) +else +libgdl_libgdl_a_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable $(AM_CFLAGS) endif libgdl_libgdl_a_SOURCES = \ |
