[gthumb/ext: 2/79] added disable deprecated and warning flags



commit 40d079f856f3802622345421640c9d1ad480d4fe
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Jun 9 13:51:03 2009 +0200

    added disable deprecated and warning flags

 Makefile.am                         |    2 +-
 configure.ac                        |   37 +++++++++++++++++++++++++++++++++++
 extensions/catalogs/Makefile.am     |    2 +-
 extensions/comments/Makefile.am     |    2 +-
 extensions/exiv2/Makefile.am        |    2 +-
 extensions/file_manager/Makefile.am |    2 +-
 extensions/file_viewer/Makefile.am  |    2 +-
 extensions/image_tools/Makefile.am  |    2 +-
 extensions/image_viewer/Makefile.am |    2 +-
 extensions/search/Makefile.am       |    2 +-
 gthumb/Makefile.am                  |    2 +
 tests/Makefile.am                   |    2 +-
 12 files changed, 49 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1f762e3..dbe685a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,7 @@ MAINTAINERCLEANFILES = \
 	$(srcdir)/ChangeLog \
 	`find "$(srcdir)" -type f -name Makefile.in -print`
 
-GITIGNOREFILES = build
+GITIGNOREFILES = build .cdt* .cproject .project .settings/
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
 
diff --git a/configure.ac b/configure.ac
index a8a08fa..ab4abc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,43 @@ AC_SUBST(EXTENSION_LIBTOOL_FLAGS)
 
 dnl ===========================================================================
 
