49 with_direct_music="1" |
49 with_direct_music="1" |
50 with_sort="1" |
50 with_sort="1" |
51 with_iconv="1" |
51 with_iconv="1" |
52 with_midi="" |
52 with_midi="" |
53 with_midi_arg="" |
53 with_midi_arg="" |
54 with_freetpye="1" |
54 with_freetype="1" |
55 with_fontconfig="1" |
55 with_fontconfig="1" |
56 |
56 |
57 save_params_array="build host cc_build cc_host 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" |
57 save_params_array="build host cc_build cc_host 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" |
58 } |
58 } |
59 |
59 |
60 detect_params() { |
60 detect_params() { |
61 # Walk over all params from the user and override any default settings if |
61 # Walk over all params from the user and override any default settings if |
62 # needed. This also handles any invalid option. |
62 # needed. This also handles any invalid option. |
63 for p in "$@" |
63 for p in "$@"; do |
64 do |
64 if [ -n "$prev_p" ]; then |
65 if [ -n "$prev_p" ] |
|
66 then |
|
67 eval "$prev_p=\$p" |
65 eval "$prev_p=\$p" |
68 prev_p= |
66 prev_p= |
69 continue |
67 continue |
70 fi |
68 fi |
71 |
69 |
72 optarg=`expr "x$p" : 'x[^=]*=\(.*\)'` |
70 optarg=`expr "x$p" : 'x[^=]*=\(.*\)'` |
73 |
71 |
74 case "$p" in |
72 case "$p" in |
75 --help | -h) |
73 --help | -h) showhelp; exit 0;; |
76 showhelp |
74 |
77 exit 0 |
75 --config-log) prev_p="config_log";; |
78 ;; |
76 --config-log=*) config_log="$optarg";; |
79 |
77 |
80 --config-log) |
78 --build) prev_p="build";; |
81 prev_p="config_log" |
79 --build=*) build="$optarg";; |
82 ;; |
80 |
83 --config-log=*) |
81 --host) prev_p="host";; |
84 config_log="$optarg" |
82 --host=*) host="$optarg";; |
85 ;; |
83 |
86 |
84 --os) prev_p="os";; |
87 --build) |
85 --os=*) os="$optarg";; |
88 prev_p="build" |
86 |
89 ;; |
87 --revision=*) revision="$optarg";; |
90 --build=*) |
88 |
91 build="$optarg" |
89 --cc-build) prevp_p="cc_build";; |
92 ;; |
90 --cc-build=*) cc_build="$optarg";; |
93 |
91 --cc-host) prevp_p="cc_host";; |
94 --host) |
92 --cc-host=*) cc_host="$optarg";; |
95 prev_p="host" |
93 --cxx-host) prevp_p="cxx_host";; |
96 ;; |
94 --cxx-host=*) cxx_host="$optarg";; |
97 --host=*) |
95 --windres) prevp_p="windres";; |
98 host="$optarg" |
96 --windres=*) windres="$optarg";; |
99 ;; |
97 --strip) prevp_p="strip";; |
100 |
98 --strip=*) strip="$optarg";; |
101 --os) |
99 --lipo) prevp_p="lipo";; |
102 prev_p="os" |
100 --lipo=*) lipo="$optarg";; |
103 ;; |
101 |
104 --os=*) |
102 --endian) prev_p="endian";; |
105 os="$optarg" |
103 --endian=*) endian="$optarg";; |
106 ;; |
104 |
107 |
105 |
108 --revision=*) |
106 |
109 revision="$optarg" |
107 --prefix-dir) prevp_p="prefix-dir";; |
110 ;; |
108 --prefix-dir=*) prefix_dir="$optarg";; |
111 |
109 |
112 --cc-build) |
110 --binary-dir) prevp_p="binary-dir";; |
113 prevp_p="cc_build" |
111 --binary-dir=*) binary_dir="$optarg";; |
114 ;; |
112 |
115 --cc-build=*) |
113 --data-dir) prevp_p="data-dir";; |
116 cc_build="$optarg" |
114 --data-dir=*) data_dir="$optarg";; |
117 ;; |
115 |
118 --cc-host) |
116 --icon-dir) prevp_p="icon-dir";; |
119 prevp_p="cc_host" |
117 --icon-dir=*) icon_dir="$optarg";; |
120 ;; |
118 |
121 --cc-host=*) |
119 --personal-dir) prevp_p="personal-dir";; |
122 cc_host="$optarg" |
120 --personal-dir=*) personal_dir="$optarg";; |
123 ;; |
121 |
124 --cxx-host) |
122 --install-dir) prevp_p="install-dir";; |
125 prevp_p="cxx_host" |
123 --install-dir=*) install_dir="$optarg";; |
126 ;; |
|
127 --cxx-host=*) |
|
128 cxx_host="$optarg" |
|
129 ;; |
|
130 --windres) |
|
131 prevp_p="windres" |
|
132 ;; |
|
133 --windres=*) |
|
134 windres="$optarg" |
|
135 ;; |
|
136 --strip) |
|
137 prevp_p="strip" |
|
138 ;; |
|
139 --strip=*) |
|
140 strip="$optarg" |
|
141 ;; |
|
142 --lipo) |
|
143 prevp_p="lipo" |
|
144 ;; |
|
145 --lipo=*) |
|
146 lipo="$optarg" |
|
147 ;; |
|
148 |
|
149 --endian) |
|
150 prev_p="endian" |
|
151 ;; |
|
152 --endian=*) |
|
153 endian="$optarg" |
|
154 ;; |
|
155 |
|
156 |
|
157 |
|
158 --prefix-dir) |
|
159 prevp_p="prefix-dir" |
|
160 ;; |
|
161 --prefix-dir=*) |
|
162 prefix_dir="$optarg" |
|
163 ;; |
|
164 |
|
165 --binary-dir) |
|
166 prevp_p="binary-dir" |
|
167 ;; |
|
168 --binary-dir=*) |
|
169 binary_dir="$optarg" |
|
170 ;; |
|
171 |
|
172 --data-dir) |
|
173 prevp_p="data-dir" |
|
174 ;; |
|
175 --data-dir=*) |
|
176 data_dir="$optarg" |
|
177 ;; |
|
178 |
|
179 --icon-dir) |
|
180 prevp_p="icon-dir" |
|
181 ;; |
|
182 --icon-dir=*) |
|
183 icon_dir="$optarg" |
|
184 ;; |
|
185 |
|
186 --personal-dir) |
|
187 prevp_p="personal-dir" |
|
188 ;; |
|
189 --personal-dir=*) |
|
190 personal_dir="$optarg" |
|
191 ;; |
|
192 |
|
193 --install-dir) |
|
194 prevp_p="install-dir" |
|
195 ;; |
|
196 --install-dir=*) |
|
197 install_dir="$optarg" |
|
198 ;; |
|
199 |
124 |
200 # TODO: The next few cases will be removed when the search path patch is applied |
125 # TODO: The next few cases will be removed when the search path patch is applied |
201 --custom-lang-dir) |
126 --custom-lang-dir) prevp_p="custom-lang-dir";; |
202 prevp_p="custom-lang-dir" |
127 --custom-lang-dir=*) custom_lang_dir="$optarg";; |
203 ;; |
128 |
204 --custom-lang-dir=*) |
129 --second-data-dir) prevp_p="second-data-dir";; |
205 custom_lang_dir="$optarg" |
130 --second-data-dir=*) second_data_dir="$optarg";; |
206 ;; |
131 |
207 |
132 --enable-install) enable_install="1";; |
208 --second-data-dir) |
133 --enable-install=*) enable_install="$optarg";; |
209 prevp_p="second-data-dir" |
|
210 ;; |
|
211 --second-data-dir=*) |
|
212 second_data_dir="$optarg" |
|
213 ;; |
|
214 |
|
215 --enable-install) |
|
216 enable_install="1" |
|
217 ;; |
|
218 --enable-install=*) |
|
219 enable_install="$optarg" |
|
220 ;; |
|
221 # TODO: End of to be removed cases |
134 # TODO: End of to be removed cases |
222 |
135 |
223 |
136 |
224 --enable-debug) |
137 --enable-debug) enable_debug="1";; |
225 enable_debug="1" |
138 --enable-debug=*) enable_debug="$optarg";; |
226 ;; |
139 --enable-profiling) enable_profiling="1";; |
227 --enable-debug=*) |
140 --enable-profiling=*) enable_profiling="$optarg";; |
228 enable_debug="$optarg" |
141 --enable-dedicated) enable_dedicated="1";; |
229 ;; |
142 --enable-dedicated=*) enable_dedicated="$optarg";; |
230 --enable-profiling) |
143 --enable-network=*) enable_network="$optarg";; |
231 enable_profiling="1" |
144 --disable-network) enable_network="0";; |
232 ;; |
145 --disable-static) enable_static="0";; |
233 --enable-profiling=*) |
146 --enable-static) enable_static="2";; |
234 enable_profiling="$optarg" |
147 --enable-static=*) enable_static="$optarg";; |
235 ;; |
148 --disable-translator) enable_translator="0";; |
236 --enable-dedicated) |
149 --enable-translator) enable_translator="2";; |
237 enable_dedicated="1" |
150 --enable-translator=*) enable_translator="$optarg";; |
238 ;; |
151 --disable-assert) enable_assert="0";; |
239 --enable-dedicated=*) |
152 --enable-assert) enable_assert="2";; |
240 enable_dedicated="$optarg" |
153 --enable-assert=*) enable_assert="$optarg";; |
241 ;; |
154 --disable-strip) enable_strip="0";; |
242 --enable-network=*) |
155 --enable-strip) enable_strip="2";; |
243 enable_network="$optarg" |
156 --enable-strip=*) enable_strip="$optarg";; |
244 ;; |
157 --disable-universal) enable_universal="0";; |
245 --disable-network) |
158 --enable-universal) enable_universal="2";; |
246 enable_network="0" |
159 --enable-universal=*) enable_universal="$optarg";; |
247 ;; |
160 --disable-osx-g5) enable_osx_g5="0";; |
248 --disable-static) |
161 --enable-osx-g5) enable_osx_g5="2";; |
249 enable_static="0" |
162 --enable-osx-g5=*) enable_osx_g5="$optarg";; |
250 ;; |
163 |
251 --enable-static) |
164 --with-sdl) with_sdl="2";; |
252 enable_static="2" |
165 --without-sdl) with_sdl="0";; |
253 ;; |
166 --with-sdl=*) with_sdl="$optarg";; |
254 --enable-static=*) |
167 |
255 enable_static="$optarg" |
168 --with-cocoa) with_cocoa="2";; |
256 ;; |
169 --without-cocoa) with_cocoa="0";; |
257 --disable-translator) |
170 --with-cocoa=*) with_cocoa="$optarg";; |
258 enable_translator="0" |
171 |
259 ;; |
172 --with-zlib) with_zlib="2";; |
260 --enable-translator) |
173 --without-zlib) with_zlib="0";; |
261 enable_translator="2" |
174 --with-zlib=*) with_zlib="$optarg";; |
262 ;; |
175 |
263 --enable-translator=*) |
176 --with-png) with_png="2";; |
264 enable_translator="$optarg" |
177 --without-png) with_png="0";; |
265 ;; |
178 --with-png=*) with_png="$optarg";; |
266 --disable-assert) |
179 --with-libpng) with_png="2";; |
267 enable_assert="0" |
180 --without-libpng) with_png="0";; |
268 ;; |
181 --with-libpng=*) with_png="$optarg";; |
269 --enable-assert) |
182 |
270 enable_assert="2" |
183 --with-freetype) with_freetype="2";; |
271 ;; |
184 --without-freetype) with_freetype="0";; |
272 --enable-assert=*) |
185 --with-freetype=*) with_freetype="$optarg";; |
273 enable_assert="$optarg" |
186 --with-libfreetype) with_freetype="2";; |
274 ;; |
187 --without-libfreetype) with_freetype="0";; |
275 --disable-strip) |
188 --with-libfreetype=*) with_freetype="$optarg";; |
276 enable_strip="0" |
189 |
277 ;; |
190 --with-fontconfig) with_fontconfig="2";; |
278 --enable-strip) |
191 --without-fontconfig) with_fontconfig="0";; |
279 enable_strip="2" |
192 --with-fontconfig=*) with_fontconfig="$optarg";; |
280 ;; |
193 --with-libfontconfig) with_fontconfig="2";; |
281 --enable-strip=*) |
194 --without-libfontconfig) with_fontconfig="0";; |
282 enable_strip="$optarg" |
195 --with-libfontconfig=*) with_fontconfig="$optarg";; |
283 ;; |
196 |
284 --disable-universal) |
197 --with-makedepend) with_makedepend="2";; |
285 enable_universal="0" |
198 --without-makedepend) with_makedepend="0";; |
286 ;; |
199 --with-makedepend=*) with_makedepend="$optarg";; |
287 --enable-universal) |
200 |
288 enable_universal="2" |
201 --with-direct-music) with_direct_music="2";; |
289 ;; |
202 --without-direct-music) with_direct_music="0";; |
290 --enable-universal=*) |
203 --with-direct-music=*) with_direct_music="$optarg";; |
291 enable_universal="$optarg" |
204 |
292 ;; |
205 --with-sort) with_sort="2";; |
293 --disable-osx-g5) |
206 --without-sort) with_sort="0";; |
294 enable_osx_g5="0" |
207 --with-sort=*) with_sort="$optarg";; |
295 ;; |
208 |
296 --enable-osx-g5) |
209 --with-iconv) with_iconv="2";; |
297 enable_osx_g5="2" |
210 --without-iconv) with_iconv="0";; |
298 ;; |
211 --with-iconv=*) with_iconv="$optarg";; |
299 --enable-osx-g5=*) |
212 |
300 enable_osx_g5="$optarg" |
213 --with-midi=*) with_midi="$optarg";; |
301 ;; |
214 --with-midi-arg=*) with_midi_arg="$optarg";; |
302 |
215 |
303 --with-sdl) |
216 --without-osx-sysroot) with_osx_sysroot="0";; |
304 with_sdl="2" |
217 --with-osx-sysroot) with_osx_sysroot="2";; |
305 ;; |
218 --with-osx-sysroot=*) with_osx_sysroot="$optarg";; |
306 --without-sdl) |
219 |
307 with_sdl="0" |
220 --without-application-bundle) with_applicant_bundle="0";; |
308 ;; |
221 --with-application-bundle) with_applicant_bundle="1";; |
309 --with-sdl=*) |
222 --with-application-bundle=*) with_applicant_bundle="$optarg";; |
310 with_sdl="$optarg" |
223 |
311 ;; |
224 CC=* | --CC=*) CC="$optarg";; |
312 |
225 CXX=* | --CXX=*) CXX="$optarg";; |
313 --with-cocoa) |
226 CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";; |
314 with_cocoa="2" |
227 LDFLAGS=* | --LDFLAGS=*) LDFLAGS="$optarg";; |
315 ;; |
228 |
316 --without-cocoa) |
229 --ignore-extra-parameters) ignore_extra_parameters="1";; |
317 with_cocoa="0" |
|
318 ;; |
|
319 --with-cocoa=*) |
|
320 with_cocoa="$optarg" |
|
321 ;; |
|
322 |
|
323 --with-zlib) |
|
324 with_zlib="2" |
|
325 ;; |
|
326 --without-zlib) |
|
327 with_zlib="0" |
|
328 ;; |
|
329 --with-zlib=*) |
|
330 with_zlib="$optarg" |
|
331 ;; |
|
332 |
|
333 --with-png) |
|
334 with_png="2" |
|
335 ;; |
|
336 --without-png) |
|
337 with_png="0" |
|
338 ;; |
|
339 --with-png=*) |
|
340 with_png="$optarg" |
|
341 ;; |
|
342 --with-libpng) |
|
343 with_png="2" |
|
344 ;; |
|
345 --without-libpng) |
|
346 with_png="0" |
|
347 ;; |
|
348 --with-libpng=*) |
|
349 with_png="$optarg" |
|
350 ;; |
|
351 |
|
352 --with-freetype) |
|
353 with_freetype="2" |
|
354 ;; |
|
355 --without-freetype) |
|
356 with_freetype="0" |
|
357 ;; |
|
358 --with-freetype=*) |
|
359 with_freetype="$optarg" |
|
360 ;; |
|
361 --with-libfreetype) |
|
362 with_freetype="2" |
|
363 ;; |
|
364 --without-libfreetype) |
|
365 with_freetype="0" |
|
366 ;; |
|
367 --with-libfreetype=*) |
|
368 with_freetype="$optarg" |
|
369 ;; |
|
370 |
|
371 --with-fontconfig) |
|
372 with_fontconfig="2" |
|
373 ;; |
|
374 --without-fontconfig) |
|
375 with_fontconfig="0" |
|
376 ;; |
|
377 --with-fontconfig=*) |
|
378 with_fontconfig="$optarg" |
|
379 ;; |
|
380 --with-libfontconfig) |
|
381 with_fontconfig="2" |
|
382 ;; |
|
383 --without-libfontconfig) |
|
384 with_fontconfig="0" |
|
385 ;; |
|
386 --with-libfontconfig=*) |
|
387 with_fontconfig="$optarg" |
|
388 ;; |
|
389 |
|
390 --with-makedepend) |
|
391 with_makedepend="2" |
|
392 ;; |
|
393 --without-makedepend) |
|
394 with_makedepend="0" |
|
395 ;; |
|
396 --with-makedepend=*) |
|
397 with_makedepend="$optarg" |
|
398 ;; |
|
399 |
|
400 --with-direct-music) |
|
401 with_direct_music="2" |
|
402 ;; |
|
403 --without-direct-music) |
|
404 with_direct_music="0" |
|
405 ;; |
|
406 --with-direct-music=*) |
|
407 with_direct_music="$optarg" |
|
408 ;; |
|
409 |
|
410 --with-sort) |
|
411 with_sort="2" |
|
412 ;; |
|
413 --without-sort) |
|
414 with_sort="0" |
|
415 ;; |
|
416 --with-sort=*) |
|
417 with_sort="$optarg" |
|
418 ;; |
|
419 |
|
420 --with-iconv) |
|
421 with_iconv="2" |
|
422 ;; |
|
423 --without-iconv) |
|
424 with_iconv="0" |
|
425 ;; |
|
426 --with-iconv=*) |
|
427 with_iconv="$optarg" |
|
428 ;; |
|
429 |
|
430 --with-midi=*) |
|
431 with_midi="$optarg" |
|
432 ;; |
|
433 --with-midi-arg=*) |
|
434 with_midi_arg="$optarg" |
|
435 ;; |
|
436 |
|
437 --without-osx-sysroot) |
|
438 with_osx_sysroot="0" |
|
439 ;; |
|
440 --with-osx-sysroot) |
|
441 with_osx_sysroot="2" |
|
442 ;; |
|
443 --with-osx-sysroot=*) |
|
444 with_osx_sysroot="$optarg" |
|
445 ;; |
|
446 |
|
447 --without-application-bundle) |
|
448 with_applicant_bundle="0" |
|
449 ;; |
|
450 --with-application-bundle) |
|
451 with_applicant_bundle="1" |
|
452 ;; |
|
453 --with-application-bundle=*) |
|
454 with_applicant_bundle="$optarg" |
|
455 ;; |
|
456 |
|
457 CC=* | --CC=*) |
|
458 CC="$optarg" |
|
459 ;; |
|
460 CXX=* | --CXX=*) |
|
461 CXX="$optarg" |
|
462 ;; |
|
463 CFLAGS=* | --CFLAGS=*) |
|
464 CFLAGS="$optarg" |
|
465 ;; |
|
466 LDFLAGS=* | --LDFLAGS=*) |
|
467 LDFLAGS="$optarg" |
|
468 ;; |
|
469 |
|
470 --ignore-extra-parameters) |
|
471 ignore_extra_parameters="1" |
|
472 ;; |
|
473 |
230 |
474 --*) |
231 --*) |
475 if [ "$ignore_extra_parameters" = "0" ] |
232 if [ "$ignore_extra_parameters" = "0" ]; then |
476 then |
|
477 echo "Unknown option $p" |
233 echo "Unknown option $p" |
478 exit 1 |
234 exit 1 |
479 else |
235 else |
480 echo "Unknown option $p ignored" |
236 echo "Unknown option $p ignored" |
481 fi |
237 fi |
482 ;; |
238 ;; |
483 esac |
239 esac |
484 done |
240 done |
485 |
241 |
486 if [ -n "$prev_p" ] |
242 if [ -n "$prev_p" ]; then |
487 then |
|
488 echo "configure: error: missing argument to --$prev_p" |
243 echo "configure: error: missing argument to --$prev_p" |
489 exit 1 |
244 exit 1 |
490 fi |
245 fi |
491 |
246 |
492 # Clean the logfile |
247 # Clean the logfile |
576 check_windres |
324 check_windres |
577 check_strip |
325 check_strip |
578 check_lipo |
326 check_lipo |
579 check_makedepend |
327 check_makedepend |
580 |
328 |
581 if [ "$enable_static" = "1" ] |
329 if [ "$enable_static" = "1" ]; then |
582 then |
330 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "OSX" ]; then |
583 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "OSX" ] |
|
584 then |
|
585 enable_static="2" |
331 enable_static="2" |
586 else |
332 else |
587 enable_static="0" |
333 enable_static="0" |
588 fi |
334 fi |
589 fi |
335 fi |
590 |
336 |
591 if [ "$enable_static" != "0" ] |
337 if [ "$enable_static" != "0" ]; then |
592 then |
|
593 log 1 "checking for static... yes" |
338 log 1 "checking for static... yes" |
594 |
339 |
595 if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "MORPHOS" ] |
340 if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "MORPHOS" ]; then |
596 then |
|
597 log 1 "WARNING: static is only known to work on Windows, MacOSX and MorphOS" |
341 log 1 "WARNING: static is only known to work on Windows, MacOSX and MorphOS" |
598 log 1 "WARNING: use static at your own risk on this platform" |
342 log 1 "WARNING: use static at your own risk on this platform" |
599 |
343 |
600 sleep 5 |
344 sleep 5 |
601 fi |
345 fi |
602 else |
346 else |
603 log 1 "checking for static... no" |
347 log 1 "checking for static... no" |
604 fi |
348 fi |
605 |
349 |
606 # Show what we configured |
350 # Show what we configured |
607 if [ "$enable_debug" = "0" ] |
351 if [ "$enable_debug" = "0" ]; then |
608 then |
|
609 log 1 "using debug level... no" |
352 log 1 "using debug level... no" |
610 elif [ "$enable_profiling" != "0" ] |
353 elif [ "$enable_profiling" != "0" ]; then |
611 then |
|
612 log 1 "using debug level... profiling (debug level $enable_debug)" |
354 log 1 "using debug level... profiling (debug level $enable_debug)" |
613 else |
355 else |
614 log 1 "using debug level... level $enable_debug" |
356 log 1 "using debug level... level $enable_debug" |
615 fi |
357 fi |
616 |
358 |
617 detect_sdl |
359 detect_sdl |
618 detect_cocoa |
360 detect_cocoa |
619 |
361 |
620 if [ "$enable_dedicated" != "0" ] |
362 if [ "$enable_dedicated" != "0" ]; then |
621 then |
|
622 log 1 "checking GDI video driver... skipping" |
363 log 1 "checking GDI video driver... skipping" |
623 log 1 "checking dedicated... found" |
364 log 1 "checking dedicated... found" |
624 |
365 |
625 if [ "$enable_network" = "0" ] |
366 if [ "$enable_network" = "0" ]; then |
626 then |
|
627 log 1 "WARNING: compiling a dedicated server without network is pointless" |
367 log 1 "WARNING: compiling a dedicated server without network is pointless" |
628 sleep 5 |
368 sleep 5 |
629 fi |
369 fi |
630 else |
370 else |
631 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] |
371 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then |
632 then |
|
633 log 1 "checking GDI video driver... found" |
372 log 1 "checking GDI video driver... found" |
634 else |
373 else |
635 log 1 "checking GDI video driver... not Windows, skipping" |
374 log 1 "checking GDI video driver... not Windows, skipping" |
636 fi |
375 fi |
637 |
376 |
638 if [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] |
377 if [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then |
639 then |
|
640 log 1 "WARNING: no video driver found, building dedicated only" |
378 log 1 "WARNING: no video driver found, building dedicated only" |
641 enable_dedicated="1" |
379 enable_dedicated="1" |
642 sleep 1 |
380 sleep 1 |
643 |
381 |
644 log 1 "checking dedicated... found" |
382 log 1 "checking dedicated... found" |
645 else |
383 else |
646 log 1 "checking dedicated... not selected" |
384 log 1 "checking dedicated... not selected" |
647 fi |
385 fi |
648 fi |
386 fi |
649 |
387 |
650 if [ "$enable_network" != "0" ] |
388 if [ "$enable_network" != "0" ]; then |
651 then |
|
652 log 1 "checking network... found" |
389 log 1 "checking network... found" |
653 else |
390 else |
654 log 1 "checking network... disabled" |
391 log 1 "checking network... disabled" |
655 fi |
392 fi |
656 |
393 |
657 if [ "$enable_translator" != "0" ] |
394 if [ "$enable_translator" != "0" ]; then |
658 then |
|
659 log 1 "checking translator... debug" |
395 log 1 "checking translator... debug" |
660 # -t shows TODO items, normally they are muted |
396 # -t shows TODO items, normally they are muted |
661 strgen_flags="-t" |
397 strgen_flags="-t" |
662 else |
398 else |
663 log 1 "checking translator... no" |
399 log 1 "checking translator... no" |
664 strgen_flags="" |
400 strgen_flags="" |
665 fi |
401 fi |
666 |
402 |
667 if [ "$enable_assert" != "0" ] |
403 if [ "$enable_assert" != "0" ]; then |
668 then |
|
669 log 1 "checking assert... enabled" |
404 log 1 "checking assert... enabled" |
670 else |
405 else |
671 log 1 "checking assert... disabled" |
406 log 1 "checking assert... disabled" |
672 fi |
407 fi |
673 |
408 |
694 fi |
426 fi |
695 fi |
427 fi |
696 |
428 |
697 detect_sort |
429 detect_sort |
698 |
430 |
699 if [ "$os" = "OSX" ] && [ "$endian" = "AUTO" ] |
431 if [ "$os" = "OSX" ] && [ "$endian" = "AUTO" ]; then |
700 then |
|
701 endian="PREPROCESSOR" |
432 endian="PREPROCESSOR" |
702 fi |
433 fi |
703 |
434 |
704 log 1 "checking endianess... $endian" |
435 log 1 "checking endianess... $endian" |
705 |
436 |
706 # Suppress language errors when there is a version defined, indicating a release |
437 # Suppress language errors when there is a version defined, indicating a release |
707 # It just isn't pretty if any release produces warnings in the languages. |
438 # It just isn't pretty if any release produces warnings in the languages. |
708 if [ -f "$ROOT_DIR/version" ] |
439 if [ -f "$ROOT_DIR/version" ]; then |
709 then |
|
710 lang_suppress="yes" |
440 lang_suppress="yes" |
711 log 1 "suppress language errors... yes" |
441 log 1 "suppress language errors... yes" |
712 else |
442 else |
713 lang_suppress="" |
443 lang_suppress="" |
714 log 1 "suppress language errors... no" |
444 log 1 "suppress language errors... no" |
715 fi |
445 fi |
716 |
446 |
717 if [ "$enable_debug" = "0" ] && [ "$enable_profiling" = "0" ] && [ "$enable_strip" != "0" ] |
447 if [ "$enable_debug" = "0" ] && [ "$enable_profiling" = "0" ] && [ "$enable_strip" != "0" ]; then |
718 then |
448 if [ "$os" = "MORPHOS" ]; then |
719 if [ "$os" = "MORPHOS" ] |
|
720 then |
|
721 strip_arg="--strip-all --strip-unneeded --remove-section .comment" |
449 strip_arg="--strip-all --strip-unneeded --remove-section .comment" |
722 elif [ "$os" = "OSX" ] |
450 elif [ "$os" = "OSX" ]; then |
723 then |
|
724 strip_arg="" |
451 strip_arg="" |
|
452 elif [ "$os" = "OS2" ]; then |
|
453 strip_arg="" |
|
454 # OS2 uses strip via gcc, because it needs to be feed to emxbind |
|
455 LDFLAGS="$LDFLAGS -s" |
725 else |
456 else |
726 strip_arg="-s" |
457 strip_arg="-s" |
727 fi |
458 fi |
728 |
459 |
729 log 1 "checking stripping... $strip $strip_arg" |
460 log 1 "checking stripping... $strip $strip_arg" |
730 else |
461 else |
731 strip="" |
462 strip="" |
732 log 1 "checking stripping... skipped" |
463 log 1 "checking stripping... skipped" |
733 fi |
464 fi |
734 |
465 |
735 if [ "$os" != "OSX" ] && [ "$with_osx_sysroot" != "0" ] |
466 if [ "$os" != "OSX" ] && [ "$with_osx_sysroot" != "0" ]; then |
736 then |
467 if [ "$with_osx_sysroot" = "1" ]; then |
737 if [ "$with_osx_sysroot" = "1" ] |
|
738 then |
|
739 with_osx_sysroot="0" |
468 with_osx_sysroot="0" |
740 |
469 |
741 log 1 "checking OSX sysroot... not OSX, skipping" |
470 log 1 "checking OSX sysroot... not OSX, skipping" |
742 else |
471 else |
743 log 1 "configure: error: --with-osx-sysroot only works if OSX is the target" |
472 log 1 "configure: error: --with-osx-sysroot only works if OSX is the target" |
744 exit 1 |
473 exit 1 |
745 fi |
474 fi |
746 fi |
475 fi |
747 |
476 |
748 if [ "$with_osx_sysroot" != "0" ] |
477 if [ "$with_osx_sysroot" != "0" ]; then |
749 then |
478 if [ "$enable_universal" = "0" ] && [ "$with_osx_sysroot" != "1" ] && [ "$with_osx_sysroot" != "2" ]; then |
750 if [ "$enable_universal" = "0" ] && [ "$with_osx_sysroot" != "1" ] && [ "$with_osx_sysroot" != "2" ] |
|
751 then |
|
752 log 1 "checking OSX sysroot... $with_osx_sysroot" |
479 log 1 "checking OSX sysroot... $with_osx_sysroot" |
753 else |
480 else |
754 # If autodetect and no universal, use system default |
481 # If autodetect and no universal, use system default |
755 if [ "$with_osx_sysroot" = "1" ] && [ "$enable_universal" = "0" ] |
482 if [ "$with_osx_sysroot" = "1" ] && [ "$enable_universal" = "0" ]; then |
756 then |
|
757 log 1 "checking OSX sysroot... no (use system default)" |
483 log 1 "checking OSX sysroot... no (use system default)" |
758 with_osx_sysroot="0" |
484 with_osx_sysroot="0" |
759 else |
485 else |
760 log 1 "checking OSX sysroot... automaticly" |
486 log 1 "checking OSX sysroot... automatically" |
761 with_osx_sysroot="3" |
487 with_osx_sysroot="3" |
762 fi |
488 fi |
763 fi |
489 fi |
764 else |
490 else |
765 if [ "$os" = "OSX" ] |
491 if [ "$os" = "OSX" ]; then |
766 then |
|
767 log 1 "checking OSX sysroot... no (use system default)" |
492 log 1 "checking OSX sysroot... no (use system default)" |
768 fi |
493 fi |
769 fi |
494 fi |
770 |
495 |
771 if [ "$os" != "OSX" ] && [ "$with_application_bundle" != "0" ] |
496 if [ "$os" != "OSX" ] && [ "$with_application_bundle" != "0" ]; then |
772 then |
497 if [ "$with_application_bundle" = "1" ]; then |
773 if [ "$with_application_bundle" = "1" ] |
|
774 then |
|
775 with_application_bundle="0" |
498 with_application_bundle="0" |
776 |
499 |
777 log 1 "checking OSX application bundle... not OSX, skipping" |
500 log 1 "checking OSX application bundle... not OSX, skipping" |
778 else |
501 else |
779 log 1 "configure: error: --with-application-bundle only works if OSX is the target" |
502 log 1 "configure: error: --with-application-bundle only works if OSX is the target" |
780 exit 1 |
503 exit 1 |
781 fi |
504 fi |
782 fi |
505 fi |
783 |
506 |
784 if [ "$os" = "OSX" ] && [ "$with_application_bundle" = "1" ] |
507 if [ "$os" = "OSX" ] && [ "$with_application_bundle" = "1" ]; then |
785 then |
|
786 OSXAPP="OpenTTD.app" |
508 OSXAPP="OpenTTD.app" |
787 |
509 |
788 # TODO: remove next few lines of code when the search path patch has been applied |
510 # TODO: remove next few lines of code when the search path patch has been applied |
789 if [ -n "$custom_lang_dir" ] && [ "$custom_lang_dir" != "$(OSXAPP)/Contents/Lang/" ] |
511 if [ -n "$custom_lang_dir" ] && [ "$custom_lang_dir" != "$(OSXAPP)/Contents/Lang/" ]; then |
790 then |
|
791 log 1 "configure: error: --custom-lang-dir and --with-application-bundle are not compatible |
512 log 1 "configure: error: --custom-lang-dir and --with-application-bundle are not compatible |
792 exit 1 |
513 exit 1 |
793 fi |
514 fi |
794 |
515 |
795 if [ -n "$custom_lang_dir" ] && [ "$second_data_dir" != "$(OSXAPP)/Contents/Data/" ] |
516 if [ -n "$custom_lang_dir" ] && [ "$second_data_dir" != "$(OSXAPP)/Contents/Data/" ]; then |
796 then |
|
797 log 1 "configure: error: --second-data-dir and --with-application-bundle are not compatible |
517 log 1 "configure: error: --second-data-dir and --with-application-bundle are not compatible |
798 exit 1 |
518 exit 1 |
799 fi |
519 fi |
800 |
520 |
801 custom_lang_dir="${OSXAPP}/Contents/Lang/" |
521 custom_lang_dir="${OSXAPP}/Contents/Lang/" |
859 # Libs to compile. In fact this is just LDFLAGS |
574 # Libs to compile. In fact this is just LDFLAGS |
860 LIBS="-lstdc++" |
575 LIBS="-lstdc++" |
861 # LDFLAGS used for HOST |
576 # LDFLAGS used for HOST |
862 LDFLAGS="$LDFLAGS" |
577 LDFLAGS="$LDFLAGS" |
863 |
578 |
864 # Each debug level reduces the optimalization by a bit |
579 if [ $enable_debug = 0 ]; then |
865 if [ $enable_debug -ge 1 ] |
580 # No debug, add default stuff |
866 then |
|
867 CFLAGS="$CFLAGS -g -D_DEBUG" |
|
868 OBJS_SUBDIR="debug" |
|
869 else |
|
870 OBJS_SUBDIR="release" |
581 OBJS_SUBDIR="release" |
871 fi |
582 if [ "$os" = "OSX" ]; then |
872 if [ $enable_debug -ge 2 ] |
|
873 then |
|
874 CFLAGS="$CFLAGS -fno-inline" |
|
875 fi |
|
876 if [ $enable_debug -ge 3 ] |
|
877 then |
|
878 CFLAGS="$CFLAGS -O0" |
|
879 fi |
|
880 if [ $enable_debug = 0 ] |
|
881 then |
|
882 # No debug, add default stuff |
|
883 if [ "$os" = "OSX" ] |
|
884 then |
|
885 # these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer |
583 # these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer |
886 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" |
584 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" |
887 else |
585 else |
888 if [ "$os" = "MORPHOS" ] |
586 if [ "$os" = "MORPHOS" ]; then |
889 then |
|
890 CFLAGS="$CFLAGS -I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations" |
587 CFLAGS="$CFLAGS -I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations" |
891 CFLAGS="$CFLAGS -mcpu=604 -fno-inline -mstring -mmultiple" |
588 CFLAGS="$CFLAGS -mcpu=604 -fno-inline -mstring -mmultiple" |
892 fi |
589 fi |
893 |
590 |
894 CFLAGS="$CFLAGS -O2 -fomit-frame-pointer" |
591 CFLAGS="$CFLAGS -O2 -fomit-frame-pointer" |
895 fi |
592 fi |
896 |
593 else |
897 if [ "$enable_profiling" != "0" ] |
594 OBJS_SUBDIR="debug" |
898 then |
595 |
899 CFLAGS="$CFLAGS -pg" |
596 # Each debug level reduces the optimalization by a bit |
900 LDFLAGS="$LDFLAGS -pg" |
597 if [ $enable_debug -ge 1 ]; then |
901 fi |
598 CFLAGS="$CFLAGS -g -D_DEBUG" |
902 else |
599 fi |
903 if [ "$enable_profiling" != "0" ] |
600 if [ $enable_debug -ge 2 ]; then |
904 then |
601 CFLAGS="$CFLAGS -fno-inline" |
905 CFLAGS="$CFLAGS -p" |
602 fi |
906 LDFLAGS="$LDFLAGS -pg" |
603 if [ $enable_debug -ge 3 ]; then |
907 fi |
604 CFLAGS="$CFLAGS -O0" |
|
605 else |
|
606 CFLAGS="$CFLAGS -O2" |
|
607 fi |
|
608 fi |
|
609 |
|
610 if [ "$enable_profiling" != "0" ]; then |
|
611 CFLAGS="$CFLAGS -p" |
|
612 LDFLAGS="$LDFLAGS -pg" |
908 fi |
613 fi |
909 |
614 |
910 # Enable some things only for certain GCC versions |
615 # Enable some things only for certain GCC versions |
911 cc_version=`$cc_host -dumpversion | cut -c 1,3` |
616 cc_version=`$cc_host -dumpversion | cut -c 1,3` |
912 |
617 |
913 if [ $cc_version -ge 29 ] |
618 if [ $cc_version -ge 29 ]; then |
914 then |
619 CFLAGS="$CFLAGS -Wall -Wno-multichar -Wsign-compare -Wundef" |
915 CFLAGS="$CFLAGS -O -Wall -Wno-multichar -Wsign-compare -Wundef" |
|
916 CFLAGS="$CFLAGS -Wwrite-strings -Wpointer-arith" |
620 CFLAGS="$CFLAGS -Wwrite-strings -Wpointer-arith" |
917 |
621 |
918 CC_CFLAGS="$CC_CFLAGS -Wstrict-prototypes" |
622 CC_CFLAGS="$CC_CFLAGS -Wstrict-prototypes" |
919 fi |
623 fi |
920 |
624 |
921 if [ $cc_version -ge 30 ] |
625 if [ $cc_version -ge 30 ]; then |
922 then |
|
923 CFLAGS="$CFLAGS -W -Wno-unused-parameter" |
626 CFLAGS="$CFLAGS -W -Wno-unused-parameter" |
924 fi |
627 fi |
925 |
628 |
926 if [ $cc_version -ge 34 ] |
629 if [ $cc_version -ge 34 ]; then |
927 then |
|
928 CC_CFLAGS="$CC_CFLAGS -Wdeclaration-after-statement -Wold-style-definition" |
630 CC_CFLAGS="$CC_CFLAGS -Wdeclaration-after-statement -Wold-style-definition" |
929 fi |
631 fi |
930 |
632 |
931 if [ "$os" = "CYGWIN" ] |
633 if [ "$os" = "CYGWIN" ]; then |
932 then |
|
933 CFLAGS="$CFLAGS -mwin32" |
634 CFLAGS="$CFLAGS -mwin32" |
934 LDFLAGS="$LDFLAGS -mwin32" |
635 LDFLAGS="$LDFLAGS -mwin32" |
935 fi |
636 fi |
936 if [ "$os" = "MINGW" ] |
637 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then |
937 then |
|
938 CFLAGS="$CFLAGS -mno-cygwin" |
638 CFLAGS="$CFLAGS -mno-cygwin" |
939 LDFLAGS="$LDFLAGS -mno-cygwin" |
639 LDFLAGS="$LDFLAGS -mno-cygwin" |
940 fi |
640 fi |
941 |
641 |
942 if [ "$os" = "CYGWIN" ] || [ "$os" = "MINGW" ] |
642 if [ "$os" = "CYGWIN" ] || [ "$os" = "MINGW" ]; then |
943 then |
|
944 LDFLAGS="$LDFLAGS -Wl,--subsystem,windows" |
643 LDFLAGS="$LDFLAGS -Wl,--subsystem,windows" |
945 LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32" |
644 LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32" |
946 fi |
645 fi |
947 |
646 |
948 if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] |
647 if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ]; then |
949 then |
|
950 LIBS="$LIBS -lpthread" |
648 LIBS="$LIBS -lpthread" |
951 LIBS="$LIBS -lrt" |
649 LIBS="$LIBS -lrt" |
952 fi |
650 fi |
953 |
651 |
954 if [ "$os" != "MINGW" ] |
652 if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ]; then |
955 then |
|
956 LIBS="$LIBS -lc" |
653 LIBS="$LIBS -lc" |
957 fi |
654 fi |
958 |
655 |
959 if [ "$os" = "MORPHOS" ] |
656 if [ "$os" = "MORPHOS" ]; then |
960 then |
|
961 # -Wstrict-prototypes generates much noise because of system headers |
657 # -Wstrict-prototypes generates much noise because of system headers |
962 CFLAGS="$CFLAGS -Wno-strict-prototypes" |
658 CFLAGS="$CFLAGS -Wno-strict-prototypes" |
963 fi |
659 fi |
964 |
660 |
965 if [ "$os" = "OSX" ] |
661 if [ "$os" = "OSX" ]; then |
966 then |
|
967 LDFLAGS="$LDFLAGS -framework Cocoa" |
662 LDFLAGS="$LDFLAGS -framework Cocoa" |
968 if [ "$enable_dedicated" = "0" ] |
663 if [ "$enable_dedicated" = "0" ]; then |
969 then |
|
970 LIBS="$LIBS -framework QuickTime" |
664 LIBS="$LIBS -framework QuickTime" |
971 fi |
665 fi |
972 fi |
666 fi |
973 |
667 |
974 if [ "$os" = "BEOS" ] |
668 if [ "$os" = "BEOS" ]; then |
975 then |
|
976 LIBS="$LIBS -lmidi -lbe" |
669 LIBS="$LIBS -lmidi -lbe" |
977 fi |
670 fi |
978 |
671 |
979 # Most targets act like UNIX, just with some additions |
672 # Most targets act like UNIX, just with some additions |
980 if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ] |
673 if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then |
981 then |
|
982 CFLAGS="$CFLAGS -DUNIX" |
674 CFLAGS="$CFLAGS -DUNIX" |
983 fi |
675 fi |
984 # And others like Windows |
676 # And others like Windows |
985 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] |
677 if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then |
986 then |
|
987 CFLAGS="$CFLAGS -DWIN" |
678 CFLAGS="$CFLAGS -DWIN" |
988 fi |
679 fi |
989 |
680 |
990 if [ -n "$sdl_config" ] |
681 if [ -n "$sdl_config" ]; then |
991 then |
|
992 CFLAGS="$CFLAGS -DWITH_SDL" |
682 CFLAGS="$CFLAGS -DWITH_SDL" |
993 CFLAGS="$CFLAGS `$sdl_config --cflags`" |
683 CFLAGS="$CFLAGS `$sdl_config --cflags`" |
994 if [ "$enable_static" != "0" ] |
684 if [ "$enable_static" != "0" ]; then |
995 then |
|
996 LIBS="$LIBS `$sdl_config --static-libs`" |
685 LIBS="$LIBS `$sdl_config --static-libs`" |
997 else |
686 else |
998 LIBS="$LIBS `$sdl_config --libs`" |
687 LIBS="$LIBS `$sdl_config --libs`" |
999 fi |
688 fi |
1000 fi |
689 fi |
1001 |
690 |
1002 if [ "$with_cocoa" != "0" ] |
691 if [ "$with_cocoa" != "0" ]; then |
1003 then |
|
1004 CFLAGS="$CFLAGS -DWITH_COCOA" |
692 CFLAGS="$CFLAGS -DWITH_COCOA" |
1005 LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit" |
693 LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit" |
1006 fi |
694 fi |
1007 |
695 |
1008 if [ "$with_zlib" != "0" ] |
696 if [ "$with_zlib" != "0" ]; then |
1009 then |
697 if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then |
1010 if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ] |
|
1011 then |
|
1012 LIBS="$LIBS $zlib" |
698 LIBS="$LIBS $zlib" |
1013 else |
699 else |
1014 LIBS="$LIBS -lz" |
700 LIBS="$LIBS -lz" |
1015 fi |
701 fi |
1016 CFLAGS="$CFLAGS -DWITH_ZLIB" |
702 CFLAGS="$CFLAGS -DWITH_ZLIB" |
1017 fi |
703 fi |
1018 |
704 |
1019 if [ -n "$png_config" ] |
705 if [ -n "$png_config" ]; then |
1020 then |
|
1021 CFLAGS="$CFLAGS -DWITH_PNG" |
706 CFLAGS="$CFLAGS -DWITH_PNG" |
1022 CFLAGS="$CFLAGS `$png_config --cppflags --I_opts | tr '\n\r' ' '`" |
707 CFLAGS="$CFLAGS `$png_config --cppflags --I_opts | tr '\n\r' ' '`" |
1023 |
708 |
1024 # The extra flags are unneeded for latest libpng-config, but some versions are so broken... |
709 # The extra flags are unneeded for latest libpng-config, but some versions are so broken... |
1025 if [ "$enable_static" != "0" ] |
710 if [ "$enable_static" != "0" ]; then |
1026 then |
711 if [ "$os" = "OSX" ]; then |
1027 if [ "$os" = "OSX" ] |
|
1028 then |
|
1029 LIBS="$LIBS `$png_config --prefix`/lib/libpng.a" |
712 LIBS="$LIBS `$png_config --prefix`/lib/libpng.a" |
1030 else |
713 else |
1031 LIBS="$LIBS `$png_config --static --ldflags --libs --L_opts | tr '\n\r' ' '`" |
714 LIBS="$LIBS `$png_config --static --ldflags --libs --L_opts | tr '\n\r' ' '`" |
1032 fi |
715 fi |
1033 else |
716 else |
1034 LIBS="$LIBS `$png_config --ldflags --libs --L_opts | tr '\n\r' ' '`" |
717 LIBS="$LIBS `$png_config --ldflags --libs --L_opts | tr '\n\r' ' '`" |
1035 fi |
718 fi |
1036 fi |
719 fi |
1037 |
720 |
1038 if [ -n "$freetype_config" ] |
721 if [ -n "$freetype_config" ]; then |
1039 then |
|
1040 CFLAGS="$CFLAGS -DWITH_FREETYPE" |
722 CFLAGS="$CFLAGS -DWITH_FREETYPE" |
1041 CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" |
723 CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" |
1042 |
724 |
1043 if [ "$enable_static" != "0" ] |
725 if [ "$enable_static" != "0" ]; then |
1044 then |
726 if [ "$os" = "OSX" ]; then |
1045 if [ "$os" = "OSX" ] |
|
1046 then |
|
1047 LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a" |
727 LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a" |
1048 else |
728 else |
1049 # Is it possible to do static with freetype, if so: how? |
729 # Is it possible to do static with freetype, if so: how? |
1050 LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" |
730 LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" |
1051 fi |
731 fi |
1052 else |
732 else |
1053 LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" |
733 LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" |
1054 fi |
734 fi |
1055 fi |
735 fi |
1056 |
736 |
1057 if [ -n "$fontconfig_config" ] |
737 if [ -n "$fontconfig_config" ]; then |
1058 then |
|
1059 CFLAGS="$CFLAGS -DWITH_FONTCONFIG" |
738 CFLAGS="$CFLAGS -DWITH_FONTCONFIG" |
1060 CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" |
739 CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" |
1061 |
740 |
1062 if [ "$enable_static" != "0" ] |
741 if [ "$enable_static" != "0" ]; then |
1063 then |
742 if [ "$os" = "OSX" ]; then |
1064 if [ "$os" = "OSX" ] |
|
1065 then |
|
1066 LIBS="$LIBS `$fontconfig_config --prefix`/lib/libfontconfig.a" |
743 LIBS="$LIBS `$fontconfig_config --prefix`/lib/libfontconfig.a" |
1067 else |
744 else |
1068 LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" |
745 LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" |
1069 fi |
746 fi |
1070 else |
747 else |
1071 LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" |
748 LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" |
1072 fi |
749 fi |
1073 fi |
750 fi |
1074 |
751 |
1075 if [ "$with_direct_music" != "0" ] |
752 if [ "$with_direct_music" != "0" ]; then |
1076 then |
|
1077 CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT" |
753 CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT" |
1078 fi |
754 fi |
1079 |
755 |
1080 if [ "$with_iconv" != "0" ] |
756 if [ "$with_iconv" != "0" ]; then |
1081 then |
|
1082 CFLAGS="$CFLAGS -DWITH_ICONV" |
757 CFLAGS="$CFLAGS -DWITH_ICONV" |
1083 LIBS="$LIBS -liconv" |
758 LIBS="$LIBS -liconv" |
1084 if [ "$with_iconv" != "2" ] |
759 if [ "$with_iconv" != "2" ]; then |
1085 then |
|
1086 CFLAGS="$CFLAGS -I$with_iconv/include" |
760 CFLAGS="$CFLAGS -I$with_iconv/include" |
1087 LIBS="$LIBS -L$with_iconv/lib" |
761 LIBS="$LIBS -L$with_iconv/lib" |
1088 fi |
762 fi |
1089 fi |
763 fi |
1090 |
764 |
1091 if [ -n "$with_midi" ] |
765 if [ -n "$with_midi" ]; then |
1092 then |
766 CFLAGS="$CFLAGS -DEXTERNAL_PLAYER=\\\\\"$with_midi\\\\\"" |
1093 CFLAGS="$CFLAGS -DEXTERNAL_PLAYER=\"$with_midi\"" |
767 fi |
1094 fi |
768 if [ -n "$with_midi_arg" ]; then |
1095 if [ -n "$with_midi_arg" ] |
769 CFLAGS="$CFLAGS -DMIDI_ARG=\\\\\"$with_midi_arg\\\\\"" |
1096 then |
770 fi |
1097 CFLAGS="$CFLAGS -DMIDI_ARG=\"$with_midi_arg\"" |
771 |
1098 fi |
772 if [ "$enable_dedicated" != "0" ]; then |
1099 |
|
1100 if [ "$enable_dedicated" != "0" ] |
|
1101 then |
|
1102 CFLAGS="$CFLAGS -DDEDICATED" |
773 CFLAGS="$CFLAGS -DDEDICATED" |
1103 fi |
774 fi |
1104 |
775 |
1105 if [ "$enable_network" != "0" ] |
776 if [ "$enable_network" != "0" ]; then |
1106 then |
|
1107 CFLAGS="$CFLAGS -DENABLE_NETWORK" |
777 CFLAGS="$CFLAGS -DENABLE_NETWORK" |
1108 |
778 |
1109 if [ "$os" = "BEOS" ] |
779 if [ "$os" = "BEOS" ]; then |
1110 then |
|
1111 LDFLAGS="$LDFLAGS -lbind -lsocket" |
780 LDFLAGS="$LDFLAGS -lbind -lsocket" |
1112 fi |
781 fi |
1113 |
782 |
1114 if [ "$os" = "SUNOS" ] |
783 if [ "$os" = "SUNOS" ]; then |
1115 then |
|
1116 LDFLAGS="$LDFLAGS -lnsl -lsocket" |
784 LDFLAGS="$LDFLAGS -lnsl -lsocket" |
1117 fi |
785 fi |
1118 fi |
786 fi |
1119 |
787 |
1120 if [ "$enable_static" != "0" ] |
788 if [ "$enable_static" != "0" ]; then |
1121 then |
|
1122 # OSX can't handle -static in LDFLAGS |
789 # OSX can't handle -static in LDFLAGS |
1123 if [ "$os" != "OSX" ] |
790 if [ "$os" != "OSX" ]; then |
1124 then |
|
1125 LDFLAGS="$LDFLAGS -static" |
791 LDFLAGS="$LDFLAGS -static" |
1126 fi |
792 fi |
1127 fi |
793 fi |
1128 |
794 |
1129 if [ "$enable_assert" = "0" ] |
795 if [ "$enable_assert" = "0" ]; then |
1130 then |
|
1131 CFLAGS="$CFLAGS -DNDEBUG" |
796 CFLAGS="$CFLAGS -DNDEBUG" |
1132 fi |
797 fi |
1133 |
798 |
1134 if [ "$enable_osx_g5" != "0" ] |
799 if [ "$enable_osx_g5" != "0" ]; then |
1135 then |
|
1136 CFLAGS="$CFLAGS -mtune=970 -mcpu=970 -mpowerpc-gpopt" |
800 CFLAGS="$CFLAGS -mtune=970 -mcpu=970 -mpowerpc-gpopt" |
1137 fi |
801 fi |
1138 |
802 |
1139 if [ "$with_osx_sysroot" != "0" ] && [ "$with_osx_sysroot" != "3" ] |
803 if [ "$with_osx_sysroot" != "0" ] && [ "$with_osx_sysroot" != "3" ]; then |
1140 then |
|
1141 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$with_osx_sysroot.sdk" |
804 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$with_osx_sysroot.sdk" |
1142 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$with_osx_sysroot.sdk" |
805 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$with_osx_sysroot.sdk" |
1143 fi |
806 fi |
1144 |
807 |
1145 # TODO: remove next few lines of code when the search path patch has been applied |
808 # TODO: remove next few lines of code when the search path patch has been applied |
1146 if [ -n "$second_data_dir" ] |
809 if [ -n "$second_data_dir" ]; then |
1147 then |
|
1148 CFLAGS="$CFLAGS -DSECOND_DATA_DIR=\\\\\"$second_data_dir\\\\\"" |
810 CFLAGS="$CFLAGS -DSECOND_DATA_DIR=\\\\\"$second_data_dir\\\\\"" |
1149 fi |
811 fi |
1150 |
812 |
1151 if [ -n "$custom_lang_dir" ] |
813 if [ -n "$custom_lang_dir" ]; then |
1152 then |
|
1153 CFLAGS="$CFLAGS -DCUSTOM_LANG_DIR=\\\\\"$custom_lang_dir\\\\\"" |
814 CFLAGS="$CFLAGS -DCUSTOM_LANG_DIR=\\\\\"$custom_lang_dir\\\\\"" |
1154 fi |
815 fi |
1155 # TODO: remove till here |
816 # TODO: remove till here |
1156 |
817 |
1157 if [ "$enable_install" = "1" ] |
818 if [ "$enable_install" = "1" ]; then |
1158 then |
819 if [ -n "$personal_dir" ]; then |
1159 if [ -n "$personal_dir" ] |
|
1160 then |
|
1161 CFLAGS="$CFLAGS -DUSE_HOMEDIR=1 -DPERSONAL_DIR=\\\\\"$personal_dir/\\\\\"" |
820 CFLAGS="$CFLAGS -DUSE_HOMEDIR=1 -DPERSONAL_DIR=\\\\\"$personal_dir/\\\\\"" |
1162 fi |
821 fi |
1163 |
822 |
1164 if [ -n "$data_dir" ] |
823 if [ -n "$data_dir" ]; then |
1165 then |
|
1166 CFLAGS="$CFLAGS -DGAME_DATA_DIR=\\\\\"$prefix_dir/$data_dir/\\\\\"" |
824 CFLAGS="$CFLAGS -DGAME_DATA_DIR=\\\\\"$prefix_dir/$data_dir/\\\\\"" |
1167 fi |
825 fi |
1168 |
826 |
1169 if [ -n "$icon_dir" ] |
827 if [ -n "$icon_dir" ]; then |
1170 then |
|
1171 CFLAGS="$CFLAGS -DICON_DIR=\\\\\"$prefix_dir/$icon_dir/\\\\\"" |
828 CFLAGS="$CFLAGS -DICON_DIR=\\\\\"$prefix_dir/$icon_dir/\\\\\"" |
1172 fi |
829 fi |
1173 fi |
830 fi |
1174 |
831 |
1175 if [ -n "$revision" ] |
832 if [ -n "$revision" ]; then |
1176 then |
|
1177 log 1 "checking revision... $revision" |
833 log 1 "checking revision... $revision" |
1178 log 1 "WARNING: we do not advise you to use this setting" |
834 log 1 "WARNING: we do not advise you to use this setting" |
1179 log 1 "WARNING: in most cases it is not safe for network use" |
835 log 1 "WARNING: in most cases it is not safe for network use" |
1180 log 1 "WARNING: USE WITH CAUTION!" |
836 log 1 "WARNING: USE WITH CAUTION!" |
1181 |
837 |
1182 sleep 5 |
838 sleep 5 |
1183 elif [ -f "$ROOT_DIR/version" ] |
839 elif [ -f "$ROOT_DIR/version" ]; then |
1184 then |
|
1185 revision="`cat $ROOT_DIR/version`" |
840 revision="`cat $ROOT_DIR/version`" |
1186 |
841 |
1187 log 1 "checking revision... $revision" |
842 log 1 "checking revision... $revision" |
1188 else |
843 else |
1189 revision="" |
844 revision="" |
1218 # $6 - GCC alike to try |
872 # $6 - GCC alike to try |
1219 # $7 - CC alike to try |
873 # $7 - CC alike to try |
1220 # $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo |
874 # $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo |
1221 # $9 - What the command is to check for |
875 # $9 - What the command is to check for |
1222 |
876 |
1223 if [ -n "$3" ] |
877 if [ -n "$3" ]; then |
1224 then |
|
1225 # Check for system |
878 # Check for system |
1226 machine=`$3-$6 $9 2>/dev/null` |
879 machine=`$3-$6 $9 2>/dev/null` |
1227 ret=$? |
880 ret=$? |
1228 eval "$2=$3-$6" |
881 eval "$2=$3-$6" |
1229 |
882 |
1230 log 2 "executing $3-$6 $9" |
883 log 2 "executing $3-$6 $9" |
1231 log 2 " returned $machine" |
884 log 2 " returned $machine" |
1232 log 2 " exit code $ret" |
885 log 2 " exit code $ret" |
1233 |
886 |
1234 if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ] |
887 if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then |
1235 then |
|
1236 log 1 "checking $1... $3-$6 not found" |
888 log 1 "checking $1... $3-$6 not found" |
1237 log 1 "I couldn't detect any $6 binary for $3" |
889 log 1 "I couldn't detect any $6 binary for $3" |
1238 exit 1 |
890 exit 1 |
1239 fi |
891 fi |
1240 |
892 |
1241 if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ) |
893 if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then |
1242 then |
|
1243 log 1 "checking $1... expected $3, found $machine" |
894 log 1 "checking $1... expected $3, found $machine" |
1244 log 1 "the compiler suggests it doesn't build code for the machine you specified" |
895 log 1 "the compiler suggests it doesn't build code for the machine you specified" |
1245 exit 1 |
896 exit 1 |
1246 fi |
897 fi |
1247 elif [ -n "$4" ] |
898 elif [ -n "$4" ]; then |
1248 then |
|
1249 # Check for manual compiler |
899 # Check for manual compiler |
1250 machine=`$4 $9 2>/dev/null` |
900 machine=`$4 $9 2>/dev/null` |
1251 ret=$? |
901 ret=$? |
1252 eval "$2=$4" |
902 eval "$2=$4" |
1253 |
903 |
1254 log 2 "executing $4 $9" |
904 log 2 "executing $4 $9" |
1255 log 2 " returned $machine" |
905 log 2 " returned $machine" |
1256 log 2 " exit code $ret" |
906 log 2 " exit code $ret" |
1257 |
907 |
1258 if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ] |
908 if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then |
1259 then |
|
1260 log 1 "checking $1... $4 not found" |
909 log 1 "checking $1... $4 not found" |
1261 log 1 "the selected binary doesn't seem to be a $6 binary" |
910 log 1 "the selected binary doesn't seem to be a $6 binary" |
1262 exit 1 |
911 exit 1 |
1263 fi |
912 fi |
1264 else |
913 else |
1265 # Nothing given, autodetect |
914 # Nothing given, autodetect |
1266 |
915 |
1267 if [ -n "$5" ] |
916 if [ -n "$5" ]; then |
1268 then |
|
1269 machine=`$5 $9 2>/dev/null` |
917 machine=`$5 $9 2>/dev/null` |
1270 ret=$? |
918 ret=$? |
1271 eval "$2=$5" |
919 eval "$2=$5" |
1272 |
920 |
1273 log 2 "executing $5 $9" |
921 log 2 "executing $5 $9" |
1274 log 2 " returned $machine" |
922 log 2 " returned $machine" |
1275 log 2 " exit code $ret" |
923 log 2 " exit code $ret" |
1276 |
924 |
1277 # The user defined a GCC that doesn't reply to $9.. abort |
925 # The user defined a GCC that doesn't reply to $9.. abort |
1278 if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ] |
926 if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then |
1279 then |
|
1280 log 1 "checking $1... $5 unusable" |
927 log 1 "checking $1... $5 unusable" |
1281 log 1 "the CC environment variable is set, but it doesn't seem to be a $6 binary" |
928 log 1 "the CC environment variable is set, but it doesn't seem to be a $6 binary" |
1282 log 1 "please redefine the CC/CXX environment to a $6 binary" |
929 log 1 "please redefine the CC/CXX environment to a $6 binary" |
1283 exit 1 |
930 exit 1 |
1284 fi |
931 fi |
1621 log 1 "checking COCOA... found" |
1237 log 1 "checking COCOA... found" |
1622 } |
1238 } |
1623 |
1239 |
1624 detect_zlib() { |
1240 detect_zlib() { |
1625 # 0 means no, 1 is auto-detect, 2 is force |
1241 # 0 means no, 1 is auto-detect, 2 is force |
1626 if [ "$with_zlib" = "0" ] |
1242 if [ "$with_zlib" = "0" ]; then |
1627 then |
|
1628 log 1 "checking zlib... disabled" |
1243 log 1 "checking zlib... disabled" |
1629 |
1244 |
1630 zlib="" |
1245 zlib="" |
1631 return 0 |
1246 return 0 |
1632 fi |
1247 fi |
1633 |
1248 |
1634 log 2 "detecting zlib" |
1249 log 2 "detecting zlib" |
1635 |
1250 |
1636 if [ "$with_zlib" = "1" ] || [ "$with_zlib" = "" ] || [ "$with_zlib" = "2" ] |
1251 if [ "$with_zlib" = "1" ] || [ "$with_zlib" = "" ] || [ "$with_zlib" = "2" ]; then |
1637 then |
|
1638 zlib=`ls -1 /usr/include/*.h 2>/dev/null | grep "\/zlib.h$"` |
1252 zlib=`ls -1 /usr/include/*.h 2>/dev/null | grep "\/zlib.h$"` |
1639 if [ -z "$zlib" ] |
1253 if [ -z "$zlib" ]; then |
1640 then |
|
1641 log 2 " trying /usr/include/zlib.h... no" |
1254 log 2 " trying /usr/include/zlib.h... no" |
1642 zlib=`ls -1 /usr/local/include/*.h 2>/dev/null | grep "\/zlib.h$"` |
1255 zlib=`ls -1 /usr/local/include/*.h 2>/dev/null | grep "\/zlib.h$"` |
1643 fi |
1256 fi |
1644 if [ -z "$zlib" ] |
1257 if [ -z "$zlib" ]; then |
1645 then |
|
1646 log 2 " trying /usr/local/include/zlib.h... no" |
1258 log 2 " trying /usr/local/include/zlib.h... no" |
1647 fi |
1259 fi |
1648 |
1260 |
1649 if [ -n "$zlib" ] && [ "$enable_static" != "0" ] && [ "$os" != "OSX" ] |
1261 if [ -n "$zlib" ] && [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then |
1650 then |
|
1651 log 2 " trying $zlib... found" |
1262 log 2 " trying $zlib... found" |
1652 # Now find the static lib, if needed |
1263 # Now find the static lib, if needed |
1653 zlib=`ls /lib/*.a 2>/dev/null | grep "\/libz.a$"` |
1264 zlib=`ls /lib/*.a 2>/dev/null | grep "\/libz.a$"` |
1654 if [ -z "$zlib" ] |
1265 if [ -z "$zlib" ]; then |
1655 then |
|
1656 log 2 " trying /lib/libz.a... no" |
1266 log 2 " trying /lib/libz.a... no" |
1657 zlib=`ls /usr/lib/*.a 2>/dev/null | grep "\/libz.a$"` |
1267 zlib=`ls /usr/lib/*.a 2>/dev/null | grep "\/libz.a$"` |
1658 fi |
1268 fi |
1659 if [ -z "$zlib" ] |
1269 if [ -z "$zlib" ]; then |
1660 then |
|
1661 log 2 " trying /usr/lib/libz.a... no" |
1270 log 2 " trying /usr/lib/libz.a... no" |
1662 zlib=`ls /usr/local/lib/*.a 2>/dev/null | grep "\/libz.a$"` |
1271 zlib=`ls /usr/local/lib/*.a 2>/dev/null | grep "\/libz.a$"` |
1663 fi |
1272 fi |
1664 if [ -z "$zlib" ] |
1273 if [ -z "$zlib" ]; then |
1665 then |
|
1666 log 2 " trying /usr/local/lib/libz.a... no" |
1274 log 2 " trying /usr/local/lib/libz.a... no" |
1667 log 1 "configure: error: zlib couldn't be found" |
1275 log 1 "configure: error: zlib couldn't be found" |
1668 log 1 "configure: error: you requested a static link, but I can't find zlib.a" |
1276 log 1 "configure: error: you requested a static link, but I can't find zlib.a" |
1669 |
1277 |
1670 exit 1 |
1278 exit 1 |
1671 fi |
1279 fi |
1672 fi |
1280 fi |
1673 else |
1281 else |
1674 # Make sure it exists |
1282 # Make sure it exists |
1675 zlib=`ls $with_zlib 2>/dev/null` |
1283 if [ -f "$with_zlib" ]; then |
1676 fi |
1284 zlib=`ls $with_zlib 2>/dev/null` |
1677 |
1285 else |
1678 if [ -z "$zlib" ] |
1286 zlib=`ls $with_zlib/libz.a 2>/dev/null` |
1679 then |
1287 fi |
|
1288 fi |
|
1289 |
|
1290 if [ -z "$zlib" ]; then |
1680 log 1 "checking zlib... not found" |
1291 log 1 "checking zlib... not found" |
1681 if [ "$with_zlib" = "2" ] |
1292 if [ "$with_zlib" = "2" ]; then |
1682 then |
|
1683 log 1 "configure: error: zlib couldn't be found" |
1293 log 1 "configure: error: zlib couldn't be found" |
1684 |
1294 |
1685 exit 1 |
1295 exit 1 |
1686 elif [ "$with_zlib" != "1" ] |
1296 elif [ "$with_zlib" != "1" ]; then |
1687 then |
|
1688 log 1 "configure: error: zlib couldn't be found" |
1297 log 1 "configure: error: zlib couldn't be found" |
1689 log 1 "configure: error: you supplied '$with_zlib', but it seems invalid" |
1298 log 1 "configure: error: you supplied '$with_zlib', but it seems invalid" |
1690 |
1299 |
1691 exit 1 |
1300 exit 1 |
1692 fi |
1301 fi |