echo "$*" | sed 's/["\\]/\\\0/g'
}
+sh_quote(){
+ v=$(echo "$1" | sed "s/'/'\\\\''/g")
+ test "$v" = "${v#*[ |&;<>()$\`\\\"\'*?\[\]#~=%]}" || v="'$v'"
+ echo "$v"
+}
+
set_all(){
value=$1
shift
fi
for v in "$@"; do
- r="${v#*=}"
- l="${v%$r}"
- test "$r" = "${r#* }" || r="'$r'"
+ r=${v#*=}
+ l=${v%"$r"}
+ r=$(sh_quote "$r")
FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
done
echo "/* Automatically generated by configure - do not modify! */" > $TMPH
echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH
echo "#define FFMPEG_CONFIG_H" >> $TMPH
-echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
+echo "#define FFMPEG_CONFIGURATION \"$(c_escape $FFMPEG_CONFIGURATION)\"" >> $TMPH
echo "#define FFMPEG_DATADIR \"$(eval c_escape $datadir)\"" >> $TMPH
echo "FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION" >> config.mak