[libgda] Enable compiler warnings by default



commit a782d063514779553fb8261e71b796ff61e44332
Author: David King <davidk openismus com>
Date:   Fri Dec 10 14:00:16 2010 +0100

    Enable compiler warnings by default
    
    Add dk-warn.m4 and use in configure.ac to create LIBGDA_WFLAGS variable.
    Use the variable in any Makefile.am that also uses LIBGDA_CFLAGS.

 configure.ac                                     |    5 +
 control-center/Makefile.am                       |    1 +
 libgda-report/DocBook/Makefile.am                |    3 +-
 libgda-report/Makefile.am                        |    3 +-
 libgda-report/RML/Makefile.am                    |    3 +-
 libgda-report/engine/Makefile.am                 |    3 +-
 libgda-ui/Makefile.am                            |    1 +
 libgda-ui/data-entries/Makefile.am               |    1 +
 libgda-ui/data-entries/plugins/Makefile.am       |    1 +
 libgda-ui/demos/Makefile.am                      |    1 +
 libgda-ui/internal/Makefile.am                   |    1 +
 libgda-ui/marshallers/Makefile.am                |    3 +-
 libgda-xslt/Makefile.am                          |    2 +-
 libgda/Makefile.am                               |    1 +
 libgda/binreloc/Makefile.am                      |    1 +
 libgda/handlers/Makefile.am                      |    3 +-
 libgda/providers-support/Makefile.am             |    3 +-
 libgda/sql-parser/Makefile.am                    |    3 +-
 libgda/sqlite/Makefile.am                        |    1 +
 libgda/sqlite/virtual/Makefile.am                |    1 +
 libgda/thread-wrapper/Makefile.am                |    5 +-
 m4/dk-warn.m4                                    |  110 ++++++++++++++++++++++
 providers/bdb/Makefile.am                        |    1 +
 providers/bdbsql/Makefile.am                     |    1 +
 providers/firebird/Makefile.am                   |    2 +-
 providers/jdbc/Makefile.am                       |    2 +-
 providers/mdb/Makefile.am                        |    1 +
 providers/mysql/Makefile.am                      |    2 +-
 providers/oracle/Makefile.am                     |    1 +
 providers/postgres/Makefile.am                   |    2 +-
 providers/reuseable/Makefile.am                  |    3 +-
 providers/skel-implementation/capi/Makefile.am   |    2 +-
 providers/skel-implementation/models/Makefile.am |    3 +-
 providers/sqlcipher/Makefile.am                  |    1 +
 providers/sqlite/Makefile.am                     |    1 +
 providers/web/Makefile.am                        |    2 +-
 testing/Makefile.am                              |    3 +-
 tests/Makefile.am                                |    1 +
 tests/data-models/Makefile.am                    |    1 +
 tests/meta-store/Makefile.am                     |    3 +-
 tests/multi-threading/Makefile.am                |    1 +
 tests/parser/Makefile.am                         |    1 +
 tests/providers/Makefile.am                      |    1 +
 tests/value-holders/Makefile.am                  |    1 +
 tools/Makefile.am                                |    1 +
 tools/browser/Makefile.am                        |    1 +
 tools/browser/canvas/Makefile.am                 |    1 +
 tools/browser/common/Makefile.am                 |    1 +
 tools/browser/data-manager/Makefile.am           |    3 +-
 tools/browser/doc/Makefile.am                    |    1 +
 tools/browser/dummy-perspective/Makefile.am      |    1 +
 tools/browser/query-exec/Makefile.am             |    1 +
 tools/browser/schema-browser/Makefile.am         |    1 +
 53 files changed, 181 insertions(+), 22 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 005b166..93f2425 100644
