configure: Check for glib-genmarshal program at configure time.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 10 Mar 2010 00:59:06 +0000 (16:59 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 10 Mar 2010 04:13:59 +0000 (20:13 -0800)
The GUI build cannot succeed without glib-genmarshal, so it seems like a
good idea to fail earlier.

Related to bug #28959, reported by Harry Thijssen.

configure.ac
src/ui/gui/automake.mk

index 8f4ca63ba084f9c4e6341bf409caa1a4be5d8f94..a3a07a87e07816848ffd8f9c8416e20a8d9913ee 100644 (file)
@@ -76,6 +76,12 @@ AM_CONDITIONAL([HAVE_GUI],
 if test "$with_cairo" != no && test "$with_gui" != "no"; then
   PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12], [],
     [PSPP_REQUIRED_PREREQ([gtk+ 2.0 version 2.12 or later (or use --without-gui)])])
+
+  AC_ARG_VAR([GLIB_GENMARSHAL])
+  AC_CHECK_PROGS([GLIB_GENMARSHAL], [glib-genmarshal])
+  if test "x$GLIB_GENMARSHAL" = x; then
+    PSPP_REQUIRED_PREREQ([glib-genmarshal (or use --without-gui)])
+  fi
 fi
 
 dnl Checks needed for psql reader
index 5485d886233ea09f58e81fc0157c476545eb57ab..003437bf2d4654a660b7d0010ac5439699a00d69 100644 (file)
@@ -256,10 +256,10 @@ AM_CPPFLAGS += -Isrc
 
 src/ui/gui/psppire-marshal.c: src/ui/gui/marshaller-list
        echo '#include <config.h>' > $@
-       glib-genmarshal --body --prefix=psppire_marshal $? >> $@
+       $(GLIB_GENMARSHAL) --body --prefix=psppire_marshal $? >> $@
 
 src/ui/gui/psppire-marshal.h: src/ui/gui/marshaller-list
-       glib-genmarshal --header --prefix=psppire_marshal $? > $@
+       $(GLIB_GENMARSHAL) --header --prefix=psppire_marshal $? > $@
 
 SUFFIXES += .glade .ui
 .glade.ui: