]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
gettextize: Use autoconf trace to detect auxdir and m4dir
authorDaiki Ueno <ueno@gnu.org>
Mon, 4 Mar 2013 09:30:36 +0000 (18:30 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 4 Mar 2013 22:56:28 +0000 (07:56 +0900)
gettext-tools/misc/ChangeLog
gettext-tools/misc/gettextize.in

index 92dbd8d3127c966de10ca97e26f539c7d82ae14e..056921f9e6ec42d15f91889670d9c4b59425cbbc 100644 (file)
@@ -1,3 +1,7 @@
+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>
 
        * gettextize.in: Don't add redundant "-I m4" if
index f44a1c2e10e288178e46448f4fa97670436e3477..319543cbda7b7416e782b8301e216c59fa9295df 100644 (file)
@@ -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
@@ -309,13 +311,16 @@ if test $force -eq 0; then
 fi
 
 # Check in which directory config.rpath 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 gettext.m4 etc. belong.
-macrodirs=`cat "$configure_in" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIRS\{,1\}(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/'`
+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