From 26759c44804d220deedac861f1b030381d8393be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Tue, 25 Mar 2008 22:51:43 +0000 Subject: [PATCH] combine setting of various configure command line options Originally committed as revision 12592 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 50 +++++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 02d79a4370..49a75a484e 100755 --- a/configure +++ b/configure @@ -779,6 +779,22 @@ CMDLINE_SELECT=" static stripping " +CMDLINE_SET=' + arch + build_suffix + cc + cpu + cross_prefix + incdir + libdir + logfile + make + mandir + prefix + shlibdir + source_path + target_os +' # code dependency declarations @@ -993,40 +1009,12 @@ show_list() { for opt do optval="${opt#*=}" case "$opt" in - --logfile=*) logfile="$optval" - ;; - --prefix=*) prefix="$optval" - ;; - --libdir=*) libdir="$optval" - ;; - --shlibdir=*) shlibdir="$optval" - ;; - --incdir=*) incdir="$optval" - ;; - --mandir=*) mandir="$optval" - ;; - --source-path=*) source_path="$optval" - ;; - --cross-prefix=*) cross_prefix="$optval" - ;; - --target-os=*) target_os="$optval" - ;; - --cc=*) cc="$optval" - ;; - --make=*) make="$optval" - ;; --extra-cflags=*) add_cflags "$optval" ;; --extra-ldflags=*) add_ldflags "$optval" ;; --extra-libs=*) add_extralibs "$optval" ;; - --build-suffix=*) build_suffix="$optval" - ;; - --arch=*) arch="$optval" - ;; - --cpu=*) cpu="$optval" - ;; --disable-devices) disable $INDEV_LIST $OUTDEV_LIST ;; --enable-debug=*) debuglevel="$optval" @@ -1057,7 +1045,11 @@ for opt do --help|-h) show_help ;; *) - die_unknown $opt + optname="${opt%=*}" + optname="${optname#--}" + optname=$(echo "$optname" | sed 's/-/_/g') + is_in $optname $CMDLINE_SET || die_unknown $opt + eval $optname='$optval' ;; esac done