--- a/configure.ac
+++ b/configure.ac
@@ -742,6 +742,11 @@ AC_ARG_ENABLE(default-binary,
 
 AM_CONDITIONAL(DEFAULT_BINARY, test "x$enable_default_binary" = xyes)
 
+DK_ARG_ENABLE_WARNINGS([LIBGDA_WFLAGS],
+	[-Wall],
+	[-Wall -Wextra],
+	[PANGO G GDK GDK_PIXBUF GTK])
+
 AC_SUBST(LIBGDA_CFLAGS)
 AC_SUBST(LIBGDA_LIBS)
 
diff --git a/control-center/Makefile.am b/control-center/Makefile.am
index 721b7e3..522fab2 100644
--- a/control-center/Makefile.am
+++ b/control-center/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
         -I$(top_srcdir)/libgda \
         -I$(top_builddir) \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
         $(GTK_CFLAGS) \
         $(UNIQUE_CFLAGS) \
         -DPREFIX=\""$(prefix)"\" \
diff --git a/libgda-report/DocBook/Makefile.am b/libgda-report/DocBook/Makefile.am
index 490800e..7628d7c 100644
--- a/libgda-report/DocBook/Makefile.am
+++ b/libgda-report/DocBook/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
-	$(LIBGDA_CFLAGS) 
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 gda_report_headers = \
 	gda-report-docbook-document.h
diff --git a/libgda-report/Makefile.am b/libgda-report/Makefile.am
index 01f14b4..0df7a49 100644
--- a/libgda-report/Makefile.am
+++ b/libgda-report/Makefile.am
@@ -8,7 +8,8 @@ AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
-	$(LIBGDA_CFLAGS) 
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 report_headers = \
 	gda-report-document.h
diff --git a/libgda-report/RML/Makefile.am b/libgda-report/RML/Makefile.am
index c3e7cd4..154d484 100644
--- a/libgda-report/RML/Makefile.am
+++ b/libgda-report/RML/Makefile.am
@@ -8,7 +8,8 @@ AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
-	$(LIBGDA_CFLAGS) 
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 gda_report_headers = \
 	gda-report-rml-document.h
diff --git a/libgda-report/engine/Makefile.am b/libgda-report/engine/Makefile.am
index 3621598..1f6bcf2 100644
--- a/libgda-report/engine/Makefile.am
+++ b/libgda-report/engine/Makefile.am
@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_srcdir)/libgda/sqlite \
-	$(LIBGDA_CFLAGS)
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 gda_report_headers = \
 	gda-report-engine.h
diff --git a/libgda-ui/Makefile.am b/libgda-ui/Makefile.am
index 0646443..7a86078 100644
--- a/libgda-ui/Makefile.am
+++ b/libgda-ui/Makefile.am
@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
 	-DPLUGINSDIR=\""$(top_builddir)/libgda-ui/plugins/.libs"\" \
 	-DGDA_ABI_VERSION=\""$(GDA_ABI_VERSION)"\" \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GIO_CFLAGS)
 
diff --git a/libgda-ui/data-entries/Makefile.am b/libgda-ui/data-entries/Makefile.am
index 4f7f7f8..58cbb3a 100644
--- a/libgda-ui/data-entries/Makefile.am
+++ b/libgda-ui/data-entries/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
         -I$(top_srcdir) -I$(top_srcdir)/libgda -I$(srcdir)/.. \
         -I$(top_builddir) -I$(top_builddir)/libgda-ui \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
         $(GTK_CFLAGS) \
 	$(GIO_CFLAGS) \
         -DPREFIX=\""$(prefix)"\" \
diff --git a/libgda-ui/data-entries/plugins/Makefile.am b/libgda-ui/data-entries/plugins/Makefile.am
index 344553c..cbdf36d 100644
--- a/libgda-ui/data-entries/plugins/Makefile.am
+++ b/libgda-ui/data-entries/plugins/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
         -I$(top_srcdir) -I$(top_srcdir)/libgda -I$(srcdir)/.. \
         -I$(top_builddir) \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
         $(GTK_CFLAGS) \
 	$(LIBGCRYPT_CFLAGS) \
 	$(GTKSOURCEVIEW_CFLAGS) \
