patch to allow cross-compilation of glib
- From: Sven Neumann <sven gimp org>
- To: gtk-devel-list gnome org
- Subject: patch to allow cross-compilation of glib
- Date: 31 Jul 2001 18:47:23 +0200
Hi,
at the moment, glib can not be cross-compiled, since it executes
the glib-genmarshal binary created for the target platform during
the build. The included patch adds the configure option
--with-glib-genmarshal=PATH that allows to specify the path to an
installed version of glib-genmarshal to be used to generate the
marshaller code. It also beautifies the configure --help output a
little by aligning the help strings. Is it OK to commit?
Salut, Sven
Index: configure.in
===================================================================
RCS file: /cvs/gnome/glib/configure.in,v
retrieving revision 1.214
diff -u -r1.214 configure.in
--- configure.in 2001/07/30 09:02:37 1.214
+++ configure.in 2001/07/31 16:41:10
@@ -1411,7 +1411,7 @@
dnl *** Tests for iconv ***
dnl ***********************
-AC_ARG_WITH(libiconv, [ --with-libiconv Use the libiconv library ],,with_libiconv=maybe)
+AC_ARG_WITH(libiconv, [ --with-libiconv use the libiconv library ],,with_libiconv=maybe)
found_iconv=no
@@ -1455,7 +1455,7 @@
dnl *** Checks for gtk-doc ***
dnl **************************
-AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
+AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
if test "x$with_html_dir" = "x" ; then
HTML_DIR='${datadir}/gtk-doc/html'
@@ -1489,7 +1489,7 @@
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
dnl Let people disable the gtk-doc stuff.
-AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
+AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
if test x$enable_gtk_doc = xauto ; then
if test x$GTKDOC = xtrue ; then
@@ -1498,6 +1498,24 @@
enable_gtk_doc=no
fi
fi
+
+dnl *****************************************
+dnl *** Allow to override glib-genmarshal ***
+dnl *****************************************
+
+GLIB_GENMARSHAL="./glib-genmarshal"
+
+AC_ARG_WITH(glib-genmarshal, [ --with-glib-genmarshal=PATH use installed glib-genmarshal instead of built one],
+ if test "x$with_glib_genmarshal" != x; then
+ if test -x "$with_glib_genmarshal"; then
+ GLIB_GENMARSHAL="$with_glib_genmarshal"
+ else
+ AC_MSG_ERROR([*** $with_glib_genmarshal is not an executable.])
+ fi
+ fi,)
+
+AC_SUBST(GLIB_GENMARSHAL)
+
dnl NOTE: We need to use a separate automake conditional for this
dnl to make this work with the tarballs.
Index: gobject/Makefile.am
===================================================================
RCS file: /cvs/gnome/glib/gobject/Makefile.am,v
retrieving revision 1.36
diff -u -r1.36 Makefile.am
--- gobject/Makefile.am 2001/06/26 16:01:18 1.36
+++ gobject/Makefile.am 2001/07/31 16:41:11
@@ -132,13 +132,13 @@
$(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal$(EXEEXT)
echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
&& echo "#define __G_MARSHAL_H__" >> xgen-gmh \
- && ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
+ && $(GLIB_GENMARSHAL) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
&& echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
&& (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
&& rm -f xgen-gmh xgen-gmh~ \
&& echo timestamp > $@
$(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
- ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
+ $(GLIB_GENMARSHAL) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
&& cp xgen-gmc $(srcdir)/gmarshal.c \
&& rm -f xgen-gmc xgen-gmc~
$(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]