diff options
author | Daiki Ueno <ueno@gnu.org> | 2013-03-04 18:19:02 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2013-03-05 07:57:16 +0900 |
commit | 989529926b0e34126c50f128f4049361c2541eec (patch) | |
tree | 62f1966dd13a86db175b133ed6190c6de736b555 | |
parent | e9fe70eeb12b4a3d5e306a55bf22f8fcccb9a8cd (diff) | |
download | external_gettext-989529926b0e34126c50f128f4049361c2541eec.zip external_gettext-989529926b0e34126c50f128f4049361c2541eec.tar.gz external_gettext-989529926b0e34126c50f128f4049361c2541eec.tar.bz2 |
autopoint: extract macro directories from configure.ac
-rw-r--r-- | gettext-tools/misc/ChangeLog | 6 | ||||
-rw-r--r-- | gettext-tools/misc/autopoint.in | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 056921f..9a9aac1 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,5 +1,11 @@ 2013-03-04 Daiki Ueno <ueno@gnu.org> + * autopoint.in: Handle macro directories specified in configure.ac. + Reported by Pavel Raiskup in + <http://lists.gnu.org/archive/html/bug-gettext/2013-02/msg00017.html>. + +2013-03-04 Daiki Ueno <ueno@gnu.org> + * gettextize.in: Use autoconf trace to detect auxdir and m4dir. 2013-03-04 Daiki Ueno <ueno@gnu.org> diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in index d0725bc..745fdb4 100644 --- a/gettext-tools/misc/autopoint.in +++ b/gettext-tools/misc/autopoint.in @@ -30,6 +30,8 @@ prefix="@prefix@" datarootdir="@datarootdir@" gettext_dir="@datadir@/gettext" +autom4te="autom4te --no-cache --language=Autoconf-without-aclocal-m4" + # func_tmpdir # creates a temporary directory. # Sets variable @@ -302,14 +304,22 @@ case "$ver" in esac # Check in which directory config.rpath, mkinstalldirs etc. belong. -auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` +auxdir=`$autom4te --trace=AC_CONFIG_AUX_DIR:\$% "$configure_in"` if test -n "$auxdir"; then auxdir="$auxdir/" fi # Check in which directory the *.m4 macros belong. -m4dir=m4 -if test -f Makefile.am; then +macrodirs=`$autom4te --trace=AC_CONFIG_MACRO_DIR_TRACE:\$% "$configure_in"` +if test -z "$macrodirs"; then + macrodirs=`$autom4te --trace=AC_CONFIG_MACRO_DIR:\$% "$configure_in"` +fi +for arg in $macrodirs; do + m4dir="$arg" + break +done + +if test -z "$m4dir" && test -f Makefile.am; then # A package using automake. # Extract the macro directory name from Makefile.am. aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'` |