diff --git a/libgda-ui/demos/Makefile.am b/libgda-ui/demos/Makefile.am
index 80b9d2c..9019b43 100644
--- a/libgda-ui/demos/Makefile.am
+++ b/libgda-ui/demos/Makefile.am
@@ -38,6 +38,7 @@ AM_CPPFLAGS = \
         -I$(top_builddir) \
 	-I$(top_builddir)/libgda \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
         $(GTK_CFLAGS) \
         -DPREFIX=\""$(prefix)"\" \
         -DSYSCONFDIR=\""$(sysconfdir)"\" \
diff --git a/libgda-ui/internal/Makefile.am b/libgda-ui/internal/Makefile.am
index d40534a..5ce02b8 100644
--- a/libgda-ui/internal/Makefile.am
+++ b/libgda-ui/internal/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS)
 
 libgda_ui_internal_la_SOURCES = \
diff --git a/libgda-ui/marshallers/Makefile.am b/libgda-ui/marshallers/Makefile.am
index aa7f384..aa70013 100644
--- a/libgda-ui/marshallers/Makefile.am
+++ b/libgda-ui/marshallers/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
-	$(LIBGDA_CFLAGS)
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 gdaui-marshal.h: gdaui-marshal.list $(GLIB_GENMARSHAL)
 	$(GLIB_GENMARSHAL) $< --header --prefix=_gdaui_marshal > $@
diff --git a/libgda-xslt/Makefile.am b/libgda-xslt/Makefile.am
index 5f1ece5..53ef962 100644
--- a/libgda-xslt/Makefile.am
+++ b/libgda-xslt/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = \
         -I$(top_srcdir) \
         -I$(top_srcdir)/libgda/sqlite \
 	-I$(top_srcdir)/libgda \
-        $(LIBGDA_CFLAGS) $(LIBXSLT_CFLAGS)
+        $(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) $(LIBXSLT_CFLAGS)
 
 gda_xslt_headers = \
         libgda-xslt.h
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index fdeaab7..2dd485a 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-DABI_VERSION=\""$(GDA_ABI_VERSION)"\" \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(BDB_CFLAGS) \
 	-DBDB_LIB=\""$(BDB_LIB)"\" \
 	$(GIO_CFLAGS) $(GNOME_KEYRING_CFLAGS)
diff --git a/libgda/binreloc/Makefile.am b/libgda/binreloc/Makefile.am
index 07e1e3f..1b7b631 100644
--- a/libgda/binreloc/Makefile.am
+++ b/libgda/binreloc/Makefile.am
@@ -4,6 +4,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(BINRELOC_CFLAGS) \
 	-DLIBGDAPREFIX=\""$(prefix)"\" \
 	-DLIBGDADATA=\""$(datadir)"\" \
diff --git a/libgda/handlers/Makefile.am b/libgda/handlers/Makefile.am
index 35a1ecc..72dc315 100644
--- a/libgda/handlers/Makefile.am
+++ b/libgda/handlers/Makefile.am
@@ -3,7 +3,8 @@ noinst_LTLIBRARIES = libgda_handlers-4.0.la
 AM_CPPFLAGS = \
         -I$(top_srcdir) -I$(srcdir)/.. \
         -I$(top_builddir) \
-        $(LIBGDA_CFLAGS) 
+        $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 libgda_handlers_headers = \
 	gda-handler-bin.h \
diff --git a/libgda/providers-support/Makefile.am b/libgda/providers-support/Makefile.am
index 8ef4fc5..1727fcf 100644
--- a/libgda/providers-support/Makefile.am
+++ b/libgda/providers-support/Makefile.am
@@ -4,7 +4,8 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) 
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 psupport_headers = \
 	gda-data-select-priv.h \
diff --git a/libgda/sql-parser/Makefile.am b/libgda/sql-parser/Makefile.am
index 6aacb20..af398fb 100644
--- a/libgda/sql-parser/Makefile.am
+++ b/libgda/sql-parser/Makefile.am
@@ -4,7 +4,8 @@ noinst_PROGRAMS =
 AM_CPPFLAGS = \
 	-I$(top_srcdir) -I$(srcdir)/.. \
         -I$(top_builddir) \
-        $(LIBGDA_CFLAGS)
+        $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGDS)
 
 lemon$(EXEEXT_FOR_BUILD): lemon.c
 	$(CC_FOR_BUILD) -o lemon$(EXEEXT_FOR_BUILD) $(srcdir)/lemon.c
diff --git a/libgda/sqlite/Makefile.am b/libgda/sqlite/Makefile.am
index b3bf302..a701209 100644
--- a/libgda/sqlite/Makefile.am
+++ b/libgda/sqlite/Makefile.am
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(SQLITE_CFLAGS) \
 	$(sqliteinc) 
 
diff --git a/libgda/sqlite/virtual/Makefile.am b/libgda/sqlite/virtual/Makefile.am
index d0d363e..1864efd 100644
--- a/libgda/sqlite/virtual/Makefile.am
+++ b/libgda/sqlite/virtual/Makefile.am
@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(SQLITE_CFLAGS) \
 	-I$(top_srcdir)/libgda/sqlite \
         -I$(top_builddir)/libgda/sqlite \
diff --git a/libgda/thread-wrapper/Makefile.am b/libgda/thread-wrapper/Makefile.am
index 6a4fb0b..2c3c452 100644
--- a/libgda/thread-wrapper/Makefile.am
+++ b/libgda/thread-wrapper/Makefile.am
@@ -4,7 +4,8 @@ AM_CPPFLAGS = \
         -I$(top_srcdir) -I$(srcdir)/.. \
 	-I$(top_srcdir)/libgda/sqlite \
         -I$(top_builddir) \
-        $(LIBGDA_CFLAGS) 
+        $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 libgda_threadwrapper_headers = \
 	gda-thread-wrapper.h
@@ -22,4 +23,4 @@ libgda_threadwrapper_4_0_la_SOURCES = \
 	gda-thread-provider.c \
 	gda-thread-recordset.h \
 	gda-thread-recordset.c \
