From: Björn Jacke Date: Fri, 9 Jan 2009 11:05:55 +0000 (+0100) Subject: quote ' inside '...' and make sure shell isn't eating \ by using perl here. X-Git-Tag: samba-4.0.0alpha7~417^2~288 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ea6ed3fc203875b0364e95174569310fe33d1c5;p=thirdparty%2Fsamba.git quote ' inside '...' and make sure shell isn't eating \ by using perl here. Signed-off-by: Stefan Metzmacher --- diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index ffd112f5f17..1823f1ba979 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -201,11 +201,9 @@ CEOF for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - if test "$ac_var" != "ECHO_C" - then - echo "$ac_var => '$ac_val'," >> $1 - fi + eval ac_val=\$$ac_var + # quote ' (\x27) inside '...' and make sure \ isn't eaten by shells, so use perl: + QAC_VAL=$ac_val QAC_VAR=$ac_var perl -e '$myval="$ENV{QAC_VAL}"; $myval =~ s/\x27/\\\x27/g ; print $ENV{QAC_VAR}." => \x27$myval\x27,\n"' >> $1 done cat >>$1<