config.lib
author celestar
Sun, 11 Mar 2007 09:28:58 +0000
branchcustombridgeheads
changeset 5651 335d9bd345b0
parent 5650 aefc131bf5ce
permissions -rw-r--r--
(svn r9109) [cbh] -Fix: Stabilize the reversing of trains on bridges/bridgeheads a little (it still crashes at times however). Also re-allow the construction of signals on bridgeheads
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     2
log() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     3
	if [ $1 = "1" ]; then echo "$2"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     4
	echo "$2" >> $config_log
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     5
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     6
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     7
set_default() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     8
	ignore_extra_parameters="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
     9
	# We set all kinds of defaults for params. Later on the user can override
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    10
	# most of them; but if they don't, this default is used.
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    11
	build=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    12
	host=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    13
	cc_build=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    14
	cc_host=""
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
    15
	cxx_build=""
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    16
	cxx_host=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    17
	windres=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    18
	strip=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    19
	lipo=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    20
	os="DETECT"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    21
	endian="AUTO"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    22
	revision=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    23
	config_log="config.log"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    24
	prefix_dir="/usr/local"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    25
	binary_dir="games"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    26
	data_dir="share/games/openttd"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    27
	icon_dir="share/pixmaps"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    28
	personal_dir=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    29
	custom_lang_dir=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    30
	second_data_dir=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    31
	install_dir="/"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    32
	enable_install="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    33
	enable_debug="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    34
	enable_profiling="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    35
	enable_dedicated="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    36
	enable_network="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    37
	enable_static="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    38
	enable_translator="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    39
	enable_assert="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    40
	enable_strip="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    41
	enable_universal="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    42
	enable_osx_g5="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    43
	with_osx_sysroot="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    44
	with_application_bundle="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    45
	with_sdl="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    46
	with_cocoa="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    47
	with_zlib="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    48
	with_png="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    49
	with_makedepend="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    50
	with_direct_music="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    51
	with_sort="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    52
	with_iconv="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    53
	with_midi=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    54
	with_midi_arg=""
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    55
	with_freetype="1"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    56
	with_fontconfig="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    57
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
    58
	save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip lipo os revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir custom_lang_dir second_data_dir enable_install enable_debug enable_profiling enable_dedicated enable_network enable_static enable_translator enable_assert enable_strip with_osx_sysroot enable_universal enable_osx_g5 with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_freetype with_fontconfig CC CXX CFLAGS LDFLAGS"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    59
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    60
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    61
detect_params() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    62
	# Walk over all params from the user and override any default settings if
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    63
	#  needed. This also handles any invalid option.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    64
	for p in "$@"; do
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    65
		if [ -n "$prev_p" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    66
			eval "$prev_p=\$p"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    67
			prev_p=
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    68
			continue
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    69
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    70
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    71
		optarg=`expr "x$p" : 'x[^=]*=\(.*\)'`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    72
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    73
		case "$p" in
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    74
			--help | -h)                  showhelp; exit 0;;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    75
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    76
			--config-log)                 prev_p="config_log";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    77
			--config-log=*)               config_log="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
    78
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    79
			--build)                      prev_p="build";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    80
			--build=*)                    build="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    81
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    82
			--host)                       prev_p="host";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    83
			--host=*)                     host="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    84
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    85
			--os)                         prev_p="os";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    86
			--os=*)                       os="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    87
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    88
			--revision=*)                 revision="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    89
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    90
			--cc-build)                   prevp_p="cc_build";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    91
			--cc-build=*)                 cc_build="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    92
			--cc-host)                    prevp_p="cc_host";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    93
			--cc-host=*)                  cc_host="$optarg";;
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
    94
			--cxx-build)                  prevp_p="cxx_build";;
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
    95
			--cxx-build=*)                cxx_build="$optarg";;
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    96
			--cxx-host)                   prevp_p="cxx_host";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    97
			--cxx-host=*)                 cxx_host="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    98
			--windres)                    prevp_p="windres";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
    99
			--windres=*)                  windres="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   100
			--strip)                      prevp_p="strip";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   101
			--strip=*)                    strip="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   102
			--lipo)                       prevp_p="lipo";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   103
			--lipo=*)                     lipo="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   104
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   105
			--endian)                     prev_p="endian";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   106
			--endian=*)                   endian="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   107
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   108
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   109
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   110
			--prefix-dir)                 prevp_p="prefix-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   111
			--prefix-dir=*)               prefix_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   112
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   113
			--binary-dir)                 prevp_p="binary-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   114
			--binary-dir=*)               binary_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   115
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   116
			--data-dir)                   prevp_p="data-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   117
			--data-dir=*)                 data_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   118
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   119
			--icon-dir)                   prevp_p="icon-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   120
			--icon-dir=*)                 icon_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   121
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   122
			--personal-dir)               prevp_p="personal-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   123
			--personal-dir=*)             personal_dir="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   124
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   125
			--install-dir)                prevp_p="install-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   126
			--install-dir=*)              install_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   127
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   128
# TODO: The next few cases will be removed when the search path patch is applied
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   129
			--custom-lang-dir)            prevp_p="custom-lang-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   130
			--custom-lang-dir=*)          custom_lang_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   131
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   132
			--second-data-dir)            prevp_p="second-data-dir";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   133
			--second-data-dir=*)          second_data_dir="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   134
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   135
			--enable-install)             enable_install="1";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   136
			--enable-install=*)           enable_install="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   137
