configure
author Darkvater
Tue, 26 Dec 2006 13:30:48 +0000
changeset 5565 4eae079a5609
parent 5305 e07957fe871e
child 5386 57c38a03a0da
child 5643 3778051e8095
permissions -rwxr-xr-x
(svn r7562) -Fix (r7060, 5874): It seems windows doesn't have the same functionality for CreateWindow when starting a program from the console or from the GUI. Because of this starting OpenTTD from the desktop wouldn't maximize the window, even if the config file said so. So work around this...
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     1
#!/bin/sh
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     2
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     3
# This 'configure' script is a very easy wrapper around 'make updateconf'
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     4
#  It allows cross-compilers to do their job much more easy.
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     5
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     6
function showhelp() {
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     7
	echo "Configure for OpenTTD"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     8
	echo ""
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
     9
	echo "Usage:"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    10
	echo " $0 --your_options"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    11
	echo ""
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    12
	echo "Params:"
5117
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    13
	echo " --debug             Create debug-release                [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    14
	echo " --profile           Create profile-release              [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    15
	echo " --dedicated         Make a dedicated build              [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    16
	echo " --revision          Set the revision of the compilation [detected]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    17
	echo " --target-cc         Sets the target-compiler            [\$CC]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    18
	echo " --target-cxx        Sets the C++ target-compiler        []"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    19
	echo " --host-cc           Sets the host-compiler              [\$CC]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    20
	echo " --host-cxx          Sets the C++ host-compiler          []"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    21
	echo " --os                Sets the OS. Listens to:            [detected]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    22
	echo "                        UNIX, OSX, FREEBSD, MORPHOS"
5305
e07957fe871e (svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents: 5117
diff changeset
    23
	echo "                        BEOS, SUNOS, CYGWIN, MINGW, OS2"
5117
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    24
	echo " --windres           Sets the windres (Windows)          [windres]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    25
	echo " --force-le          Force LE platform                   [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    26
	echo " --force-be          Force BE platform                   [no]"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    27
	echo ""
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    28
	echo "Params that can be used with --with or --without"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    29
	echo "   (e.g.: --without-static disables static (default))"
5117
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    30
	echo " static              Do you want a static build?         [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    31
	echo " directmusic         Do you want direct-music?           [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    32
	echo " zlib                Do you want zlib-support?           [yes]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    33
	echo " sdl                 Do you want SDL-support?            [yes]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    34
	echo " png                 Do you want PNG-support?            [yes]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    35
	echo " iconv               Do you want iconv-support?          [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    36
	echo " network             Do you want network-support?        [yes]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    37
	echo " cocoa               Do you want cocoa-support? (MacOSX) [no]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    38
	echo " freetype            Do you want freetype-support?       [yes]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    39
	echo " fontconfig          Do you want fontconfig-support?     [yes]"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    40
	echo ""
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    41
	echo "Params used to configure external libs:"
5117
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    42
	echo " --static-zlib-path  Set the path to your static zlib    []"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    43
	echo " --sdl-config        Where is your sdl-config            [sdl-config]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    44
	echo " --libpng-config     Where is your libpng-config         [libpng-config]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    45
	echo " --freetype-config   Where is your freetype-config       [freetype-config]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    46
	echo " --fontconfig-config Where is your fontconfig-config     [pkg-config fontconfig]"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
    47
	echo " --with-iconv        Set the path to your iconv headers  []"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    48
	echo " "
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    49
}
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    50
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    51
function handle() {
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
    52
	PARAM="$PARAM \"$1=`awk 'BEGIN { FS="="; $0="'"$2"'"; print $2;}'`\""
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    53
}
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    54
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    55
# The things you can use inside this case:
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    56
#  handle NAME VALUE - Sets the value to give the 'make upgradeconf'
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    57
#                         Value is in form: tag=REAL_VALUE
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    58
#  ITEM="NAME"       - Will set the value as above, only with the next param
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    59
#  SITEM="NAME"      - Will set the var $NAME to the next param
3221
ef81bf83703b (svn r3894) -Fix: use "" over in configure
truelight
parents: 3205
diff changeset
    60
for n in "$@"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    61
do
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    62
	case "$n" in
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    63
		--help | -h)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    64
			showhelp
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    65
			exit 0
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    66
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    67
3200
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    68
		--debug)
3205
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
    69
			DEBUG_SET=1
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
    70
			ITEM="DEBUG"
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
    71
			;;
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
    72
		--debug=*)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
    73
			handle "DEBUG" "$n"
3200
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    74
			;;
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    75
		--profile)
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    76
			PARAM="$PARAM PROFILE=1"
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    77
			;;
3302
d02733d7cc59 (svn r4059) -Fix: add --dedicated flag to configure
truelight
parents: 3221
diff changeset
    78
		--dedicated)
d02733d7cc59 (svn r4059) -Fix: add --dedicated flag to configure
truelight
parents: 3221
diff changeset
    79
			PARAM="$PARAM DEDICATED=1"
d02733d7cc59 (svn r4059) -Fix: add --dedicated flag to configure
truelight
parents: 3221
diff changeset
    80
			;;
3200
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    81
		--revision=*)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
    82
			RELEASE=`awk 'BEGIN { FS="="; $0="'"$n"'"; print $2;}'`
3200
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    83
			;;
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    84
		--revision)
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    85
			SITEM="RELEASE"
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
    86
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    87
		--target-cc=*)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
    88
			handle "CC_TARGET" "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    89
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    90
		--target-cc)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
    91
			ITEM="CC_TARGET"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    92
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    93
		--target-cxx=*)
4094
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
    94
			handle "CXX_TARGET" "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    95
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    96
		--target-cxx)
4094
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
    97
			SITEM="CXX_TARGET"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    98
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
    99
		--host-cc=*)
4094
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   100
			handle "CC_HOST" "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   101
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   102
		--host-cc)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   103
			ITEM="CC_HOST"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   104
			;;
4094
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   105
		--host-cxx=*)
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   106
			handle "CXX_HOST" "$n"
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   107
			;;
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   108
		--host-cxx)
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   109
			ITEM="CXX_HOST"
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   110
			;;
3306
51ee3cbe60f2 (svn r4065) -Fix: the configure now knows --host-cflags
truelight
parents: 3305
diff changeset
   111
		--host-cflags=*)
51ee3cbe60f2 (svn r4065) -Fix: the configure now knows --host-cflags
truelight
parents: 3305
diff changeset
   112
			handle CFLAGS_HOST "$n"
51ee3cbe60f2 (svn r4065) -Fix: the configure now knows --host-cflags
truelight
parents: 3305
diff changeset
   113
			;;
51ee3cbe60f2 (svn r4065) -Fix: the configure now knows --host-cflags
truelight
parents: 3305
diff changeset
   114
		--host-cflags)
51ee3cbe60f2 (svn r4065) -Fix: the configure now knows --host-cflags
truelight
parents: 3305
diff changeset
   115
			ITEM="CFLAGS_HOST"
51ee3cbe60f2 (svn r4065) -Fix: the configure now knows --host-cflags
truelight
parents: 3305
diff changeset
   116
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   117
		--os=*)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   118
			TARGET_OS=`awk 'BEGIN { FS="="; $0="'"$n"'"; print $2;}'`
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   119
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   120
		--os)
3201
65449801760c (svn r3869) -Fix: don't use OS in configure, some system have that defined ;)
truelight
parents: 3200
diff changeset
   121
			SITEM="TARGET_OS"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   122
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   123
		--windres=*)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   124
			handle WINDRES "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   125
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   126
		--windres)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   127
			ITEM="WINDRES"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   128
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   129
		--force-le)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   130
			PARAM="$PARAM ENDIAN_FORCE=LE"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   131
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   132
		--force-be)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   133
			PARAM="$PARAM ENDIAN_FORCE=BE"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   134
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   135
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   136
		--with-static)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   137
			PARAM="$PARAM STATIC=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   138
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   139
		--without-static)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   140
			PARAM="$PARAM STATIC="
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   141
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   142
		--with-directmusic)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   143
			PARAM="$PARAM WITH_DIRECTMUSIC=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   144
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   145
		--without-directmusic)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   146
			PARAM="$PARAM WITH_DIRECTMUSIC="
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   147
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   148
		--with-zlib)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   149
			PARAM="$PARAM WITH_ZLIB=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   150
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   151
		--without-zlib)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   152
			PARAM="$PARAM WITH_ZLIB="
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   153
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   154
		--with-sdl)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   155
			PARAM="$PARAM WITH_SDL=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   156
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   157
		--without-sdl)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   158
			PARAM="$PARAM WITH_SDL="
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   159
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   160
		--with-png)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   161
			PARAM="$PARAM WITH_PNG=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   162
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   163
		--without-png)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   164
			PARAM="$PARAM WITH_PNG="
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   165
			;;
3408
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   166
		--with-iconv)
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   167
			PARAM="$PARAM WITH_ICONV=1"
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   168
			;;
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   169
		--with-iconv=*)
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   170
			PARAM="$PARAM WITH_ICONV=1"
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   171
			handle WITH_ICONV_PATH "$n"
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   172
			;;
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   173
		--without-iconv)
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   174
			PARAM="$PARAM WITH_ICONV="
313f35564673 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   175
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   176
		--with-cocoa)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   177
			PARAM="$PARAM WITH_COCOA=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   178
			;;
4827
e79ca4952307 (svn r6751) -Fix: Add option to enable/disable network support. Default is on
Darkvater
parents: 4094
diff changeset
   179
		--with-network)
e79ca4952307 (svn r6751) -Fix: Add option to enable/disable network support. Default is on
Darkvater
parents: 4094
diff changeset
   180
			PARAM="$PARAM WITH_NETWORK=1"
e79ca4952307 (svn r6751) -Fix: Add option to enable/disable network support. Default is on
Darkvater
parents: 4094
diff changeset
   181
			;;
e79ca4952307 (svn r6751) -Fix: Add option to enable/disable network support. Default is on
Darkvater
parents: 4094
diff changeset
   182
		--without-network)
e79ca4952307 (svn r6751) -Fix: Add option to enable/disable network support. Default is on
Darkvater
parents: 4094
diff changeset
   183
			PARAM="$PARAM WITH_NETWORK="
e79ca4952307 (svn r6751) -Fix: Add option to enable/disable network support. Default is on
Darkvater
parents: 4094
diff changeset
   184
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   185
		--without-cocoa)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   186
			PARAM="$PARAM WITH_COCOA="
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   187
			;;
5108
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   188
		--with-freetype)
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   189
			PARAM="$PARAM WITH_FREETYPE=1"
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   190
			;;
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   191
		--without-freetype)
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   192
			PARAM="$PARAM WITH_FREETYPE="
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   193
			;;
5117
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   194
		--with-fontconfig)
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   195
			PARAM="$PARAM WITH_FONTCONFIG=1"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   196
			;;
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   197
		--without-fontconfig)
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   198
			PARAM="$PARAM WITH_FONTCONFIG="
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   199
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   200
		--static-zlib-path=*)
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   201
			handle STATIC_ZLIB_PATH "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   202
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   203
		--static-zlib-path)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   204
			ITEM="STATIC_ZLIB_PATH"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   205
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   206
		--sdl-config=*)
3406
514eef372355 (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3307
diff changeset
   207
			handle SDL_CONFIG "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   208
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   209
		--sdl-config)
3406
514eef372355 (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3307
diff changeset
   210
			ITEM="SDL_CONFIG"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   211
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   212
		--libpng-config=*)
3406
514eef372355 (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3307
diff changeset
   213
			handle LIBPNG_CONFIG "$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   214
			;;
4094
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   215
		--libpng-config)
3406
514eef372355 (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3307
diff changeset
   216
			ITEM="LIBPNG_CONFIG"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   217
			;;
5108
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   218
		--freetype-config=*)
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   219
			handle FREETYPE_CONFIG "$n"
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   220
			;;
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   221
		--freetype-config)
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   222
			ITEM="FREETYPE_CONFIG"
dc67d70b5a45 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4827
diff changeset
   223
			;;
5117
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   224
		--fontconfig-config=*)
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   225
			handle FONTCONFIG_CONFIG "$n"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   226
			;;
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   227
		--fontconfig-config)
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   228
			ITEM="FONTCONFIG_CONFIG"