+AC_ARG_ENABLE(deprecations,AC_HELP_STRING([--enable-deprecations],[warn about de
+precated usages]))
+if test "x$enable_deprecations" = "xyes"; then
+	DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED \
+	-DGDK_DISABLE_DEPRECATED \
+	-DGDK_PIXBUF_DISABLE_DEPRECATED \
+	-DGTK_DISABLE_DEPRECATED \
+	-DGNOME_VFS_DISABLE_DEPRECATED \
+	-DGNOME_DISABLE_DEPRECATED"
+fi
+AC_SUBST(DISABLE_DEPRECATED)
+
+dnl ===========================================================================
+
+WARN_CFLAGS="-Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers"
+
+for option in $WARN_CFLAGS; do
+	SAVE_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $option"
+	AC_MSG_CHECKING([whether gcc understands $option])
+	AC_TRY_COMPILE([], [],
+			has_option=yes,
+			has_option=no,)
+	if test x$has_option = xyes; then
+		WARNINGS="$WARNINGS $option"
+	fi
+	AC_MSG_RESULT($has_option)
+	CFLAGS="$SAVE_CFLAGS"
+	unset has_option
+	unset SAVE_CFLAGS
+done
+unset option
+AC_SUBST(WARNINGS)
+
+
+dnl ===========================================================================
+
 AC_CONFIG_FILES([
 Makefile
 copy-n-paste/Makefile
diff --git a/extensions/catalogs/Makefile.am b/extensions/catalogs/Makefile.am
index 963c970..22efe18 100644
--- a/extensions/catalogs/Makefile.am
+++ b/extensions/catalogs/Makefile.am
@@ -16,7 +16,7 @@ libcatalogs_la_SOURCES = 		\
 	gth-file-source-catalogs.h	\
 	main.c
 
-libcatalogs_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libcatalogs_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libcatalogs_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libcatalogs_la_LIBADD = $(GTHUMB_LIBS)
 libcatalogs_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/comments/Makefile.am b/extensions/comments/Makefile.am
index afa1153..70c41d3 100644
--- a/extensions/comments/Makefile.am
+++ b/extensions/comments/Makefile.am
@@ -14,7 +14,7 @@ libcomments_la_SOURCES = 			\
 	gth-test-category.h			\
 	main.c
 
-libcomments_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libcomments_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libcomments_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libcomments_la_LIBADD = $(GTHUMB_LIBS)
 libcomments_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/exiv2/Makefile.am b/extensions/exiv2/Makefile.am
index b3cbae2..c25d765 100644
--- a/extensions/exiv2/Makefile.am
+++ b/extensions/exiv2/Makefile.am
@@ -10,7 +10,7 @@ libexiv2_la_SOURCES = 			\
 	gth-metadata-provider-exiv2.h	\
 	main.c
 
-libexiv2_la_CPPFLAGS = $(GTHUMB_CFLAGS) $(EXIV2_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libexiv2_la_CPPFLAGS = $(GTHUMB_CFLAGS) $(EXIV2_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libexiv2_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libexiv2_la_LIBADD = $(GTHUMB_LIBS) 
 libexiv2_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/file_manager/Makefile.am b/extensions/file_manager/Makefile.am
index 36dc51d..e4e1513 100644
--- a/extensions/file_manager/Makefile.am
+++ b/extensions/file_manager/Makefile.am
@@ -10,7 +10,7 @@ libfile_manager_la_SOURCES = 		\
 	gth-duplicate-task.h		\
 	main.c
 
-libfile_manager_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libfile_manager_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libfile_manager_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libfile_manager_la_LIBADD = $(GTHUMB_LIBS)
 libfile_manager_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/file_viewer/Makefile.am b/extensions/file_viewer/Makefile.am
index 3e2d066..30435fc 100644
--- a/extensions/file_viewer/Makefile.am
+++ b/extensions/file_viewer/Makefile.am
@@ -6,7 +6,7 @@ libfile_viewer_la_SOURCES = 		\
 	gth-file-viewer-page.h		\
 	main.c
 
-libfile_viewer_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libfile_viewer_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libfile_viewer_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libfile_viewer_la_LIBADD = $(GTHUMB_LIBS)
 libfile_viewer_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/image_tools/Makefile.am b/extensions/image_tools/Makefile.am
index 3561a65..950400c 100644
--- a/extensions/image_tools/Makefile.am
+++ b/extensions/image_tools/Makefile.am
@@ -16,7 +16,7 @@ libimage_tools_la_SOURCES = 		\
 	gth-image-tool-undo.h		\
 	main.c
 
-libimage_tools_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libimage_tools_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libimage_tools_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libimage_tools_la_LIBADD = $(GTHUMB_LIBS)
 libimage_tools_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/image_viewer/Makefile.am b/extensions/image_viewer/Makefile.am
index d321db1..28825c3 100644
--- a/extensions/image_viewer/Makefile.am
+++ b/extensions/image_viewer/Makefile.am
@@ -12,7 +12,7 @@ libimage_viewer_la_SOURCES = 		\
 	preferences.c			\
 	preferences.h
 
-libimage_viewer_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libimage_viewer_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libimage_viewer_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libimage_viewer_la_LIBADD = $(GTHUMB_LIBS)
 libimage_viewer_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/extensions/search/Makefile.am b/extensions/search/Makefile.am
index 0765f2e..afcbbe7 100644
--- a/extensions/search/Makefile.am
+++ b/extensions/search/Makefile.am
@@ -16,7 +16,7 @@ libsearch_la_SOURCES = 			\
 	gth-search-task.h		\
 	main.c
 
-libsearch_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
+libsearch_la_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libsearch_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
 libsearch_la_LIBADD = $(GTHUMB_LIBS)
 libsearch_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
diff --git a/gthumb/Makefile.am b/gthumb/Makefile.am
index 939ccfc..0e65ad5 100644
--- a/gthumb/Makefile.am
+++ b/gthumb/Makefile.am
@@ -224,6 +224,8 @@ endif
 gthumb_CFLAGS =							\
 	$(GTHUMB_CFLAGS)					\
 	$(EXIV2_CFLAGS)						\
+	$(DISABLE_DEPRECATED)                   		\
+        $(WARNINGS)                             		\
 	-I$(top_srcdir)/copy-n-paste/				\
 	-DGTHUMB_LOCALEDIR=\"$(datadir)/locale\"		\
 	-DGTHUMB_PREFIX=\"$(prefix)\"           		\
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 968ec0a..f4142a0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,5 +8,5 @@ dom_test_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir)/gthumb
 
 glib_utils_test_SOURCES = glib-utils-test.c $(top_srcdir)/gthumb/glib-utils.c
 glib_utils_test_LDADD = $(GTHUMB_LIBS) 
-glib_utils_test_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir)/gthumb
+glib_utils_test_CFLAGS = $(GTHUMB_CFLAGS) $(DISABLE_DEPRECATED) $(WARNINGS) -I$(top_srcdir)/gthumb
 -include $(top_srcdir)/git.mk



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