1
0
Fork 0

(svn r4064) -Fix: fixes for configure to accept spaces in params. This are mostly bypasses because bash really does suck in handling spaces and " stuff :(

release/0.5
truelight 2006-03-23 15:34:47 +00:00
parent e13a6c79c3
commit 262bc14595
1 changed files with 19 additions and 16 deletions

35
configure vendored
View File

@ -41,7 +41,7 @@ function showhelp() {
} }
function handle() { function handle() {
PARAM="$PARAM $1=`awk 'BEGIN { FS="="; $0="'$2'"; print $2;}'`" PARAM="$PARAM \"$1=`awk 'BEGIN { FS="="; $0="'"$2"'"; print $2;}'`\""
} }
# The things you can use inside this case: # The things you can use inside this case:
@ -62,7 +62,7 @@ do
ITEM="DEBUG" ITEM="DEBUG"
;; ;;
--debug=*) --debug=*)
handle "DEBUG" $n handle "DEBUG" "$n"
;; ;;
--profile) --profile)
PARAM="$PARAM PROFILE=1" PARAM="$PARAM PROFILE=1"
@ -71,37 +71,38 @@ do
PARAM="$PARAM DEDICATED=1" PARAM="$PARAM DEDICATED=1"
;; ;;
--revision=*) --revision=*)
RELEASE=`awk 'BEGIN { FS="="; $0="'$n'"; print $2;}'` RELEASE=`awk 'BEGIN { FS="="; $0="'"$n"'"; print $2;}'`
;; ;;
--revision) --revision)
SITEM="RELEASE" SITEM="RELEASE"
;; ;;
--target-cc=*) --target-cc=*)
handle "CC_TARGET" $n handle "CC_TARGET" "$n"
;; ;;
--target-cc) --target-cc)
ITEM="CCTARGET" ITEM="CC_TARGET"
;; ;;
--target-cxx=*) --target-cxx=*)
TARGET_CXX=`awk 'BEGIN { FS="="; $0="'$n'"; print $2;}'` echo "$n"
TARGET_CXX=`awk 'BEGIN { FS="="; $0="'"$n"'"; print $2;}'`
;; ;;
--target-cxx) --target-cxx)
SITEM="TARGET_CXX" SITEM="TARGET_CXX"
;; ;;
--host-cc=*) --host-cc=*)
handle CC_HOST $n handle CC_HOST "$n"
;; ;;
--host-cc) --host-cc)
ITEM="CC_HOST" ITEM="CC_HOST"
;; ;;
--os=*) --os=*)
TARGET_OS=`awk 'BEGIN { FS="="; $0="'$n'"; print $2;}'` TARGET_OS=`awk 'BEGIN { FS="="; $0="'"$n"'"; print $2;}'`
;; ;;
--os) --os)
SITEM="TARGET_OS" SITEM="TARGET_OS"
;; ;;
--windres=*) --windres=*)
handle WINDRES $n handle WINDRES "$n"
;; ;;
--windres) --windres)
ITEM="WINDRES" ITEM="WINDRES"
@ -150,19 +151,19 @@ do
PARAM="$PARAM WITH_COCOA=" PARAM="$PARAM WITH_COCOA="
;; ;;
--static-zlib-path=*) --static-zlib-path=*)
handle STATIC_ZLIB_PATH $n handle STATIC_ZLIB_PATH "$n"
;; ;;
--static-zlib-path) --static-zlib-path)
ITEM="STATIC_ZLIB_PATH" ITEM="STATIC_ZLIB_PATH"
;; ;;
--sdl-config=*) --sdl-config=*)
handle SDL-CONFIG $n handle SDL-CONFIG "$n"
;; ;;
--sdl-config) --sdl-config)
ITEM="SDL-CONFIG" ITEM="SDL-CONFIG"
;; ;;
--libpng-config=*) --libpng-config=*)
handle LIBPNG-CONFIG $n handle LIBPNG-CONFIG "$n"
;; ;;
--lib-png-config) --lib-png-config)
ITEM="LIBPNG-CONFIG" ITEM="LIBPNG-CONFIG"
@ -170,7 +171,7 @@ do
--*=*) --*=*)
echo -n "Unknown switch " echo -n "Unknown switch "
echo `awk 'BEGIN { FS="="; $0="'$n'"; print $1;}'` echo `awk 'BEGIN { FS="="; $0="'"$n"'"; print $1;}'`
exit 1 exit 1
;; ;;
-*) -*)
@ -181,11 +182,11 @@ do
*) *)
if ! test -z "$ITEM" if ! test -z "$ITEM"
then then
PARAM="$PARAM $ITEM=$n" PARAM="$PARAM $ITEM=\"$n\""
ITEM=""; ITEM="";
elif ! test -z "$SITEM" elif ! test -z "$SITEM"
then then
export $SITEM=$n export $SITEM="$n"
SITEM="" SITEM=""
else else
echo "Unknown switch $n" echo "Unknown switch $n"
@ -249,7 +250,9 @@ then
rm -f Makefile.config rm -f Makefile.config
fi fi
make upgradeconf $PARAM echo "make upgradeconf $PARAM" > Makefile.run
. Makefile.run
rm -f Makefile.run
# Makefile.config currently doesn't support custom CXX, so, we add the line # Makefile.config currently doesn't support custom CXX, so, we add the line
# ourself! # ourself!