[gxml/serialization] Fixes for Windows cross compile
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/serialization] Fixes for Windows cross compile
- Date: Tue, 18 Mar 2014 00:28:03 +0000 (UTC)
commit 7d5ebef7b81585d3f20c95abb0faa2d0fcca86b2
Author: Daniel Espinosa <esodan gmail com>
Date: Mon Mar 17 18:14:31 2014 -0600
Fixes for Windows cross compile
autogen.sh | 159 +++++++++++++++++++++++++++++++++++++++++--------
configure.ac | 20 +++---
vapi/libxml-2.0.vapi | 6 +-
3 files changed, 147 insertions(+), 38 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 5fbd8e1..a0ec5ee 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,15 +1,11 @@
#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
-# Run this to generate all the initial makefiles, etc. You'll want to
-# make sure that you have Makefile.am and configure.ac already.
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
-test -n "$srcdir" || srcdir=`dirname "$0"`
-test -n "$srcdir" || srcdir=.
+DIE=0
-OLDDIR=`pwd`
-cd $srcdir
-
-# Set paths if GNOME2_DIR is set
if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
@@ -18,33 +14,144 @@ if [ -n "$GNOME2_DIR" ]; then
export LD_LIBRARY_PATH
fi
-# TODO: consider adding specifying automake and aclocal version here ala libfolks
+(test -f $srcdir/configure.ac) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level package directory"
+ exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`autoconf' installed."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
+ (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`intltool' installed."
+ echo "You can get it from:"
+ echo " ftp://ftp.gnome.org/pub/GNOME/"
+ DIE=1
+ }
+}
+
+(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
+ (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`xml-i18n-toolize' installed."
+ echo "You can get it from:"
+ echo " ftp://ftp.gnome.org/pub/GNOME/"
+ DIE=1
+ }
+}
+
+(grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
+ (libtool --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`libtool' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+ }
+}
+
+(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
+ (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
+ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`glib' installed."
+ echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
+ DIE=1
+ }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`automake' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+ NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: Missing \`aclocal'. The version of \`automake'"
+ echo "installed doesn't appear recent enough."
+ echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
-AUTORECONF=`which autoreconf`
-if test -z $AUTORECONF; then
- echo "*** No autoreconf found, please intall it ***"
- exit 1
+if test "$DIE" -eq 1; then
+ exit 1
fi
-INTLTOOLIZE=`which intltoolize`
-if test -z $INTLTOOLIZE; then
- echo "*** No intltoolize found, please install the intltool package ***"
- exit 1
+if test -z "$*"; then
+ echo "**Warning**: I am going to run \`configure' with no arguments."
+ echo "If you wish to pass any to it, please specify them on the"
+ echo \`$0\'" command line."
+ echo
fi
-mkdir -p m4
+case $CC in
+xlc )
+ am_opt=--include-deps;;
+esac
-autopoint --force || exit 1
-AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install
+for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print`
+do
+ dr=`dirname $coin`
+ if test -f $dr/NO-AUTO-GEN; then
+ echo skipping $dr -- flagged as no auto-gen
+ else
+ echo processing $dr
+ ( cd $dr
+ aclocalinclude="$ACLOCAL_FLAGS"
-cd $OLDDIR
+ if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
+ echo "Creating $dr/aclocal.m4 ..."
+ test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+ echo "Running glib-gettextize... Ignore non-fatal messages."
+ echo "no" | glib-gettextize --force --copy
+ echo "Making $dr/aclocal.m4 writable ..."
+ test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+ fi
+ if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
+ echo "Running intltoolize..."
+ intltoolize --copy --force --automake
+ fi
+ if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
+ echo "Running xml-i18n-toolize..."
+ xml-i18n-toolize --copy --force --automake
+ fi
+ if grep "^LT_INIT" configure.ac >/dev/null; then
+ if test -z "$NO_LIBTOOLIZE" ; then
+ echo "Running libtoolize..."
+ libtoolize --force --copy
+ fi
+ fi
+ echo "Running aclocal $aclocalinclude ..."
+ aclocal $aclocalinclude
+ if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
+ echo "Running autoheader..."
+ autoheader
+ fi
+ echo "Running automake --gnu $am_opt ..."
+ automake --add-missing --copy --gnu $am_opt
+ echo "Running autoconf ..."
+ autoconf
+ )
+ fi
+done
-# Run ./configure
-if [ -z "$NOCONFIGURE" ]; then
- echo Running $srcdir/configure "$@" ...
- $srcdir/configure "$@" \
- && echo Now type \`make\' to compile. || exit 1
+if test x$NOCONFIGURE = x; then
+ echo Running $srcdir/configure "$@" ...
+ $srcdir/configure "$@" \
+ && echo Now type \`make\' to compile. || exit 1
else
echo Skipping configure process.
fi
diff --git a/configure.ac b/configure.ac
index b32420b..88365ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,16 +66,6 @@ AM_MAINTAINER_MODE([enable])
AC_PROG_CC
AM_PROG_CC_C_O
-# Internationalization
-IT_PROG_INTLTOOL([0.35.0])
-
-AM_GNU_GETTEXT_VERSION([0.18.1])
-AM_GNU_GETTEXT([external])
-
-GETTEXT_PACKAGE=gxml
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
-
# Initialise libtools (handles library creation) with stuff from above
LT_INIT([disable-static])
@@ -102,6 +92,16 @@ AC_SUBST([API_VERSION])
GXML_VERSION=project_base_version
AC_SUBST([GXML_VERSION])
+IT_PROG_INTLTOOL([0.35.0])
+
+GETTEXT_PACKAGE=GXml
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
+ [The domain to use with gettext])
+AM_GLIB_GNU_GETTEXT
+
+GXML_LOCALEDIR=[${datadir}/locale]
+AC_SUBST(GXML_LOCALEDIR)
### Dependencies
diff --git a/vapi/libxml-2.0.vapi b/vapi/libxml-2.0.vapi
index 2a1f547..ceb5578 100644
--- a/vapi/libxml-2.0.vapi
+++ b/vapi/libxml-2.0.vapi
@@ -1786,8 +1786,10 @@ namespace Xml {
MODULE = 26, /* The dynamically loaded module modul */
I18N = 27, /* The module handling character conversion */
SCHEMATRONV = 28, /* The Schematron validator module */
- BUFFER = 29, /* The buffers module */
- URI = 30 /* The URI module */
+// This items are defined only on libxml 2.9
+// Are commented out in order to compile for GTK+ 3.6 for Windows
+// BUFFER = 29, /* The buffers module */
+// URI = 30 /* The URI module */
}
[CCode (cname = "xmlErrorLevel", cprefix = "XML_ERR_", cheader_filename = "libxml/xmlerror.h",
has_type_id = false)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]