(svn r7877) Improve readability and shorten the configure script by 241 lines

This commit is contained in:
tron 2007-01-05 17:29:08 +00:00
parent dbb910679f
commit 63341d85d4

View File

@ -72,404 +72,163 @@ detect_params() {
optarg=`expr "x$p" : 'x[^=]*=\(.*\)'` optarg=`expr "x$p" : 'x[^=]*=\(.*\)'`
case "$p" in case "$p" in
--help | -h) --help | -h) showhelp; exit 0;;
showhelp
exit 0
;;
--config-log) --config-log) prev_p="config_log";;
prev_p="config_log" --config-log=*) config_log="$optarg";;
;;
--config-log=*)
config_log="$optarg"
;;
--build) --build) prev_p="build";;
prev_p="build" --build=*) build="$optarg";;
;;
--build=*)
build="$optarg"
;;
--host) --host) prev_p="host";;
prev_p="host" --host=*) host="$optarg";;
;;
--host=*)
host="$optarg"
;;
--os) --os) prev_p="os";;
prev_p="os" --os=*) os="$optarg";;
;;
--os=*)
os="$optarg"
;;
--revision=*) --revision=*) revision="$optarg";;
revision="$optarg"
;;
--cc-build) --cc-build) prevp_p="cc_build";;
prevp_p="cc_build" --cc-build=*) cc_build="$optarg";;
;; --cc-host) prevp_p="cc_host";;
--cc-build=*) --cc-host=*) cc_host="$optarg";;
cc_build="$optarg" --cxx-host) prevp_p="cxx_host";;
;; --cxx-host=*) cxx_host="$optarg";;
--cc-host) --windres) prevp_p="windres";;
prevp_p="cc_host" --windres=*) windres="$optarg";;
;; --strip) prevp_p="strip";;
--cc-host=*) --strip=*) strip="$optarg";;
cc_host="$optarg" --lipo) prevp_p="lipo";;
;; --lipo=*) lipo="$optarg";;
--cxx-host)
prevp_p="cxx_host"
;;
--cxx-host=*)
cxx_host="$optarg"
;;
--windres)
prevp_p="windres"
;;
--windres=*)
windres="$optarg"
;;
--strip)
prevp_p="strip"
;;
--strip=*)
strip="$optarg"
;;
--lipo)
prevp_p="lipo"
;;
--lipo=*)
lipo="$optarg"
;;
--endian) --endian) prev_p="endian";;
prev_p="endian" --endian=*) endian="$optarg";;
;;
--endian=*)
endian="$optarg"
;;
--prefix-dir) --prefix-dir) prevp_p="prefix-dir";;
prevp_p="prefix-dir" --prefix-dir=*) prefix_dir="$optarg";;
;;
--prefix-dir=*)
prefix_dir="$optarg"
;;
--binary-dir) --binary-dir) prevp_p="binary-dir";;
prevp_p="binary-dir" --binary-dir=*) binary_dir="$optarg";;
;;
--binary-dir=*)
binary_dir="$optarg"
;;
--data-dir) --data-dir) prevp_p="data-dir";;
prevp_p="data-dir" --data-dir=*) data_dir="$optarg";;
;;
--data-dir=*)
data_dir="$optarg"
;;
--icon-dir) --icon-dir) prevp_p="icon-dir";;
prevp_p="icon-dir" --icon-dir=*) icon_dir="$optarg";;
;;
--icon-dir=*)
icon_dir="$optarg"
;;
--personal-dir) --personal-dir) prevp_p="personal-dir";;
prevp_p="personal-dir" --personal-dir=*) personal_dir="$optarg";;
;;
--personal-dir=*)
personal_dir="$optarg"
;;
--install-dir) --install-dir) prevp_p="install-dir";;
prevp_p="install-dir" --install-dir=*) install_dir="$optarg";;
;;
--install-dir=*)
install_dir="$optarg"
;;
# TODO: The next few cases will be removed when the search path patch is applied # TODO: The next few cases will be removed when the search path patch is applied
--custom-lang-dir) --custom-lang-dir) prevp_p="custom-lang-dir";;
prevp_p="custom-lang-dir" --custom-lang-dir=*) custom_lang_dir="$optarg";;
;;
--custom-lang-dir=*)
custom_lang_dir="$optarg"
;;
--second-data-dir) --second-data-dir) prevp_p="second-data-dir";;
prevp_p="second-data-dir" --second-data-dir=*) second_data_dir="$optarg";;
;;
--second-data-dir=*)
second_data_dir="$optarg"
;;
--enable-install) --enable-install) enable_install="1";;
enable_install="1" --enable-install=*) enable_install="$optarg";;
;;
--enable-install=*)
enable_install="$optarg"
;;
# TODO: End of to be removed cases # TODO: End of to be removed cases
--enable-debug) --enable-debug) enable_debug="1";;
enable_debug="1" --enable-debug=*) enable_debug="$optarg";;
;; --enable-profiling) enable_profiling="1";;
--enable-debug=*) --enable-profiling=*) enable_profiling="$optarg";;
enable_debug="$optarg" --enable-dedicated) enable_dedicated="1";;
;; --enable-dedicated=*) enable_dedicated="$optarg";;
--enable-profiling) --enable-network=*) enable_network="$optarg";;
enable_profiling="1" --disable-network) enable_network="0";;
;; --disable-static) enable_static="0";;
--enable-profiling=*) --enable-static) enable_static="2";;
enable_profiling="$optarg" --enable-static=*) enable_static="$optarg";;
;; --disable-translator) enable_translator="0";;
--enable-dedicated) --enable-translator) enable_translator="2";;
enable_dedicated="1" --enable-translator=*) enable_translator="$optarg";;
;; --disable-assert) enable_assert="0";;
--enable-dedicated=*) --enable-assert) enable_assert="2";;
enable_dedicated="$optarg" --enable-assert=*) enable_assert="$optarg";;
;; --disable-strip) enable_strip="0";;
--enable-network=*) --enable-strip) enable_strip="2";;
enable_network="$optarg" --enable-strip=*) enable_strip="$optarg";;
;; --disable-universal) enable_universal="0";;
--disable-network) --enable-universal) enable_universal="2";;
enable_network="0" --enable-universal=*) enable_universal="$optarg";;
;; --disable-osx-g5) enable_osx_g5="0";;
--disable-static) --enable-osx-g5) enable_osx_g5="2";;
enable_static="0" --enable-osx-g5=*) enable_osx_g5="$optarg";;
;;
--enable-static)
enable_static="2"
;;
--enable-static=*)
enable_static="$optarg"
;;
--disable-translator)
enable_translator="0"
;;
--enable-translator)
enable_translator="2"
;;
--enable-translator=*)
enable_translator="$optarg"
;;
--disable-assert)
enable_assert="0"
;;
--enable-assert)
enable_assert="2"
;;
--enable-assert=*)
enable_assert="$optarg"
;;
--disable-strip)
enable_strip="0"
;;
--enable-strip)
enable_strip="2"
;;
--enable-strip=*)
enable_strip="$optarg"
;;
--disable-universal)
enable_universal="0"
;;
--enable-universal)
enable_universal="2"
;;
--enable-universal=*)
enable_universal="$optarg"
;;
--disable-osx-g5)
enable_osx_g5="0"
;;
--enable-osx-g5)
enable_osx_g5="2"
;;
--enable-osx-g5=*)
enable_osx_g5="$optarg"
;;
--with-sdl) --with-sdl) with_sdl="2";;
with_sdl="2" --without-sdl) with_sdl="0";;
;; --with-sdl=*) with_sdl="$optarg";;
--without-sdl)
with_sdl="0"
;;
--with-sdl=*)
with_sdl="$optarg"
;;
--with-cocoa) --with-cocoa) with_cocoa="2";;
with_cocoa="2" --without-cocoa) with_cocoa="0";;
;; --with-cocoa=*) with_cocoa="$optarg";;
--without-cocoa)
with_cocoa="0"
;;
--with-cocoa=*)
with_cocoa="$optarg"
;;
--with-zlib) --with-zlib) with_zlib="2";;
with_zlib="2" --without-zlib) with_zlib="0";;
;; --with-zlib=*) with_zlib="$optarg";;
--without-zlib)
with_zlib="0"
;;
--with-zlib=*)
with_zlib="$optarg"
;;
--with-png) --with-png) with_png="2";;
with_png="2" --without-png) with_png="0";;
;; --with-png=*) with_png="$optarg";;
--without-png) --with-libpng) with_png="2";;
with_png="0" --without-libpng) with_png="0";;
;; --with-libpng=*) with_png="$optarg";;
--with-png=*)
with_png="$optarg"
;;
--with-libpng)
with_png="2"
;;
--without-libpng)
with_png="0"
;;
--with-libpng=*)
with_png="$optarg"
;;
--with-freetype) --with-freetype) with_freetype="2";;
with_freetype="2" --without-freetype) with_freetype="0";;
;; --with-freetype=*) with_freetype="$optarg";;
--without-freetype) --with-libfreetype) with_freetype="2";;
with_freetype="0" --without-libfreetype) with_freetype="0";;
;; --with-libfreetype=*) with_freetype="$optarg";;
--with-freetype=*)
with_freetype="$optarg"
;;
--with-libfreetype)
with_freetype="2"
;;
--without-libfreetype)
with_freetype="0"
;;
--with-libfreetype=*)
with_freetype="$optarg"
;;
--with-fontconfig) --with-fontconfig) with_fontconfig="2";;
with_fontconfig="2" --without-fontconfig) with_fontconfig="0";;
;; --with-fontconfig=*) with_fontconfig="$optarg";;
--without-fontconfig) --with-libfontconfig) with_fontconfig="2";;
with_fontconfig="0" --without-libfontconfig) with_fontconfig="0";;
;; --with-libfontconfig=*) with_fontconfig="$optarg";;
--with-fontconfig=*)
with_fontconfig="$optarg"
;;
--with-libfontconfig)
with_fontconfig="2"
;;
--without-libfontconfig)
with_fontconfig="0"
;;
--with-libfontconfig=*)
with_fontconfig="$optarg"
;;
--with-makedepend) --with-makedepend) with_makedepend="2";;
with_makedepend="2" --without-makedepend) with_makedepend="0";;
;; --with-makedepend=*) with_makedepend="$optarg";;
--without-makedepend)
with_makedepend="0"
;;
--with-makedepend=*)
with_makedepend="$optarg"
;;
--with-direct-music) --with-direct-music) with_direct_music="2";;
with_direct_music="2" --without-direct-music) with_direct_music="0";;
;; --with-direct-music=*) with_direct_music="$optarg";;
--without-direct-music)
with_direct_music="0"
;;
--with-direct-music=*)
with_direct_music="$optarg"
;;
--with-sort) --with-sort) with_sort="2";;
with_sort="2" --without-sort) with_sort="0";;
;; --with-sort=*) with_sort="$optarg";;
--without-sort)
with_sort="0"
;;
--with-sort=*)
with_sort="$optarg"
;;
--with-iconv) --with-iconv) with_iconv="2";;
with_iconv="2" --without-iconv) with_iconv="0";;
;; --with-iconv=*) with_iconv="$optarg";;
--without-iconv)
with_iconv="0"
;;
--with-iconv=*)
with_iconv="$optarg"
;;
--with-midi=*) --with-midi=*) with_midi="$optarg";;
with_midi="$optarg" --with-midi-arg=*) with_midi_arg="$optarg";;
;;
--with-midi-arg=*)
with_midi_arg="$optarg"
;;
--without-osx-sysroot) --without-osx-sysroot) with_osx_sysroot="0";;
with_osx_sysroot="0" --with-osx-sysroot) with_osx_sysroot="2";;
;; --with-osx-sysroot=*) with_osx_sysroot="$optarg";;
--with-osx-sysroot)
with_osx_sysroot="2"
;;
--with-osx-sysroot=*)
with_osx_sysroot="$optarg"
;;
--without-application-bundle) --without-application-bundle) with_applicant_bundle="0";;
with_applicant_bundle="0" --with-application-bundle) with_applicant_bundle="1";;
;; --with-application-bundle=*) with_applicant_bundle="$optarg";;
--with-application-bundle)
with_applicant_bundle="1"
;;
--with-application-bundle=*)
with_applicant_bundle="$optarg"
;;
CC=* | --CC=*) CC=* | --CC=*) CC="$optarg";;
CC="$optarg" CXX=* | --CXX=*) CXX="$optarg";;
;; CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";;
CXX=* | --CXX=*) LDFLAGS=* | --LDFLAGS=*) LDFLAGS="$optarg";;
CXX="$optarg"
;;
CFLAGS=* | --CFLAGS=*)
CFLAGS="$optarg"
;;
LDFLAGS=* | --LDFLAGS=*)
LDFLAGS="$optarg"
;;
--ignore-extra-parameters) --ignore-extra-parameters) ignore_extra_parameters="1";;
ignore_extra_parameters="1"
;;
--*) --*)
if [ "$ignore_extra_parameters" = "0" ] if [ "$ignore_extra_parameters" = "0" ]