New option to enable Glib casting checks (default: disable)
authorJim Huang <jserv.tw@gmail.com>
Thu, 30 Nov 2006 06:40:53 +0000 (06:40 +0000)
committerJim Huang <jserv.tw@gmail.com>
Thu, 30 Nov 2006 06:40:53 +0000 (06:40 +0000)
configure.ac
src/Makefile.am
src/plugins/Makefile.am
src/plugins/cpu/Makefile.am
src/plugins/deskno/Makefile.am
src/plugins/netstatus/Makefile.am
src/plugins/volume/Makefile.am

index 2f01ab6..65d92be 100644 (file)
@@ -22,6 +22,16 @@ PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
 
+AC_ARG_ENABLE([cast-checks],
+       AS_HELP_STRING([--enable-cast-checks],
+                      [enable Glib casting checks (default: disable)]),
+                      cast_checks=$enableval, cast_checks="no")
+G_CAST_CHECKS=""
+if test x"$cast_checks" = "xno"; then
+       G_CAST_CHECKS="-DG_DISABLE_CAST_CHECKS"
+fi
+AC_SUBST(G_CAST_CHECKS)
+
 AC_ARG_ENABLE([plugins-loading],
        AS_HELP_STRING([--disable-plugins-loading],
                       [disable plugin loading (default: enable)]),
@@ -29,7 +39,7 @@ AC_ARG_ENABLE([plugins-loading],
 
 AM_CONDITIONAL(BUILD_PLUGIN_LOADER, test x$plugins_loading = xyes)
 
-if test "$plugins_loading" = "no"; then
+if test x"$plugins_loading" = "xno"; then
        AC_DEFINE(DISABLE_PLUGINS_LOADING, [1], [Disable plugin loading])
 fi
 
index caf55e8..8818fd6 100644 (file)
@@ -11,7 +11,8 @@ INCLUDES = \
        -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
        -DPACKAGE_BIN_DIR=\""$(bindir)"\" \
        -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-       $(PACKAGE_CFLAGS)
+       $(PACKAGE_CFLAGS) \
+       $(G_CAST_CHECKS)
 
 BUILTIN_PLUGINS = $(top_builddir)/src/plugins/libbuiltin_plugins.a
 
index 9887be2..24f4c3c 100644 (file)
@@ -15,7 +15,8 @@ INCLUDES = \
        -I$(top_srcdir)/src/plugins \
        -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
        -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-       $(PACKAGE_CFLAGS)
+       $(PACKAGE_CFLAGS) \
+       $(G_CAST_CHECKS)
 
 PLUGINS_SOURCES= \
        launchbar.c \
index 8d0be70..47564ce 100644 (file)
@@ -1,7 +1,8 @@
 INCLUDES = \
        -I. \
        -I$(top_srcdir)/src \
-       $(PACKAGE_CFLAGS)
+       $(PACKAGE_CFLAGS) \
+       $(G_CAST_CHECKS)
 
 module_LTLIBRARIES = cpu.la
 
index 70a69d9..1ab0f5b 100644 (file)
@@ -1,7 +1,8 @@
 INCLUDES = \
        -I. \
        -I$(top_srcdir)/src \
-       $(PACKAGE_CFLAGS)
+       $(PACKAGE_CFLAGS) \
+       $(G_CAST_CHECKS)
 
 module_LTLIBRARIES = deskno.la
 
index 92ca211..5d7ce3e 100644 (file)
@@ -1,7 +1,8 @@
 INCLUDES = \
        -I. \
        -I$(top_srcdir)/src \
-       $(PACKAGE_CFLAGS)
+       $(PACKAGE_CFLAGS) \
+       $(G_CAST_CHECKS)
 
 module_LTLIBRARIES = netstatus.la
 
@@ -37,4 +38,4 @@ netstatus_la_LDFLAGS = \
        -export-symbols-regex '_plugin_class$$'
 
 install-exec-hook:
-       rm -f "$(moduledir)\*.la" *.a
\ No newline at end of file
+       rm -f "$(moduledir)\*.la" *.a
index bf43c59..e2d108d 100644 (file)
@@ -1,7 +1,8 @@
 INCLUDES = \
        -I. \
        -I$(top_srcdir)/src \
-       $(PACKAGE_CFLAGS)
+       $(PACKAGE_CFLAGS) \
+       $(G_CAST_CHECKS)
 
 module_LTLIBRARIES = volume.la