aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-19 21:21:32 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-19 21:21:32 +0800
commit3560966d1492dc788eb089116c1d077043176b1e (patch)
treee989db41ba506fde9c7bea46a210c2ecac7c3473 /configure.ac
parent86853c6e1768fc5e6aa86454f60d4a4b976ee290 (diff)
downloadgsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.tar
gsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.tar.gz
gsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.tar.bz2
gsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.tar.lz
gsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.tar.xz
gsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.tar.zst
gsoc2013-epiphany-3560966d1492dc788eb089116c1d077043176b1e.zip
Check for -Wdeclaration-after-statement, it's not universally available.
2004-12-19 Christian Persch <chpe@cvs.gnome.org> * configure.ac: Check for -Wdeclaration-after-statement, it's not universally available.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 26 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 53ff7e214..1f2cd84fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AM_MAINTAINER_MODE
if test "x$enable_maintainer_mode" = "xyes"; then
AC_DEFINE([MAINTAINER_MODE],[1],[Define to enable 'maintainer-only' behaviour])
enable_debug=yes
- MORE_WARN_FLAGS="-Wdeclaration-after-statement"
+ MORE_WARN_FLAGS=
DEPRECATION_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED"
MOZILLA_WARN_CXXFLAGS="-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
fi
@@ -135,6 +135,30 @@ dnl ******************
AC_CHECK_FUNCS([mkdtemp])
+dnl Check for -Wdeclaration-after-statement (since gcc 3.4)
+
+if test "x$enable_maintainer_mode" = "xyes"; then
+
+ AC_LANG_PUSH([C])
+ FLAGS="-Wdeclaration-after-statement"
+ _SAVE_AM_CFLAGS=$AM_CFLAGS
+ AM_CFLAGS="$AM_CFLAGS $FLAGS"
+
+ AC_CACHE_CHECK([for compiler $FLAGS option],
+ ac_cv_have_declaration_after_statement,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[int main () { return 0; }]])],
+ [ac_cv_have_declaration_after_statement="yes"],
+ [ac_cv_have_declaration_after_statement="no"],
+ [ac_cv_have_declaration_after_statement="maybe"])])
+
+ if test "x$ac_cv_have_declaration_after_statement" = "xyes"; then
+ MORE_WARN_FLAGS="$MORE_WARN_FLAGS $FLAGS"
+ fi
+ AM_CFLAGS="$_SAVE_AM_CFLAGS"
+ AC_LANG_POP([C])
+fi
+
dnl ******************
dnl Mozilla name check
dnl ******************
@@ -494,6 +518,7 @@ AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS $MOZILLA_WARN_CXXFLAGS"
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
+AC_SUBST([AM_LDFLAGS])
dnl *******************************
dnl Internationalization