]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use an echo command that doesn't interpret backslashes.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Nov 2003 18:53:18 +0000 (18:53 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:17 +0000 (12:11 +0200)
gettext-runtime/m4/po.m4

index a6e906af5b92510df1d063dade0d2044a6761971..b8190a5052eac2964fe4dc72875e5c765fb8691a 100644 (file)
@@ -227,6 +227,22 @@ changequote(,)dnl
     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
   esac
 
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
   # A sed script that extracts the value of VARIABLE from a Makefile.
   sed_x_variable='
 # Test if the hold space is empty.
@@ -267,7 +283,7 @@ x
 changequote([,])dnl
 
   # Set POTFILES to the value of the Makefile variable POTFILES.
-  sed_x_POTFILES="`echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
+  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
   # Compute POTFILES_DEPS as
   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
@@ -286,7 +302,7 @@ changequote([,])dnl
     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
   else
     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
-    sed_x_LINGUAS="`echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
+    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
   fi
   # Hide the ALL_LINGUAS assigment from automake.