-	gda-thread-wrapper.c
\ No newline at end of file
+	gda-thread-wrapper.c
diff --git a/m4/dk-warn.m4 b/m4/dk-warn.m4
new file mode 100644
index 0000000..788d5a4
--- /dev/null
+++ b/m4/dk-warn.m4
@@ -0,0 +1,110 @@
+## Copyright (c) 2004-2009  Daniel Elstner  <daniel kitta gmail com>
+##
+## This file is part of danielk's Autostuff.
+##
+## danielk's Autostuff is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as published
+## by the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## danielk's Autostuff is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with danielk's Autostuff; if not, see <http://www.gnu.org/licenses/>.
+
+#serial 20090528
+
+## DK_ARG_ENABLE_WARNINGS(variable, min-flags, max-flags, [deprecation-prefixes])
+##
+## Provide the --enable-warnings configure argument, set to "min" by default.
+## <min-flags> and <max-flags> should be space-separated lists of compiler
+## warning flags to use with --enable-warnings=min or --enable-warnings=max,
+## respectively.  Warning level "fatal" is the same as "max" but in addition
+## enables -Werror mode.
+##
+## If not empty, <deprecation-prefixes> should be a list of module prefixes
+## which is expanded to -D<module>_DISABLE_DEPRECATED flags if fatal warnings
+## are enabled, too.
+##
+AC_DEFUN([DK_ARG_ENABLE_WARNINGS],
+[dnl
+m4_if([$3],, [AC_FATAL([3 arguments expected])])[]dnl
+dnl
+AC_ARG_ENABLE([warnings], [AS_HELP_STRING(
+  [--enable-warnings=@<:@min|max|fatal|no@:>@],
+  [control compiler pickyness @<:@min@:>@])],
+  [dk_enable_warnings=$enableval],
+  [dk_enable_warnings=min])[]dnl
+
+dk_lang=
+case $ac_compile in
+  *'$CXXFLAGS '*)
+    dk_lang='C++'
+    dk_cc=$CXX
+    dk_conftest=conftest.${ac_ext-cc}
+    ;;
+  *'$CFLAGS '*)
+    dk_lang=C
+    dk_cc=$CC
+    dk_conftest=conftest.${ac_ext-c}
+    ;;
+esac
+
+AS_IF([test "x$dk_lang" != x],
+[
+  AC_MSG_CHECKING([which $dk_lang compiler warning flags to use])
+
+  dk_deprecation_flags=
+  dk_tested_flags=
+
+  case $dk_enable_warnings in
+    no)     dk_warning_flags=;;
+    max)    dk_warning_flags="$3";;
+    fatal)  dk_warning_flags="$3 -Werror"
+m4_if([$4],,, [dnl
+            for dk_prefix in $4
+            do
+              dk_deprecation_flags="${dk_deprecation_flags}-D${dk_prefix}_DISABLE_DEPRECATED "
+            done
+])[]dnl
+            ;;
+    *)      dk_warning_flags="$2";;
+  esac
+
+  AS_IF([test "x$dk_warning_flags" != x],
+  [
+    # Keep in mind that the dummy source must be devoid of any
+    # problems that might cause diagnostics.
+    AC_LANG_CONFTEST([AC_LANG_SOURCE(
+      [[int main(int argc, char** argv) { return (argv != 0) ? argc : 0; }]])])
+
+    for dk_flag in $dk_warning_flags
+    do
+      # Test whether the compiler accepts the flag.  GCC doesn't bail
+      # out when given an unsupported flag but prints a warning, so
+      # check the compiler output instead.
+      dk_cc_out=`$dk_cc $dk_tested_flags $dk_flag -c "$dk_conftest" 2>&1 || echo failed`
+      rm -f "conftest.${OBJEXT-o}"
+
+      AS_IF([test "x$dk_cc_out" = x],
+      [
+        AS_IF([test "x$dk_tested_flags" = x],
+              [dk_tested_flags=$dk_flag],
+              [dk_tested_flags="$dk_tested_flags $dk_flag"])
+      ], [
+        echo "$dk_cc_out" >&AS_MESSAGE_LOG_FD
+      ])
+    done
+
+    rm -f "$dk_conftest"
+  ])
+  dk_all_flags=$dk_deprecation_flags$dk_tested_flags
+  AC_SUBST([$1], [$dk_all_flags])
+
+  test "x$dk_all_flags" != x || dk_all_flags=none
+  AC_MSG_RESULT([$dk_all_flags])
+])
+])
diff --git a/providers/bdb/Makefile.am b/providers/bdb/Makefile.am
index ac36607..b132443 100644
--- a/providers/bdb/Makefile.am
+++ b/providers/bdb/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(BDB_CFLAGS)
 
 libgda_bdb_la_SOURCES = \
diff --git a/providers/bdbsql/Makefile.am b/providers/bdbsql/Makefile.am
index f4ddc71..ddac536 100644
--- a/providers/bdbsql/Makefile.am
+++ b/providers/bdbsql/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda/sqlite \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(BDBSQL_CFLAGS) \
 	$(sqliteinc) 
 
diff --git a/providers/firebird/Makefile.am b/providers/firebird/Makefile.am
index 5156d93..5af4c8d 100644
--- a/providers/firebird/Makefile.am
+++ b/providers/firebird/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) #$(FIREBIRD_CFLAGS) 
+	$(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) #$(FIREBIRD_CFLAGS) 
 
 # parser generation
 parser.c parser.h: parser.y $(top_builddir)/libgda/sql-parser/lemon$(EXEEXT_FOR_BUILD)
