From dd803b09f28acfe312547871896fc888f118a9c4 Mon Sep 17 00:00:00 2001 From: "Gergely Polonkai (W00d5t0ck)" Date: Sat, 5 Oct 2013 02:05:17 +0200 Subject: [PATCH] Create own autogen.sh gnome-autogen.sh can not really make GTK-Doc optional. With this script, GTK-Doc is only used if it is actually present on the system. --- autogen.sh | 45 ++++++++++++++++++++++++++++++++++++--------- configure.ac | 4 ++-- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/autogen.sh b/autogen.sh index e5c0058..1919d2f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,22 +13,49 @@ PKG_NAME="swe-glib" exit 1 } +m4dir=`grep '^AC_CONFIG_MACRO_DIR' configure.ac | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` +if [ -n "$m4dir" ]; then + m4dir="-I $m4dir" +fi + +echo "Running libtoolize" +libtoolize --force --copy || exit $? + +echo "Running autopoint" +autopoint --force || exit $? + +echo "Running intltoolize" +intltoolize --force --copy --automake || exit $? + GTKDOCIZE=$(which gtkdocize 2>/dev/null) if test -z $GTKDOCIZE; then - echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation." - rm -f gtk-doc.make - cat > gtk-doc.make < gtk-doc.make </dev/null; then + echo "Running autoheader" + autoheader || exit $? + # this prevents automake from thinking config.h.in is out of + # date, since autoheader doesn't touch the file if it doesn't + # change. + test -f config.h.in && touch config.h.in +fi + +echo "Running automake" +automake --gnu --add-missing --copy -Wno-portability || exit $? diff --git a/configure.ac b/configure.ac index 21df532..33192e8 100644 --- a/configure.ac +++ b/configure.ac @@ -40,9 +40,9 @@ AM_GNU_GETTEXT_VERSION([0.17]) LT_INIT AC_CHECK_LIB([m], [atan]) m4_ifdef([GTK_DOC_CHECK], [ - GTK_DOC_CHECK([1.19], [--flavour no-tmpl]) +GTK_DOC_CHECK([1.19], [--flavour no-tmpl]) ],[ - AM_CONDITIONAL([ENABLE_GTK_DOC], false) +AM_CONDITIONAL([ENABLE_GTK_DOC], false) ]) GOBJECT_INTROSPECTION_CHECK([1.0]) PKG_PROG_PKG_CONFIG