summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-06-29 07:19:24 +0000
committerpeter1138 <peter1138@openttd.org>2006-06-29 07:19:24 +0000
commit5c88a9745acb06ed085cba594f3b3ca8d8c04ba3 (patch)
tree08800c63bc0f0285f516f2247d9ea5d57a989146 /configure
parent0b44ec1b281fa56e9403af75ea1c888bd1f054f3 (diff)
downloadopenttd-5c88a9745acb06ed085cba594f3b3ca8d8c04ba3.tar.xz
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
up the same way as CC_HOST / CXX_HOST, and add or fix their options within the configure script. In the Makefile, instead of overriding CC / CXX with the target compilers if they are set, set the target compilers with the default compilers if none are set (bit of a mouthful), and use the target compilers explicitly.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 13 insertions, 13 deletions
diff --git a/configure b/configure
index 2a30a58db..bcc52d992 100755
--- a/configure
+++ b/configure
@@ -17,6 +17,7 @@ function showhelp() {
echo " --target-cc Sets the target-compiler [\$CC]"
echo " --target-cxx Sets the C++ target-compiler []"
echo " --host-cc Sets the host-compiler [\$CC]"
+ echo " --host-cxx Sets the C++ host-compiler []"
echo " --os Sets the OS. Listens to: [detected]"
echo " UNIX, OSX, FREEBSD, MORPHOS"
echo " BEOS, SUNOS, CYGWIN, MINGW"
@@ -85,17 +86,23 @@ do
ITEM="CC_TARGET"
;;
--target-cxx=*)
- TARGET_CXX=`awk 'BEGIN { FS="="; $0="'"$n"'"; print $2;}'`
+ handle "CXX_TARGET" "$n"
;;
--target-cxx)
- SITEM="TARGET_CXX"
+ SITEM="CXX_TARGET"
;;
--host-cc=*)
- handle CC_HOST "$n"
+ handle "CC_HOST" "$n"
;;
--host-cc)
ITEM="CC_HOST"
;;
+ --host-cxx=*)
+ handle "CXX_HOST" "$n"
+ ;;
+ --host-cxx)
+ ITEM="CXX_HOST"
+ ;;
--host-cflags=*)
handle CFLAGS_HOST "$n"
;;
@@ -182,7 +189,7 @@ do
--libpng-config=*)
handle LIBPNG_CONFIG "$n"
;;
- --lib-png-config)
+ --libpng-config)
ITEM="LIBPNG_CONFIG"
;;
@@ -268,15 +275,8 @@ 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
-# ourself!
-
-if ! test -z "$TARGET_CXX"
-then
- echo "CXX=$TARGET_CXX" >> Makefile.config
-fi
-
-# Same for RELEASE (read: REVISION)
+# Makefile.config currently doesn't support custom RELEASE (revision), so, we add the line
+# yourself!
if ! test -z "$RELEASE"
then