diff --git a/providers/jdbc/Makefile.am b/providers/jdbc/Makefile.am
index 6665fc2..afb6b7a 100644
--- a/providers/jdbc/Makefile.am
+++ b/providers/jdbc/Makefile.am
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) $(JAVA_CFLAGS) \
+	$(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) $(JAVA_CFLAGS) \
 	-DJVM_PATH=\""$(JAVA_LD_PATH)"\" \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
 
diff --git a/providers/mdb/Makefile.am b/providers/mdb/Makefile.am
index c27f427..774c67d 100644
--- a/providers/mdb/Makefile.am
+++ b/providers/mdb/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda/sqlite \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(MDB_CFLAGS) \
 	-DLIBGDA_DATA_DIR=\""$(datadir)/libgda-4.0"\"
 
diff --git a/providers/mysql/Makefile.am b/providers/mysql/Makefile.am
index 06a2569..9a0a4c6 100644
--- a/providers/mysql/Makefile.am
+++ b/providers/mysql/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	-I$(top_srcdir)/providers/reuseable/mysql \
-	$(LIBGDA_CFLAGS) $(MYSQL_CFLAGS) 
+	$(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) $(MYSQL_CFLAGS) 
 
 libgda_mysql_la_SOURCES = \
 	gda-mysql-blob-op.c \
diff --git a/providers/oracle/Makefile.am b/providers/oracle/Makefile.am
index 48059c0..2710dbc 100644
--- a/providers/oracle/Makefile.am
+++ b/providers/oracle/Makefile.am
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(ORACLE_CFLAGS) 
 
 keyword_files=keywords_8.list keywords_9.list
diff --git a/providers/postgres/Makefile.am b/providers/postgres/Makefile.am
index 33f9d0e..4cb0a5a 100644
--- a/providers/postgres/Makefile.am
+++ b/providers/postgres/Makefile.am
@@ -6,7 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	-I$(top_srcdir)/providers/reuseable/postgres \
-	$(LIBGDA_CFLAGS) $(POSTGRES_CFLAGS) 
+	$(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) $(POSTGRES_CFLAGS) 
 
 libgda_postgres_la_SOURCES = \
 	gda-postgres-blob-op.c \
diff --git a/providers/reuseable/Makefile.am b/providers/reuseable/Makefile.am
index f765659..4fe12d7 100644
--- a/providers/reuseable/Makefile.am
+++ b/providers/reuseable/Makefile.am
@@ -9,7 +9,8 @@ AM_CPPFLAGS = \
         -I$(top_srcdir)/libgda \
         -I$(top_srcdir)/libgda/sqlite \
         -I$(top_builddir) \
-        $(LIBGDA_CFLAGS)
+        $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 libreuseable_la_SOURCES = \
 	gda-provider-reuseable.h \
diff --git a/providers/skel-implementation/capi/Makefile.am b/providers/skel-implementation/capi/Makefile.am
index 2752e34..96b0348 100644
--- a/providers/skel-implementation/capi/Makefile.am
+++ b/providers/skel-implementation/capi/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) #$(CAPI_CFLAGS) 
+	$(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) #$(CAPI_CFLAGS) 
 
 # SQL keywords HASH generation
 keyword_files=keywords.list
diff --git a/providers/skel-implementation/models/Makefile.am b/providers/skel-implementation/models/Makefile.am
index da1fd90..0ff2d21 100644
--- a/providers/skel-implementation/models/Makefile.am
+++ b/providers/skel-implementation/models/Makefile.am
@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda/sqlite \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) 
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_CFLAGS)
 
 libgda_models_la_SOURCES = \
 	gda-models-provider.c \
