Commit 72702705 authored by Måns Rullgård's avatar Måns Rullgård
Browse files

configure: {enable,disable}_safe functions that sanitise arguments

Originally committed as revision 17667 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 3aa7ac6d
......@@ -325,6 +325,14 @@ disable_weak(){
set_weak no $*
}
enable_safe(){
enable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g')
}
disable_safe(){
disable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g')
}
do_enable_deep(){
for var; do
enabled $var && continue
......@@ -566,9 +574,7 @@ check_header(){
log check_header "$@"
header=$1
shift
var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
disable $var
check_cpp "$@" <<EOF && enable $var
check_cpp "$@" <<EOF && enable_safe $header || disable_safe $header
#include <$header>
int x;
EOF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment