]> git.sesse.net Git - ffmpeg/commitdiff
configure: escape colons in values written to config.fate
authorMans Rullgard <mans@mansr.com>
Thu, 12 Apr 2012 20:32:33 +0000 (21:32 +0100)
committerMans Rullgard <mans@mansr.com>
Fri, 13 Apr 2012 12:22:37 +0000 (13:22 +0100)
The fields in config.fate are colon-separated so any colons
within the fields should be escaped to prevent confusion.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure

index cc631461287d45915735f218e32cf7bab3fe1630..2eb885b5af665c81789e76ba77a045fefb20c68c 100755 (executable)
--- a/configure
+++ b/configure
@@ -2594,7 +2594,11 @@ case $target_os in
         ;;
 esac
 
-echo "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$LIBAV_CONFIGURATION" >config.fate
+esc(){
+    echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
+}
+
+echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate
 
 check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic