diff --git a/configure b/configure index f28d1b012..b0de8f0bc 100755 --- a/configure +++ b/configure @@ -5808,8 +5808,11 @@ extract() { return 1 fi + # BSD sed needs an actual newline character in the substitute command + new_line=' +' # Convert " -" to "\n" if not between quotes and remove possible leading white spaces - string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[:space:]*//') + string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[:space:]*//') SAVEIFS=$IFS IFS=$(printf "\n\b") for i in $string; do diff --git a/configure.ac b/configure.ac index d0cc2737a..f537c5502 100644 --- a/configure.ac +++ b/configure.ac @@ -258,8 +258,11 @@ extract() { return 1 fi + # BSD sed needs an actual newline character in the substitute command + new_line=' +' # Convert " -" to "\n" if not between quotes and remove possible leading white spaces - string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//') + string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//') SAVEIFS=$IFS IFS=$(printf "\n\b") for i in $string; do