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