portability: work around a "busybox sed" limitation
authorJim Meyering <meyering@redhat.com>
Sat, 22 Mar 2008 17:33:15 +0000 (18:33 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 22 Mar 2008 18:13:34 +0000 (19:13 +0100)
* configure.ac: While every other sed tested supports usage like
'/\(re\)/{s//\1/;...<NEWLINE>}', and POSIX appears to requires this,
busybox's sed does not support it.  So duplicate the regexp:
'/\(re\)/{s/\(re\)/\1/;...<NEWLINE>}'.  Reported by Vincent Lefevre:
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13013>.

configure.ac

index cc4e152..14505fc 100644 (file)
@@ -280,7 +280,8 @@ no_install_progs_default=`echo "$t"|sed 's/ $//'`
 # The compromise is to ensure that the space-separated list extracted
 # above matches the literal 2nd argument below.
 c="$srcdir/configure.ac"
-t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/{s//\1/;s/,/ /gp
+re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
+t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
 }' $c`
 case $t in
   $no_install_progs_default) ;;