From 2388ff31586b98d33c91c9eb65ade3f2a1bf5fdf Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Thu, 1 Apr 2004 05:42:58 +0000 Subject: [PATCH] Build CVS directly with recent gettextize; no AC_OUTPUT errors. * configure.in: move m4/Makefile to its own line * macros/autogen.sh: add code to remove "intl/Makefile po/Makefile" from AC_OUTPUT in configure.in prior to calling gettextize to make sure that you can build from CVS with recent versions of gettextize. Tested with both RH9 and RH7.3 to make sure it works with both old and new. Fixes #120206. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9871 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 9 +++++++++ Makefile.am | 2 +- configure.in | 3 ++- macros/autogen.sh | 35 ++++++++++++++++++++++------------- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddd8651d8f..1871b7dbe9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-03-31 Derek Atkins + + * configure.in: move m4/Makefile to its own line + * macros/autogen.sh: add code to remove "intl/Makefile po/Makefile" + from AC_OUTPUT in configure.in prior to calling gettextize + to make sure that you can build from CVS with recent versions + of gettextize. Tested with both RH9 and RH7.3 to make sure + it works with both old and new. Fixes #120206. + 2004-03-30 Derek Atkins * src/report/report-system/report-system.scm: diff --git a/Makefile.am b/Makefile.am index 188d3d3c55..fe8460b0bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,7 +33,7 @@ m4data_DATA = gnucash.m4 # Don't list any directories or you'll get *everything*, including the # CVS dirs. -EXTRA_DIST = config.rpath config.rpath \ +EXTRA_DIST = config.rpath \ .cvsignore \ ChangeLog.1 \ HACKING \ diff --git a/configure.in b/configure.in index 2de09fe8dd..581023604d 100644 --- a/configure.in +++ b/configure.in @@ -1160,7 +1160,8 @@ chmod u+x ${srcdir}/src/bin/overrides/gnucash-make-guids LIBOBJS_SEDSCRIPT="s,\.[[^.]]* ,$U&,g;s,\.[[^.]]*\$\$,$U&," AC_SUBST(LIBOBJS_SEDSCRIPT) -AC_OUTPUT( m4/Makefile intl/Makefile po/Makefile.in +AC_OUTPUT(intl/Makefile po/Makefile.in + m4/Makefile dnl # Makefiles Makefile accounts/Makefile diff --git a/macros/autogen.sh b/macros/autogen.sh index 39631547f4..65eac44ca5 100644 --- a/macros/autogen.sh +++ b/macros/autogen.sh @@ -111,17 +111,14 @@ ACLOCAL="$program" DIE=1 } -GETTEXTIZE_VERSION=`${GETTEXTIZE} --version` -gettextize_major_version=`echo ${GETTEXTIZE_VERSION} | \ - sed 's/^.*GNU gettext.* \([0-9]*\)\.\([0-9]*\).\([0-9]*\).*$/\1/'` -gettextize_minor_version=`echo ${GETTEXTIZE_VERSION} | \ - sed 's/^.*GNU gettext.* \([0-9]*\)\.\([0-9]*\).\([0-9]*\).*$/\2/'` -if [ $gettextize_major_version -gt 0 -o \ - $gettextize_minor_version -gt 10 ]; then - INTL="--intl"; -else - INTL=""; -fi +gettext_version=`gettextize --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'` +case $gettext_version in +0.10.*) + ;; + +*) + INTL="--intl --no-changelog";; +esac #(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { # (${LIBTOOL} --version) < /dev/null > /dev/null 2>&1 || { @@ -224,13 +221,16 @@ do fi fi done + grep "intl/Makefile" configure.in > /dev/null && + ( sed -e 's#^AC_OUTPUT(.*intl/Makefile po/Makefile.in#AC_OUTPUT(#' \ + configure.in >configure.in.new && mv configure.in.new configure.in ) if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then if grep "sed.*POTFILES" configure.in >/dev/null; then : do nothing -- we still have an old unmodified configure.in else echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running ${GETTEXTIZE}... Ignore non-fatal messages." + echo "(1) Running ${GETTEXTIZE}... Ignore non-fatal messages." echo "no" | ${GETTEXTIZE} --force --copy $INTL echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 @@ -239,7 +239,7 @@ do if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running ${GETTEXTIZE}... Ignore non-fatal messages." + echo "(2) Running ${GETTEXTIZE}... Ignore non-fatal messages." echo "no" | ${GETTEXTIZE} --force --copy $INTL echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 @@ -249,6 +249,15 @@ do echo "*** Ignore any instruction above about running aclocal by hand." echo "*** I repeat, do not run aclocal by hand. You have been warned....." echo + case $gettext_version in + 0.10.*) + grep "intl/Makefile" configure.in > /dev/null || + ( sed -e 's#^AC_OUTPUT(#AC_OUTPUT( intl/Makefile po/Makefile.in#' \ + configure.in >configure.in.new && mv configure.in.new configure.in ) + ;; + *) + ;; + esac if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then echo "Running ${INTLTOOLIZE} ..." ${INTLTOOLIZE} --copy --force --automake