# TODO: End of to be removed cases
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   138
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   139
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   140
			--enable-debug)               enable_debug="1";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   141
			--enable-debug=*)             enable_debug="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   142
			--enable-profiling)           enable_profiling="1";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   143
			--enable-profiling=*)         enable_profiling="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   144
			--enable-dedicated)           enable_dedicated="1";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   145
			--enable-dedicated=*)         enable_dedicated="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   146
			--enable-network=*)           enable_network="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   147
			--disable-network)            enable_network="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   148
			--disable-static)             enable_static="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   149
			--enable-static)              enable_static="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   150
			--enable-static=*)            enable_static="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   151
			--disable-translator)         enable_translator="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   152
			--enable-translator)          enable_translator="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   153
			--enable-translator=*)        enable_translator="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   154
			--disable-assert)             enable_assert="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   155
			--enable-assert)              enable_assert="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   156
			--enable-assert=*)            enable_assert="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   157
			--disable-strip)              enable_strip="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   158
			--enable-strip)               enable_strip="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   159
			--enable-strip=*)             enable_strip="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   160
			--disable-universal)          enable_universal="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   161
			--enable-universal)           enable_universal="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   162
			--enable-universal=*)         enable_universal="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   163
			--disable-osx-g5)             enable_osx_g5="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   164
			--enable-osx-g5)              enable_osx_g5="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   165
			--enable-osx-g5=*)            enable_osx_g5="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   166
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   167
			--with-sdl)                   with_sdl="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   168
			--without-sdl)                with_sdl="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   169
			--with-sdl=*)                 with_sdl="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   170
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   171
			--with-cocoa)                 with_cocoa="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   172
			--without-cocoa)              with_cocoa="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   173
			--with-cocoa=*)               with_cocoa="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   174
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   175
			--with-zlib)                  with_zlib="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   176
			--without-zlib)               with_zlib="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   177
			--with-zlib=*)                with_zlib="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   178
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   179
			--with-png)                   with_png="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   180
			--without-png)                with_png="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   181
			--with-png=*)                 with_png="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   182
			--with-libpng)                with_png="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   183
			--without-libpng)             with_png="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   184
			--with-libpng=*)              with_png="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   185
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   186
			--with-freetype)              with_freetype="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   187
			--without-freetype)           with_freetype="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   188
			--with-freetype=*)            with_freetype="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   189
			--with-libfreetype)           with_freetype="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   190
			--without-libfreetype)        with_freetype="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   191
			--with-libfreetype=*)         with_freetype="$optarg";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   192
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   193
			--with-fontconfig)            with_fontconfig="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   194
			--without-fontconfig)         with_fontconfig="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   195
			--with-fontconfig=*)          with_fontconfig="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   196
			--with-libfontconfig)         with_fontconfig="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   197
			--without-libfontconfig)      with_fontconfig="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   198
			--with-libfontconfig=*)       with_fontconfig="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   199
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   200
			--with-makedepend)            with_makedepend="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   201
			--without-makedepend)         with_makedepend="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   202
			--with-makedepend=*)          with_makedepend="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   203
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   204
			--with-direct-music)          with_direct_music="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   205
			--without-direct-music)       with_direct_music="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   206
			--with-direct-music=*)        with_direct_music="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   207
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   208
			--with-sort)                  with_sort="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   209
			--without-sort)               with_sort="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   210
			--with-sort=*)                with_sort="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   211
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   212
			--with-iconv)                 with_iconv="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   213
			--without-iconv)              with_iconv="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   214
			--with-iconv=*)               with_iconv="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   215
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   216
			--with-midi=*)                with_midi="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   217
			--with-midi-arg=*)            with_midi_arg="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   218
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   219
			--without-osx-sysroot)        with_osx_sysroot="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   220
			--with-osx-sysroot)           with_osx_sysroot="2";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   221
			--with-osx-sysroot=*)         with_osx_sysroot="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   222
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   223
			--without-application-bundle) with_applicant_bundle="0";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   224
			--with-application-bundle)    with_applicant_bundle="1";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   225
			--with-application-bundle=*)  with_applicant_bundle="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   226
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   227
			CC=* | --CC=*)                CC="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   228
			CXX=* | --CXX=*)              CXX="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   229
			CFLAGS=* | --CFLAGS=*)        CFLAGS="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   230
			LDFLAGS=* | --LDFLAGS=*)      LDFLAGS="$optarg";;
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   231
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   232
			--ignore-extra-parameters)    ignore_extra_parameters="1";;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   233
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   234
			--*)
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   235
				if [ "$ignore_extra_parameters" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   236
					echo "Unknown option $p"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   237
					exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   238
				else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   239
					echo "Unknown option $p ignored"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   240
				fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   241
				;;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   242
		esac
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   243
	done
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   244
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   245
	if [ -n "$prev_p" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   246
		echo "configure: error: missing argument to --$prev_p"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   247
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   248
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   249
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   250
	# Clean the logfile
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   251
	echo "" > $config_log
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   252
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   253
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   254
save_params() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   255
	# Here we save all params, so we can later on do an exact redo of this
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   256
	#  configuration, without having the user to re-input stuff
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   257
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   258
	echo "Running configure with following options:" >> $config_log
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   259
	echo "" >> $config_log
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   260
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   261
	configure="$0 --ignore-extra-parameters"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   262
	for p in $save_params_array; do
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   263
		eval "v=\"\$$p\""
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   264
		p=`echo "$p" | sed 's/_/-/g;s/\n//g;'`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   265
		# Only save those params that aren't empty
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   266
		configure="$configure --$p=\"$v\""
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   267
	done
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   268
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   269
	echo "$configure" >> $config_log
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   270
	echo "$configure" > config.cache
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   271
	echo "" >> $config_log
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   272
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   273
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   274
check_params() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   275
	# Some params want to be in full uppercase, else they might not work as
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   276
	# expected.. fix that here
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   277
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   278
	endian=`echo $endian | tr [:lower:] [:upper:]`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   279
	os=`echo $os | tr [:lower:] [:upper:]`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   280
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   281
	# Check if all params have valid values
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   282
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   283
	# Endian only allows AUTO, LE and, BE
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   284
	if ! echo $endian | grep -Eq "^(AUTO|LE|BE)$"; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   285
		echo "configure: error: invalid option --endian=$endian"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   286
		echo " Available options are: --endian=[AUTO|LE|BE]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   287
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   288
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   289
	# OS only allows DETECT, UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, and MINGW, OS2
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   290
	if ! echo $os | grep -Eq "^(DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2)$"; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   291
		echo "configure: error: invalid option --os=$os"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   292
		echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   293
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   294
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   295
	# enable_debug should be between 0 and 4
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   296
	if ! echo $enable_debug | grep -q "^[0123]$"; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   297
		echo "configure: error: invalid option --enable-debug=$enable_debug"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   298
		echo " Available options are: --enable-debug[=0123]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   299
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   300
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   301
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   302
	check_build
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   303
	check_host
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   304
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   305
	detect_os
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   306
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   307
# We might enable universal builds always on OSX targets.. but currently we don't
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   308
#	if [ "$enable_universal" = "1" ]  && [ "$os" != "OSX" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   309
	if [ "$enable_universal" = "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   310
		enable_universal="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   311
	fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   312
	if [ "$enable_universal" = "2" ]  && [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   313
		log 1 "configure: error: --enable-universal only works on OSX"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   314
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   315
	fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   316
	if [ "$enable_universal" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   317
		log 1 "checking universal build... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   318
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   319
		log 1 "checking universal build... yes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   320
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   321
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   322
	# Already detected by check_build
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   323
	log 1 "checking for build gcc... $cc_build"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   324
	log 1 "checking for host gcc... $cc_host"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   325
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   326
	check_cxx_build
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   327
	check_cxx_host
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   328
	check_windres
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   329
	check_strip
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   330
	check_lipo
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   331
	check_makedepend
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   332
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   333
	if [ "$enable_static" = "1" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   334
		if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   335
			enable_static="2"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   336
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   337
			enable_static="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   338
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   339
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   340
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   341
	if [ "$enable_static" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   342
		log 1 "checking for static... yes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   343
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   344
		if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "MORPHOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   345
			log 1 "WARNING: static is only known to work on Windows, MacOSX and MorphOS"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   346
			log 1 "WARNING: use static at your own risk on this platform"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   347
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   348
			sleep 5
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   349
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   350
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   351
		log 1 "checking for static... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   352
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   353
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   354
	# Show what we configured
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   355
	if [ "$enable_debug" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   356
		log 1 "using debug level... no"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   357
	elif [ "$enable_profiling" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   358
		log 1 "using debug level... profiling (debug level $enable_debug)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   359
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   360
		log 1 "using debug level... level $enable_debug"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   361
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   362
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   363
	detect_sdl
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   364
	detect_cocoa
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   365
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   366
	if [ "$enable_dedicated" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   367
		log 1 "checking GDI video driver... skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   368
		log 1 "checking dedicated... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   369
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   370
		if [ "$enable_network" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   371
			log 1 "WARNING: compiling a dedicated server without network is pointless"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   372
			sleep 5
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   373
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   374
	else
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   375
		if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   376
			log 1 "checking GDI video driver... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   377
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   378
			log 1 "checking GDI video driver... not Windows, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   379
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   380
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   381
		if [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   382
			log 1 "WARNING: no video driver found, building dedicated only"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   383
			enable_dedicated="1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   384
			sleep 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   385
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   386
			log 1 "checking dedicated... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   387
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   388
			log 1 "checking dedicated... not selected"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   389
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   390
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   391
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   392
	if [ "$enable_network" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   393
		log 1 "checking network... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   394
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   395
		log 1 "checking network... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   396
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   397
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   398
	if [ "$enable_translator" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   399
		log 1 "checking translator... debug"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
   400
		# -t shows TODO items, normally they are muted
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
   401
		strgen_flags="-t"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   402
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   403
		log 1 "checking translator... no"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
   404
		strgen_flags=""
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   405
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   406
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   407
	if [ "$enable_assert" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   408
		log 1 "checking assert... enabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   409
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   410
		log 1 "checking assert... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   411
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   412
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   413
	detect_zlib
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   414
	detect_png
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   415
	detect_freetype
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   416
	detect_fontconfig
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   417
	detect_iconv
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   418
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   419
	if [ "$with_direct_music" = "1" ] || [ "$with_direct_music" = "2" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   420
		if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   421
			if [ "$with_direct_music" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   422
				log 1 "configure: error: direct-music is only supported on Win32 targets"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   423
				exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   424
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   425
			with_direct_music="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   426
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   427
			log 1 "checking direct-music... not Windows, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   428
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   429
			check_direct_music
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   430
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   431
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   432
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   433
	detect_sort
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   434
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   435
	if [ "$os" = "OSX" ] && [ "$endian" = "AUTO" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   436
		endian="PREPROCESSOR"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   437
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   438
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   439
	log 1 "checking endianess... $endian"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   440
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   441
	# Suppress language errors when there is a version defined, indicating a release
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   442
	#  It just isn't pretty if any release produces warnings in the languages.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   443
	if [ -f "$ROOT_DIR/version" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   444
		lang_suppress="yes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   445
		log 1 "suppress language errors... yes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   446
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   447
		lang_suppress=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   448
		log 1 "suppress language errors... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   449
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   450
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   451
	if [ "$enable_debug" = "0" ] && [ "$enable_profiling" = "0" ] && [ "$enable_strip" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   452
		if [ "$os" = "MORPHOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   453
			strip_arg="--strip-all --strip-unneeded --remove-section .comment"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   454
		elif [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   455
			strip_arg=""
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   456
		elif [ "$os" = "OS2" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   457
			strip_arg=""
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   458
			# OS2 uses strip via gcc, because it needs to be feed to emxbind
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   459
			LDFLAGS="$LDFLAGS -s"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   460
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   461
			strip_arg="-s"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   462
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   463
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   464
		log 1 "checking stripping... $strip $strip_arg"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   465
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   466
		strip=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   467
		log 1 "checking stripping... skipped"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   468
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   469
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   470
	if [ "$os" != "OSX" ] && [ "$with_osx_sysroot" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   471
		if [ "$with_osx_sysroot" = "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   472
			with_osx_sysroot="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   473
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   474
			log 1 "checking OSX sysroot... not OSX, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   475
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   476
			log 1 "configure: error: --with-osx-sysroot only works if OSX is the target"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   477
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   478
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   479
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   480
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   481
	if [ "$with_osx_sysroot" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   482
		if [ "$enable_universal" = "0" ] && [ "$with_osx_sysroot" != "1" ] && [ "$with_osx_sysroot" != "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   483
			log 1 "checking OSX sysroot... $with_osx_sysroot"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   484
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   485
			# If autodetect and no universal, use system default
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   486
			if [ "$with_osx_sysroot" = "1" ] && [ "$enable_universal" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   487
				log 1 "checking OSX sysroot... no (use system default)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   488
				with_osx_sysroot="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   489
			else
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   490
				log 1 "checking OSX sysroot... automatically"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   491
				with_osx_sysroot="3"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   492
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   493
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   494
	else
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   495
		if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   496
			log 1 "checking OSX sysroot... no (use system default)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   497
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   498
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   499
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   500
	if [ "$os" != "OSX" ] && [ "$with_application_bundle" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   501
		if [ "$with_application_bundle" = "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   502
			with_application_bundle="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   503
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   504
			log 1 "checking OSX application bundle... not OSX, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   505
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   506
			log 1 "configure: error: --with-application-bundle only works if OSX is the target"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   507
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   508
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   509
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   510
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   511
	if [ "$os" = "OSX" ] && [ "$with_application_bundle" = "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   512
		OSXAPP="OpenTTD.app"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   513
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   514
# TODO: remove next few lines of code when the search path patch has been applied
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   515
		if [ -n "$custom_lang_dir" ] && [ "$custom_lang_dir" != "$(OSXAPP)/Contents/Lang/" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   516
			log 1 "configure: error: --custom-lang-dir and --with-application-bundle are not compatible
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   517
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   518
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   519
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   520
		if [ -n "$custom_lang_dir" ] && [ "$second_data_dir" != "$(OSXAPP)/Contents/Data/" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   521
			log 1 "configure: error: --second-data-dir and --with-application-bundle are not compatible
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   522
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   523
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   524
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   525
		custom_lang_dir="${OSXAPP}/Contents/Lang/"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   526
		second_data_dir="${OSXAPP}/Contents/Data/"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   527
# TODO: remove till here
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   528
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   529
		OSXAPP=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   530
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   531
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   532
	if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   533
		# Test on G5
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   534
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   535
		if [ "$enable_osx_g5" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   536
			log 1 "detecting G5... yes (forced)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   537
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   538
			# First, are we a real OSX system, else we can't detect it
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   539
			native=`LC_ALL=C uname | tr [:upper:] [:lower:] | grep darwin`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   540
			# If $host doesn't match $build , we are cross-compiling
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   541
			if [ -n "$native" ] && [ "$build" != "$host" ]; then
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   542
				$cc_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   543
				res=`./G5_detector`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   544
				rm -f G5_detector
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   545
				if [ -n "$res" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   546
					# This is G5, add flags for it
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   547
					enable_osx_g5="2"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   548
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   549
					log 1 "detecting G5... yes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   550
				else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   551
					enable_osx_g5="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   552
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   553
					log 1 "detecting G5... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   554
				fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   555
			else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   556
				enable_osx_g5="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   557
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   558
				log 1 "detecting G5... no (cross-compiling)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   559
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   560
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   561
	else
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   562
		if [ "$enable_osx_g5" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   563
			log 1 "configure: error: OSX G5 selected, but not compiling for OSX"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   564
			log 1 "configure: error: either select OSX as OS, or deselect OSX G5"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   565
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   566
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   567
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   568
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   569
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   570
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   571
make_cflags_and_ldflags() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   572
	# General CFlags for BUILD
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   573
	CFLAGS_BUILD=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   574
	# General CFlags for HOST
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   575
	CFLAGS="$CFLAGS -D$os -DWITH_REV"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   576
	# CFlags for HOST and C-Compiler
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   577
	CC_FLAGS=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   578
	# Libs to compile. In fact this is just LDFLAGS
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   579
	LIBS="-lstdc++"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   580
	# LDFLAGS used for HOST
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   581
	LDFLAGS="$LDFLAGS"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   582
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   583
	if [ $enable_debug = 0 ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   584
		# No debug, add default stuff
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   585
		OBJS_SUBDIR="release"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   586
		if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   587
			# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   588
			CFLAGS="$CFLAGS -O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   589
		else
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   590
			if [ "$os" = "MORPHOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   591
				CFLAGS="$CFLAGS -I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   592
				CFLAGS="$CFLAGS -mcpu=604 -fno-inline -mstring -mmultiple"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   593
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   594
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   595
			CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   596
		fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   597
	else
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   598
		OBJS_SUBDIR="debug"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   599
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   600
		# Each debug level reduces the optimalization by a bit
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   601
		if [ $enable_debug -ge 1 ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   602
			CFLAGS="$CFLAGS -g -D_DEBUG"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   603
		fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   604
		if [ $enable_debug -ge 2 ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   605
			CFLAGS="$CFLAGS -fno-inline"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   606
		fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   607
		if [ $enable_debug -ge 3 ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   608
			CFLAGS="$CFLAGS -O0"
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   609
		else
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   610
			CFLAGS="$CFLAGS -O2"
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   611
		fi
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   612
	fi
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   613
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   614
	if [ "$enable_profiling" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   615
		CFLAGS="$CFLAGS -p"
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   616
		LDFLAGS="$LDFLAGS -pg"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   617
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   618
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   619
	# Enable some things only for certain GCC versions
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   620
	cc_version=`$cc_host -dumpversion | cut -c 1,3`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   621
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   622
	if [ $cc_version -ge 29 ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   623
		CFLAGS="$CFLAGS -Wall -Wno-multichar -Wsign-compare -Wundef"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   624
		CFLAGS="$CFLAGS -Wwrite-strings -Wpointer-arith"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   625
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   626
		CC_CFLAGS="$CC_CFLAGS -Wstrict-prototypes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   627
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   628
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   629
	if [ $cc_version -ge 30 ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   630
		CFLAGS="$CFLAGS -W -Wno-unused-parameter"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   631
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   632
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   633
	if [ $cc_version -ge 34 ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   634
		CC_CFLAGS="$CC_CFLAGS -Wdeclaration-after-statement -Wold-style-definition"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   635
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   636
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   637
	if [ "$os" = "CYGWIN" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   638
		CFLAGS="$CFLAGS -mwin32"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   639
		LDFLAGS="$LDFLAGS -mwin32"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   640
	fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   641
	if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   642
		CFLAGS="$CFLAGS -mno-cygwin"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   643
		LDFLAGS="$LDFLAGS -mno-cygwin"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   644
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   645
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   646
	if [ "$os" = "CYGWIN" ] || [ "$os" = "MINGW" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   647
		LDFLAGS="$LDFLAGS -Wl,--subsystem,windows"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   648
		LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   649
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   650
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   651
	if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   652
		LIBS="$LIBS -lpthread"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   653
		LIBS="$LIBS -lrt"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   654
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   655
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   656
	if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   657
		LIBS="$LIBS -lc"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   658
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   659
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   660
	if [ "$os" = "MORPHOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   661
		# -Wstrict-prototypes generates much noise because of system headers
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   662
		CFLAGS="$CFLAGS -Wno-strict-prototypes"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   663
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   664
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   665
	if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   666
		LDFLAGS="$LDFLAGS -framework Cocoa"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   667
		if [ "$enable_dedicated" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   668
			LIBS="$LIBS -framework QuickTime"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   669
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   670
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   671
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   672
	if [ "$os" = "BEOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   673
		LIBS="$LIBS -lmidi -lbe"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   674
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   675
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   676
	# Most targets act like UNIX, just with some additions
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   677
	if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   678
		CFLAGS="$CFLAGS -DUNIX"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   679
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   680
	# And others like Windows
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   681
	if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   682
		CFLAGS="$CFLAGS -DWIN"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   683
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   684
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   685
	if [ -n "$sdl_config" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   686
		CFLAGS="$CFLAGS -DWITH_SDL"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   687
		CFLAGS="$CFLAGS `$sdl_config --cflags`"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   688
		if [ "$enable_static" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   689
			LIBS="$LIBS `$sdl_config --static-libs`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   690
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   691
			LIBS="$LIBS `$sdl_config --libs`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   692
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   693
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   694
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   695
	if [ "$with_cocoa" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   696
		CFLAGS="$CFLAGS -DWITH_COCOA"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   697
		LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   698
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   699
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   700
	if [ "$with_zlib" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   701
		if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   702
			LIBS="$LIBS $zlib"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   703
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   704
			LIBS="$LIBS -lz"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   705
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   706
		CFLAGS="$CFLAGS -DWITH_ZLIB"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   707
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   708
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   709
	if [ -n "$png_config" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   710
		CFLAGS="$CFLAGS -DWITH_PNG"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   711
		CFLAGS="$CFLAGS `$png_config --cppflags --I_opts | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   712
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   713
		# The extra flags are unneeded for latest libpng-config, but some versions are so broken...
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   714
		if [ "$enable_static" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   715
			if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   716
				LIBS="$LIBS `$png_config --prefix`/lib/libpng.a"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   717
			else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   718
				LIBS="$LIBS `$png_config --static --ldflags --libs --L_opts | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   719
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   720
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   721
			LIBS="$LIBS `$png_config --ldflags --libs --L_opts | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   722
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   723
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   724
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   725
	if [ -n "$freetype_config" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   726
		CFLAGS="$CFLAGS -DWITH_FREETYPE"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   727
		CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   728
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   729
		if [ "$enable_static" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   730
			if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   731
				LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   732
			else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   733
				# Is it possible to do static with freetype, if so: how?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   734
				LIBS="$LIBS `$freetype_config --libs | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   735
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   736
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   737
			LIBS="$LIBS `$freetype_config --libs | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   738
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   739
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   740
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   741
	if [ -n "$fontconfig_config" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   742
		CFLAGS="$CFLAGS -DWITH_FONTCONFIG"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   743
		CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   744
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   745
		if [ "$enable_static" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   746
			if [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   747
				LIBS="$LIBS `$fontconfig_config --prefix`/lib/libfontconfig.a"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   748
			else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   749
				LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   750
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   751
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   752
			LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' '  '`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   753
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   754
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   755
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   756
	if [ "$with_direct_music" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   757
		CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   758
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   759
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   760
	if [ "$with_iconv" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   761
		CFLAGS="$CFLAGS -DWITH_ICONV"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   762
		LIBS="$LIBS -liconv"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   763
		if [ "$with_iconv" != "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   764
			CFLAGS="$CFLAGS -I$with_iconv/include"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   765
			LIBS="$LIBS -L$with_iconv/lib"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   766
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   767
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   768
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   769
	if [ -n "$with_midi" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   770
		CFLAGS="$CFLAGS -DEXTERNAL_PLAYER=\\\\\"$with_midi\\\\\""
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   771
	fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   772
	if [ -n "$with_midi_arg" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   773
		CFLAGS="$CFLAGS -DMIDI_ARG=\\\\\"$with_midi_arg\\\\\""
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   774
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   775
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   776
	if [ "$enable_dedicated" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   777
		CFLAGS="$CFLAGS -DDEDICATED"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   778
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   779
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   780
	if [ "$enable_network" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   781
		CFLAGS="$CFLAGS -DENABLE_NETWORK"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   782
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   783
		if [ "$os" = "BEOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   784
			LDFLAGS="$LDFLAGS -lbind -lsocket"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   785
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   786
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   787
		if [ "$os" = "SUNOS" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   788
			LDFLAGS="$LDFLAGS -lnsl -lsocket"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   789
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   790
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   791
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   792
	if [ "$enable_static" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   793
		# OSX can't handle -static in LDFLAGS
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   794
		if [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   795
			LDFLAGS="$LDFLAGS -static"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   796
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   797
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   798
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   799
	if [ "$enable_assert" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   800
		CFLAGS="$CFLAGS -DNDEBUG"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   801
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   802
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   803
	if [ "$enable_osx_g5" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   804
		CFLAGS="$CFLAGS -mtune=970 -mcpu=970 -mpowerpc-gpopt"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   805
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   806
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   807
	if [ "$with_osx_sysroot" != "0" ] && [ "$with_osx_sysroot" != "3" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   808
		CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$with_osx_sysroot.sdk"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   809
		LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$with_osx_sysroot.sdk"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   810
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   811
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   812
# TODO: remove next few lines of code when the search path patch has been applied
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   813
	if [ -n "$second_data_dir" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   814
		CFLAGS="$CFLAGS -DSECOND_DATA_DIR=\\\\\"$second_data_dir\\\\\""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   815
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   816
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   817
	if [ -n "$custom_lang_dir" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   818
		CFLAGS="$CFLAGS -DCUSTOM_LANG_DIR=\\\\\"$custom_lang_dir\\\\\""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   819
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   820
# TODO: remove till here
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   821
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   822
	if [ "$enable_install" = "1" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   823
		if [ -n "$personal_dir" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   824
			CFLAGS="$CFLAGS -DUSE_HOMEDIR=1 -DPERSONAL_DIR=\\\\\"$personal_dir/\\\\\""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   825
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   826
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   827
		if [ -n "$data_dir" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   828
			CFLAGS="$CFLAGS -DGAME_DATA_DIR=\\\\\"$prefix_dir/$data_dir/\\\\\""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   829
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   830
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   831
		if [ -n "$icon_dir" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   832
			CFLAGS="$CFLAGS -DICON_DIR=\\\\\"$prefix_dir/$icon_dir/\\\\\""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   833
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   834
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   835
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   836
	if [ -n "$revision" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   837
		log 1 "checking revision... $revision"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   838
		log 1 "WARNING: we do not advise you to use this setting"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   839
		log 1 "WARNING: in most cases it is not safe for network use"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   840
		log 1 "WARNING: USE WITH CAUTION!"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   841
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   842
		sleep 5
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   843
	elif [ -f "$ROOT_DIR/version" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   844
		revision="`cat $ROOT_DIR/version`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   845
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   846
		log 1 "checking revision... $revision"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   847
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   848
		revision=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   849
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   850
		log 1 "checking revision... svn detection"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   851
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   852
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   853
	log 1 "using CFLAGS... $CFLAGS $CC_CFLAGS"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   854
	log 1 "using LDFLAGS... $LIBS $LDFLAGS"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   855
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   856
	# Makedepend doesn't like something like: -isysroot /OSX/blabla
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   857
	#  so convert it to: -isysroot -OSX/blabla. makedepend just ignores
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   858
	#  any - command it doesn't know, so we are pretty save.
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   859
	# Lovely hackish, not?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   860
	# Btw, this almost always comes from outside the configure, so it is
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   861
	#  not something we can control.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   862
	if [ "$with_makedepend" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   863
		cflags_makedep="` echo "$CFLAGS" | sed 's# /# -#g'`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   864
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   865
		makedepend=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   866
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   867
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   868
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   869
check_compiler() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   870
	# Params:
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   871
	# $1 - Type for message (build / host)
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   872
	# $2 - What to fill with the found compiler
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   873
	# $3 - System to try
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   874
	# $4 - Compiler to try
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   875
	# $5 - Env-setting to try
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   876
	# $6 - GCC alike to try
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   877
	# $7 - CC alike to try
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   878
	# $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   879
	# $9 - What the command is to check for
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   880
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   881
	if [ -n "$3" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   882
		# Check for system
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   883
		machine=`$3-$6 $9 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   884
		ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   885
		eval "$2=$3-$6"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   886
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   887
		log 2 "executing $3-$6 $9"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   888
		log 2 "  returned $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   889
		log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   890
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   891
		if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   892
			log 1 "checking $1... $3-$6 not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   893
			log 1 "I couldn't detect any $6 binary for $3"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   894
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   895
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   896
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   897
		if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   898
			log 1 "checking $1... expected $3, found $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   899
			log 1 "the compiler suggests it doesn't build code for the machine you specified"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   900
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   901
		fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   902
	elif [ -n "$4" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   903
		# Check for manual compiler
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   904
		machine=`$4 $9 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   905
		ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   906
		eval "$2=$4"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   907
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   908
		log 2 "executing $4 $9"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   909
		log 2 "  returned $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   910
		log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   911
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   912
		if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   913
			log 1 "checking $1... $4 not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   914
			log 1 "the selected binary doesn't seem to be a $6 binary"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   915
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   916
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   917
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   918
		# Nothing given, autodetect
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   919
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   920
		if [ -n "$5" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   921
			machine=`$5 $9 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   922
			ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   923
			eval "$2=$5"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   924
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   925
			log 2 "executing $5 $9"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   926
			log 2 "  returned $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   927
			log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   928
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   929
			# The user defined a GCC that doesn't reply to $9.. abort
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   930
			if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   931
				log 1 "checking $1... $5 unusable"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   932
				log 1 "the CC environment variable is set, but it doesn't seem to be a $6 binary"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   933
				log 1 "please redefine the CC/CXX environment to a $6 binary"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   934
				exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   935
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   936
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   937
			log 2 "checking $1... CC/CXX not set (skipping)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   938
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   939
			# No $5, so try '$6'
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   940
			machine=`$6 $9 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   941
			ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   942
			eval "$2=$6"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   943
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   944
			log 2 "executing $6 $9"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   945
			log 2 "  returned $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   946
			log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   947
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   948
			if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   949
				# Maybe '$7'?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   950
				machine=`$7 $9 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   951
				ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   952
				eval "$2=$7"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   953
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   954
				log 2 "executing $7 $9"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   955
				log 2 "  returned $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   956
				log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   957
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   958
				# All failed, abort
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   959
				if [ -z "$machine" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   960
					log 1 "checking $1... $6 not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   961
					log 1 "I couldn't detect any $6 binary on your system"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   962
					log 1 "please define the CC/CXX environment to where it is located"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   963
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   964
					exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   965
				fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   966
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   967
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   968
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   969
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   970
	if [ "$8" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   971
		eval "res=\$$2"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   972
		log 1 "checking $1... $res"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   973
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   974
		log 1 "checking $1... $machine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   975
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   976
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   977
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   978
check_build() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   979
	check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   980
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   981
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   982
check_host() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   983
	# By default the host is the build
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   984
	if [ -z "$host" ]; then host="$build"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   985
	check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   986
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   987
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   988
check_cxx_build() {
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   989
	check_compiler "build g++" "cxx_build" "$build" "$cxx_build" "$CXX" "g++" "c++" 1 "-dumpmachine"
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   990
}
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   991
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   992
check_cxx_host() {
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   993
	# By default the host is the build
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
   994
	if [ -z "$host" ]; then host="$build"; fi
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   995
	check_compiler "host g++" "cxx_host" "$host" "$cxx_host" "$CXX" "g++" "c++" 1 "-dumpmachine"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   996
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   997
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
   998
check_windres() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
   999
	if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1000
		check_compiler "host windres" "windres" "$host" "$windres" "$WINDRES" "windres" "windres" "2" "-V"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1001
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1002
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1003
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1004
check_strip() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1005
	if [ "$os" = "OS2" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1006
		# OS2 via gcc is a bit weird.. stripping HAS to be done via emxbind, which is via gcc directly
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1007
		echo "checking for host strip... using gcc -s option"
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1008
	elif [ "$os" = "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1009
		# Most targets have -V in strip, to see if they exists... OSX doesn't.. so execute something
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1010
		echo "int main(int argc, char *argv[]) { }" > strip.test.c
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1011
		$cc_host strip.test.c -o strip.test
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1012
		check_compiler "host strip" "strip" "$host" "$strip" "$STRIP" "strip" "strip" "3" "strip.test"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1013
		rm -f strip.test.c strip.test
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1014
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1015
		check_compiler "host strip" "strip" "$host" "$strip" "$STRIP" "strip" "strip" "3" "-V"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1016
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1017
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1018
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1019
check_lipo() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1020
	if [ "$os" = "OSX" ] && [ "$enable_universal" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1021
		echo "int main(int argc, char *argv[]) { }" > lipo.test.c
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1022
		$cc_host lipo.test.c -o lipo.test
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1023
		check_compiler "host lipo" "lipo" "$host" "$lipo" "$LIPO" "lipo" "lipo" "4" "-info lipo.test"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1024
		rm -f lipo.test.c lipo.test
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1025
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1026
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1027
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1028
check_direct_music() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1029
	echo "
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1030
		#include <windows.h>
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1031
		#include <dmksctrl.h>
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1032
		#include <dmusici.h>
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1033
		#include <dmusicc.h>
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1034
		#include <dmusicf.h>
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1035
		int main(int argc, char *argv[]) { }" > direct_music.test.c
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1036
	$cxx_host $CFLAGS direct_music.test.c -o direct_music.test 2> /dev/null
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1037
	res=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1038
	rm -f direct_music.test.c direct_music.test
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1039
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1040
	if [ "$res" != "0" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1041
		if [ "$with_direct_music" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1042
			log 1 "configure: error: direct-music is not available on this system"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1043
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1044
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1045
		with_direct_music="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1046
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1047
		log 1 "checking direct-music... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1048
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1049
		log 1 "checking direct-music... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1050
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1051
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1052
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1053
check_makedepend() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1054
	if [ "$with_makedepend" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1055
		log 1 "checking makedepend... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1056
		return
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1057
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1058
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1059
	if [ "$with_makedepend" = "1" ] || [ "$with_makedepend" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1060
		makedepend="makedepend"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1061
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1062
		makedepend="$with_makedepend"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1063
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1064
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1065
	rm -f makedepend.tmp
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1066
	touch makedepend.tmp
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1067
	res=`$makedepend -fmakedepend.tmp 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1068
	res=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1069
	log 2 "executing $makedepend -f makedepend.tmp"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1070
	log 2 "  returned `cat makedepend.tmp`"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1071
	log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1072
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1073
	if [ ! -s makedepend.tmp ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1074
		rm -f makedepend.tmp makedepend.tmp.bak
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1075
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1076
		if [ "$with_makedepend" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1077
			log 1 "checking makedepend... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1078
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1079
			log 1 "I couldn't detect any makedepend on your system"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1080
			log 1 "please locate it via --makedepend=[binary]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1081
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1082
			exit 1
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1083
		elif [ "$with_makedepend" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1084
			log 1 "checking makedepend... $makedepend not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1085
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1086
			log 1 "the selected file doesn't seem to be a valid makedepend binary"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1087
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1088
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1089
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1090
			log 1 "checking makedepend... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1091
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1092
			with_makedepend="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1093
			return
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1094
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1095
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1096
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1097
	rm -f makedepend.tmp makedepend.tmp.bak
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1098
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1099
	log 1 "checking makedepend... $makedepend"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1100
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1101
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1102
detect_os() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1103
	if [ $os = "DETECT" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1104
		# Detect UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW and OS2
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1105
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1106
		# Try first via dumpmachine, then via uname
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1107
		os=`echo "$host" | tr [:upper:] [:lower:] | awk '
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1108
					/linux/        { print "UNIX";    exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1109
					/darwin/       { print "OSX";     exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1110
					/freebsd/      { print "FREEBSD"; exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1111
					/morphos/      { print "MORPHOS"; exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1112
					/beos/         { print "BEOS";    exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1113
					/sunos/        { print "SUNOS";   exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1114
					/cygwin/       { print "CYGWIN";  exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1115
					/mingw/        { print "MINGW";   exit}
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1116
					/os2/          { print "OS2";     exit}
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1117
		'`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1118
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1119
		if [ -z "$os" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1120
			os=`LC_ALL=C uname | tr [:upper:] [:lower:] | awk '
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1121
					/linux/        { print "UNIX";    exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1122
					/darwin/       { print "OSX";     exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1123
					/freebsd/      { print "FREEBSD"; exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1124
					/morphos/      { print "MORPHOS"; exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1125
					/beos/         { print "BEOS";    exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1126
					/sunos/        { print "SUNOS";   exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1127
					/cygwin/       { print "CYGWIN";  exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1128
					/mingw/        { print "MINGW";   exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1129
					/os\/2/        { print "OS2";     exit}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1130
			'`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1131
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1132
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1133
		if [ -z "$os" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1134
			log 1 "detecting OS... none detected"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1135
			log 1 "I couldn't detect your OS. Please use --with-os=OS to force one"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1136
			log 1 "Allowed values are: UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, and MINGW"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1137
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1138
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1139
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1140
		log 1 "detecting OS... $os"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1141
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1142
		log 1 "forcing OS... $os"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1143
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1144
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1145
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1146
detect_sdl() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1147
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1148
	if [ "$with_sdl" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1149
		log 1 "checking SDL... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1150
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1151
		sdl_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1152
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1153
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1154
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1155
	if [ "$with_sdl" = "2" ] && [ "$with_cocoa" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1156
		log 1 "configure: error: it is impossible to compile both SDL and COCOA"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1157
		log 1 "configure: error: please deselect one of them and try again"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1158
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1159
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1160
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1161
	if [ "$with_sdl" = "2" ] && [ "$enable_dedicated" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1162
		log 1 "configure: error: it is impossible to compile a dedicated with SDL"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1163
		log 1 "configure: error: please deselect one of them and try again"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1164
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1165
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1166
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1167
	if [ "$enable_dedicated" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1168
		log 1 "checking SDL... skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1169
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1170
		sdl_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1171
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1172
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1173
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1174
	# By default on OSX we don't use SDL. The rest is auto-detect
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1175
	if [ "$with_sdl" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1176
		log 1 "checking SDL... OSX, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1177
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1178
		sdl_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1179
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1180
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1181
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1182
	if [ "$with_sdl" = "1" ] || [ "$with_sdl" = "" ] || [ "$with_sdl" = "2" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1183
		sdl_config="sdl-config"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1184
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1185
		sdl_config="$with_sdl"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1186
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1187
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1188
	version=`$sdl_config --version 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1189
	ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1190
	log 2 "executing $sdl_config --version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1191
	log 2 "  returned $version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1192
	log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1193
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1194
	if [ -z "$version" ] || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1195
		log 1 "checking SDL... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1196
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1197
		# It was forced, so it should be found.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1198
		if [ "$with_sdl" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1199
			log 1 "configure: error: sdl-config couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1200
			log 1 "configure: error: you supplied '$with_sdl', but it seems invalid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1201
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1202
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1203
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1204
		sdl_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1205
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1206
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1207
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1208
	log 1 "checking SDL... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1209
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1210
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1211
detect_cocoa() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1212
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1213
	if [ "$with_cocoa" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1214
		log 1 "checking COCOA... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1215
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1216
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1217
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1218
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1219
	if [ "$with_cocoa" = "2" ] && [ "$enable_dedicated" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1220
		log 1 "configure: error: it is impossible to compile a dedicated with COCOA"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1221
		log 1 "configure: error: please deselect one of them and try again"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1222
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1223
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1224
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1225
	if [ "$enable_dedicated" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1226
		log 1 "checking COCOA... skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1227
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1228
		with_cocoa="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1229
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1230
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1231
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1232
	# By default on OSX we use COCOA. The rest doesn't support it
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1233
	if [ "$with_cocoa" = "1" ] && [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1234
		log 1 "checking COCOA... not OSX, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1235
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1236
		with_cocoa="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1237
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1238
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1239
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1240
	if [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1241
		log 1 "checking COCOA... not OSX"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1242
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1243
		log 1 "configure: error: COCOA video driver is only supported for OSX"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1244
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1245
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1246
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1247
	log 1 "checking COCOA... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1248
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1249
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1250
detect_zlib() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1251
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1252
	if [ "$with_zlib" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1253
		log 1 "checking zlib... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1254
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1255
		zlib=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1256
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1257
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1258
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1259
	log 2 "detecting zlib"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1260
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1261
	if [ "$with_zlib" = "1" ] || [ "$with_zlib" = "" ] || [ "$with_zlib" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1262
		zlib=`ls -1 /usr/include/*.h 2>/dev/null | grep "\/zlib.h$"`
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1263
		if [ -z "$zlib" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1264
			log 2 "  trying /usr/include/zlib.h... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1265
			zlib=`ls -1 /usr/local/include/*.h 2>/dev/null | grep "\/zlib.h$"`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1266
		fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1267
		if [ -z "$zlib" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1268
			log 2 "  trying /usr/local/include/zlib.h... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1269
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1270
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1271
		if [ -n "$zlib" ] && [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1272
			log 2 "  trying $zlib... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1273
			# Now find the static lib, if needed
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1274
			zlib=`ls /lib/*.a 2>/dev/null | grep "\/libz.a$"`
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1275
			if [ -z "$zlib" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1276
				log 2 "  trying /lib/libz.a... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1277
				zlib=`ls /usr/lib/*.a 2>/dev/null | grep "\/libz.a$"`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1278
			fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1279
			if [ -z "$zlib" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1280
				log 2 "  trying /usr/lib/libz.a... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1281
				zlib=`ls /usr/local/lib/*.a 2>/dev/null | grep "\/libz.a$"`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1282
			fi
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1283
			if [ -z "$zlib" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1284
				log 2 "  trying /usr/local/lib/libz.a... no"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1285
				log 1 "configure: error: zlib couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1286
				log 1 "configure: error: you requested a static link, but I can't find zlib.a"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1287
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1288
				exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1289
			fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1290
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1291
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1292
		# Make sure it exists
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1293
		if [ -f "$with_zlib" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1294
			zlib=`ls $with_zlib 2>/dev/null`
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1295
		else
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1296
			zlib=`ls $with_zlib/libz.a 2>/dev/null`
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1297
		fi
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1298
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1299
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1300
	if [ -z "$zlib" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1301
		log 1 "checking zlib... not found"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1302
		if [ "$with_zlib" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1303
			log 1 "configure: error: zlib couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1304
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1305
			exit 1
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1306
		elif [ "$with_zlib" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1307
			log 1 "configure: error: zlib couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1308
			log 1 "configure: error: you supplied '$with_zlib', but it seems invalid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1309
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1310
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1311
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1312
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1313
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1314
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1315
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1316
	log 2 "  trying $zlib... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1317
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1318
	log 1 "checking zlib... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1319
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1320
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1321
detect_png() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1322
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1323
	if [ "$with_png" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1324
		log 1 "checking libpng... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1325
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1326
		png_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1327
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1328
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1329
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1330
	if [ "$with_zlib" = "0" ] || [ "$zlib" = "" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1331
		log 1 "configure: error: libpng depends on zlib, which couldn't be found / was disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1332
		log 1 "configure: error: please supply --with-zlib, with a valid zlib location"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1333
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1334
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1335
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1336
	if [ "$with_png" = "1" ] || [ "$with_png" = "" ] || [ "$with_png" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1337
		png_config="libpng-config"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1338
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1339
		png_config="$with_png"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1340
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1341
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1342
	version=`$png_config --version 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1343
	ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1344
	log 2 "executing $png_config --version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1345
	log 2 "  returned $version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1346
	log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1347
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1348
	if [ -z "$version" ] || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1349
		log 1 "checking libpng... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1350
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1351
		# It was forced, so it should be found.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1352
		if [ "$with_png" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1353
			log 1 "configure: error: libpng-config couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1354
			log 1 "configure: error: you supplied '$with_png', but it seems invalid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1355
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1356
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1357
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1358
		png_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1359
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1360
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1361
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1362
	log 1 "checking libpng... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1363
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1364
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1365
detect_freetype() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1366
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1367
	if [ "$with_freetype" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1368
		log 1 "checking libfreetype... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1369
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1370
		freetype_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1371
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1372
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1373
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1374
	if [ "$with_zlib" = "0" ] || [ "$zlib" = "" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1375
		log 1 "configure: error: libfreetype depends on zlib, which couldn't be found / was disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1376
		log 1 "configure: error: please supply --with-zlib, with a valid zlib location"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1377
		exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1378
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1379
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1380
	if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1381
		freetype_config="freetype-config"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1382
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1383
		freetype_config="$with_freetype"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1384
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1385
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1386
	version=`$freetype_config --version 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1387
	ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1388
	log 2 "executing freetype_config --version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1389
	log 2 "  returned $version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1390
	log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1391
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1392
	if [ -z "$version" ] || [ "$ret" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1393
		log 1 "checking libfreetype... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1394
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1395
		# It was forced, so it should be found.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1396
		if [ "$with_freetype" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1397
			log 1 "configure: error: freetype-config couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1398
			log 1 "configure: error: you supplied '$with_freetype', but it seems invalid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1399
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1400
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1401
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1402
		freetype_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1403
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1404
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1405
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1406
	log 1 "checking libfreetype... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1407
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1408
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1409
detect_fontconfig() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1410
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1411
	if [ "$with_fontconfig" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1412
		log 1 "checking libfontconfig... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1413
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1414
		fontconfig_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1415
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1416
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1417
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1418
	if [ "$with_fontconfig" = "1" ] || [ "$with_fontconfig" = "" ] || [ "$with_fontconfig" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1419
		fontconfig_config="pkg-config fontconfig"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1420
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1421
		fontconfig_config="$with_fontconfig"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1422
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1423
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1424
	version=`$fontconfig_config --modversion 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1425
	ret=$?
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1426
	shortversion=`echo $version | cut -c 1,3`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1427
	log 2 "executing $fontconfig_config --modversion"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1428
	log 2 "  returned $version"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1429
	log 2 "  exit code $ret"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1430
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1431
	if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$shortversion" -le "22" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1432
		if [ -n "$shortversion" ] && [ "$shortversion" -le "22" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1433
			log 1 "checking libfontconfig... needs at least version 2.3.0, fontconfig NOT enabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1434
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1435
			log 1 "checking libfontconfig... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1436
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1437
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1438
		# It was forced, so it should be found.
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1439
		if [ "$with_fontconfig" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1440
			log 1 "configure: error: fontconfig-config couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1441
			log 1 "configure: error: you supplied '$with_fontconfig', but it seems invalid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1442
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1443
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1444
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1445
		fontconfig_config=""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1446
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1447
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1448
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1449
	log 1 "checking libfontconfig... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1450
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1451
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1452
detect_iconv() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1453
	# 0 means no, 1 is auto-detect, 2 is force
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1454
	if [ "$with_iconv" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1455
		log 1 "checking iconv... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1456
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1457
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1458
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1459
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1460
	if [ "$with_iconv" = "1" ] && [ "$os" != "OSX" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1461
		log 1 "checking iconv... not OSX, skipping"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1462
		with_iconv="0"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1463
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1464
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1465
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1466
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1467
	# Try to find iconv.h, seems to only thing to detect iconv with
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1468
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1469
	if [ "$with_iconv" = "1" ] || [ "$with_iconv" = "" ] || [ "$with_iconv" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1470
		iconv=`ls -1 /usr/include 2>/dev/null | grep "iconv.h"`
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1471
		if [ -z "$iconv" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1472
			iconv=`ls -1 /usr/local/include 2>/dev/null | grep "iconv.h"`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1473
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1474
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1475
		# Make sure it exists
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1476
		iconv=`ls $with_iconv/include/iconv.h 2>/dev/null`
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1477
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1478
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1479
	if [ -z "$iconv" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1480
		log 1 "checking iconv... not found"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1481
		if [ "$with_iconv" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1482
			log 1 "configure: error: iconv couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1483
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1484
			exit 1
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1485
		elif [ "$with_iconv" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1486
			log 1 "configure: error: iconv couldn't be found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1487
			log 1 "configure: error: you supplied '$with_iconv', but I couldn't detect iconv in it"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1488
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1489
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1490
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1491
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1492
		return 0
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1493
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1494
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1495
	if [ "$with_iconv" = "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1496
		with_iconv="2"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1497
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1498
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1499
	log 2 "found iconv in $iconv"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1500
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1501
	log 1 "checking iconv... found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1502
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1503
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1504
_detect_sort() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1505
	sort_test_in="d
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1506
a
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1507
c
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1508
b"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1509
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1510
	sort_test_out="a
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1511
b
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1512
c
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1513
d"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1514
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1515
	log 2 "running echo <array> | $1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1516
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1517
	if [ "`echo \"$sort_test_in\" | $1 2>/dev/null`" = "$sort_test_out" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1518
		sort="$1"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1519
		log 2 "  result was valid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1520
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1521
		log 2 "  result was invalid"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1522
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1523
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1524
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1525
detect_sort() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1526
	if [ "$with_sort" = "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1527
		log 1 "checking sort... disabled"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1528
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1529
		return
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1530
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1531
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1532
	if [ "$with_sort" = "1" ] || [ "$with_sort" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1533
		_detect_sort "sort"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1534
		if [ -z "$sort" ]; then _detect_sort "/sbin/sort"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1535
		if [ -z "$sort" ]; then _detect_sort "/usr/sbin/sort"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1536
		if [ -z "$sort" ]; then _detect_sort "/usr/local/sbin/sort"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1537
		if [ -z "$sort" ]; then _detect_sort "/bin/sort"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1538
		if [ -z "$sort" ]; then _detect_sort "/usr/bin/sort"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1539
		if [ -z "$sort" ]; then _detect_sort "/usr/local/bin/sort"; fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1540
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1541
		_detect_sort "$with_sort"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1542
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1543
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1544
	if [ -z "$sort" ]; then
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1545
		if [ "$with_sort" = "2" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1546
			log 1 "checking sort... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1547
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1548
			log 1 "configure: error: couldn't detect sort on your system"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1549
			exit 1
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1550
		elif [ "$with_sort" != "1" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1551
			log 1 "checking sort... $with_sort not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1552
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1553
			log 1 "configure: error: '$with_sort' doesn't look like a sort to me"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1554
			log 1 "configure: error: please verify its location and function and try again"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1555
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1556
			exit 1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1557
		else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1558
			log 1 "checking sort... not found"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1559
		fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1560
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1561
		log 1 "checking sort... $sort"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1562
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1563
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1564
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1565
make_sed() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1566
	# We check here if we are PPC, because then we need to enable FOUR_BYTE_BOOL
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1567
	#  We do this here, and not sooner, so universal builds also have this
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1568
	#  automatically correct
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1569
	# FOUR_BYTE_BOOL is needed, because C++ uses 4byte for a bool on PPC, where
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1570
	#  we use 1 byte per bool normally in C part. So convert that last one to 4
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1571
	#  bytes too, but only for PPC.
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1572
	ppc=`$cc_host -dumpmachine | grep "powerpc\|ppc"`
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1573
	if [ -n "$ppc" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1574
		T_CFLAGS="$CFLAGS -DFOUR_BYTE_BOOL"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1575
		osx_sysroot_version=10.3.9
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1576
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1577
		T_CFLAGS="$CFLAGS"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1578
		osx_sysroot_version=10.4u
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1579
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1580
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1581
	T_LDFLAGS="$LDFLAGS"
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1582
	if [ "$with_osx_sysroot" = "3" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1583
		T_CFLAGS="$T_CFLAGS -isysroot /Developer/SDKs/MacOSX$osx_sysroot_version.sdk"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1584
		T_LDFLAGS="$T_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$osx_sysroot_version.sdk"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1585
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1586
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1587
	SRC_OBJS_DIR="$BASE_SRC_OBJS_DIR/$OBJS_SUBDIR"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1588
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1589
	# All the data needed to compile a single target
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1590
	#  Make sure if you compile multiple targets to
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1591
	#  use multiple OBJS_DIR, because all in-between
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1592
	#  binaries are stored in there, and nowhere else.
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1593
	SRC_REPLACE="
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1594
		s#!!CC_HOST!!#$cc_host#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1595
		s#!!CXX_HOST!!#$cxx_host#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1596
		s#!!CC_BUILD!!#$cc_build#g;
5650
aefc131bf5ce (svn r8149) [cbh] - Sync with -r8038:8038 from trunk (the cpp merge)
celestar
parents: 5648
diff changeset
  1597
		s#!!CXX_BUILD!!#$cxx_build#g;
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1598
		s#!!WINDRES!!#$windres#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1599
		s#!!STRIP!!#$strip $strip_arg#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1600
		s#!!LIPO!!#$lipo#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1601
		s#!!CC_CFLAGS!!#$CC_CFLAGS#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1602
		s#!!CFLAGS!!#$T_CFLAGS#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1603
		s#!!CFLAGS_BUILD!!#$CFLAGS_BUILD#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1604
		s#!!STRGEN_FLAGS!!#$strgen_flags#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1605
		s#!!LIBS!!#$LIBS#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1606
		s#!!LDFLAGS!!#$T_LDFLAGS#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1607
		s#!!BIN_DIR!!#$BIN_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1608
		s#!!ROOT_DIR!!#$ROOT_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1609
		s#!!MEDIA_DIR!!#$MEDIA_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1610
		s#!!SOURCE_LIST!!#$SOURCE_LIST#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1611
		s#!!SRC_OBJS_DIR!!#$SRC_OBJS_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1612
		s#!!LANG_OBJS_DIR!!#$LANG_OBJS_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1613
		s#!!SRC_DIR!!#$SRC_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1614
		s#!!OSXAPP!!#$OSXAPP#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1615
		s#!!LANG_DIR!!#$LANG_DIR#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1616
		s#!!TTD!!#$TTD#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1617
		s#!!BINARY_DIR!!#$prefix_dir/$binary_dir#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1618
		s#!!DATA_DIR!!#$prefix_dir/$data_dir#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1619
		s#!!ICON_DIR!!#$prefix_dir/$icon_dir#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1620
		s#!!PERSONAL_DIR!!#$personal_dir#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1621
		s#!!INSTALL_DIR!!#$install_dir#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1622
		s#!!STRGEN!!#$STRGEN#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1623
		s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1624
		s#!!ENDIAN_FORCE!!#$endian#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1625
		s#!!STAGE!!#$STAGE#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1626
		s#!!MAKEDEPEND!!#$makedepend#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1627
		s#!!CFLAGS_MAKEDEP!!#$cflags_makedep#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1628
		s#!!SORT!!#$sort#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1629
		s#!!CONFIG_CACHE_COMPILER!!#config.cache.compiler#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1630
		s#!!CONFIG_CACHE_LINKER!!#config.cache.linker#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1631
		s#!!CONFIG_CACHE_ENDIAN!!#config.cache.endian#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1632
		s#!!CONFIG_CACHE_SOURCE!!#config.cache.source#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1633
		s#!!CONFIG_CACHE_VERSION!!#config.cache.version#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1634
		s#!!CONFIG_CACHE_SOURCE_LIST!!#config.cache.source.list#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1635
		s#!!LANG_SUPPRESS!!#$lang_suppress#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1636
		s#!!OBJS_C!!#$OBJS_C#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1637
		s#!!OBJS_CPP!!#$OBJS_CPP#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1638
		s#!!OBJS_M!!#$OBJS_M#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1639
		s#!!OBJS_RC!!#$OBJS_RC#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1640
		s#!!SRCS!!#$SRCS#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1641
		s#!!OS!!#$os#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1642
		s#!!CONFIGURE_FILES!!#$CONFIGURE_FILES#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1643
		s#!!REVISION!!#$revision#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1644
		s#!!ENABLE_INSTALL!!#$enable_install#g;
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1645
	"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1646
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1647
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1648
generate_main() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1649
	STAGE="[MAIN]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1650
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1651
	make_sed
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1652
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1653
	# Create the main Makefile
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1654
	echo "Generating Makefile..."
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1655
	< $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" > Makefile
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1656
	echo "# Auto-generated file -- DO NOT EDIT" > Makefile.am
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1657
	echo >> Makefile.am
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1658
	# Make the copy of the source-list, so we don't trigger an unwanted recompile
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1659
	cp $SOURCE_LIST config.cache.source.list
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1660
	# Make sure config.cache is OLDER then config.cache.source.list
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1661
	touch config.cache
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1662
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1663
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1664
generate_lang() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1665
	STAGE="[LANG]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1666
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1667
	make_sed
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1668
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1669
	# Create the language file
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1670
	mkdir -p $LANG_OBJS_DIR
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1671
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1672
	echo "Generating lang/Makefile..."
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1673
	< $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" > $LANG_OBJS_DIR/Makefile
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1674
	echo "DIRS += $LANG_OBJS_DIR" >> Makefile.am
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1675
	echo "LANG_DIRS += $LANG_OBJS_DIR" >> Makefile.am
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1676
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1677
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1678
generate_src_normal() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1679
	STAGE=$1
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1680
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1681
	make_sed
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1682
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1683
	# Create the source file
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1684
	mkdir -p $SRC_OBJS_DIR
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1685
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1686
	echo "Generating $2/Makefile..."
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1687
	< $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" > $SRC_OBJS_DIR/Makefile
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1688
	echo "DIRS += $SRC_OBJS_DIR" >> Makefile.am
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1689
	echo "SRC_DIRS += $SRC_OBJS_DIR" >> Makefile.am
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1690
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1691
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1692
generate_src_osx() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1693
	cc_host_orig="$cc_host"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1694
	cxx_host_orig="$cxx_host"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1695
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1696
	BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1697
	cc_host="$cc_host_orig -arch ppc"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1698
	cxx_host="$cxx_host_orig -arch ppc"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1699
	generate_src_normal "[PowerPC]" "objs/ppc"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1700
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1701
	BASE_SRC_OBJS_DIR="$OBJS_DIR/intel"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1702
	cc_host="$cc_host_orig -arch i386"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1703
	cxx_host="$cxx_host_orig -arch i386"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1704
	generate_src_normal "[Intel]" "objs/intel"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1705
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1706
	BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc970"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1707
	cc_host="$cc_host_orig -arch ppc970"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1708
	cxx_host="$cxx_host_orig -arch ppc970"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1709
	CFLAGS="$CFLAGS -mtune=970 -mcpu=970 -mpowerpc-gpopt"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1710
	generate_src_normal "[PowerPC G5]" "objs/ppc970"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1711
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1712
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1713
generate_src() {
5648
1608018c5ff2 (svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents: 5645
diff changeset
  1714
	if [ "$os" = "OSX" ] && [ "$enable_universal" != "0" ]; then
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1715
		generate_src_osx
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1716
	else
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1717
		generate_src_normal "[SRC]" "objs"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1718
	fi
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1719
}
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1720
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1721
showhelp() {
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1722
	echo "'configure' configures OpenTTD."
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1723
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1724
	echo "Usage: $0 [OPTION]... [VAR=VALUE]..."
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1725
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1726
	echo "To assign environment variables (e.g., CC, CFLAGS...), specify them as"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1727
	echo "VAR=VALUE.  See below for descriptions of some of the useful variables."
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1728
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1729
	echo "Defaults for the options are specified in brackets."
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1730
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1731
	echo "Configuration:"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1732
	echo "  -h, --help                     display this help and exit"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1733
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1734
	echo "System types:"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1735
	echo "  --build=BUILD                  configure for building on BUILD [guessed]"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1736
	echo "  --host=HOST                    cross-compile to build programs to run"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1737
	echo "                                 on HOST [BUILD]"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1738
	echo "  --windres=WINDRES              the windres to use [HOST-windres]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1739
	echo "  --strip=STRIP                  the strip to use [HOST-strip]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1740
	echo "  --lipo=LIPO                    the lipo to use (OSX ONLY) [HOST-lipo]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1741
	echo "  --os=OS                        the OS we are compiling for [DETECT]"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1742
	echo "                                 DETECT/UNIX/OSX/FREEBSD/MORPHOS/BEOS/"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1743
	echo "                                 SUNOS/CYGWIN/MINGW"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1744
	echo "  --endian=ENDIAN                set the endian of the HOST (AUTO/LE/BE)"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1745
	echo "  --revision=rXXXX               overwrite the revision detection."
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1746
	echo "                                 Use with care!"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1747
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1748
	echo "Paths:"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1749
	echo "  --prefix-dir=dir               specifies the prefix for all installed"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1750
	echo "                                 files [/usr/local]"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1751
	echo "  --binary-dir=dir               location of the binary. Will be prefixed"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1752
	echo "                                 with the prefix-dir [games]"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1753
	echo "  --data-dir=dir                 location of data files (lang, data, gm)."
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1754
	echo "                                 Will be prefixed with the prefix-dir"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1755
	echo "                                 [share/games/openttd]"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1756
	echo "  --icon-dir=dir                 location of icons. Will be prefixed"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1757
	echo "                                 with the prefix-dir [share/pixmaps]"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1758
	echo "  --personal-dir=dir             location of the personal directory []"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1759
	echo "  --install-dir=dir              specifies the root to install to."
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1760
	echo "                                 Useful to install into jails [/]"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1761
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1762
# TODO: The Following 3 tags will be removed when the 'search path patch' is applied
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1763
	echo "  --second-data-dir=dir          specifies a second directory for the"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1764
	echo "                                 data files"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1765
	echo "  --custom-lang-dir=dir          specifies a custom directory for the"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1766
	echo "                                 language files"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1767
	echo "  --enable-install               make a binary that uses the specified"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1768
	echo "                                 data-dir and icon-dir"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1769
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1770
	echo "Features and packages:"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1771
	echo "  --enable-debug[=LVL]           enable debug-mode (LVL=[0123], 0 is release)"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1772
	echo "  --enable-profiling             enables profiling"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1773
	echo "  --enable-dedicated             compile a dedicated server (without video)"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1774
	echo "  --enable-static                enable static compile (doesn't work for"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1775
	echo "                                 all HOSTs)"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1776
	echo "  --enable-translator            enable extra output for translators"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1777
	echo "  --enable-universal             enable universal builds (OSX ONLY)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1778
	echo "  --enable-osx-g5                enables optimalizations for G5 (OSX ONLY)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1779
	echo "  --disable-network              disable network support"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1780
	echo "  --disable-assert               disable asserts (continue on errors)"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1781
	echo "  --disable-strip                disable any possible stripping"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1782
	echo "  --without-osx-sysroot          disable the automatic adding of sysroot "
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1783
	echo "                                 (OSX ONLY)"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1784
	echo "  --without-application-bundle   disable generation of application bundle"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1785
	echo "                                 (OSX ONLY)"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1786
	echo "  --with-direct-music            enable direct music support (Win32 ONLY)"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1787
	echo "  --with-sort=sort               define a non-default location for sort"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1788
	echo "  --with-midi=midi               define which midi-player to use"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1789
	echo "  --with-midi-arg=arg            define which args to use for the"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1790
	echo "                                 midi-player"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1791
	echo "  --with-cocoa                   enables COCOA video driver (OSX ONLY)"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1792
	echo "  --with-sdl[=sdl-config]        enables SDL video driver support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1793
	echo "  --with-zlib[=zlib.a]           enables zlib support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1794
	echo "  --with-png[=libpng-config]     enables libpng support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1795
	echo "  --with-freetype[=freetype-config]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1796
	echo "                                 enables libfreetype support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1797
	echo "  --with-fontconfig[=pkg-config fontconfig]"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1798
	echo "                                 enables fontconfig support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1799
	echo "  --with-iconv[=iconv-path]      enables iconv support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1800
	echo "  --with-makedepend[=makedepend] enables makedepend support"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1801
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1802
	echo "Some influential environment variables:"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1803
	echo "  CC                             C compiler command"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1804
	echo "  CXX                            C++ compiler command"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1805
	echo "  CFLAGS                         C compiler flags"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1806
	echo "  WINDRES                        windres command"
5645
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1807
	echo "  LDFLAGS                        linker flags, e.g. -L<lib dir> if you"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1808
	echo "                                 have libraries in a nonstandard"
72ebd9e4cd64 (svn r7792) [cbh] -Sync: with trunk r7759:7788.
rubidium
parents: 5643
diff changeset
  1809
	echo "                                 directory <lib dir>"
5643
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1810
	echo ""
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1811
	echo "Use these variables to override the choices made by 'configure' or to help"
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1812
	echo "it to find libraries and programs with nonstandard names/locations."
3778051e8095 (svn r7790) [cbh] -Sync: execute the same script for /branches/custombridgeheads as was done for /trunk in r7759.
rubidium
parents:
diff changeset
  1813
}