diff --git a/providers/sqlcipher/Makefile.am b/providers/sqlcipher/Makefile.am
index 2bbbe66..d45c0e2 100644
--- a/providers/sqlcipher/Makefile.am
+++ b/providers/sqlcipher/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda/sqlite \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(LIBCRYPTO_CFLAGS) \
 	$(sqliteinc) \
 	-DSQLITE_HAS_CODEC -DSQLITE_API= -DSQLITE_PRIVATE= -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1
diff --git a/providers/sqlite/Makefile.am b/providers/sqlite/Makefile.am
index b3c4993..83d56fe 100644
--- a/providers/sqlite/Makefile.am
+++ b/providers/sqlite/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda/sqlite \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(SQLITE_CFLAGS) \
 	$(sqliteinc) 
 
diff --git a/providers/web/Makefile.am b/providers/web/Makefile.am
index 2dbb2fb..8ff50b9 100644
--- a/providers/web/Makefile.am
+++ b/providers/web/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) $(LIBSOUP_CFLAGS) 
+	$(LIBGDA_CFLAGS) $(LIBGDA_WFLAGS) $(LIBSOUP_CFLAGS) 
 
 libgda_web_la_SOURCES = \
 	gda-web-blob-op.c \
diff --git a/testing/Makefile.am b/testing/Makefile.am
index c6271e8..fe8de0f 100644
--- a/testing/Makefile.am
+++ b/testing/Makefile.am
@@ -3,7 +3,8 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_srcdir)/libgda/sqlite \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS)
+	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS)
 
 bin_PROGRAMS = gda-test-connection-4.0
 if HAVE_UI
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b77934e..8eb45b7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,6 +10,7 @@ AM_CPPFLAGS = \
         -I$(top_srcdir) \
         -I$(top_srcdir)/libgda \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	-DCHECK_FILES=\""$(top_srcdir)"\" \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
 
diff --git a/tests/data-models/Makefile.am b/tests/data-models/Makefile.am
index c9b7b69..9f2b261 100644
--- a/tests/data-models/Makefile.am
+++ b/tests/data-models/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	-DCHECK_FILES=\""$(top_srcdir)"\" \
 	-DTOP_SRC_DIR=\""$(top_srcdir)"\" \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
diff --git a/tests/meta-store/Makefile.am b/tests/meta-store/Makefile.am
index 97fa462..4bf5da8 100644
--- a/tests/meta-store/Makefile.am
+++ b/tests/meta-store/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	-DTOP_SRC_DIR=\""$(top_srcdir)"\" \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
 
@@ -49,4 +50,4 @@ EXTRA_DIST = data_builtin_data_types.csv \
 	data_view_column_usage.csv \
 	data_views.csv
 
-DISTCLEANFILES = test.db
\ No newline at end of file
+DISTCLEANFILES = test.db
diff --git a/tests/multi-threading/Makefile.am b/tests/multi-threading/Makefile.am
index 93e87e6..f595884 100644
--- a/tests/multi-threading/Makefile.am
+++ b/tests/multi-threading/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	-DROOT_DIR=\""$(top_srcdir)"\" \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
 
diff --git a/tests/parser/Makefile.am b/tests/parser/Makefile.am
index ee67543..acc8e81 100644
--- a/tests/parser/Makefile.am
+++ b/tests/parser/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	-DROOT_DIR=\""$(top_srcdir)"\"  \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\" \
 	-DTOP_SRC_DIR=\""$(top_srcdir)"\"
diff --git a/tests/providers/Makefile.am b/tests/providers/Makefile.am
index 11a8313..784b60e 100644
--- a/tests/providers/Makefile.am
+++ b/tests/providers/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	-DCHECK_SQL_FILES=\""$(top_srcdir)"\" \
 	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
 
