build: make --internal of glib-genmarshal optional
authorNicola Fontana <ntd@entidi.it>
Thu, 4 Apr 2013 22:38:14 +0000 (5 00:38 +0200)
committerNicola Fontana <ntd@entidi.it>
Thu, 4 Apr 2013 22:38:14 +0000 (5 00:38 +0200)
glib-genmarshal --internal has been introduced in glib 2.13.0. Check the
GLib version and eventually strip this flag from the makefiles.

configure.ac
src/adg/Makefile.am

index c612449..1e4e56c 100644 (file)
@@ -130,6 +130,13 @@ AC_CONFIG_COMMANDS([default],
 # Check for required packages
 
 PKG_CHECK_MODULES([GLIB],[glib-2.0])
+
+AC_MSG_CHECKING([if glib-genmarshal supports --internal])
+AS_IF([$PKG_CONFIG --atleast-version 2.13.0 glib-2.0],
+      [AC_MSG_RESULT([yes])
+       GLIB_GENMARSHAL="$GLIB_GENMARSHAL --internal"],
+      [AC_MSG_RESULT([no])])
+
 PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= ]gobject_prereq)
 PKG_CHECK_MODULES([CAIRO],[cairo >= ]cairo_prereq)
 PKG_CHECK_MODULES([CAIRO_GOBJECT],[cairo-gobject],
index a3b67fc..583ef17 100644 (file)
@@ -252,7 +252,7 @@ endif
 mkenums_command=               $(AM_V_GEN)$(GLIB_MKENUMS) \
                                --template
 genmarshal_command=            $(AM_V_GEN)$(GLIB_GENMARSHAL) \
-                               --nostdinc --internal --prefix=adg_marshal
+                               --nostdinc --prefix=adg_marshal
 
 
 adg-type-builtins.c: $(srcdir)/adg-type-builtins.c.mkenums $(srcdir)/adg-enums.h