]> icculus.org git repositories - btb/d2x.git/blob - configure
configuration fixes
[btb/d2x.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-maintainer-mode enable make rules and dependencies not useful
16                           (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18   --enable-werror              Count compiler warning as errors "
19 ac_help="$ac_help
20   --enable-ndebug              Build with NDEBUG defined "
21 ac_help="$ac_help
22   --with-opengl                Build OpenGL support "
23 ac_help="$ac_help
24   --with-ggi                   Build GGI suuport "
25 ac_help="$ac_help
26   --with-svga                  Build SVGALib support "
27 ac_help="$ac_help
28   --without-assembler          Do not use assembler optimization "
29 ac_help="$ac_help
30   --without-network            Do not build network/serial support "
31
32 # Initialize some variables set by options.
33 # The variables have the same names as the options, with
34 # dashes changed to underlines.
35 build=NONE
36 cache_file=./config.cache
37 exec_prefix=NONE
38 host=NONE
39 no_create=
40 nonopt=NONE
41 no_recursion=
42 prefix=NONE
43 program_prefix=NONE
44 program_suffix=NONE
45 program_transform_name=s,x,x,
46 silent=
47 site=
48 srcdir=
49 target=NONE
50 verbose=
51 x_includes=NONE
52 x_libraries=NONE
53 bindir='${exec_prefix}/bin'
54 sbindir='${exec_prefix}/sbin'
55 libexecdir='${exec_prefix}/libexec'
56 datadir='${prefix}/share'
57 sysconfdir='${prefix}/etc'
58 sharedstatedir='${prefix}/com'
59 localstatedir='${prefix}/var'
60 libdir='${exec_prefix}/lib'
61 includedir='${prefix}/include'
62 oldincludedir='/usr/include'
63 infodir='${prefix}/info'
64 mandir='${prefix}/man'
65
66 # Initialize some other variables.
67 subdirs=
68 MFLAGS= MAKEFLAGS=
69 SHELL=${CONFIG_SHELL-/bin/sh}
70 # Maximum number of lines to put in a shell here document.
71 ac_max_here_lines=12
72
73 ac_prev=
74 for ac_option
75 do
76
77   # If the previous option needs an argument, assign it.
78   if test -n "$ac_prev"; then
79     eval "$ac_prev=\$ac_option"
80     ac_prev=
81     continue
82   fi
83
84   case "$ac_option" in
85   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86   *) ac_optarg= ;;
87   esac
88
89   # Accept the important Cygnus configure options, so we can diagnose typos.
90
91   case "$ac_option" in
92
93   -bindir | --bindir | --bindi | --bind | --bin | --bi)
94     ac_prev=bindir ;;
95   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96     bindir="$ac_optarg" ;;
97
98   -build | --build | --buil | --bui | --bu)
99     ac_prev=build ;;
100   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
101     build="$ac_optarg" ;;
102
103   -cache-file | --cache-file | --cache-fil | --cache-fi \
104   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105     ac_prev=cache_file ;;
106   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108     cache_file="$ac_optarg" ;;
109
110   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111     ac_prev=datadir ;;
112   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113   | --da=*)
114     datadir="$ac_optarg" ;;
115
116   -disable-* | --disable-*)
117     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
118     # Reject names that are not valid shell variable names.
119     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
120       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121     fi
122     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123     eval "enable_${ac_feature}=no" ;;
124
125   -enable-* | --enable-*)
126     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
127     # Reject names that are not valid shell variable names.
128     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
129       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130     fi
131     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132     case "$ac_option" in
133       *=*) ;;
134       *) ac_optarg=yes ;;
135     esac
136     eval "enable_${ac_feature}='$ac_optarg'" ;;
137
138   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140   | --exec | --exe | --ex)
141     ac_prev=exec_prefix ;;
142   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144   | --exec=* | --exe=* | --ex=*)
145     exec_prefix="$ac_optarg" ;;
146
147   -gas | --gas | --ga | --g)
148     # Obsolete; use --with-gas.
149     with_gas=yes ;;
150
151   -help | --help | --hel | --he)
152     # Omit some internal or obsolete options to make the list less imposing.
153     # This message is too long to be a string in the A/UX 3.1 sh.
154     cat << EOF
155 Usage: configure [options] [host]
156 Options: [defaults in brackets after descriptions]
157 Configuration:
158   --cache-file=FILE       cache test results in FILE
159   --help                  print this message
160   --no-create             do not create output files
161   --quiet, --silent       do not print \`checking...' messages
162   --version               print the version of autoconf that created configure
163 Directory and file names:
164   --prefix=PREFIX         install architecture-independent files in PREFIX
165                           [$ac_default_prefix]
166   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
167                           [same as prefix]
168   --bindir=DIR            user executables in DIR [EPREFIX/bin]
169   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
170   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
171   --datadir=DIR           read-only architecture-independent data in DIR
172                           [PREFIX/share]
173   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
174   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
175                           [PREFIX/com]
176   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
177   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
178   --includedir=DIR        C header files in DIR [PREFIX/include]
179   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
180   --infodir=DIR           info documentation in DIR [PREFIX/info]
181   --mandir=DIR            man documentation in DIR [PREFIX/man]
182   --srcdir=DIR            find the sources in DIR [configure dir or ..]
183   --program-prefix=PREFIX prepend PREFIX to installed program names
184   --program-suffix=SUFFIX append SUFFIX to installed program names
185   --program-transform-name=PROGRAM
186                           run sed PROGRAM on installed program names
187 EOF
188     cat << EOF
189 Host type:
190   --build=BUILD           configure for building on BUILD [BUILD=HOST]
191   --host=HOST             configure for HOST [guessed]
192   --target=TARGET         configure for TARGET [TARGET=HOST]
193 Features and packages:
194   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
195   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
196   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
197   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
198   --x-includes=DIR        X include files are in DIR
199   --x-libraries=DIR       X library files are in DIR
200 EOF
201     if test -n "$ac_help"; then
202       echo "--enable and --with options recognized:$ac_help"
203     fi
204     exit 0 ;;
205
206   -host | --host | --hos | --ho)
207     ac_prev=host ;;
208   -host=* | --host=* | --hos=* | --ho=*)
209     host="$ac_optarg" ;;
210
211   -includedir | --includedir | --includedi | --included | --include \
212   | --includ | --inclu | --incl | --inc)
213     ac_prev=includedir ;;
214   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215   | --includ=* | --inclu=* | --incl=* | --inc=*)
216     includedir="$ac_optarg" ;;
217
218   -infodir | --infodir | --infodi | --infod | --info | --inf)
219     ac_prev=infodir ;;
220   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221     infodir="$ac_optarg" ;;
222
223   -libdir | --libdir | --libdi | --libd)
224     ac_prev=libdir ;;
225   -libdir=* | --libdir=* | --libdi=* | --libd=*)
226     libdir="$ac_optarg" ;;
227
228   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229   | --libexe | --libex | --libe)
230     ac_prev=libexecdir ;;
231   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232   | --libexe=* | --libex=* | --libe=*)
233     libexecdir="$ac_optarg" ;;
234
235   -localstatedir | --localstatedir | --localstatedi | --localstated \
236   | --localstate | --localstat | --localsta | --localst \
237   | --locals | --local | --loca | --loc | --lo)
238     ac_prev=localstatedir ;;
239   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242     localstatedir="$ac_optarg" ;;
243
244   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245     ac_prev=mandir ;;
246   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247     mandir="$ac_optarg" ;;
248
249   -nfp | --nfp | --nf)
250     # Obsolete; use --without-fp.
251     with_fp=no ;;
252
253   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254   | --no-cr | --no-c)
255     no_create=yes ;;
256
257   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259     no_recursion=yes ;;
260
261   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263   | --oldin | --oldi | --old | --ol | --o)
264     ac_prev=oldincludedir ;;
265   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268     oldincludedir="$ac_optarg" ;;
269
270   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271     ac_prev=prefix ;;
272   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273     prefix="$ac_optarg" ;;
274
275   -program-prefix | --program-prefix | --program-prefi | --program-pref \
276   | --program-pre | --program-pr | --program-p)
277     ac_prev=program_prefix ;;
278   -program-prefix=* | --program-prefix=* | --program-prefi=* \
279   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280     program_prefix="$ac_optarg" ;;
281
282   -program-suffix | --program-suffix | --program-suffi | --program-suff \
283   | --program-suf | --program-su | --program-s)
284     ac_prev=program_suffix ;;
285   -program-suffix=* | --program-suffix=* | --program-suffi=* \
286   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287     program_suffix="$ac_optarg" ;;
288
289   -program-transform-name | --program-transform-name \
290   | --program-transform-nam | --program-transform-na \
291   | --program-transform-n | --program-transform- \
292   | --program-transform | --program-transfor \
293   | --program-transfo | --program-transf \
294   | --program-trans | --program-tran \
295   | --progr-tra | --program-tr | --program-t)
296     ac_prev=program_transform_name ;;
297   -program-transform-name=* | --program-transform-name=* \
298   | --program-transform-nam=* | --program-transform-na=* \
299   | --program-transform-n=* | --program-transform-=* \
300   | --program-transform=* | --program-transfor=* \
301   | --program-transfo=* | --program-transf=* \
302   | --program-trans=* | --program-tran=* \
303   | --progr-tra=* | --program-tr=* | --program-t=*)
304     program_transform_name="$ac_optarg" ;;
305
306   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307   | -silent | --silent | --silen | --sile | --sil)
308     silent=yes ;;
309
310   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311     ac_prev=sbindir ;;
312   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313   | --sbi=* | --sb=*)
314     sbindir="$ac_optarg" ;;
315
316   -sharedstatedir | --sharedstatedir | --sharedstatedi \
317   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318   | --sharedst | --shareds | --shared | --share | --shar \
319   | --sha | --sh)
320     ac_prev=sharedstatedir ;;
321   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324   | --sha=* | --sh=*)
325     sharedstatedir="$ac_optarg" ;;
326
327   -site | --site | --sit)
328     ac_prev=site ;;
329   -site=* | --site=* | --sit=*)
330     site="$ac_optarg" ;;
331
332   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333     ac_prev=srcdir ;;
334   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335     srcdir="$ac_optarg" ;;
336
337   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338   | --syscon | --sysco | --sysc | --sys | --sy)
339     ac_prev=sysconfdir ;;
340   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342     sysconfdir="$ac_optarg" ;;
343
344   -target | --target | --targe | --targ | --tar | --ta | --t)
345     ac_prev=target ;;
346   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347     target="$ac_optarg" ;;
348
349   -v | -verbose | --verbose | --verbos | --verbo | --verb)
350     verbose=yes ;;
351
352   -version | --version | --versio | --versi | --vers)
353     echo "configure generated by autoconf version 2.13"
354     exit 0 ;;
355
356   -with-* | --with-*)
357     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
358     # Reject names that are not valid shell variable names.
359     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
360       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361     fi
362     ac_package=`echo $ac_package| sed 's/-/_/g'`
363     case "$ac_option" in
364       *=*) ;;
365       *) ac_optarg=yes ;;
366     esac
367     eval "with_${ac_package}='$ac_optarg'" ;;
368
369   -without-* | --without-*)
370     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
371     # Reject names that are not valid shell variable names.
372     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
373       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374     fi
375     ac_package=`echo $ac_package| sed 's/-/_/g'`
376     eval "with_${ac_package}=no" ;;
377
378   --x)
379     # Obsolete; use --with-x.
380     with_x=yes ;;
381
382   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383   | --x-incl | --x-inc | --x-in | --x-i)
384     ac_prev=x_includes ;;
385   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387     x_includes="$ac_optarg" ;;
388
389   -x-libraries | --x-libraries | --x-librarie | --x-librari \
390   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391     ac_prev=x_libraries ;;
392   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394     x_libraries="$ac_optarg" ;;
395
396   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
397     ;;
398
399   *)
400     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
401       echo "configure: warning: $ac_option: invalid host type" 1>&2
402     fi
403     if test "x$nonopt" != xNONE; then
404       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405     fi
406     nonopt="$ac_option"
407     ;;
408
409   esac
410 done
411
412 if test -n "$ac_prev"; then
413   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
414 fi
415
416 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
417
418 # File descriptor usage:
419 # 0 standard input
420 # 1 file creation
421 # 2 errors and warnings
422 # 3 some systems may open it to /dev/tty
423 # 4 used on the Kubota Titan
424 # 6 checking for... messages and results
425 # 5 compiler messages saved in config.log
426 if test "$silent" = yes; then
427   exec 6>/dev/null
428 else
429   exec 6>&1
430 fi
431 exec 5>./config.log
432
433 echo "\
434 This file contains any messages produced by compilers while
435 running configure, to aid debugging if configure makes a mistake.
436 " 1>&5
437
438 # Strip out --no-create and --no-recursion so they do not pile up.
439 # Also quote any args containing shell metacharacters.
440 ac_configure_args=
441 for ac_arg
442 do
443   case "$ac_arg" in
444   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445   | --no-cr | --no-c) ;;
446   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
451   esac
452 done
453
454 # NLS nuisances.
455 # Only set these to C if already set.  These must not be set unconditionally
456 # because not all systems understand e.g. LANG=C (notably SCO).
457 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
458 # Non-C LC_CTYPE values break the ctype check.
459 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
460 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
461 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
462 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
463
464 # confdefs.h avoids OS command line length limits that DEFS can exceed.
465 rm -rf conftest* confdefs.h
466 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
467 echo > confdefs.h
468
469 # A filename unique to this package, relative to the directory that
470 # configure is in, which we can look for to find out if srcdir is correct.
471 ac_unique_file=main/game.c
472
473 # Find the source files, if location was not specified.
474 if test -z "$srcdir"; then
475   ac_srcdir_defaulted=yes
476   # Try the directory containing this script, then its parent.
477   ac_prog=$0
478   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
479   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480   srcdir=$ac_confdir
481   if test ! -r $srcdir/$ac_unique_file; then
482     srcdir=..
483   fi
484 else
485   ac_srcdir_defaulted=no
486 fi
487 if test ! -r $srcdir/$ac_unique_file; then
488   if test "$ac_srcdir_defaulted" = yes; then
489     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490   else
491     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492   fi
493 fi
494 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
495
496 # Prefer explicitly selected file to automatically selected ones.
497 if test -z "$CONFIG_SITE"; then
498   if test "x$prefix" != xNONE; then
499     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500   else
501     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502   fi
503 fi
504 for ac_site_file in $CONFIG_SITE; do
505   if test -r "$ac_site_file"; then
506     echo "loading site script $ac_site_file"
507     . "$ac_site_file"
508   fi
509 done
510
511 if test -r "$cache_file"; then
512   echo "loading cache $cache_file"
513   . $cache_file
514 else
515   echo "creating cache $cache_file"
516   > $cache_file
517 fi
518
519 ac_ext=c
520 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
521 ac_cpp='$CPP $CPPFLAGS'
522 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
524 cross_compiling=$ac_cv_prog_cc_cross
525
526 ac_exeext=
527 ac_objext=o
528 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
529   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
530   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531     ac_n= ac_c='
532 ' ac_t='        '
533   else
534     ac_n=-n ac_c= ac_t=
535   fi
536 else
537   ac_n= ac_c='\c' ac_t=
538 fi
539
540
541
542
543
544
545 ac_aux_dir=
546 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
547   if test -f $ac_dir/install-sh; then
548     ac_aux_dir=$ac_dir
549     ac_install_sh="$ac_aux_dir/install-sh -c"
550     break
551   elif test -f $ac_dir/install.sh; then
552     ac_aux_dir=$ac_dir
553     ac_install_sh="$ac_aux_dir/install.sh -c"
554     break
555   fi
556 done
557 if test -z "$ac_aux_dir"; then
558   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
559 fi
560 ac_config_guess=$ac_aux_dir/config.guess
561 ac_config_sub=$ac_aux_dir/config.sub
562 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
563
564 # Find a good install program.  We prefer a C program (faster),
565 # so one script is as good as another.  But avoid the broken or
566 # incompatible versions:
567 # SysV /etc/install, /usr/sbin/install
568 # SunOS /usr/etc/install
569 # IRIX /sbin/install
570 # AIX /bin/install
571 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
572 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
573 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
574 # ./install, which can be erroneously created by make from ./install.sh.
575 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
576 echo "configure:577: checking for a BSD compatible install" >&5
577 if test -z "$INSTALL"; then
578 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
579   echo $ac_n "(cached) $ac_c" 1>&6
580 else
581     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
582   for ac_dir in $PATH; do
583     # Account for people who put trailing slashes in PATH elements.
584     case "$ac_dir/" in
585     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
586     *)
587       # OSF1 and SCO ODT 3.0 have their own names for install.
588       # Don't use installbsd from OSF since it installs stuff as root
589       # by default.
590       for ac_prog in ginstall scoinst install; do
591         if test -f $ac_dir/$ac_prog; then
592           if test $ac_prog = install &&
593             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
594             # AIX install.  It has an incompatible calling convention.
595             :
596           else
597             ac_cv_path_install="$ac_dir/$ac_prog -c"
598             break 2
599           fi
600         fi
601       done
602       ;;
603     esac
604   done
605   IFS="$ac_save_IFS"
606
607 fi
608   if test "${ac_cv_path_install+set}" = set; then
609     INSTALL="$ac_cv_path_install"
610   else
611     # As a last resort, use the slow shell script.  We don't cache a
612     # path for INSTALL within a source directory, because that will
613     # break other packages using the cache if that directory is
614     # removed, or if the path is relative.
615     INSTALL="$ac_install_sh"
616   fi
617 fi
618 echo "$ac_t""$INSTALL" 1>&6
619
620 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
621 # It thinks the first close brace ends the variable substitution.
622 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
623
624 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
625
626 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
627
628 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
629 echo "configure:630: checking whether build environment is sane" >&5
630 # Just in case
631 sleep 1
632 echo timestamp > conftestfile
633 # Do `set' in a subshell so we don't clobber the current shell's
634 # arguments.  Must try -L first in case configure is actually a
635 # symlink; some systems play weird games with the mod time of symlinks
636 # (eg FreeBSD returns the mod time of the symlink's containing
637 # directory).
638 if (
639    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
640    if test "$*" = "X"; then
641       # -L didn't work.
642       set X `ls -t $srcdir/configure conftestfile`
643    fi
644    if test "$*" != "X $srcdir/configure conftestfile" \
645       && test "$*" != "X conftestfile $srcdir/configure"; then
646
647       # If neither matched, then we have a broken ls.  This can happen
648       # if, for instance, CONFIG_SHELL is bash and it inherits a
649       # broken ls alias from the environment.  This has actually
650       # happened.  Such a system could not be considered "sane".
651       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
652 alias in your environment" 1>&2; exit 1; }
653    fi
654
655    test "$2" = conftestfile
656    )
657 then
658    # Ok.
659    :
660 else
661    { echo "configure: error: newly created file is older than distributed files!
662 Check your system clock" 1>&2; exit 1; }
663 fi
664 rm -f conftest*
665 echo "$ac_t""yes" 1>&6
666 if test "$program_transform_name" = s,x,x,; then
667   program_transform_name=
668 else
669   # Double any \ or $.  echo might interpret backslashes.
670   cat <<\EOF_SED > conftestsed
671 s,\\,\\\\,g; s,\$,$$,g
672 EOF_SED
673   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
674   rm -f conftestsed
675 fi
676 test "$program_prefix" != NONE &&
677   program_transform_name="s,^,${program_prefix},; $program_transform_name"
678 # Use a double $ so make ignores it.
679 test "$program_suffix" != NONE &&
680   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
681
682 # sed with no file args requires a program.
683 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
684
685 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
686 echo "configure:687: checking whether ${MAKE-make} sets \${MAKE}" >&5
687 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
688 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
689   echo $ac_n "(cached) $ac_c" 1>&6
690 else
691   cat > conftestmake <<\EOF
692 all:
693         @echo 'ac_maketemp="${MAKE}"'
694 EOF
695 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
696 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
697 if test -n "$ac_maketemp"; then
698   eval ac_cv_prog_make_${ac_make}_set=yes
699 else
700   eval ac_cv_prog_make_${ac_make}_set=no
701 fi
702 rm -f conftestmake
703 fi
704 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
705   echo "$ac_t""yes" 1>&6
706   SET_MAKE=
707 else
708   echo "$ac_t""no" 1>&6
709   SET_MAKE="MAKE=${MAKE-make}"
710 fi
711
712
713 PACKAGE=d2x
714
715 VERSION=0.0.9
716
717 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
718   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
719 fi
720 cat >> confdefs.h <<EOF
721 #define PACKAGE "$PACKAGE"
722 EOF
723
724 cat >> confdefs.h <<EOF
725 #define VERSION "$VERSION"
726 EOF
727
728
729
730 missing_dir=`cd $ac_aux_dir && pwd`
731 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
732 echo "configure:733: checking for working aclocal" >&5
733 # Run test in a subshell; some versions of sh will print an error if
734 # an executable is not found, even if stderr is redirected.
735 # Redirect stdin to placate older versions of autoconf.  Sigh.
736 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
737    ACLOCAL=aclocal
738    echo "$ac_t""found" 1>&6
739 else
740    ACLOCAL="$missing_dir/missing aclocal"
741    echo "$ac_t""missing" 1>&6
742 fi
743
744 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
745 echo "configure:746: checking for working autoconf" >&5
746 # Run test in a subshell; some versions of sh will print an error if
747 # an executable is not found, even if stderr is redirected.
748 # Redirect stdin to placate older versions of autoconf.  Sigh.
749 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
750    AUTOCONF=autoconf
751    echo "$ac_t""found" 1>&6
752 else
753    AUTOCONF="$missing_dir/missing autoconf"
754    echo "$ac_t""missing" 1>&6
755 fi
756
757 echo $ac_n "checking for working automake""... $ac_c" 1>&6
758 echo "configure:759: checking for working automake" >&5
759 # Run test in a subshell; some versions of sh will print an error if
760 # an executable is not found, even if stderr is redirected.
761 # Redirect stdin to placate older versions of autoconf.  Sigh.
762 if (automake --version) < /dev/null > /dev/null 2>&1; then
763    AUTOMAKE=automake
764    echo "$ac_t""found" 1>&6
765 else
766    AUTOMAKE="$missing_dir/missing automake"
767    echo "$ac_t""missing" 1>&6
768 fi
769
770 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
771 echo "configure:772: checking for working autoheader" >&5
772 # Run test in a subshell; some versions of sh will print an error if
773 # an executable is not found, even if stderr is redirected.
774 # Redirect stdin to placate older versions of autoconf.  Sigh.
775 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
776    AUTOHEADER=autoheader
777    echo "$ac_t""found" 1>&6
778 else
779    AUTOHEADER="$missing_dir/missing autoheader"
780    echo "$ac_t""missing" 1>&6
781 fi
782
783 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
784 echo "configure:785: checking for working makeinfo" >&5
785 # Run test in a subshell; some versions of sh will print an error if
786 # an executable is not found, even if stderr is redirected.
787 # Redirect stdin to placate older versions of autoconf.  Sigh.
788 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
789    MAKEINFO=makeinfo
790    echo "$ac_t""found" 1>&6
791 else
792    MAKEINFO="$missing_dir/missing makeinfo"
793    echo "$ac_t""missing" 1>&6
794 fi
795
796
797
798 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
799 echo "configure:800: checking whether to enable maintainer-specific portions of Makefiles" >&5
800     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
801 if test "${enable_maintainer_mode+set}" = set; then
802   enableval="$enable_maintainer_mode"
803   USE_MAINTAINER_MODE=$enableval
804 else
805   USE_MAINTAINER_MODE=no
806 fi
807
808   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
809   
810
811 if test $USE_MAINTAINER_MODE = yes; then
812   MAINTAINER_MODE_TRUE=
813   MAINTAINER_MODE_FALSE='#'
814 else
815   MAINTAINER_MODE_TRUE='#'
816   MAINTAINER_MODE_FALSE=
817 fi
818   MAINT=$MAINTAINER_MODE_TRUE
819   
820
821
822 # Extract the first word of "gcc", so it can be a program name with args.
823 set dummy gcc; ac_word=$2
824 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
825 echo "configure:826: checking for $ac_word" >&5
826 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
827   echo $ac_n "(cached) $ac_c" 1>&6
828 else
829   if test -n "$CC"; then
830   ac_cv_prog_CC="$CC" # Let the user override the test.
831 else
832   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
833   ac_dummy="$PATH"
834   for ac_dir in $ac_dummy; do
835     test -z "$ac_dir" && ac_dir=.
836     if test -f $ac_dir/$ac_word; then
837       ac_cv_prog_CC="gcc"
838       break
839     fi
840   done
841   IFS="$ac_save_ifs"
842 fi
843 fi
844 CC="$ac_cv_prog_CC"
845 if test -n "$CC"; then
846   echo "$ac_t""$CC" 1>&6
847 else
848   echo "$ac_t""no" 1>&6
849 fi
850
851 if test -z "$CC"; then
852   # Extract the first word of "cc", so it can be a program name with args.
853 set dummy cc; ac_word=$2
854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
855 echo "configure:856: checking for $ac_word" >&5
856 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
857   echo $ac_n "(cached) $ac_c" 1>&6
858 else
859   if test -n "$CC"; then
860   ac_cv_prog_CC="$CC" # Let the user override the test.
861 else
862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
863   ac_prog_rejected=no
864   ac_dummy="$PATH"
865   for ac_dir in $ac_dummy; do
866     test -z "$ac_dir" && ac_dir=.
867     if test -f $ac_dir/$ac_word; then
868       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
869         ac_prog_rejected=yes
870         continue
871       fi
872       ac_cv_prog_CC="cc"
873       break
874     fi
875   done
876   IFS="$ac_save_ifs"
877 if test $ac_prog_rejected = yes; then
878   # We found a bogon in the path, so make sure we never use it.
879   set dummy $ac_cv_prog_CC
880   shift
881   if test $# -gt 0; then
882     # We chose a different compiler from the bogus one.
883     # However, it has the same basename, so the bogon will be chosen
884     # first if we set CC to just the basename; use the full file name.
885     shift
886     set dummy "$ac_dir/$ac_word" "$@"
887     shift
888     ac_cv_prog_CC="$@"
889   fi
890 fi
891 fi
892 fi
893 CC="$ac_cv_prog_CC"
894 if test -n "$CC"; then
895   echo "$ac_t""$CC" 1>&6
896 else
897   echo "$ac_t""no" 1>&6
898 fi
899
900   if test -z "$CC"; then
901     case "`uname -s`" in
902     *win32* | *WIN32*)
903       # Extract the first word of "cl", so it can be a program name with args.
904 set dummy cl; ac_word=$2
905 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
906 echo "configure:907: checking for $ac_word" >&5
907 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
908   echo $ac_n "(cached) $ac_c" 1>&6
909 else
910   if test -n "$CC"; then
911   ac_cv_prog_CC="$CC" # Let the user override the test.
912 else
913   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
914   ac_dummy="$PATH"
915   for ac_dir in $ac_dummy; do
916     test -z "$ac_dir" && ac_dir=.
917     if test -f $ac_dir/$ac_word; then
918       ac_cv_prog_CC="cl"
919       break
920     fi
921   done
922   IFS="$ac_save_ifs"
923 fi
924 fi
925 CC="$ac_cv_prog_CC"
926 if test -n "$CC"; then
927   echo "$ac_t""$CC" 1>&6
928 else
929   echo "$ac_t""no" 1>&6
930 fi
931  ;;
932     esac
933   fi
934   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
935 fi
936
937 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
938 echo "configure:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
939
940 ac_ext=c
941 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
942 ac_cpp='$CPP $CPPFLAGS'
943 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
944 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
945 cross_compiling=$ac_cv_prog_cc_cross
946
947 cat > conftest.$ac_ext << EOF
948
949 #line 950 "configure"
950 #include "confdefs.h"
951
952 main(){return(0);}
953 EOF
954 if { (eval echo configure:955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
955   ac_cv_prog_cc_works=yes
956   # If we can't run a trivial program, we are probably using a cross compiler.
957   if (./conftest; exit) 2>/dev/null; then
958     ac_cv_prog_cc_cross=no
959   else
960     ac_cv_prog_cc_cross=yes
961   fi
962 else
963   echo "configure: failed program was:" >&5
964   cat conftest.$ac_ext >&5
965   ac_cv_prog_cc_works=no
966 fi
967 rm -fr conftest*
968 ac_ext=c
969 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
970 ac_cpp='$CPP $CPPFLAGS'
971 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
972 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
973 cross_compiling=$ac_cv_prog_cc_cross
974
975 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
976 if test $ac_cv_prog_cc_works = no; then
977   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
978 fi
979 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
980 echo "configure:981: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
981 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
982 cross_compiling=$ac_cv_prog_cc_cross
983
984 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
985 echo "configure:986: checking whether we are using GNU C" >&5
986 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
987   echo $ac_n "(cached) $ac_c" 1>&6
988 else
989   cat > conftest.c <<EOF
990 #ifdef __GNUC__
991   yes;
992 #endif
993 EOF
994 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
995   ac_cv_prog_gcc=yes
996 else
997   ac_cv_prog_gcc=no
998 fi
999 fi
1000
1001 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1002
1003 if test $ac_cv_prog_gcc = yes; then
1004   GCC=yes
1005 else
1006   GCC=
1007 fi
1008
1009 ac_test_CFLAGS="${CFLAGS+set}"
1010 ac_save_CFLAGS="$CFLAGS"
1011 CFLAGS=
1012 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1013 echo "configure:1014: checking whether ${CC-cc} accepts -g" >&5
1014 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1015   echo $ac_n "(cached) $ac_c" 1>&6
1016 else
1017   echo 'void f(){}' > conftest.c
1018 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1019   ac_cv_prog_cc_g=yes
1020 else
1021   ac_cv_prog_cc_g=no
1022 fi
1023 rm -f conftest*
1024
1025 fi
1026
1027 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1028 if test "$ac_test_CFLAGS" = set; then
1029   CFLAGS="$ac_save_CFLAGS"
1030 elif test $ac_cv_prog_cc_g = yes; then
1031   if test "$GCC" = yes; then
1032     CFLAGS="-g -O2"
1033   else
1034     CFLAGS="-g"
1035   fi
1036 else
1037   if test "$GCC" = yes; then
1038     CFLAGS="-O2"
1039   else
1040     CFLAGS=
1041   fi
1042 fi
1043
1044 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1045 echo "configure:1046: checking for POSIXized ISC" >&5
1046 if test -d /etc/conf/kconfig.d &&
1047   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1048 then
1049   echo "$ac_t""yes" 1>&6
1050   ISC=yes # If later tests want to check for ISC.
1051   cat >> confdefs.h <<\EOF
1052 #define _POSIX_SOURCE 1
1053 EOF
1054
1055   if test "$GCC" = yes; then
1056     CC="$CC -posix"
1057   else
1058     CC="$CC -Xp"
1059   fi
1060 else
1061   echo "$ac_t""no" 1>&6
1062   ISC=
1063 fi
1064
1065 # Extract the first word of "gcc", so it can be a program name with args.
1066 set dummy gcc; ac_word=$2
1067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1068 echo "configure:1069: checking for $ac_word" >&5
1069 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1070   echo $ac_n "(cached) $ac_c" 1>&6
1071 else
1072   if test -n "$CC"; then
1073   ac_cv_prog_CC="$CC" # Let the user override the test.
1074 else
1075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1076   ac_dummy="$PATH"
1077   for ac_dir in $ac_dummy; do
1078     test -z "$ac_dir" && ac_dir=.
1079     if test -f $ac_dir/$ac_word; then
1080       ac_cv_prog_CC="gcc"
1081       break
1082     fi
1083   done
1084   IFS="$ac_save_ifs"
1085 fi
1086 fi
1087 CC="$ac_cv_prog_CC"
1088 if test -n "$CC"; then
1089   echo "$ac_t""$CC" 1>&6
1090 else
1091   echo "$ac_t""no" 1>&6
1092 fi
1093
1094 if test -z "$CC"; then
1095   # Extract the first word of "cc", so it can be a program name with args.
1096 set dummy cc; ac_word=$2
1097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1098 echo "configure:1099: checking for $ac_word" >&5
1099 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1100   echo $ac_n "(cached) $ac_c" 1>&6
1101 else
1102   if test -n "$CC"; then
1103   ac_cv_prog_CC="$CC" # Let the user override the test.
1104 else
1105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1106   ac_prog_rejected=no
1107   ac_dummy="$PATH"
1108   for ac_dir in $ac_dummy; do
1109     test -z "$ac_dir" && ac_dir=.
1110     if test -f $ac_dir/$ac_word; then
1111       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1112         ac_prog_rejected=yes
1113         continue
1114       fi
1115       ac_cv_prog_CC="cc"
1116       break
1117     fi
1118   done
1119   IFS="$ac_save_ifs"
1120 if test $ac_prog_rejected = yes; then
1121   # We found a bogon in the path, so make sure we never use it.
1122   set dummy $ac_cv_prog_CC
1123   shift
1124   if test $# -gt 0; then
1125     # We chose a different compiler from the bogus one.
1126     # However, it has the same basename, so the bogon will be chosen
1127     # first if we set CC to just the basename; use the full file name.
1128     shift
1129     set dummy "$ac_dir/$ac_word" "$@"
1130     shift
1131     ac_cv_prog_CC="$@"
1132   fi
1133 fi
1134 fi
1135 fi
1136 CC="$ac_cv_prog_CC"
1137 if test -n "$CC"; then
1138   echo "$ac_t""$CC" 1>&6
1139 else
1140   echo "$ac_t""no" 1>&6
1141 fi
1142
1143   if test -z "$CC"; then
1144     case "`uname -s`" in
1145     *win32* | *WIN32*)
1146       # Extract the first word of "cl", so it can be a program name with args.
1147 set dummy cl; ac_word=$2
1148 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1149 echo "configure:1150: checking for $ac_word" >&5
1150 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   if test -n "$CC"; then
1154   ac_cv_prog_CC="$CC" # Let the user override the test.
1155 else
1156   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1157   ac_dummy="$PATH"
1158   for ac_dir in $ac_dummy; do
1159     test -z "$ac_dir" && ac_dir=.
1160     if test -f $ac_dir/$ac_word; then
1161       ac_cv_prog_CC="cl"
1162       break
1163     fi
1164   done
1165   IFS="$ac_save_ifs"
1166 fi
1167 fi
1168 CC="$ac_cv_prog_CC"
1169 if test -n "$CC"; then
1170   echo "$ac_t""$CC" 1>&6
1171 else
1172   echo "$ac_t""no" 1>&6
1173 fi
1174  ;;
1175     esac
1176   fi
1177   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1178 fi
1179
1180 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1181 echo "configure:1182: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1182
1183 ac_ext=c
1184 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1185 ac_cpp='$CPP $CPPFLAGS'
1186 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1187 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1188 cross_compiling=$ac_cv_prog_cc_cross
1189
1190 cat > conftest.$ac_ext << EOF
1191
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1194
1195 main(){return(0);}
1196 EOF
1197 if { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1198   ac_cv_prog_cc_works=yes
1199   # If we can't run a trivial program, we are probably using a cross compiler.
1200   if (./conftest; exit) 2>/dev/null; then
1201     ac_cv_prog_cc_cross=no
1202   else
1203     ac_cv_prog_cc_cross=yes
1204   fi
1205 else
1206   echo "configure: failed program was:" >&5
1207   cat conftest.$ac_ext >&5
1208   ac_cv_prog_cc_works=no
1209 fi
1210 rm -fr conftest*
1211 ac_ext=c
1212 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1213 ac_cpp='$CPP $CPPFLAGS'
1214 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1215 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1216 cross_compiling=$ac_cv_prog_cc_cross
1217
1218 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1219 if test $ac_cv_prog_cc_works = no; then
1220   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1221 fi
1222 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1223 echo "configure:1224: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1224 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1225 cross_compiling=$ac_cv_prog_cc_cross
1226
1227 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1228 echo "configure:1229: checking whether we are using GNU C" >&5
1229 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1230   echo $ac_n "(cached) $ac_c" 1>&6
1231 else
1232   cat > conftest.c <<EOF
1233 #ifdef __GNUC__
1234   yes;
1235 #endif
1236 EOF
1237 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1238   ac_cv_prog_gcc=yes
1239 else
1240   ac_cv_prog_gcc=no
1241 fi
1242 fi
1243
1244 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1245
1246 if test $ac_cv_prog_gcc = yes; then
1247   GCC=yes
1248 else
1249   GCC=
1250 fi
1251
1252 ac_test_CFLAGS="${CFLAGS+set}"
1253 ac_save_CFLAGS="$CFLAGS"
1254 CFLAGS=
1255 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1256 echo "configure:1257: checking whether ${CC-cc} accepts -g" >&5
1257 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1258   echo $ac_n "(cached) $ac_c" 1>&6
1259 else
1260   echo 'void f(){}' > conftest.c
1261 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1262   ac_cv_prog_cc_g=yes
1263 else
1264   ac_cv_prog_cc_g=no
1265 fi
1266 rm -f conftest*
1267
1268 fi
1269
1270 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1271 if test "$ac_test_CFLAGS" = set; then
1272   CFLAGS="$ac_save_CFLAGS"
1273 elif test $ac_cv_prog_cc_g = yes; then
1274   if test "$GCC" = yes; then
1275     CFLAGS="-g -O2"
1276   else
1277     CFLAGS="-g"
1278   fi
1279 else
1280   if test "$GCC" = yes; then
1281     CFLAGS="-O2"
1282   else
1283     CFLAGS=
1284   fi
1285 fi
1286
1287 # Extract the first word of "ranlib", so it can be a program name with args.
1288 set dummy ranlib; ac_word=$2
1289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1290 echo "configure:1291: checking for $ac_word" >&5
1291 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1292   echo $ac_n "(cached) $ac_c" 1>&6
1293 else
1294   if test -n "$RANLIB"; then
1295   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1296 else
1297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1298   ac_dummy="$PATH"
1299   for ac_dir in $ac_dummy; do
1300     test -z "$ac_dir" && ac_dir=.
1301     if test -f $ac_dir/$ac_word; then
1302       ac_cv_prog_RANLIB="ranlib"
1303       break
1304     fi
1305   done
1306   IFS="$ac_save_ifs"
1307   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1308 fi
1309 fi
1310 RANLIB="$ac_cv_prog_RANLIB"
1311 if test -n "$RANLIB"; then
1312   echo "$ac_t""$RANLIB" 1>&6
1313 else
1314   echo "$ac_t""no" 1>&6
1315 fi
1316
1317 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1318 echo "configure:1319: checking how to run the C preprocessor" >&5
1319 # On Suns, sometimes $CPP names a directory.
1320 if test -n "$CPP" && test -d "$CPP"; then
1321   CPP=
1322 fi
1323 if test -z "$CPP"; then
1324 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1325   echo $ac_n "(cached) $ac_c" 1>&6
1326 else
1327     # This must be in double quotes, not single quotes, because CPP may get
1328   # substituted into the Makefile and "${CC-cc}" will confuse make.
1329   CPP="${CC-cc} -E"
1330   # On the NeXT, cc -E runs the code through the compiler's parser,
1331   # not just through cpp.
1332   cat > conftest.$ac_ext <<EOF
1333 #line 1334 "configure"
1334 #include "confdefs.h"
1335 #include <assert.h>
1336 Syntax Error
1337 EOF
1338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1339 { (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1341 if test -z "$ac_err"; then
1342   :
1343 else
1344   echo "$ac_err" >&5
1345   echo "configure: failed program was:" >&5
1346   cat conftest.$ac_ext >&5
1347   rm -rf conftest*
1348   CPP="${CC-cc} -E -traditional-cpp"
1349   cat > conftest.$ac_ext <<EOF
1350 #line 1351 "configure"
1351 #include "confdefs.h"
1352 #include <assert.h>
1353 Syntax Error
1354 EOF
1355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1356 { (eval echo configure:1357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1358 if test -z "$ac_err"; then
1359   :
1360 else
1361   echo "$ac_err" >&5
1362   echo "configure: failed program was:" >&5
1363   cat conftest.$ac_ext >&5
1364   rm -rf conftest*
1365   CPP="${CC-cc} -nologo -E"
1366   cat > conftest.$ac_ext <<EOF
1367 #line 1368 "configure"
1368 #include "confdefs.h"
1369 #include <assert.h>
1370 Syntax Error
1371 EOF
1372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1373 { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1375 if test -z "$ac_err"; then
1376   :
1377 else
1378   echo "$ac_err" >&5
1379   echo "configure: failed program was:" >&5
1380   cat conftest.$ac_ext >&5
1381   rm -rf conftest*
1382   CPP=/lib/cpp
1383 fi
1384 rm -f conftest*
1385 fi
1386 rm -f conftest*
1387 fi
1388 rm -f conftest*
1389   ac_cv_prog_CPP="$CPP"
1390 fi
1391   CPP="$ac_cv_prog_CPP"
1392 else
1393   ac_cv_prog_CPP="$CPP"
1394 fi
1395 echo "$ac_t""$CPP" 1>&6
1396
1397 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1398 echo "configure:1399: checking for ANSI C header files" >&5
1399 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1400   echo $ac_n "(cached) $ac_c" 1>&6
1401 else
1402   cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1405 #include <stdlib.h>
1406 #include <stdarg.h>
1407 #include <string.h>
1408 #include <float.h>
1409 EOF
1410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1411 { (eval echo configure:1412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1413 if test -z "$ac_err"; then
1414   rm -rf conftest*
1415   ac_cv_header_stdc=yes
1416 else
1417   echo "$ac_err" >&5
1418   echo "configure: failed program was:" >&5
1419   cat conftest.$ac_ext >&5
1420   rm -rf conftest*
1421   ac_cv_header_stdc=no
1422 fi
1423 rm -f conftest*
1424
1425 if test $ac_cv_header_stdc = yes; then
1426   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1427 cat > conftest.$ac_ext <<EOF
1428 #line 1429 "configure"
1429 #include "confdefs.h"
1430 #include <string.h>
1431 EOF
1432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1433   egrep "memchr" >/dev/null 2>&1; then
1434   :
1435 else
1436   rm -rf conftest*
1437   ac_cv_header_stdc=no
1438 fi
1439 rm -f conftest*
1440
1441 fi
1442
1443 if test $ac_cv_header_stdc = yes; then
1444   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1448 #include <stdlib.h>
1449 EOF
1450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1451   egrep "free" >/dev/null 2>&1; then
1452   :
1453 else
1454   rm -rf conftest*
1455   ac_cv_header_stdc=no
1456 fi
1457 rm -f conftest*
1458
1459 fi
1460
1461 if test $ac_cv_header_stdc = yes; then
1462   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1463 if test "$cross_compiling" = yes; then
1464   :
1465 else
1466   cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1469 #include <ctype.h>
1470 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1471 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1472 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1473 int main () { int i; for (i = 0; i < 256; i++)
1474 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1475 exit (0); }
1476
1477 EOF
1478 if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1479 then
1480   :
1481 else
1482   echo "configure: failed program was:" >&5
1483   cat conftest.$ac_ext >&5
1484   rm -fr conftest*
1485   ac_cv_header_stdc=no
1486 fi
1487 rm -fr conftest*
1488 fi
1489
1490 fi
1491 fi
1492
1493 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1494 if test $ac_cv_header_stdc = yes; then
1495   cat >> confdefs.h <<\EOF
1496 #define STDC_HEADERS 1
1497 EOF
1498
1499 fi
1500
1501
1502 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1503 echo "configure:1504: checking for Cygwin environment" >&5
1504 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1505   echo $ac_n "(cached) $ac_c" 1>&6
1506 else
1507   cat > conftest.$ac_ext <<EOF
1508 #line 1509 "configure"
1509 #include "confdefs.h"
1510
1511 int main() {
1512
1513 #ifndef __CYGWIN__
1514 #define __CYGWIN__ __CYGWIN32__
1515 #endif
1516 return __CYGWIN__;
1517 ; return 0; }
1518 EOF
1519 if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1520   rm -rf conftest*
1521   ac_cv_cygwin=yes
1522 else
1523   echo "configure: failed program was:" >&5
1524   cat conftest.$ac_ext >&5
1525   rm -rf conftest*
1526   ac_cv_cygwin=no
1527 fi
1528 rm -f conftest*
1529 rm -f conftest*
1530 fi
1531
1532 echo "$ac_t""$ac_cv_cygwin" 1>&6
1533 CYGWIN=
1534 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1535 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1536 echo "configure:1537: checking for mingw32 environment" >&5
1537 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1538   echo $ac_n "(cached) $ac_c" 1>&6
1539 else
1540   cat > conftest.$ac_ext <<EOF
1541 #line 1542 "configure"
1542 #include "confdefs.h"
1543
1544 int main() {
1545 return __MINGW32__;
1546 ; return 0; }
1547 EOF
1548 if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1549   rm -rf conftest*
1550   ac_cv_mingw32=yes
1551 else
1552   echo "configure: failed program was:" >&5
1553   cat conftest.$ac_ext >&5
1554   rm -rf conftest*
1555   ac_cv_mingw32=no
1556 fi
1557 rm -f conftest*
1558 rm -f conftest*
1559 fi
1560
1561 echo "$ac_t""$ac_cv_mingw32" 1>&6
1562 MINGW32=
1563 test "$ac_cv_mingw32" = yes && MINGW32=yes
1564
1565 CFLAGS="-g -O2 -Wall"
1566
1567 # Check whether --enable-werror or --disable-werror was given.
1568 if test "${enable_werror+set}" = set; then
1569   enableval="$enable_werror"
1570   case "${enableval}" in
1571     yes) CFLAGS="-Werror $CFLAGS" ;;
1572     no)  ;;
1573     *) { echo "configure: error: bad value ${enableval} for --enable-werror" 1>&2; exit 1; } ;;
1574   esac
1575 fi
1576
1577
1578 # Check whether --enable-ndebug or --disable-ndebug was given.
1579 if test "${enable_ndebug+set}" = set; then
1580   enableval="$enable_ndebug"
1581   case "${enableval}" in
1582     yes) CFLAGS="-DNDEBUG $CFLAGS" ;;
1583     no)  ;;
1584     *) { echo "configure: error: bad value ${withval} for --enable-ndebug" 1>&2; exit 1; } ;;
1585   esac
1586 fi
1587
1588
1589 # Test for DJGPP
1590 if test "$OSTYPE" = "MSDOS"; then
1591
1592   CFLAGS="-I \$(top_srcdir)/arch/dos/include $CFLAGS"
1593   
1594
1595 if test "$OSTYPE" = "MSDOS"; then
1596   ENV_DJGPP_TRUE=
1597   ENV_DJGPP_FALSE='#'
1598 else
1599   ENV_DJGPP_TRUE='#'
1600   ENV_DJGPP_FALSE=
1601 fi
1602   cat >> confdefs.h <<\EOF
1603 #define __ENV_DJGPP__ 1
1604 EOF
1605
1606   # Extract the first word of "nasmw", so it can be a program name with args.
1607 set dummy nasmw; ac_word=$2
1608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1609 echo "configure:1610: checking for $ac_word" >&5
1610 if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
1611   echo $ac_n "(cached) $ac_c" 1>&6
1612 else
1613   case "$NASM" in
1614   /*)
1615   ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
1616   ;;
1617   ?:/*)                  
1618   ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
1619   ;;
1620   *)
1621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1622   ac_dummy="$PATH"
1623   for ac_dir in $ac_dummy; do 
1624     test -z "$ac_dir" && ac_dir=.
1625     if test -f $ac_dir/$ac_word; then
1626       ac_cv_path_NASM="$ac_dir/$ac_word"
1627       break
1628     fi
1629   done
1630   IFS="$ac_save_ifs"
1631   test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
1632   ;;
1633 esac
1634 fi
1635 NASM="$ac_cv_path_NASM"
1636 if test -n "$NASM"; then
1637   echo "$ac_t""$NASM" 1>&6
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641
1642
1643
1644 else
1645   CFLAGS="-D_REENTRANT -pipe $CFLAGS"
1646   
1647
1648 if test "$OSTYPE" != "MSDOS"; then
1649   ENV_LINUX_TRUE=
1650   ENV_LINUX_FALSE='#'
1651 else
1652   ENV_LINUX_TRUE='#'
1653   ENV_LINUX_FALSE=
1654 fi
1655   cat >> confdefs.h <<\EOF
1656 #define __ENV_LINUX__ 1
1657 EOF
1658
1659
1660
1661   echo $ac_n "checking for SDL_Init in -lSDL""... $ac_c" 1>&6
1662 echo "configure:1663: checking for SDL_Init in -lSDL" >&5
1663 ac_lib_var=`echo SDL'_'SDL_Init | sed 'y%./+-%__p_%'`
1664 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1665   echo $ac_n "(cached) $ac_c" 1>&6
1666 else
1667   ac_save_LIBS="$LIBS"
1668 LIBS="-lSDL -ldl -lpthread $LIBS"
1669 cat > conftest.$ac_ext <<EOF
1670 #line 1671 "configure"
1671 #include "confdefs.h"
1672 /* Override any gcc2 internal prototype to avoid an error.  */
1673 /* We use char because int might match the return type of a gcc2
1674     builtin and then its argument prototype would still apply.  */
1675 char SDL_Init();
1676
1677 int main() {
1678 SDL_Init()
1679 ; return 0; }
1680 EOF
1681 if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1682   rm -rf conftest*
1683   eval "ac_cv_lib_$ac_lib_var=yes"
1684 else
1685   echo "configure: failed program was:" >&5
1686   cat conftest.$ac_ext >&5
1687   rm -rf conftest*
1688   eval "ac_cv_lib_$ac_lib_var=no"
1689 fi
1690 rm -f conftest*
1691 LIBS="$ac_save_LIBS"
1692
1693 fi
1694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1695   echo "$ac_t""yes" 1>&6
1696   SDL_LIBS="-lSDL"
1697 else
1698   echo "$ac_t""no" 1>&6
1699 { echo "configure: error: The SDL which is required not found." 1>&2; exit 1; }
1700 fi
1701
1702   for ac_hdr in netipx/ipx.h
1703 do
1704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1706 echo "configure:1707: checking for $ac_hdr" >&5
1707 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1708   echo $ac_n "(cached) $ac_c" 1>&6
1709 else
1710   cat > conftest.$ac_ext <<EOF
1711 #line 1712 "configure"
1712 #include "confdefs.h"
1713 #include <$ac_hdr>
1714 EOF
1715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1716 { (eval echo configure:1717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1718 if test -z "$ac_err"; then
1719   rm -rf conftest*
1720   eval "ac_cv_header_$ac_safe=yes"
1721 else
1722   echo "$ac_err" >&5
1723   echo "configure: failed program was:" >&5
1724   cat conftest.$ac_ext >&5
1725   rm -rf conftest*
1726   eval "ac_cv_header_$ac_safe=no"
1727 fi
1728 rm -f conftest*
1729 fi
1730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1731   echo "$ac_t""yes" 1>&6
1732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1733   cat >> confdefs.h <<EOF
1734 #define $ac_tr_hdr 1
1735 EOF
1736  
1737 else
1738   echo "$ac_t""no" 1>&6
1739 fi
1740 done
1741
1742   
1743
1744   # Check for OpenGL
1745   # Check whether --with-opengl or --without-opengl was given.
1746 if test "${with_opengl+set}" = set; then
1747   withval="$with_opengl"
1748   case "${withval}" in
1749       yes) opengl=true ;;
1750       no)  opengl=false ;;
1751       *) { echo "configure: error: bad value ${withval} for --with-opengl" 1>&2; exit 1; } ;;
1752     esac
1753 else
1754   opengl=false
1755 fi
1756
1757   
1758   if test x$opengl = xtrue; then
1759     echo $ac_n "checking for main in -lGL""... $ac_c" 1>&6
1760 echo "configure:1761: checking for main in -lGL" >&5
1761 ac_lib_var=`echo GL'_'main | sed 'y%./+-%__p_%'`
1762 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1763   echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765   ac_save_LIBS="$LIBS"
1766 LIBS="-lGL -L/usr/X11R6/lib -lX11 -lXext -lm $LIBS"
1767 cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770
1771 int main() {
1772 main()
1773 ; return 0; }
1774 EOF
1775 if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1776   rm -rf conftest*
1777   eval "ac_cv_lib_$ac_lib_var=yes"
1778 else
1779   echo "configure: failed program was:" >&5
1780   cat conftest.$ac_ext >&5
1781   rm -rf conftest*
1782   eval "ac_cv_lib_$ac_lib_var=no"
1783 fi
1784 rm -f conftest*
1785 LIBS="$ac_save_LIBS"
1786
1787 fi
1788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1789   echo "$ac_t""yes" 1>&6
1790   OGL_LIBS="-lGL"
1791 else
1792   echo "$ac_t""no" 1>&6
1793 { echo "configure: error: GL not found, OpenGL cannot be built" 1>&2; exit 1; }
1794        opengl=false
1795 fi
1796
1797     echo $ac_n "checking for main in -lGLU""... $ac_c" 1>&6
1798 echo "configure:1799: checking for main in -lGLU" >&5
1799 ac_lib_var=`echo GLU'_'main | sed 'y%./+-%__p_%'`
1800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1801   echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803   ac_save_LIBS="$LIBS"
1804 LIBS="-lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lm $LIBS"
1805 cat > conftest.$ac_ext <<EOF
1806 #line 1807 "configure"
1807 #include "confdefs.h"
1808
1809 int main() {
1810 main()
1811 ; return 0; }
1812 EOF
1813 if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1814   rm -rf conftest*
1815   eval "ac_cv_lib_$ac_lib_var=yes"
1816 else
1817   echo "configure: failed program was:" >&5
1818   cat conftest.$ac_ext >&5
1819   rm -rf conftest*
1820   eval "ac_cv_lib_$ac_lib_var=no"
1821 fi
1822 rm -f conftest*
1823 LIBS="$ac_save_LIBS"
1824
1825 fi
1826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1827   echo "$ac_t""yes" 1>&6
1828   OGL_LIBS="${OGL_LIBS} -lGLU"
1829 else
1830   echo "$ac_t""no" 1>&6
1831 { echo "configure: error: GLU not found, OpenGL cannot be built" 1>&2; exit 1; }
1832        opengl=false
1833 fi
1834
1835   fi
1836   
1837   
1838
1839 if test x$opengl = xtrue; then
1840   USE_OPENGL_TRUE=
1841   USE_OPENGL_FALSE='#'
1842 else
1843   USE_OPENGL_TRUE='#'
1844   USE_OPENGL_FALSE=
1845 fi
1846
1847   # Check for GGI
1848   # Check whether --with-ggi or --without-ggi was given.
1849 if test "${with_ggi+set}" = set; then
1850   withval="$with_ggi"
1851   case "${withval}" in
1852       yes) ggi=true ;;
1853       no)  ggi=false ;;
1854       *)   { echo "configure: error: bad value ${withval} for --with-ggi" 1>&2; exit 1; } ;;
1855     esac
1856 else
1857   ggi=false
1858 fi
1859
1860
1861   if test x$ggi = xtrue; then
1862     echo $ac_n "checking for ggiInit in -lggi""... $ac_c" 1>&6
1863 echo "configure:1864: checking for ggiInit in -lggi" >&5
1864 ac_lib_var=`echo ggi'_'ggiInit | sed 'y%./+-%__p_%'`
1865 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1866   echo $ac_n "(cached) $ac_c" 1>&6
1867 else
1868   ac_save_LIBS="$LIBS"
1869 LIBS="-lggi  $LIBS"
1870 cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873 /* Override any gcc2 internal prototype to avoid an error.  */
1874 /* We use char because int might match the return type of a gcc2
1875     builtin and then its argument prototype would still apply.  */
1876 char ggiInit();
1877
1878 int main() {
1879 ggiInit()
1880 ; return 0; }
1881 EOF
1882 if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1883   rm -rf conftest*
1884   eval "ac_cv_lib_$ac_lib_var=yes"
1885 else
1886   echo "configure: failed program was:" >&5
1887   cat conftest.$ac_ext >&5
1888   rm -rf conftest*
1889   eval "ac_cv_lib_$ac_lib_var=no"
1890 fi
1891 rm -f conftest*
1892 LIBS="$ac_save_LIBS"
1893
1894 fi
1895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1896   echo "$ac_t""yes" 1>&6
1897   GGI_LIBS="-lggi"
1898 else
1899   echo "$ac_t""no" 1>&6
1900 { echo "configure: error: GGI not found, GGI version cannot be built" 1>&2; exit 1; }; ggi=false
1901 fi
1902
1903     echo $ac_n "checking for giiInit in -lgii""... $ac_c" 1>&6
1904 echo "configure:1905: checking for giiInit in -lgii" >&5
1905 ac_lib_var=`echo gii'_'giiInit | sed 'y%./+-%__p_%'`
1906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1907   echo $ac_n "(cached) $ac_c" 1>&6
1908 else
1909   ac_save_LIBS="$LIBS"
1910 LIBS="-lgii  $LIBS"
1911 cat > conftest.$ac_ext <<EOF
1912 #line 1913 "configure"
1913 #include "confdefs.h"
1914 /* Override any gcc2 internal prototype to avoid an error.  */
1915 /* We use char because int might match the return type of a gcc2
1916     builtin and then its argument prototype would still apply.  */
1917 char giiInit();
1918
1919 int main() {
1920 giiInit()
1921 ; return 0; }
1922 EOF
1923 if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1924   rm -rf conftest*
1925   eval "ac_cv_lib_$ac_lib_var=yes"
1926 else
1927   echo "configure: failed program was:" >&5
1928   cat conftest.$ac_ext >&5
1929   rm -rf conftest*
1930   eval "ac_cv_lib_$ac_lib_var=no"
1931 fi
1932 rm -f conftest*
1933 LIBS="$ac_save_LIBS"
1934
1935 fi
1936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1937   echo "$ac_t""yes" 1>&6
1938   GGI_LIBS="${GGI_LIBS} -lgii"
1939 else
1940   echo "$ac_t""no" 1>&6
1941 { echo "configure: error: GII not found, GGI version cannot be built" 1>&2; exit 1; }; ggi=false
1942 fi
1943
1944   fi
1945   
1946   
1947
1948 if test x$ggi = xtrue; then
1949   USE_GGI_TRUE=
1950   USE_GGI_FALSE='#'
1951 else
1952   USE_GGI_TRUE='#'
1953   USE_GGI_FALSE=
1954 fi
1955
1956   # Check for SVGALib
1957   # Check whether --with-svga or --without-svga was given.
1958 if test "${with_svga+set}" = set; then
1959   withval="$with_svga"
1960   case "${withval}" in
1961       yes) svga=true ;;
1962       no)  svga=false ;;
1963       *) { echo "configure: error: bad value ${withval} for --with-svga" 1>&2; exit 1; } ;;
1964     esac
1965 else
1966   svga=false
1967 fi
1968
1969
1970   if test x$svga = xtrue; then
1971     echo $ac_n "checking for vga_getmousetype in -lvga""... $ac_c" 1>&6
1972 echo "configure:1973: checking for vga_getmousetype in -lvga" >&5
1973 ac_lib_var=`echo vga'_'vga_getmousetype | sed 'y%./+-%__p_%'`
1974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1975   echo $ac_n "(cached) $ac_c" 1>&6
1976 else
1977   ac_save_LIBS="$LIBS"
1978 LIBS="-lvga  $LIBS"
1979 cat > conftest.$ac_ext <<EOF
1980 #line 1981 "configure"
1981 #include "confdefs.h"
1982 /* Override any gcc2 internal prototype to avoid an error.  */
1983 /* We use char because int might match the return type of a gcc2
1984     builtin and then its argument prototype would still apply.  */
1985 char vga_getmousetype();
1986
1987 int main() {
1988 vga_getmousetype()
1989 ; return 0; }
1990 EOF
1991 if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1992   rm -rf conftest*
1993   eval "ac_cv_lib_$ac_lib_var=yes"
1994 else
1995   echo "configure: failed program was:" >&5
1996   cat conftest.$ac_ext >&5
1997   rm -rf conftest*
1998   eval "ac_cv_lib_$ac_lib_var=no"
1999 fi
2000 rm -f conftest*
2001 LIBS="$ac_save_LIBS"
2002
2003 fi
2004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2005   echo "$ac_t""yes" 1>&6
2006   SVGA_LIBS="-lvga"
2007 else
2008   echo "$ac_t""no" 1>&6
2009 { echo "configure: error: vga not found, SVGALib cannot be built" 1>&2; exit 1; }
2010        svga=false
2011 fi
2012
2013     echo $ac_n "checking for gl_getcontext in -lvgagl""... $ac_c" 1>&6
2014 echo "configure:2015: checking for gl_getcontext in -lvgagl" >&5
2015 ac_lib_var=`echo vgagl'_'gl_getcontext | sed 'y%./+-%__p_%'`
2016 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2017   echo $ac_n "(cached) $ac_c" 1>&6
2018 else
2019   ac_save_LIBS="$LIBS"
2020 LIBS="-lvgagl -lvga $LIBS"
2021 cat > conftest.$ac_ext <<EOF
2022 #line 2023 "configure"
2023 #include "confdefs.h"
2024 /* Override any gcc2 internal prototype to avoid an error.  */
2025 /* We use char because int might match the return type of a gcc2
2026     builtin and then its argument prototype would still apply.  */
2027 char gl_getcontext();
2028
2029 int main() {
2030 gl_getcontext()
2031 ; return 0; }
2032 EOF
2033 if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2034   rm -rf conftest*
2035   eval "ac_cv_lib_$ac_lib_var=yes"
2036 else
2037   echo "configure: failed program was:" >&5
2038   cat conftest.$ac_ext >&5
2039   rm -rf conftest*
2040   eval "ac_cv_lib_$ac_lib_var=no"
2041 fi
2042 rm -f conftest*
2043 LIBS="$ac_save_LIBS"
2044
2045 fi
2046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2047   echo "$ac_t""yes" 1>&6
2048   SVGA_LIBS="${SVGA_LIBS} -lvgagl"
2049 else
2050   echo "$ac_t""no" 1>&6
2051 { echo "configure: error: vgagl not found, SVGALib cannot be built" 1>&2; exit 1; }
2052        svga=false
2053 fi
2054
2055   fi
2056   
2057   
2058
2059 if test x$svga = xtrue; then
2060   USE_SVGALIB_TRUE=
2061   USE_SVGALIB_FALSE='#'
2062 else
2063   USE_SVGALIB_TRUE='#'
2064   USE_SVGALIB_FALSE=
2065 fi
2066
2067   if test x$opengl = xtrue; then
2068     cat >> confdefs.h <<\EOF
2069 #define OGL 1
2070 EOF
2071
2072     CFLAGS="-I \$(top_srcdir)/input/ggi/include $CFLAGS"
2073   else
2074     if test x$svga = xtrue; then
2075       cat >> confdefs.h <<\EOF
2076 #define SVGA 1
2077 EOF
2078
2079       CFLAGS="-I \$(top_srcdir)/input/svgalib/include $CFLAGS"
2080     else
2081       if test x$ggi = xtrue; then
2082         cat >> confdefs.h <<\EOF
2083 #define GGI 1
2084 EOF
2085
2086         CFLAGS="-I \$(top_srcdir)/input/ggi/include $CFLAGS"
2087       else
2088         CFLAGS="-I \$(top_srcdir)/input/sdl/include $CFLAGS"
2089       fi
2090     fi
2091   fi
2092
2093   # Extract the first word of "nasm", so it can be a program name with args.
2094 set dummy nasm; ac_word=$2
2095 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2096 echo "configure:2097: checking for $ac_word" >&5
2097 if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
2098   echo $ac_n "(cached) $ac_c" 1>&6
2099 else
2100   case "$NASM" in
2101   /*)
2102   ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
2103   ;;
2104   ?:/*)                  
2105   ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
2106   ;;
2107   *)
2108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2109   ac_dummy="$PATH"
2110   for ac_dir in $ac_dummy; do 
2111     test -z "$ac_dir" && ac_dir=.
2112     if test -f $ac_dir/$ac_word; then
2113       ac_cv_path_NASM="$ac_dir/$ac_word"
2114       break
2115     fi
2116   done
2117   IFS="$ac_save_ifs"
2118   test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
2119   ;;
2120 esac
2121 fi
2122 NASM="$ac_cv_path_NASM"
2123 if test -n "$NASM"; then
2124   echo "$ac_t""$NASM" 1>&6
2125 else
2126   echo "$ac_t""no" 1>&6
2127 fi
2128
2129   CFLAGS="-I \$(top_srcdir)/input/linux/include -I \$(top_srcdir)/arch/linux/include $CFLAGS"
2130
2131 fi
2132
2133 # Check for NASM and network
2134 NO_ASM=0
2135 NO_NETWORK=0
2136 # Check whether --with-assembler or --without-assembler was given.
2137 if test "${with_assembler+set}" = set; then
2138   withval="$with_assembler"
2139   if test x$withval = xno; then
2140         NO_ASM=1
2141       fi
2142 fi
2143
2144 # Check whether --with-network or --without-network was given.
2145 if test "${with_network+set}" = set; then
2146   withval="$with_network"
2147   if test x$withval = xno; then
2148         NO_NETWORK=1
2149       fi
2150 fi
2151
2152       
2153 if test "$NASM" = "no"; then
2154         NO_ASM=1 
2155 fi
2156 if test "$NO_ASM" = 1; then
2157         cat >> confdefs.h <<\EOF
2158 #define NO_ASM 1
2159 EOF
2160
2161         NASMFLAGS=""
2162 else
2163         case $ARCH in
2164           win32)
2165               NASMFLAGS="-f win32"
2166               ;;
2167           *)
2168               if test "$OSTYPE" = "MSDOS"; then
2169                   NASMFLAGS="-f coff"
2170               else
2171                   NASMFLAGS="-f elf -d__ENV_LINUX__ -i\$(srcdir)/"
2172               fi
2173               ;;
2174         esac
2175 fi  
2176 if test "$NO_NETWORK" = 0; then
2177         cat >> confdefs.h <<\EOF
2178 #define NETWORK 1
2179 EOF
2180
2181 fi
2182
2183
2184 if test "$NO_ASM" != 1; then
2185   USE_ASM_TRUE=
2186   USE_ASM_FALSE='#'
2187 else
2188   USE_ASM_TRUE='#'
2189   USE_ASM_FALSE=
2190 fi
2191
2192
2193
2194
2195 if test "$program_transform_name" = s,x,x,; then
2196   program_transform_name=
2197 else
2198   # Double any \ or $.  echo might interpret backslashes.
2199   cat <<\EOF_SED > conftestsed
2200 s,\\,\\\\,g; s,\$,$$,g
2201 EOF_SED
2202   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2203   rm -f conftestsed
2204 fi
2205 test "$program_prefix" != NONE &&
2206   program_transform_name="s,^,${program_prefix},; $program_transform_name"
2207 # Use a double $ so make ignores it.
2208 test "$program_suffix" != NONE &&
2209   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2210
2211 # sed with no file args requires a program.
2212 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2213
2214
2215 #libdir='$(shell pwd)/${top_srcdir}/main'
2216 trap '' 1 2 15
2217 cat > confcache <<\EOF
2218 # This file is a shell script that caches the results of configure
2219 # tests run on this system so they can be shared between configure
2220 # scripts and configure runs.  It is not useful on other systems.
2221 # If it contains results you don't want to keep, you may remove or edit it.
2222 #
2223 # By default, configure uses ./config.cache as the cache file,
2224 # creating it if it does not exist already.  You can give configure
2225 # the --cache-file=FILE option to use a different cache file; that is
2226 # what configure does when it calls configure scripts in
2227 # subdirectories, so they share the cache.
2228 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2229 # config.status only pays attention to the cache file if you give it the
2230 # --recheck option to rerun configure.
2231 #
2232 EOF
2233 # The following way of writing the cache mishandles newlines in values,
2234 # but we know of no workaround that is simple, portable, and efficient.
2235 # So, don't put newlines in cache variables' values.
2236 # Ultrix sh set writes to stderr and can't be redirected directly,
2237 # and sets the high bit in the cache file unless we assign to the vars.
2238 (set) 2>&1 |
2239   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2240   *ac_space=\ *)
2241     # `set' does not quote correctly, so add quotes (double-quote substitution
2242     # turns \\\\ into \\, and sed turns \\ into \).
2243     sed -n \
2244       -e "s/'/'\\\\''/g" \
2245       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2246     ;;
2247   *)
2248     # `set' quotes correctly as required by POSIX, so do not add quotes.
2249     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2250     ;;
2251   esac >> confcache
2252 if cmp -s $cache_file confcache; then
2253   :
2254 else
2255   if test -w $cache_file; then
2256     echo "updating cache $cache_file"
2257     cat confcache > $cache_file
2258   else
2259     echo "not updating unwritable cache $cache_file"
2260   fi
2261 fi
2262 rm -f confcache
2263
2264 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2265
2266 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2267 # Let make expand exec_prefix.
2268 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2269
2270 # Any assignment to VPATH causes Sun make to only execute
2271 # the first set of double-colon rules, so remove it if not needed.
2272 # If there is a colon in the path, we need to keep it.
2273 if test "x$srcdir" = x.; then
2274   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2275 fi
2276
2277 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2278
2279 DEFS=-DHAVE_CONFIG_H
2280
2281 # Without the "./", some shells look in PATH for config.status.
2282 : ${CONFIG_STATUS=./config.status}
2283
2284 echo creating $CONFIG_STATUS
2285 rm -f $CONFIG_STATUS
2286 cat > $CONFIG_STATUS <<EOF
2287 #! /bin/sh
2288 # Generated automatically by configure.
2289 # Run this file to recreate the current configuration.
2290 # This directory was configured as follows,
2291 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2292 #
2293 # $0 $ac_configure_args
2294 #
2295 # Compiler output produced by configure, useful for debugging
2296 # configure, is in ./config.log if it exists.
2297
2298 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2299 for ac_option
2300 do
2301   case "\$ac_option" in
2302   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2303     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2304     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2305   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2306     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2307     exit 0 ;;
2308   -help | --help | --hel | --he | --h)
2309     echo "\$ac_cs_usage"; exit 0 ;;
2310   *) echo "\$ac_cs_usage"; exit 1 ;;
2311   esac
2312 done
2313
2314 ac_given_srcdir=$srcdir
2315 ac_given_INSTALL="$INSTALL"
2316
2317 trap 'rm -fr `echo "Makefile
2318 2d/Makefile
2319 3d/Makefile
2320 maths/Makefile
2321 mem/Makefile
2322 cfile/Makefile
2323 iff/Makefile
2324 texmap/Makefile
2325 misc/Makefile
2326 input/Makefile
2327 video/Makefile
2328 sound/Makefile
2329 arch/Makefile
2330 main/Makefile
2331  conf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2332 EOF
2333 cat >> $CONFIG_STATUS <<EOF
2334
2335 # Protect against being on the right side of a sed subst in config.status.
2336 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2337  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2338 $ac_vpsub
2339 $extrasub
2340 s%@SHELL@%$SHELL%g
2341 s%@CFLAGS@%$CFLAGS%g
2342 s%@CPPFLAGS@%$CPPFLAGS%g
2343 s%@CXXFLAGS@%$CXXFLAGS%g
2344 s%@FFLAGS@%$FFLAGS%g
2345 s%@DEFS@%$DEFS%g
2346 s%@LDFLAGS@%$LDFLAGS%g
2347 s%@LIBS@%$LIBS%g
2348 s%@exec_prefix@%$exec_prefix%g
2349 s%@prefix@%$prefix%g
2350 s%@program_transform_name@%$program_transform_name%g
2351 s%@bindir@%$bindir%g
2352 s%@sbindir@%$sbindir%g
2353 s%@libexecdir@%$libexecdir%g
2354 s%@datadir@%$datadir%g
2355 s%@sysconfdir@%$sysconfdir%g
2356 s%@sharedstatedir@%$sharedstatedir%g
2357 s%@localstatedir@%$localstatedir%g
2358 s%@libdir@%$libdir%g
2359 s%@includedir@%$includedir%g
2360 s%@oldincludedir@%$oldincludedir%g
2361 s%@infodir@%$infodir%g
2362 s%@mandir@%$mandir%g
2363 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2364 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2365 s%@INSTALL_DATA@%$INSTALL_DATA%g
2366 s%@PACKAGE@%$PACKAGE%g
2367 s%@VERSION@%$VERSION%g
2368 s%@ACLOCAL@%$ACLOCAL%g
2369 s%@AUTOCONF@%$AUTOCONF%g
2370 s%@AUTOMAKE@%$AUTOMAKE%g
2371 s%@AUTOHEADER@%$AUTOHEADER%g
2372 s%@MAKEINFO@%$MAKEINFO%g
2373 s%@SET_MAKE@%$SET_MAKE%g
2374 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2375 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2376 s%@MAINT@%$MAINT%g
2377 s%@CC@%$CC%g
2378 s%@RANLIB@%$RANLIB%g
2379 s%@CPP@%$CPP%g
2380 s%@ENV_DJGPP_TRUE@%$ENV_DJGPP_TRUE%g
2381 s%@ENV_DJGPP_FALSE@%$ENV_DJGPP_FALSE%g
2382 s%@NASM@%$NASM%g
2383 s%@ENV_LINUX_TRUE@%$ENV_LINUX_TRUE%g
2384 s%@ENV_LINUX_FALSE@%$ENV_LINUX_FALSE%g
2385 s%@SDL_LIBS@%$SDL_LIBS%g
2386 s%@OGL_LIBS@%$OGL_LIBS%g
2387 s%@USE_OPENGL_TRUE@%$USE_OPENGL_TRUE%g
2388 s%@USE_OPENGL_FALSE@%$USE_OPENGL_FALSE%g
2389 s%@GGI_LIBS@%$GGI_LIBS%g
2390 s%@USE_GGI_TRUE@%$USE_GGI_TRUE%g
2391 s%@USE_GGI_FALSE@%$USE_GGI_FALSE%g
2392 s%@SVGA_LIBS@%$SVGA_LIBS%g
2393 s%@USE_SVGALIB_TRUE@%$USE_SVGALIB_TRUE%g
2394 s%@USE_SVGALIB_FALSE@%$USE_SVGALIB_FALSE%g
2395 s%@USE_ASM_TRUE@%$USE_ASM_TRUE%g
2396 s%@USE_ASM_FALSE@%$USE_ASM_FALSE%g
2397 s%@NASMFLAGS@%$NASMFLAGS%g
2398
2399 CEOF
2400 EOF
2401
2402 cat >> $CONFIG_STATUS <<\EOF
2403
2404 # Split the substitutions into bite-sized pieces for seds with
2405 # small command number limits, like on Digital OSF/1 and HP-UX.
2406 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2407 ac_file=1 # Number of current file.
2408 ac_beg=1 # First line for current file.
2409 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2410 ac_more_lines=:
2411 ac_sed_cmds=""
2412 while $ac_more_lines; do
2413   if test $ac_beg -gt 1; then
2414     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2415   else
2416     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2417   fi
2418   if test ! -s conftest.s$ac_file; then
2419     ac_more_lines=false
2420     rm -f conftest.s$ac_file
2421   else
2422     if test -z "$ac_sed_cmds"; then
2423       ac_sed_cmds="sed -f conftest.s$ac_file"
2424     else
2425       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2426     fi
2427     ac_file=`expr $ac_file + 1`
2428     ac_beg=$ac_end
2429     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2430   fi
2431 done
2432 if test -z "$ac_sed_cmds"; then
2433   ac_sed_cmds=cat
2434 fi
2435 EOF
2436
2437 cat >> $CONFIG_STATUS <<EOF
2438
2439 CONFIG_FILES=\${CONFIG_FILES-"Makefile
2440 2d/Makefile
2441 3d/Makefile
2442 maths/Makefile
2443 mem/Makefile
2444 cfile/Makefile
2445 iff/Makefile
2446 texmap/Makefile
2447 misc/Makefile
2448 input/Makefile
2449 video/Makefile
2450 sound/Makefile
2451 arch/Makefile
2452 main/Makefile
2453 "}
2454 EOF
2455 cat >> $CONFIG_STATUS <<\EOF
2456 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2457   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2458   case "$ac_file" in
2459   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2460        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2461   *) ac_file_in="${ac_file}.in" ;;
2462   esac
2463
2464   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2465
2466   # Remove last slash and all that follows it.  Not all systems have dirname.
2467   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2468   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2469     # The file is in a subdirectory.
2470     test ! -d "$ac_dir" && mkdir "$ac_dir"
2471     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2472     # A "../" for each directory in $ac_dir_suffix.
2473     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2474   else
2475     ac_dir_suffix= ac_dots=
2476   fi
2477
2478   case "$ac_given_srcdir" in
2479   .)  srcdir=.
2480       if test -z "$ac_dots"; then top_srcdir=.
2481       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2482   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2483   *) # Relative path.
2484     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2485     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2486   esac
2487
2488   case "$ac_given_INSTALL" in
2489   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2490   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2491   esac
2492
2493   echo creating "$ac_file"
2494   rm -f "$ac_file"
2495   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2496   case "$ac_file" in
2497   *Makefile*) ac_comsub="1i\\
2498 # $configure_input" ;;
2499   *) ac_comsub= ;;
2500   esac
2501
2502   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2503   sed -e "$ac_comsub
2504 s%@configure_input@%$configure_input%g
2505 s%@srcdir@%$srcdir%g
2506 s%@top_srcdir@%$top_srcdir%g
2507 s%@INSTALL@%$INSTALL%g
2508 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2509 fi; done
2510 rm -f conftest.s*
2511
2512 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2513 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2514 #
2515 # ac_d sets the value in "#define NAME VALUE" lines.
2516 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2517 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2518 ac_dC='\3'
2519 ac_dD='%g'
2520 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2521 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2522 ac_uB='\([      ]\)%\1#\2define\3'
2523 ac_uC=' '
2524 ac_uD='\4%g'
2525 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2526 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2527 ac_eB='$%\1#\2define\3'
2528 ac_eC=' '
2529 ac_eD='%g'
2530
2531 if test "${CONFIG_HEADERS+set}" != set; then
2532 EOF
2533 cat >> $CONFIG_STATUS <<EOF
2534   CONFIG_HEADERS="conf.h"
2535 EOF
2536 cat >> $CONFIG_STATUS <<\EOF
2537 fi
2538 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2539   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2540   case "$ac_file" in
2541   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2542        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2543   *) ac_file_in="${ac_file}.in" ;;
2544   esac
2545
2546   echo creating $ac_file
2547
2548   rm -f conftest.frag conftest.in conftest.out
2549   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2550   cat $ac_file_inputs > conftest.in
2551
2552 EOF
2553
2554 # Transform confdefs.h into a sed script conftest.vals that substitutes
2555 # the proper values into config.h.in to produce config.h.  And first:
2556 # Protect against being on the right side of a sed subst in config.status.
2557 # Protect against being in an unquoted here document in config.status.
2558 rm -f conftest.vals
2559 cat > conftest.hdr <<\EOF
2560 s/[\\&%]/\\&/g
2561 s%[\\$`]%\\&%g
2562 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2563 s%ac_d%ac_u%gp
2564 s%ac_u%ac_e%gp
2565 EOF
2566 sed -n -f conftest.hdr confdefs.h > conftest.vals
2567 rm -f conftest.hdr
2568
2569 # This sed command replaces #undef with comments.  This is necessary, for
2570 # example, in the case of _POSIX_SOURCE, which is predefined and required
2571 # on some systems where configure will not decide to define it.
2572 cat >> conftest.vals <<\EOF
2573 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2574 EOF
2575
2576 # Break up conftest.vals because some shells have a limit on
2577 # the size of here documents, and old seds have small limits too.
2578
2579 rm -f conftest.tail
2580 while :
2581 do
2582   ac_lines=`grep -c . conftest.vals`
2583   # grep -c gives empty output for an empty file on some AIX systems.
2584   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2585   # Write a limited-size here document to conftest.frag.
2586   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2587   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2588   echo 'CEOF
2589   sed -f conftest.frag conftest.in > conftest.out
2590   rm -f conftest.in
2591   mv conftest.out conftest.in
2592 ' >> $CONFIG_STATUS
2593   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2594   rm -f conftest.vals
2595   mv conftest.tail conftest.vals
2596 done
2597 rm -f conftest.vals
2598
2599 cat >> $CONFIG_STATUS <<\EOF
2600   rm -f conftest.frag conftest.h
2601   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2602   cat conftest.in >> conftest.h
2603   rm -f conftest.in
2604   if cmp -s $ac_file conftest.h 2>/dev/null; then
2605     echo "$ac_file is unchanged"
2606     rm -f conftest.h
2607   else
2608     # Remove last slash and all that follows it.  Not all systems have dirname.
2609       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2610       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2611       # The file is in a subdirectory.
2612       test ! -d "$ac_dir" && mkdir "$ac_dir"
2613     fi
2614     rm -f $ac_file
2615     mv conftest.h $ac_file
2616   fi
2617 fi; done
2618
2619 EOF
2620 cat >> $CONFIG_STATUS <<EOF
2621
2622
2623 EOF
2624 cat >> $CONFIG_STATUS <<\EOF
2625 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2626
2627 exit 0
2628 EOF
2629 chmod +x $CONFIG_STATUS
2630 rm -fr confdefs* $ac_clean_files
2631 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2632
2633