diff --git a/tests/value-holders/Makefile.am b/tests/value-holders/Makefile.am
index 3c6c1d0..21c357a 100644
--- a/tests/value-holders/Makefile.am
+++ b/tests/value-holders/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(JSON_GLIB_CFLAGS) \
 	-DROOT_DIR=\""$(top_srcdir)"\"
 
diff --git a/tools/Makefile.am b/tools/Makefile.am
index b41d97a..4f4ea9c 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -18,6 +18,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/libgda \
 	-I. \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_CFLAGS) \
 	-DROOT_DIR=\""$(top_srcdir)"\"
 
 gda_list_config_4_0_SOURCES = \
diff --git a/tools/browser/Makefile.am b/tools/browser/Makefile.am
index ead07e2..0ce57a3 100644
--- a/tools/browser/Makefile.am
+++ b/tools/browser/Makefile.am
@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
         -I$(top_srcdir)/libgda/sqlite \
         -I$(top_builddir) \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
         $(GTK_CFLAGS) \
         $(GTKSOURCEVIEW_CFLAGS) \
 	$(MAC_INTEGRATION_CFLAGS) \
diff --git a/tools/browser/canvas/Makefile.am b/tools/browser/canvas/Makefile.am
index 6443e01..3eabadc 100644
--- a/tools/browser/canvas/Makefile.am
+++ b/tools/browser/canvas/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GOOCANVAS_CFLAGS) \
 	$(GRAPHVIZ_CFLAGS) \
diff --git a/tools/browser/common/Makefile.am b/tools/browser/common/Makefile.am
index 94f6561..e36d61c 100644
--- a/tools/browser/common/Makefile.am
+++ b/tools/browser/common/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(MAC_INTEGRATION_CFLAGS)
 
diff --git a/tools/browser/data-manager/Makefile.am b/tools/browser/data-manager/Makefile.am
index f9e130a..865001b 100644
--- a/tools/browser/data-manager/Makefile.am
+++ b/tools/browser/data-manager/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GTKSOURCEVIEW_CFLAGS) \
 	$(MAC_INTEGRATION_CFLAGS)
@@ -46,4 +47,4 @@ EXTRA_DIST= \
 
 CLEANFILES = \
         marshal.h \
-        marshal.c
\ No newline at end of file
+        marshal.c
diff --git a/tools/browser/doc/Makefile.am b/tools/browser/doc/Makefile.am
index 1c75c64..c0faf2d 100644
--- a/tools/browser/doc/Makefile.am
+++ b/tools/browser/doc/Makefile.am
@@ -34,6 +34,7 @@ GTKDOC_CFLAGS = -I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_srcdir)/tools/browser \
         $(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
         $(GTK_CFLAGS) \
 	$(GTKSOURCEVIEW_CFLAGS) \
 	-DGETTEXT_PACKAGE=\""$(GETTEXT_PACKAGE)"\"
diff --git a/tools/browser/dummy-perspective/Makefile.am b/tools/browser/dummy-perspective/Makefile.am
index 179dd1c..dfd04da 100644
--- a/tools/browser/dummy-perspective/Makefile.am
+++ b/tools/browser/dummy-perspective/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(MAC_INTEGRATION_CFLAGS)
 
diff --git a/tools/browser/query-exec/Makefile.am b/tools/browser/query-exec/Makefile.am
index 2204f66..255e174 100644
--- a/tools/browser/query-exec/Makefile.am
+++ b/tools/browser/query-exec/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GTKSOURCEVIEW_CFLAGS) \
 	$(MAC_INTEGRATION_CFLAGS)
diff --git a/tools/browser/schema-browser/Makefile.am b/tools/browser/schema-browser/Makefile.am
index 65115ba..f720ab1 100644
--- a/tools/browser/schema-browser/Makefile.am
+++ b/tools/browser/schema-browser/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	$(LIBGDA_CFLAGS) \
+	$(LIBGDA_WFLAGS) \
 	$(GTK_CFLAGS) \
 	$(MAC_INTEGRATION_CFLAGS)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]