configure added again
[supertux.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-gprof          enable GNU profiling support"
16 ac_help="$ac_help
17   --enable-debug          enable debugging mode"
18 ac_help="$ac_help
19   --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)"
20 ac_help="$ac_help
21   --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)"
22 ac_help="$ac_help
23   --disable-sdltest       Do not try to compile and run a test SDL program"
24
25 # Initialize some variables set by options.
26 # The variables have the same names as the options, with
27 # dashes changed to underlines.
28 build=NONE
29 cache_file=./config.cache
30 exec_prefix=NONE
31 host=NONE
32 no_create=
33 nonopt=NONE
34 no_recursion=
35 prefix=NONE
36 program_prefix=NONE
37 program_suffix=NONE
38 program_transform_name=s,x,x,
39 silent=
40 site=
41 srcdir=
42 target=NONE
43 verbose=
44 x_includes=NONE
45 x_libraries=NONE
46 bindir='${exec_prefix}/bin'
47 sbindir='${exec_prefix}/sbin'
48 libexecdir='${exec_prefix}/libexec'
49 datadir='${prefix}/share'
50 sysconfdir='${prefix}/etc'
51 sharedstatedir='${prefix}/com'
52 localstatedir='${prefix}/var'
53 libdir='${exec_prefix}/lib'
54 includedir='${prefix}/include'
55 oldincludedir='/usr/include'
56 infodir='${prefix}/info'
57 mandir='${prefix}/man'
58
59 # Initialize some other variables.
60 subdirs=
61 MFLAGS= MAKEFLAGS=
62 SHELL=${CONFIG_SHELL-/bin/sh}
63 # Maximum number of lines to put in a shell here document.
64 ac_max_here_lines=12
65
66 ac_prev=
67 for ac_option
68 do
69
70   # If the previous option needs an argument, assign it.
71   if test -n "$ac_prev"; then
72     eval "$ac_prev=\$ac_option"
73     ac_prev=
74     continue
75   fi
76
77   case "$ac_option" in
78   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
79   *) ac_optarg= ;;
80   esac
81
82   # Accept the important Cygnus configure options, so we can diagnose typos.
83
84   case "$ac_option" in
85
86   -bindir | --bindir | --bindi | --bind | --bin | --bi)
87     ac_prev=bindir ;;
88   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
89     bindir="$ac_optarg" ;;
90
91   -build | --build | --buil | --bui | --bu)
92     ac_prev=build ;;
93   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94     build="$ac_optarg" ;;
95
96   -cache-file | --cache-file | --cache-fil | --cache-fi \
97   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
98     ac_prev=cache_file ;;
99   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
100   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
101     cache_file="$ac_optarg" ;;
102
103   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
104     ac_prev=datadir ;;
105   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
106   | --da=*)
107     datadir="$ac_optarg" ;;
108
109   -disable-* | --disable-*)
110     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
111     # Reject names that are not valid shell variable names.
112     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
113       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114     fi
115     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116     eval "enable_${ac_feature}=no" ;;
117
118   -enable-* | --enable-*)
119     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
120     # Reject names that are not valid shell variable names.
121     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
122       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123     fi
124     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125     case "$ac_option" in
126       *=*) ;;
127       *) ac_optarg=yes ;;
128     esac
129     eval "enable_${ac_feature}='$ac_optarg'" ;;
130
131   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
132   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
133   | --exec | --exe | --ex)
134     ac_prev=exec_prefix ;;
135   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
136   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
137   | --exec=* | --exe=* | --ex=*)
138     exec_prefix="$ac_optarg" ;;
139
140   -gas | --gas | --ga | --g)
141     # Obsolete; use --with-gas.
142     with_gas=yes ;;
143
144   -help | --help | --hel | --he)
145     # Omit some internal or obsolete options to make the list less imposing.
146     # This message is too long to be a string in the A/UX 3.1 sh.
147     cat << EOF
148 Usage: configure [options] [host]
149 Options: [defaults in brackets after descriptions]
150 Configuration:
151   --cache-file=FILE       cache test results in FILE
152   --help                  print this message
153   --no-create             do not create output files
154   --quiet, --silent       do not print \`checking...' messages
155   --version               print the version of autoconf that created configure
156 Directory and file names:
157   --prefix=PREFIX         install architecture-independent files in PREFIX
158                           [$ac_default_prefix]
159   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
160                           [same as prefix]
161   --bindir=DIR            user executables in DIR [EPREFIX/bin]
162   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
163   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
164   --datadir=DIR           read-only architecture-independent data in DIR
165                           [PREFIX/share]
166   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
167   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
168                           [PREFIX/com]
169   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
170   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
171   --includedir=DIR        C header files in DIR [PREFIX/include]
172   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
173   --infodir=DIR           info documentation in DIR [PREFIX/info]
174   --mandir=DIR            man documentation in DIR [PREFIX/man]
175   --srcdir=DIR            find the sources in DIR [configure dir or ..]
176   --program-prefix=PREFIX prepend PREFIX to installed program names
177   --program-suffix=SUFFIX append SUFFIX to installed program names
178   --program-transform-name=PROGRAM
179                           run sed PROGRAM on installed program names
180 EOF
181     cat << EOF
182 Host type:
183   --build=BUILD           configure for building on BUILD [BUILD=HOST]
184   --host=HOST             configure for HOST [guessed]
185   --target=TARGET         configure for TARGET [TARGET=HOST]
186 Features and packages:
187   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
188   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
189   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
190   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
191   --x-includes=DIR        X include files are in DIR
192   --x-libraries=DIR       X library files are in DIR
193 EOF
194     if test -n "$ac_help"; then
195       echo "--enable and --with options recognized:$ac_help"
196     fi
197     exit 0 ;;
198
199   -host | --host | --hos | --ho)
200     ac_prev=host ;;
201   -host=* | --host=* | --hos=* | --ho=*)
202     host="$ac_optarg" ;;
203
204   -includedir | --includedir | --includedi | --included | --include \
205   | --includ | --inclu | --incl | --inc)
206     ac_prev=includedir ;;
207   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208   | --includ=* | --inclu=* | --incl=* | --inc=*)
209     includedir="$ac_optarg" ;;
210
211   -infodir | --infodir | --infodi | --infod | --info | --inf)
212     ac_prev=infodir ;;
213   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214     infodir="$ac_optarg" ;;
215
216   -libdir | --libdir | --libdi | --libd)
217     ac_prev=libdir ;;
218   -libdir=* | --libdir=* | --libdi=* | --libd=*)
219     libdir="$ac_optarg" ;;
220
221   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222   | --libexe | --libex | --libe)
223     ac_prev=libexecdir ;;
224   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225   | --libexe=* | --libex=* | --libe=*)
226     libexecdir="$ac_optarg" ;;
227
228   -localstatedir | --localstatedir | --localstatedi | --localstated \
229   | --localstate | --localstat | --localsta | --localst \
230   | --locals | --local | --loca | --loc | --lo)
231     ac_prev=localstatedir ;;
232   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235     localstatedir="$ac_optarg" ;;
236
237   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
238     ac_prev=mandir ;;
239   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240     mandir="$ac_optarg" ;;
241
242   -nfp | --nfp | --nf)
243     # Obsolete; use --without-fp.
244     with_fp=no ;;
245
246   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
247   | --no-cr | --no-c)
248     no_create=yes ;;
249
250   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252     no_recursion=yes ;;
253
254   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256   | --oldin | --oldi | --old | --ol | --o)
257     ac_prev=oldincludedir ;;
258   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261     oldincludedir="$ac_optarg" ;;
262
263   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
264     ac_prev=prefix ;;
265   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266     prefix="$ac_optarg" ;;
267
268   -program-prefix | --program-prefix | --program-prefi | --program-pref \
269   | --program-pre | --program-pr | --program-p)
270     ac_prev=program_prefix ;;
271   -program-prefix=* | --program-prefix=* | --program-prefi=* \
272   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273     program_prefix="$ac_optarg" ;;
274
275   -program-suffix | --program-suffix | --program-suffi | --program-suff \
276   | --program-suf | --program-su | --program-s)
277     ac_prev=program_suffix ;;
278   -program-suffix=* | --program-suffix=* | --program-suffi=* \
279   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280     program_suffix="$ac_optarg" ;;
281
282   -program-transform-name | --program-transform-name \
283   | --program-transform-nam | --program-transform-na \
284   | --program-transform-n | --program-transform- \
285   | --program-transform | --program-transfor \
286   | --program-transfo | --program-transf \
287   | --program-trans | --program-tran \
288   | --progr-tra | --program-tr | --program-t)
289     ac_prev=program_transform_name ;;
290   -program-transform-name=* | --program-transform-name=* \
291   | --program-transform-nam=* | --program-transform-na=* \
292   | --program-transform-n=* | --program-transform-=* \
293   | --program-transform=* | --program-transfor=* \
294   | --program-transfo=* | --program-transf=* \
295   | --program-trans=* | --program-tran=* \
296   | --progr-tra=* | --program-tr=* | --program-t=*)
297     program_transform_name="$ac_optarg" ;;
298
299   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300   | -silent | --silent | --silen | --sile | --sil)
301     silent=yes ;;
302
303   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
304     ac_prev=sbindir ;;
305   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
306   | --sbi=* | --sb=*)
307     sbindir="$ac_optarg" ;;
308
309   -sharedstatedir | --sharedstatedir | --sharedstatedi \
310   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311   | --sharedst | --shareds | --shared | --share | --shar \
312   | --sha | --sh)
313     ac_prev=sharedstatedir ;;
314   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
317   | --sha=* | --sh=*)
318     sharedstatedir="$ac_optarg" ;;
319
320   -site | --site | --sit)
321     ac_prev=site ;;
322   -site=* | --site=* | --sit=*)
323     site="$ac_optarg" ;;
324
325   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
326     ac_prev=srcdir ;;
327   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328     srcdir="$ac_optarg" ;;
329
330   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331   | --syscon | --sysco | --sysc | --sys | --sy)
332     ac_prev=sysconfdir ;;
333   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335     sysconfdir="$ac_optarg" ;;
336
337   -target | --target | --targe | --targ | --tar | --ta | --t)
338     ac_prev=target ;;
339   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340     target="$ac_optarg" ;;
341
342   -v | -verbose | --verbose | --verbos | --verbo | --verb)
343     verbose=yes ;;
344
345   -version | --version | --versio | --versi | --vers)
346     echo "configure generated by autoconf version 2.13"
347     exit 0 ;;
348
349   -with-* | --with-*)
350     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351     # Reject names that are not valid shell variable names.
352     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
354     fi
355     ac_package=`echo $ac_package| sed 's/-/_/g'`
356     case "$ac_option" in
357       *=*) ;;
358       *) ac_optarg=yes ;;
359     esac
360     eval "with_${ac_package}='$ac_optarg'" ;;
361
362   -without-* | --without-*)
363     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364     # Reject names that are not valid shell variable names.
365     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
367     fi
368     ac_package=`echo $ac_package| sed 's/-/_/g'`
369     eval "with_${ac_package}=no" ;;
370
371   --x)
372     # Obsolete; use --with-x.
373     with_x=yes ;;
374
375   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376   | --x-incl | --x-inc | --x-in | --x-i)
377     ac_prev=x_includes ;;
378   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380     x_includes="$ac_optarg" ;;
381
382   -x-libraries | --x-libraries | --x-librarie | --x-librari \
383   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384     ac_prev=x_libraries ;;
385   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387     x_libraries="$ac_optarg" ;;
388
389   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
390     ;;
391
392   *)
393     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394       echo "configure: warning: $ac_option: invalid host type" 1>&2
395     fi
396     if test "x$nonopt" != xNONE; then
397       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
398     fi
399     nonopt="$ac_option"
400     ;;
401
402   esac
403 done
404
405 if test -n "$ac_prev"; then
406   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 fi
408
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
410
411 # File descriptor usage:
412 # 0 standard input
413 # 1 file creation
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
420   exec 6>/dev/null
421 else
422   exec 6>&1
423 fi
424 exec 5>./config.log
425
426 echo "\
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
429 " 1>&5
430
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
433 ac_configure_args=
434 for ac_arg
435 do
436   case "$ac_arg" in
437   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438   | --no-cr | --no-c) ;;
439   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
444   esac
445 done
446
447 # NLS nuisances.
448 # Only set these to C if already set.  These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
456
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 echo > confdefs.h
461
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=src/supertux.c
465
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468   ac_srcdir_defaulted=yes
469   # Try the directory containing this script, then its parent.
470   ac_prog=$0
471   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473   srcdir=$ac_confdir
474   if test ! -r $srcdir/$ac_unique_file; then
475     srcdir=..
476   fi
477 else
478   ac_srcdir_defaulted=no
479 fi
480 if test ! -r $srcdir/$ac_unique_file; then
481   if test "$ac_srcdir_defaulted" = yes; then
482     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483   else
484     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485   fi
486 fi
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491   if test "x$prefix" != xNONE; then
492     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493   else
494     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495   fi
496 fi
497 for ac_site_file in $CONFIG_SITE; do
498   if test -r "$ac_site_file"; then
499     echo "loading site script $ac_site_file"
500     . "$ac_site_file"
501   fi
502 done
503
504 if test -r "$cache_file"; then
505   echo "loading cache $cache_file"
506   . $cache_file
507 else
508   echo "creating cache $cache_file"
509   > $cache_file
510 fi
511
512 ac_ext=c
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
518
519 ac_exeext=
520 ac_objext=o
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524     ac_n= ac_c='
525 ' ac_t='        '
526   else
527     ac_n=-n ac_c= ac_t=
528   fi
529 else
530   ac_n= ac_c='\c' ac_t=
531 fi
532
533
534
535 SDL_VERSION=1.2.5
536 ac_aux_dir=
537 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
538   if test -f $ac_dir/install-sh; then
539     ac_aux_dir=$ac_dir
540     ac_install_sh="$ac_aux_dir/install-sh -c"
541     break
542   elif test -f $ac_dir/install.sh; then
543     ac_aux_dir=$ac_dir
544     ac_install_sh="$ac_aux_dir/install.sh -c"
545     break
546   fi
547 done
548 if test -z "$ac_aux_dir"; then
549   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
550 fi
551 ac_config_guess=$ac_aux_dir/config.guess
552 ac_config_sub=$ac_aux_dir/config.sub
553 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
554
555 am__api_version="1.4"
556 # Find a good install program.  We prefer a C program (faster),
557 # so one script is as good as another.  But avoid the broken or
558 # incompatible versions:
559 # SysV /etc/install, /usr/sbin/install
560 # SunOS /usr/etc/install
561 # IRIX /sbin/install
562 # AIX /bin/install
563 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
564 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
565 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
566 # ./install, which can be erroneously created by make from ./install.sh.
567 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
568 echo "configure:569: checking for a BSD compatible install" >&5
569 if test -z "$INSTALL"; then
570 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
571   echo $ac_n "(cached) $ac_c" 1>&6
572 else
573     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
574   for ac_dir in $PATH; do
575     # Account for people who put trailing slashes in PATH elements.
576     case "$ac_dir/" in
577     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
578     *)
579       # OSF1 and SCO ODT 3.0 have their own names for install.
580       # Don't use installbsd from OSF since it installs stuff as root
581       # by default.
582       for ac_prog in ginstall scoinst install; do
583         if test -f $ac_dir/$ac_prog; then
584           if test $ac_prog = install &&
585             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
586             # AIX install.  It has an incompatible calling convention.
587             :
588           else
589             ac_cv_path_install="$ac_dir/$ac_prog -c"
590             break 2
591           fi
592         fi
593       done
594       ;;
595     esac
596   done
597   IFS="$ac_save_IFS"
598
599 fi
600   if test "${ac_cv_path_install+set}" = set; then
601     INSTALL="$ac_cv_path_install"
602   else
603     # As a last resort, use the slow shell script.  We don't cache a
604     # path for INSTALL within a source directory, because that will
605     # break other packages using the cache if that directory is
606     # removed, or if the path is relative.
607     INSTALL="$ac_install_sh"
608   fi
609 fi
610 echo "$ac_t""$INSTALL" 1>&6
611
612 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
613 # It thinks the first close brace ends the variable substitution.
614 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
615
616 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
617
618 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
619
620 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
621 echo "configure:622: checking whether build environment is sane" >&5
622 # Just in case
623 sleep 1
624 echo timestamp > conftestfile
625 # Do `set' in a subshell so we don't clobber the current shell's
626 # arguments.  Must try -L first in case configure is actually a
627 # symlink; some systems play weird games with the mod time of symlinks
628 # (eg FreeBSD returns the mod time of the symlink's containing
629 # directory).
630 if (
631    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
632    if test "$*" = "X"; then
633       # -L didn't work.
634       set X `ls -t $srcdir/configure conftestfile`
635    fi
636    if test "$*" != "X $srcdir/configure conftestfile" \
637       && test "$*" != "X conftestfile $srcdir/configure"; then
638
639       # If neither matched, then we have a broken ls.  This can happen
640       # if, for instance, CONFIG_SHELL is bash and it inherits a
641       # broken ls alias from the environment.  This has actually
642       # happened.  Such a system could not be considered "sane".
643       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
644 alias in your environment" 1>&2; exit 1; }
645    fi
646
647    test "$2" = conftestfile
648    )
649 then
650    # Ok.
651    :
652 else
653    { echo "configure: error: newly created file is older than distributed files!
654 Check your system clock" 1>&2; exit 1; }
655 fi
656 rm -f conftest*
657 echo "$ac_t""yes" 1>&6
658 if test "$program_transform_name" = s,x,x,; then
659   program_transform_name=
660 else
661   # Double any \ or $.  echo might interpret backslashes.
662   cat <<\EOF_SED > conftestsed
663 s,\\,\\\\,g; s,\$,$$,g
664 EOF_SED
665   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
666   rm -f conftestsed
667 fi
668 test "$program_prefix" != NONE &&
669   program_transform_name="s,^,${program_prefix},; $program_transform_name"
670 # Use a double $ so make ignores it.
671 test "$program_suffix" != NONE &&
672   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
673
674 # sed with no file args requires a program.
675 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
676
677 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
678 echo "configure:679: checking whether ${MAKE-make} sets \${MAKE}" >&5
679 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
680 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
681   echo $ac_n "(cached) $ac_c" 1>&6
682 else
683   cat > conftestmake <<\EOF
684 all:
685         @echo 'ac_maketemp="${MAKE}"'
686 EOF
687 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
688 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
689 if test -n "$ac_maketemp"; then
690   eval ac_cv_prog_make_${ac_make}_set=yes
691 else
692   eval ac_cv_prog_make_${ac_make}_set=no
693 fi
694 rm -f conftestmake
695 fi
696 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
697   echo "$ac_t""yes" 1>&6
698   SET_MAKE=
699 else
700   echo "$ac_t""no" 1>&6
701   SET_MAKE="MAKE=${MAKE-make}"
702 fi
703
704
705 PACKAGE=SuperTux
706
707 VERSION="0.0.6 cvs"
708
709 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
710   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
711 fi
712 cat >> confdefs.h <<EOF
713 #define PACKAGE "$PACKAGE"
714 EOF
715
716 cat >> confdefs.h <<EOF
717 #define VERSION "$VERSION"
718 EOF
719
720
721
722 missing_dir=`cd $ac_aux_dir && pwd`
723 echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
724 echo "configure:725: checking for working aclocal-${am__api_version}" >&5
725 # Run test in a subshell; some versions of sh will print an error if
726 # an executable is not found, even if stderr is redirected.
727 # Redirect stdin to placate older versions of autoconf.  Sigh.
728 if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
729    ACLOCAL=aclocal-${am__api_version}
730    echo "$ac_t""found" 1>&6
731 else
732    ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
733    echo "$ac_t""missing" 1>&6
734 fi
735
736 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
737 echo "configure:738: checking for working autoconf" >&5
738 # Run test in a subshell; some versions of sh will print an error if
739 # an executable is not found, even if stderr is redirected.
740 # Redirect stdin to placate older versions of autoconf.  Sigh.
741 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
742    AUTOCONF=autoconf
743    echo "$ac_t""found" 1>&6
744 else
745    AUTOCONF="$missing_dir/missing autoconf"
746    echo "$ac_t""missing" 1>&6
747 fi
748
749 echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
750 echo "configure:751: checking for working automake-${am__api_version}" >&5
751 # Run test in a subshell; some versions of sh will print an error if
752 # an executable is not found, even if stderr is redirected.
753 # Redirect stdin to placate older versions of autoconf.  Sigh.
754 if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
755    AUTOMAKE=automake-${am__api_version}
756    echo "$ac_t""found" 1>&6
757 else
758    AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
759    echo "$ac_t""missing" 1>&6
760 fi
761
762 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
763 echo "configure:764: checking for working autoheader" >&5
764 # Run test in a subshell; some versions of sh will print an error if
765 # an executable is not found, even if stderr is redirected.
766 # Redirect stdin to placate older versions of autoconf.  Sigh.
767 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
768    AUTOHEADER=autoheader
769    echo "$ac_t""found" 1>&6
770 else
771    AUTOHEADER="$missing_dir/missing autoheader"
772    echo "$ac_t""missing" 1>&6
773 fi
774
775 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
776 echo "configure:777: checking for working makeinfo" >&5
777 # Run test in a subshell; some versions of sh will print an error if
778 # an executable is not found, even if stderr is redirected.
779 # Redirect stdin to placate older versions of autoconf.  Sigh.
780 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
781    MAKEINFO=makeinfo
782    echo "$ac_t""found" 1>&6
783 else
784    MAKEINFO="$missing_dir/missing makeinfo"
785    echo "$ac_t""missing" 1>&6
786 fi
787
788
789
790 CC=gcc
791
792
793
794
795 # Check whether --enable-gprof or --disable-gprof was given.
796 if test "${enable_gprof+set}" = set; then
797   enableval="$enable_gprof"
798   :
799 fi
800
801 if test "x${enable_gprof}" = "xyes"; then
802         enable_gprof="-pg"
803 else
804         unset enable_gprof
805 fi
806
807 # Check whether --enable-debug or --disable-debug was given.
808 if test "${enable_debug+set}" = set; then
809   enableval="$enable_debug"
810   :
811 fi
812
813 if test "x${enable_debug}" = "xyes"; then
814         enable_debug="-DDEBUG"
815 else
816         unset enable_debug
817 fi
818
819 echo $ac_n "checking target system type""... $ac_c" 1>&6
820 echo "configure:821: checking target system type" >&5
821
822 target_alias=$target
823 case "$target_alias" in
824 NONE)
825   case $nonopt in
826   NONE) target_alias=$host_alias ;;
827   *) target_alias=$nonopt ;;
828   esac ;;
829 esac
830
831 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
832 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
833 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
834 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
835 echo "$ac_t""$target" 1>&6
836
837 # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
838 if test "${with_sdl_prefix+set}" = set; then
839   withval="$with_sdl_prefix"
840   sdl_prefix="$withval"
841 else
842   sdl_prefix=""
843 fi
844
845 # Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given.
846 if test "${with_sdl_exec_prefix+set}" = set; then
847   withval="$with_sdl_exec_prefix"
848   sdl_exec_prefix="$withval"
849 else
850   sdl_exec_prefix=""
851 fi
852
853 # Check whether --enable-sdltest or --disable-sdltest was given.
854 if test "${enable_sdltest+set}" = set; then
855   enableval="$enable_sdltest"
856   :
857 else
858   enable_sdltest=yes
859 fi
860
861
862   if test x$sdl_exec_prefix != x ; then
863      sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
864      if test x${SDL_CONFIG+set} != xset ; then
865         SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
866      fi
867   fi
868   if test x$sdl_prefix != x ; then
869      sdl_args="$sdl_args --prefix=$sdl_prefix"
870      if test x${SDL_CONFIG+set} != xset ; then
871         SDL_CONFIG=$sdl_prefix/bin/sdl-config
872      fi
873   fi
874
875   
876   PATH="$prefix/bin:$prefix/usr/bin:$PATH"
877   # Extract the first word of "sdl-config", so it can be a program name with args.
878 set dummy sdl-config; ac_word=$2
879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
880 echo "configure:881: checking for $ac_word" >&5
881 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
882   echo $ac_n "(cached) $ac_c" 1>&6
883 else
884   case "$SDL_CONFIG" in
885   /*)
886   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
887   ;;
888   ?:/*)                  
889   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
890   ;;
891   *)
892   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
893   ac_dummy="$PATH"
894   for ac_dir in $ac_dummy; do 
895     test -z "$ac_dir" && ac_dir=.
896     if test -f $ac_dir/$ac_word; then
897       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
898       break
899     fi
900   done
901   IFS="$ac_save_ifs"
902   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
903   ;;
904 esac
905 fi
906 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
907 if test -n "$SDL_CONFIG"; then
908   echo "$ac_t""$SDL_CONFIG" 1>&6
909 else
910   echo "$ac_t""no" 1>&6
911 fi
912
913   min_sdl_version=$SDL_VERSION
914   echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6
915 echo "configure:916: checking for SDL - version >= $min_sdl_version" >&5
916   no_sdl=""
917   if test "$SDL_CONFIG" = "no" ; then
918     no_sdl=yes
919   else
920     SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
921     SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
922
923     sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
924            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
925     sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
926            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
927     sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
928            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
929     if test "x$enable_sdltest" = "xyes" ; then
930       ac_save_CFLAGS="$CFLAGS"
931       ac_save_LIBS="$LIBS"
932       CFLAGS="$CFLAGS $SDL_CFLAGS"
933       LIBS="$LIBS $SDL_LIBS"
934       rm -f conf.sdltest
935       if test "$cross_compiling" = yes; then
936   echo $ac_n "cross compiling; assumed OK... $ac_c"
937 else
938   cat > conftest.$ac_ext <<EOF
939 #line 940 "configure"
940 #include "confdefs.h"
941
942 #include <stdio.h>
943 #include <stdlib.h>
944 #include <string.h>
945 #include "SDL.h"
946
947 char*
948 my_strdup (char *str)
949 {
950   char *new_str;
951   
952   if (str)
953     {
954       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
955       strcpy (new_str, str);
956     }
957   else
958     new_str = NULL;
959   
960   return new_str;
961 }
962
963 int main (int argc, char *argv[])
964 {
965   int major, minor, micro;
966   char *tmp_version;
967
968   /* This hangs on some systems (?)
969   system ("touch conf.sdltest");
970   */
971   { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
972
973   /* HP/UX 9 (%@#!) writes to sscanf strings */
974   tmp_version = my_strdup("$min_sdl_version");
975   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
976      printf("%s, bad version string\n", "$min_sdl_version");
977      exit(1);
978    }
979
980    if (($sdl_major_version > major) ||
981       (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
982       (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
983     {
984       return 0;
985     }
986   else
987     {
988       printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
989       printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
990       printf("*** best to upgrade to the required version.\n");
991       printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
992       printf("*** to point to the correct copy of sdl-config, and remove the file\n");
993       printf("*** config.cache before re-running configure\n");
994       return 1;
995     }
996 }
997
998
999 EOF
1000 if { (eval echo configure:1001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1001 then
1002   :
1003 else
1004   echo "configure: failed program was:" >&5
1005   cat conftest.$ac_ext >&5
1006   rm -fr conftest*
1007   no_sdl=yes
1008 fi
1009 rm -fr conftest*
1010 fi
1011
1012        CFLAGS="$ac_save_CFLAGS"
1013        LIBS="$ac_save_LIBS"
1014      fi
1015   fi
1016   if test "x$no_sdl" = x ; then
1017      echo "$ac_t""yes" 1>&6
1018      :     
1019   else
1020      echo "$ac_t""no" 1>&6
1021      if test "$SDL_CONFIG" = "no" ; then
1022        echo "*** The sdl-config script installed by SDL could not be found"
1023        echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
1024        echo "*** your path, or set the SDL_CONFIG environment variable to the"
1025        echo "*** full path to sdl-config."
1026      else
1027        if test -f conf.sdltest ; then
1028         :
1029        else
1030           echo "*** Could not run SDL test program, checking why..."
1031           CFLAGS="$CFLAGS $SDL_CFLAGS"
1032           LIBS="$LIBS $SDL_LIBS"
1033           cat > conftest.$ac_ext <<EOF
1034 #line 1035 "configure"
1035 #include "confdefs.h"
1036
1037 #include <stdio.h>
1038 #include "SDL.h"
1039
1040 int main(int argc, char *argv[])
1041 { return 0; }
1042 #undef  main
1043 #define main K_and_R_C_main
1044
1045 int main() {
1046  return 0; 
1047 ; return 0; }
1048 EOF
1049 if { (eval echo configure:1050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1050   rm -rf conftest*
1051    echo "*** The test program compiled, but did not run. This usually means"
1052           echo "*** that the run-time linker is not finding SDL or finding the wrong"
1053           echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
1054           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1055           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1056           echo "*** is required on your system"
1057           echo "***"
1058           echo "*** If you have an old version installed, it is best to remove it, although"
1059           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1060 else
1061   echo "configure: failed program was:" >&5
1062   cat conftest.$ac_ext >&5
1063   rm -rf conftest*
1064    echo "*** The test program failed to compile or link. See the file config.log for the"
1065           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
1066           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
1067           echo "*** may want to edit the sdl-config script: $SDL_CONFIG" 
1068 fi
1069 rm -f conftest*
1070           CFLAGS="$ac_save_CFLAGS"
1071           LIBS="$ac_save_LIBS"
1072        fi
1073      fi
1074      SDL_CFLAGS=""
1075      SDL_LIBS=""
1076      { echo "configure: error: *** SDL version $SDL_VERSION not found!" 1>&2; exit 1; }
1077
1078   fi
1079   
1080   
1081   rm -f conf.sdltest
1082
1083
1084 LDFLAGS="-L/usr/X11R6/lib"
1085
1086 echo $ac_n "checking for SDL_OpenAudio in -lSDL_mixer""... $ac_c" 1>&6
1087 echo "configure:1088: checking for SDL_OpenAudio in -lSDL_mixer" >&5
1088 ac_lib_var=`echo SDL_mixer'_'SDL_OpenAudio | sed 'y%./+-%__p_%'`
1089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1090   echo $ac_n "(cached) $ac_c" 1>&6
1091 else
1092   ac_save_LIBS="$LIBS"
1093 LIBS="-lSDL_mixer  $LIBS"
1094 cat > conftest.$ac_ext <<EOF
1095 #line 1096 "configure"
1096 #include "confdefs.h"
1097 /* Override any gcc2 internal prototype to avoid an error.  */
1098 /* We use char because int might match the return type of a gcc2
1099     builtin and then its argument prototype would still apply.  */
1100 char SDL_OpenAudio();
1101
1102 int main() {
1103 SDL_OpenAudio()
1104 ; return 0; }
1105 EOF
1106 if { (eval echo configure:1107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1107   rm -rf conftest*
1108   eval "ac_cv_lib_$ac_lib_var=yes"
1109 else
1110   echo "configure: failed program was:" >&5
1111   cat conftest.$ac_ext >&5
1112   rm -rf conftest*
1113   eval "ac_cv_lib_$ac_lib_var=no"
1114 fi
1115 rm -f conftest*
1116 LIBS="$ac_save_LIBS"
1117
1118 fi
1119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1120   echo "$ac_t""yes" 1>&6
1121     ac_tr_lib=HAVE_LIB`echo SDL_mixer | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1123   cat >> confdefs.h <<EOF
1124 #define $ac_tr_lib 1
1125 EOF
1126
1127   LIBS="-lSDL_mixer $LIBS"
1128
1129 else
1130   echo "$ac_t""no" 1>&6
1131 { echo "configure: error: SDL_mixer library required" 1>&2; exit 1; }
1132 fi
1133
1134 echo $ac_n "checking for IMG_Load in -lSDL_image""... $ac_c" 1>&6
1135 echo "configure:1136: checking for IMG_Load in -lSDL_image" >&5
1136 ac_lib_var=`echo SDL_image'_'IMG_Load | sed 'y%./+-%__p_%'`
1137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1138   echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140   ac_save_LIBS="$LIBS"
1141 LIBS="-lSDL_image  $LIBS"
1142 cat > conftest.$ac_ext <<EOF
1143 #line 1144 "configure"
1144 #include "confdefs.h"
1145 /* Override any gcc2 internal prototype to avoid an error.  */
1146 /* We use char because int might match the return type of a gcc2
1147     builtin and then its argument prototype would still apply.  */
1148 char IMG_Load();
1149
1150 int main() {
1151 IMG_Load()
1152 ; return 0; }
1153 EOF
1154 if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1155   rm -rf conftest*
1156   eval "ac_cv_lib_$ac_lib_var=yes"
1157 else
1158   echo "configure: failed program was:" >&5
1159   cat conftest.$ac_ext >&5
1160   rm -rf conftest*
1161   eval "ac_cv_lib_$ac_lib_var=no"
1162 fi
1163 rm -f conftest*
1164 LIBS="$ac_save_LIBS"
1165
1166 fi
1167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1168   echo "$ac_t""yes" 1>&6
1169     ac_tr_lib=HAVE_LIB`echo SDL_image | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1171   cat >> confdefs.h <<EOF
1172 #define $ac_tr_lib 1
1173 EOF
1174
1175   LIBS="-lSDL_image $LIBS"
1176
1177 else
1178   echo "$ac_t""no" 1>&6
1179 { echo "configure: error: SDL_image library required" 1>&2; exit 1; }
1180 fi
1181
1182 echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
1183 echo "configure:1184: checking for glBegin in -lGL" >&5
1184 ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
1185 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1186   echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188   ac_save_LIBS="$LIBS"
1189 LIBS="-lGL  $LIBS"
1190 cat > conftest.$ac_ext <<EOF
1191 #line 1192 "configure"
1192 #include "confdefs.h"
1193 /* Override any gcc2 internal prototype to avoid an error.  */
1194 /* We use char because int might match the return type of a gcc2
1195     builtin and then its argument prototype would still apply.  */
1196 char glBegin();
1197
1198 int main() {
1199 glBegin()
1200 ; return 0; }
1201 EOF
1202 if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1203   rm -rf conftest*
1204   eval "ac_cv_lib_$ac_lib_var=yes"
1205 else
1206   echo "configure: failed program was:" >&5
1207   cat conftest.$ac_ext >&5
1208   rm -rf conftest*
1209   eval "ac_cv_lib_$ac_lib_var=no"
1210 fi
1211 rm -f conftest*
1212 LIBS="$ac_save_LIBS"
1213
1214 fi
1215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1216   echo "$ac_t""yes" 1>&6
1217     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1219   cat >> confdefs.h <<EOF
1220 #define $ac_tr_lib 1
1221 EOF
1222
1223   LIBS="-lGL $LIBS"
1224
1225 else
1226   echo "$ac_t""no" 1>&6
1227 { echo "configure: error: GL library required" 1>&2; exit 1; }
1228 fi
1229
1230
1231 CFLAGS="-DDATA_PREFIX=\\\"$PWD/data\\\" -DLINUX ${enable_debug} ${enable_gprof}"
1232 CFLAGS="$CFLAGS $SDL_CFLAGS"
1233 LDFLAGS="$LDFLAGS $SDL_LIBS"
1234
1235 ac_header_dirent=no
1236 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1237 do
1238 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1239 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1240 echo "configure:1241: checking for $ac_hdr that defines DIR" >&5
1241 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1242   echo $ac_n "(cached) $ac_c" 1>&6
1243 else
1244   cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1247 #include <sys/types.h>
1248 #include <$ac_hdr>
1249 int main() {
1250 DIR *dirp = 0;
1251 ; return 0; }
1252 EOF
1253 if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1254   rm -rf conftest*
1255   eval "ac_cv_header_dirent_$ac_safe=yes"
1256 else
1257   echo "configure: failed program was:" >&5
1258   cat conftest.$ac_ext >&5
1259   rm -rf conftest*
1260   eval "ac_cv_header_dirent_$ac_safe=no"
1261 fi
1262 rm -f conftest*
1263 fi
1264 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1265   echo "$ac_t""yes" 1>&6
1266     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1267   cat >> confdefs.h <<EOF
1268 #define $ac_tr_hdr 1
1269 EOF
1270  ac_header_dirent=$ac_hdr; break
1271 else
1272   echo "$ac_t""no" 1>&6
1273 fi
1274 done
1275 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1276 if test $ac_header_dirent = dirent.h; then
1277 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1278 echo "configure:1279: checking for opendir in -ldir" >&5
1279 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1280 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1281   echo $ac_n "(cached) $ac_c" 1>&6
1282 else
1283   ac_save_LIBS="$LIBS"
1284 LIBS="-ldir  $LIBS"
1285 cat > conftest.$ac_ext <<EOF
1286 #line 1287 "configure"
1287 #include "confdefs.h"
1288 /* Override any gcc2 internal prototype to avoid an error.  */
1289 /* We use char because int might match the return type of a gcc2
1290     builtin and then its argument prototype would still apply.  */
1291 char opendir();
1292
1293 int main() {
1294 opendir()
1295 ; return 0; }
1296 EOF
1297 if { (eval echo configure:1298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1298   rm -rf conftest*
1299   eval "ac_cv_lib_$ac_lib_var=yes"
1300 else
1301   echo "configure: failed program was:" >&5
1302   cat conftest.$ac_ext >&5
1303   rm -rf conftest*
1304   eval "ac_cv_lib_$ac_lib_var=no"
1305 fi
1306 rm -f conftest*
1307 LIBS="$ac_save_LIBS"
1308
1309 fi
1310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1311   echo "$ac_t""yes" 1>&6
1312   LIBS="$LIBS -ldir"
1313 else
1314   echo "$ac_t""no" 1>&6
1315 fi
1316
1317 else
1318 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1319 echo "configure:1320: checking for opendir in -lx" >&5
1320 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1321 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1322   echo $ac_n "(cached) $ac_c" 1>&6
1323 else
1324   ac_save_LIBS="$LIBS"
1325 LIBS="-lx  $LIBS"
1326 cat > conftest.$ac_ext <<EOF
1327 #line 1328 "configure"
1328 #include "confdefs.h"
1329 /* Override any gcc2 internal prototype to avoid an error.  */
1330 /* We use char because int might match the return type of a gcc2
1331     builtin and then its argument prototype would still apply.  */
1332 char opendir();
1333
1334 int main() {
1335 opendir()
1336 ; return 0; }
1337 EOF
1338 if { (eval echo configure:1339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1339   rm -rf conftest*
1340   eval "ac_cv_lib_$ac_lib_var=yes"
1341 else
1342   echo "configure: failed program was:" >&5
1343   cat conftest.$ac_ext >&5
1344   rm -rf conftest*
1345   eval "ac_cv_lib_$ac_lib_var=no"
1346 fi
1347 rm -f conftest*
1348 LIBS="$ac_save_LIBS"
1349
1350 fi
1351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1352   echo "$ac_t""yes" 1>&6
1353   LIBS="$LIBS -lx"
1354 else
1355   echo "$ac_t""no" 1>&6
1356 fi
1357
1358 fi
1359
1360 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1361 echo "configure:1362: checking how to run the C preprocessor" >&5
1362 # On Suns, sometimes $CPP names a directory.
1363 if test -n "$CPP" && test -d "$CPP"; then
1364   CPP=
1365 fi
1366 if test -z "$CPP"; then
1367 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1368   echo $ac_n "(cached) $ac_c" 1>&6
1369 else
1370     # This must be in double quotes, not single quotes, because CPP may get
1371   # substituted into the Makefile and "${CC-cc}" will confuse make.
1372   CPP="${CC-cc} -E"
1373   # On the NeXT, cc -E runs the code through the compiler's parser,
1374   # not just through cpp.
1375   cat > conftest.$ac_ext <<EOF
1376 #line 1377 "configure"
1377 #include "confdefs.h"
1378 #include <assert.h>
1379 Syntax Error
1380 EOF
1381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1382 { (eval echo configure:1383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1384 if test -z "$ac_err"; then
1385   :
1386 else
1387   echo "$ac_err" >&5
1388   echo "configure: failed program was:" >&5
1389   cat conftest.$ac_ext >&5
1390   rm -rf conftest*
1391   CPP="${CC-cc} -E -traditional-cpp"
1392   cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395 #include <assert.h>
1396 Syntax Error
1397 EOF
1398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1399 { (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1401 if test -z "$ac_err"; then
1402   :
1403 else
1404   echo "$ac_err" >&5
1405   echo "configure: failed program was:" >&5
1406   cat conftest.$ac_ext >&5
1407   rm -rf conftest*
1408   CPP="${CC-cc} -nologo -E"
1409   cat > conftest.$ac_ext <<EOF
1410 #line 1411 "configure"
1411 #include "confdefs.h"
1412 #include <assert.h>
1413 Syntax Error
1414 EOF
1415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1416 { (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1418 if test -z "$ac_err"; then
1419   :
1420 else
1421   echo "$ac_err" >&5
1422   echo "configure: failed program was:" >&5
1423   cat conftest.$ac_ext >&5
1424   rm -rf conftest*
1425   CPP=/lib/cpp
1426 fi
1427 rm -f conftest*
1428 fi
1429 rm -f conftest*
1430 fi
1431 rm -f conftest*
1432   ac_cv_prog_CPP="$CPP"
1433 fi
1434   CPP="$ac_cv_prog_CPP"
1435 else
1436   ac_cv_prog_CPP="$CPP"
1437 fi
1438 echo "$ac_t""$CPP" 1>&6
1439
1440 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1441 echo "configure:1442: checking for ANSI C header files" >&5
1442 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1443   echo $ac_n "(cached) $ac_c" 1>&6
1444 else
1445   cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1448 #include <stdlib.h>
1449 #include <stdarg.h>
1450 #include <string.h>
1451 #include <float.h>
1452 EOF
1453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1454 { (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1456 if test -z "$ac_err"; then
1457   rm -rf conftest*
1458   ac_cv_header_stdc=yes
1459 else
1460   echo "$ac_err" >&5
1461   echo "configure: failed program was:" >&5
1462   cat conftest.$ac_ext >&5
1463   rm -rf conftest*
1464   ac_cv_header_stdc=no
1465 fi
1466 rm -f conftest*
1467
1468 if test $ac_cv_header_stdc = yes; then
1469   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1470 cat > conftest.$ac_ext <<EOF
1471 #line 1472 "configure"
1472 #include "confdefs.h"
1473 #include <string.h>
1474 EOF
1475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1476   egrep "memchr" >/dev/null 2>&1; then
1477   :
1478 else
1479   rm -rf conftest*
1480   ac_cv_header_stdc=no
1481 fi
1482 rm -f conftest*
1483
1484 fi
1485
1486 if test $ac_cv_header_stdc = yes; then
1487   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1488 cat > conftest.$ac_ext <<EOF
1489 #line 1490 "configure"
1490 #include "confdefs.h"
1491 #include <stdlib.h>
1492 EOF
1493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1494   egrep "free" >/dev/null 2>&1; then
1495   :
1496 else
1497   rm -rf conftest*
1498   ac_cv_header_stdc=no
1499 fi
1500 rm -f conftest*
1501
1502 fi
1503
1504 if test $ac_cv_header_stdc = yes; then
1505   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1506 if test "$cross_compiling" = yes; then
1507   :
1508 else
1509   cat > conftest.$ac_ext <<EOF
1510 #line 1511 "configure"
1511 #include "confdefs.h"
1512 #include <ctype.h>
1513 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1514 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1515 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1516 int main () { int i; for (i = 0; i < 256; i++)
1517 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1518 exit (0); }
1519
1520 EOF
1521 if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1522 then
1523   :
1524 else
1525   echo "configure: failed program was:" >&5
1526   cat conftest.$ac_ext >&5
1527   rm -fr conftest*
1528   ac_cv_header_stdc=no
1529 fi
1530 rm -fr conftest*
1531 fi
1532
1533 fi
1534 fi
1535
1536 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1537 if test $ac_cv_header_stdc = yes; then
1538   cat >> confdefs.h <<\EOF
1539 #define STDC_HEADERS 1
1540 EOF
1541
1542 fi
1543
1544 for ac_hdr in unistd.h
1545 do
1546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1548 echo "configure:1549: checking for $ac_hdr" >&5
1549 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1550   echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552   cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555 #include <$ac_hdr>
1556 EOF
1557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1558 { (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1560 if test -z "$ac_err"; then
1561   rm -rf conftest*
1562   eval "ac_cv_header_$ac_safe=yes"
1563 else
1564   echo "$ac_err" >&5
1565   echo "configure: failed program was:" >&5
1566   cat conftest.$ac_ext >&5
1567   rm -rf conftest*
1568   eval "ac_cv_header_$ac_safe=no"
1569 fi
1570 rm -f conftest*
1571 fi
1572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1573   echo "$ac_t""yes" 1>&6
1574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1575   cat >> confdefs.h <<EOF
1576 #define $ac_tr_hdr 1
1577 EOF
1578  
1579 else
1580   echo "$ac_t""no" 1>&6
1581 fi
1582 done
1583
1584
1585 echo $ac_n "checking for working const""... $ac_c" 1>&6
1586 echo "configure:1587: checking for working const" >&5
1587 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1588   echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590   cat > conftest.$ac_ext <<EOF
1591 #line 1592 "configure"
1592 #include "confdefs.h"
1593
1594 int main() {
1595
1596 /* Ultrix mips cc rejects this.  */
1597 typedef int charset[2]; const charset x;
1598 /* SunOS 4.1.1 cc rejects this.  */
1599 char const *const *ccp;
1600 char **p;
1601 /* NEC SVR4.0.2 mips cc rejects this.  */
1602 struct point {int x, y;};
1603 static struct point const zero = {0,0};
1604 /* AIX XL C 1.02.0.0 rejects this.
1605    It does not let you subtract one const X* pointer from another in an arm
1606    of an if-expression whose if-part is not a constant expression */
1607 const char *g = "string";
1608 ccp = &g + (g ? g-g : 0);
1609 /* HPUX 7.0 cc rejects these. */
1610 ++ccp;
1611 p = (char**) ccp;
1612 ccp = (char const *const *) p;
1613 { /* SCO 3.2v4 cc rejects this.  */
1614   char *t;
1615   char const *s = 0 ? (char *) 0 : (char const *) 0;
1616
1617   *t++ = 0;
1618 }
1619 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1620   int x[] = {25, 17};
1621   const int *foo = &x[0];
1622   ++foo;
1623 }
1624 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1625   typedef const int *iptr;
1626   iptr p = 0;
1627   ++p;
1628 }
1629 { /* AIX XL C 1.02.0.0 rejects this saying
1630      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1631   struct s { int j; const int *ap[3]; };
1632   struct s *b; b->j = 5;
1633 }
1634 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1635   const int foo = 10;
1636 }
1637
1638 ; return 0; }
1639 EOF
1640 if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1641   rm -rf conftest*
1642   ac_cv_c_const=yes
1643 else
1644   echo "configure: failed program was:" >&5
1645   cat conftest.$ac_ext >&5
1646   rm -rf conftest*
1647   ac_cv_c_const=no
1648 fi
1649 rm -f conftest*
1650 fi
1651
1652 echo "$ac_t""$ac_cv_c_const" 1>&6
1653 if test $ac_cv_c_const = no; then
1654   cat >> confdefs.h <<\EOF
1655 #define const 
1656 EOF
1657
1658 fi
1659
1660
1661 for ac_func in mkdir strdup strstr
1662 do
1663 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1664 echo "configure:1665: checking for $ac_func" >&5
1665 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1666   echo $ac_n "(cached) $ac_c" 1>&6
1667 else
1668   cat > conftest.$ac_ext <<EOF
1669 #line 1670 "configure"
1670 #include "confdefs.h"
1671 /* System header to define __stub macros and hopefully few prototypes,
1672     which can conflict with char $ac_func(); below.  */
1673 #include <assert.h>
1674 /* Override any gcc2 internal prototype to avoid an error.  */
1675 /* We use char because int might match the return type of a gcc2
1676     builtin and then its argument prototype would still apply.  */
1677 char $ac_func();
1678
1679 int main() {
1680
1681 /* The GNU C library defines this for functions which it implements
1682     to always fail with ENOSYS.  Some functions are actually named
1683     something starting with __ and the normal name is an alias.  */
1684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1685 choke me
1686 #else
1687 $ac_func();
1688 #endif
1689
1690 ; return 0; }
1691 EOF
1692 if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1693   rm -rf conftest*
1694   eval "ac_cv_func_$ac_func=yes"
1695 else
1696   echo "configure: failed program was:" >&5
1697   cat conftest.$ac_ext >&5
1698   rm -rf conftest*
1699   eval "ac_cv_func_$ac_func=no"
1700 fi
1701 rm -f conftest*
1702 fi
1703
1704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1705   echo "$ac_t""yes" 1>&6
1706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1707   cat >> confdefs.h <<EOF
1708 #define $ac_tr_func 1
1709 EOF
1710  
1711 else
1712   echo "$ac_t""no" 1>&6
1713 fi
1714 done
1715
1716
1717 trap '' 1 2 15
1718 cat > confcache <<\EOF
1719 # This file is a shell script that caches the results of configure
1720 # tests run on this system so they can be shared between configure
1721 # scripts and configure runs.  It is not useful on other systems.
1722 # If it contains results you don't want to keep, you may remove or edit it.
1723 #
1724 # By default, configure uses ./config.cache as the cache file,
1725 # creating it if it does not exist already.  You can give configure
1726 # the --cache-file=FILE option to use a different cache file; that is
1727 # what configure does when it calls configure scripts in
1728 # subdirectories, so they share the cache.
1729 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1730 # config.status only pays attention to the cache file if you give it the
1731 # --recheck option to rerun configure.
1732 #
1733 EOF
1734 # The following way of writing the cache mishandles newlines in values,
1735 # but we know of no workaround that is simple, portable, and efficient.
1736 # So, don't put newlines in cache variables' values.
1737 # Ultrix sh set writes to stderr and can't be redirected directly,
1738 # and sets the high bit in the cache file unless we assign to the vars.
1739 (set) 2>&1 |
1740   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1741   *ac_space=\ *)
1742     # `set' does not quote correctly, so add quotes (double-quote substitution
1743     # turns \\\\ into \\, and sed turns \\ into \).
1744     sed -n \
1745       -e "s/'/'\\\\''/g" \
1746       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1747     ;;
1748   *)
1749     # `set' quotes correctly as required by POSIX, so do not add quotes.
1750     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1751     ;;
1752   esac >> confcache
1753 if cmp -s $cache_file confcache; then
1754   :
1755 else
1756   if test -w $cache_file; then
1757     echo "updating cache $cache_file"
1758     cat confcache > $cache_file
1759   else
1760     echo "not updating unwritable cache $cache_file"
1761   fi
1762 fi
1763 rm -f confcache
1764
1765 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1766
1767 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1768 # Let make expand exec_prefix.
1769 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1770
1771 # Any assignment to VPATH causes Sun make to only execute
1772 # the first set of double-colon rules, so remove it if not needed.
1773 # If there is a colon in the path, we need to keep it.
1774 if test "x$srcdir" = x.; then
1775   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1776 fi
1777
1778 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1779
1780 # Transform confdefs.h into DEFS.
1781 # Protect against shell expansion while executing Makefile rules.
1782 # Protect against Makefile macro expansion.
1783 cat > conftest.defs <<\EOF
1784 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1785 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1786 s%\[%\\&%g
1787 s%\]%\\&%g
1788 s%\$%$$%g
1789 EOF
1790 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1791 rm -f conftest.defs
1792
1793
1794 # Without the "./", some shells look in PATH for config.status.
1795 : ${CONFIG_STATUS=./config.status}
1796
1797 echo creating $CONFIG_STATUS
1798 rm -f $CONFIG_STATUS
1799 cat > $CONFIG_STATUS <<EOF
1800 #! /bin/sh
1801 # Generated automatically by configure.
1802 # Run this file to recreate the current configuration.
1803 # This directory was configured as follows,
1804 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1805 #
1806 # $0 $ac_configure_args
1807 #
1808 # Compiler output produced by configure, useful for debugging
1809 # configure, is in ./config.log if it exists.
1810
1811 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1812 for ac_option
1813 do
1814   case "\$ac_option" in
1815   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1816     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1817     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1818   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1819     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1820     exit 0 ;;
1821   -help | --help | --hel | --he | --h)
1822     echo "\$ac_cs_usage"; exit 0 ;;
1823   *) echo "\$ac_cs_usage"; exit 1 ;;
1824   esac
1825 done
1826
1827 ac_given_srcdir=$srcdir
1828 ac_given_INSTALL="$INSTALL"
1829
1830 trap 'rm -fr `echo "src/Makefile Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1831 EOF
1832 cat >> $CONFIG_STATUS <<EOF
1833
1834 # Protect against being on the right side of a sed subst in config.status.
1835 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1836  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1837 $ac_vpsub
1838 $extrasub
1839 s%@SHELL@%$SHELL%g
1840 s%@CFLAGS@%$CFLAGS%g
1841 s%@CPPFLAGS@%$CPPFLAGS%g
1842 s%@CXXFLAGS@%$CXXFLAGS%g
1843 s%@FFLAGS@%$FFLAGS%g
1844 s%@DEFS@%$DEFS%g
1845 s%@LDFLAGS@%$LDFLAGS%g
1846 s%@LIBS@%$LIBS%g
1847 s%@exec_prefix@%$exec_prefix%g
1848 s%@prefix@%$prefix%g
1849 s%@program_transform_name@%$program_transform_name%g
1850 s%@bindir@%$bindir%g
1851 s%@sbindir@%$sbindir%g
1852 s%@libexecdir@%$libexecdir%g
1853 s%@datadir@%$datadir%g
1854 s%@sysconfdir@%$sysconfdir%g
1855 s%@sharedstatedir@%$sharedstatedir%g
1856 s%@localstatedir@%$localstatedir%g
1857 s%@libdir@%$libdir%g
1858 s%@includedir@%$includedir%g
1859 s%@oldincludedir@%$oldincludedir%g
1860 s%@infodir@%$infodir%g
1861 s%@mandir@%$mandir%g
1862 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1863 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1864 s%@INSTALL_DATA@%$INSTALL_DATA%g
1865 s%@PACKAGE@%$PACKAGE%g
1866 s%@VERSION@%$VERSION%g
1867 s%@ACLOCAL@%$ACLOCAL%g
1868 s%@AUTOCONF@%$AUTOCONF%g
1869 s%@AUTOMAKE@%$AUTOMAKE%g
1870 s%@AUTOHEADER@%$AUTOHEADER%g
1871 s%@MAKEINFO@%$MAKEINFO%g
1872 s%@SET_MAKE@%$SET_MAKE%g
1873 s%@CC@%$CC%g
1874 s%@target@%$target%g
1875 s%@target_alias@%$target_alias%g
1876 s%@target_cpu@%$target_cpu%g
1877 s%@target_vendor@%$target_vendor%g
1878 s%@target_os@%$target_os%g
1879 s%@SDL_CONFIG@%$SDL_CONFIG%g
1880 s%@SDL_CFLAGS@%$SDL_CFLAGS%g
1881 s%@SDL_LIBS@%$SDL_LIBS%g
1882 s%@CPP@%$CPP%g
1883
1884 CEOF
1885 EOF
1886
1887 cat >> $CONFIG_STATUS <<\EOF
1888
1889 # Split the substitutions into bite-sized pieces for seds with
1890 # small command number limits, like on Digital OSF/1 and HP-UX.
1891 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1892 ac_file=1 # Number of current file.
1893 ac_beg=1 # First line for current file.
1894 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1895 ac_more_lines=:
1896 ac_sed_cmds=""
1897 while $ac_more_lines; do
1898   if test $ac_beg -gt 1; then
1899     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1900   else
1901     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1902   fi
1903   if test ! -s conftest.s$ac_file; then
1904     ac_more_lines=false
1905     rm -f conftest.s$ac_file
1906   else
1907     if test -z "$ac_sed_cmds"; then
1908       ac_sed_cmds="sed -f conftest.s$ac_file"
1909     else
1910       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1911     fi
1912     ac_file=`expr $ac_file + 1`
1913     ac_beg=$ac_end
1914     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1915   fi
1916 done
1917 if test -z "$ac_sed_cmds"; then
1918   ac_sed_cmds=cat
1919 fi
1920 EOF
1921
1922 cat >> $CONFIG_STATUS <<EOF
1923
1924 CONFIG_FILES=\${CONFIG_FILES-"src/Makefile Makefile"}
1925 EOF
1926 cat >> $CONFIG_STATUS <<\EOF
1927 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1928   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1929   case "$ac_file" in
1930   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1931        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1932   *) ac_file_in="${ac_file}.in" ;;
1933   esac
1934
1935   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1936
1937   # Remove last slash and all that follows it.  Not all systems have dirname.
1938   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1939   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1940     # The file is in a subdirectory.
1941     test ! -d "$ac_dir" && mkdir "$ac_dir"
1942     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1943     # A "../" for each directory in $ac_dir_suffix.
1944     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1945   else
1946     ac_dir_suffix= ac_dots=
1947   fi
1948
1949   case "$ac_given_srcdir" in
1950   .)  srcdir=.
1951       if test -z "$ac_dots"; then top_srcdir=.
1952       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1953   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1954   *) # Relative path.
1955     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1956     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1957   esac
1958
1959   case "$ac_given_INSTALL" in
1960   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1961   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1962   esac
1963
1964   echo creating "$ac_file"
1965   rm -f "$ac_file"
1966   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1967   case "$ac_file" in
1968   *Makefile*) ac_comsub="1i\\
1969 # $configure_input" ;;
1970   *) ac_comsub= ;;
1971   esac
1972
1973   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1974   sed -e "$ac_comsub
1975 s%@configure_input@%$configure_input%g
1976 s%@srcdir@%$srcdir%g
1977 s%@top_srcdir@%$top_srcdir%g
1978 s%@INSTALL@%$INSTALL%g
1979 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1980 fi; done
1981 rm -f conftest.s*
1982
1983 EOF
1984 cat >> $CONFIG_STATUS <<EOF
1985
1986 EOF
1987 cat >> $CONFIG_STATUS <<\EOF
1988
1989 exit 0
1990 EOF
1991 chmod +x $CONFIG_STATUS
1992 rm -fr confdefs* $ac_clean_files
1993 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1994