a4a7fd847b77 (svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents: 5108
diff changeset
   229
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   230
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   231
		--*=*)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   232
			echo -n "Unknown switch "
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   233
			echo `awk 'BEGIN { FS="="; $0="'"$n"'"; print $1;}'`
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   234
			exit 1
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   235
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   236
		-*)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   237
			echo "Unknown switch $n"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   238
			exit 1
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   239
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   240
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   241
		*)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   242
			if ! test -z "$ITEM"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   243
			then
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   244
				PARAM="$PARAM $ITEM=\"$n\""
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   245
				ITEM="";
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   246
			elif ! test -z "$SITEM"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   247
			then
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   248
				export $SITEM="$n"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   249
				SITEM=""
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   250
			else
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   251
				echo "Unknown switch $n"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   252
				exit 1
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   253
			fi
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   254
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   255
	esac
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   256
done
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   257
3201
65449801760c (svn r3869) -Fix: don't use OS in configure, some system have that defined ;)
truelight
parents: 3200
diff changeset
   258
if ! test -z "$TARGET_OS"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   259
then
3201
65449801760c (svn r3869) -Fix: don't use OS in configure, some system have that defined ;)
truelight
parents: 3200
diff changeset
   260
	TARGET_OS=`echo $TARGET_OS | tr '[:lower:]' '[:upper:]'`
65449801760c (svn r3869) -Fix: don't use OS in configure, some system have that defined ;)
truelight
parents: 3200
diff changeset
   261
	case "$TARGET_OS" in
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   262
		WIN32)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   263
			PARAM="$PARAM WIN32=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   264
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   265
		UNIX)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   266
			PARAM="$PARAM UNIX=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   267
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   268
		OSX)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   269
			PARAM="$PARAM OSX=1 UNIX=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   270
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   271
		FREEBSD)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   272
			PARAM="$PARAM FREEBSD=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   273
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   274
		MORPHOS)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   275
			PARAM="$PARAM MORPHOS=1 UNIX=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   276
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   277
		BEOS)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   278
			PARAM="$PARAM BEOS=1 UNIX=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   279
			;;
5305
e07957fe871e (svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents: 5117
diff changeset
   280
		OS2)
e07957fe871e (svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents: 5117
diff changeset
   281
			PARAM="$PARAM OS2=1 UNIX=1"
e07957fe871e (svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents: 5117
diff changeset
   282
			;;
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   283
		SUNOS)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   284
			PARAM="$PARAM SUNOS=1 UNIX=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   285
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   286
		CYGWIN)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   287
			PARAM="$PARAM CYGWIN=1 WIN32=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   288
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   289
		MINGW)
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   290
			PARAM="$PARAM MINGW=1 WIN32=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   291
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   292
		*)
3202
ee43c4501036 (svn r3870) -Fix: missed one item in last commit, tnx glx :)
truelight
parents: 3201
diff changeset
   293
			echo "Unknown OS: $TARGET_OS"
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   294
			exit 1
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   295
			;;
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   296
	esac
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   297
	PARAM="$PARAM BYPASS_OS_DETECT=1"
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   298
fi
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   299
3205
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   300
if ! test -z "$DEBUG_SET"
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   301
then
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   302
	if test -z "`echo $PARAM | grep "DEBUG="`"
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   303
	then
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   304
		# Someone did --debug, without assigning a value, assume 1
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   305
		PARAM="$PARAM DEBUG=1"
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   306
	fi
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   307
fi
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   308
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   309
# First remove the Makefile.config, else you can have double entries
4009
16c7ad34af62 (svn r5220) Testing for existence AND using rm -f is tautologous
tron
parents: 3408
diff changeset
   310
rm -f Makefile.config
3205
cfe0785b5171 (svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
truelight
parents: 3202
diff changeset
   311
3305
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   312
echo "make upgradeconf $PARAM" > Makefile.run
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   313
. Makefile.run
cfeaa8e862e4 (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 :(
truelight
parents: 3302
diff changeset
   314
rm -f Makefile.run
3198
57a611a83867 (svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff changeset
   315
4094
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   316
# Makefile.config currently doesn't support custom RELEASE (revision), so, we add the line
a83fac319c4e (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 4009
diff changeset
   317
# yourself!
3200
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
   318
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
   319
if ! test -z "$RELEASE"
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
   320
then
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
   321
	echo "RELEASE=$RELEASE" >> Makefile.config
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
   322
fi
7440ead8c22a (svn r3867) -Add: added --debug, --profile and --revision to configure
truelight
parents: 3199
diff changeset
   323