]> icculus.org git repositories - btb/d2x.git/blob - configure
This commit was generated by cvs2svn to compensate for changes in r5,
[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
1559 # Test for DJGPP
1560 if test "$OSTYPE" = "MSDOS"; then
1561
1562   CFLAGS="-I \$(top_srcdir)/arch/dos/include $CFLAGS"
1563   
1564
1565 if test "$OSTYPE" = "MSDOS"; then
1566   ENV_DJGPP_TRUE=
1567   ENV_DJGPP_FALSE='#'
1568 else
1569   ENV_DJGPP_TRUE='#'
1570   ENV_DJGPP_FALSE=
1571 fi
1572   cat >> confdefs.h <<\EOF
1573 #define __ENV_DJGPP__ 1
1574 EOF
1575
1576   # Extract the first word of "nasmw", so it can be a program name with args.
1577 set dummy nasmw; ac_word=$2
1578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1579 echo "configure:1580: checking for $ac_word" >&5
1580 if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
1581   echo $ac_n "(cached) $ac_c" 1>&6
1582 else
1583   case "$NASM" in
1584   /*)
1585   ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
1586   ;;
1587   ?:/*)                  
1588   ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
1589   ;;
1590   *)
1591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1592   ac_dummy="$PATH"
1593   for ac_dir in $ac_dummy; do 
1594     test -z "$ac_dir" && ac_dir=.
1595     if test -f $ac_dir/$ac_word; then
1596       ac_cv_path_NASM="$ac_dir/$ac_word"
1597       break
1598     fi
1599   done
1600   IFS="$ac_save_ifs"
1601   test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
1602   ;;
1603 esac
1604 fi
1605 NASM="$ac_cv_path_NASM"
1606 if test -n "$NASM"; then
1607   echo "$ac_t""$NASM" 1>&6
1608 else
1609   echo "$ac_t""no" 1>&6
1610 fi
1611
1612
1613
1614 else
1615   CFLAGS="-D_REENTRANT -pipe $CFLAGS"
1616   
1617
1618 if test "$OSTYPE" != "MSDOS"; then
1619   ENV_LINUX_TRUE=
1620   ENV_LINUX_FALSE='#'
1621 else
1622   ENV_LINUX_TRUE='#'
1623   ENV_LINUX_FALSE=
1624 fi
1625   cat >> confdefs.h <<\EOF
1626 #define __ENV_LINUX__ 1
1627 EOF
1628
1629
1630
1631   echo $ac_n "checking for SDL_Init in -lSDL""... $ac_c" 1>&6
1632 echo "configure:1633: checking for SDL_Init in -lSDL" >&5
1633 ac_lib_var=`echo SDL'_'SDL_Init | sed 'y%./+-%__p_%'`
1634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1635   echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637   ac_save_LIBS="$LIBS"
1638 LIBS="-lSDL -ldl -lpthread $LIBS"
1639 cat > conftest.$ac_ext <<EOF
1640 #line 1641 "configure"
1641 #include "confdefs.h"
1642 /* Override any gcc2 internal prototype to avoid an error.  */
1643 /* We use char because int might match the return type of a gcc2
1644     builtin and then its argument prototype would still apply.  */
1645 char SDL_Init();
1646
1647 int main() {
1648 SDL_Init()
1649 ; return 0; }
1650 EOF
1651 if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1652   rm -rf conftest*
1653   eval "ac_cv_lib_$ac_lib_var=yes"
1654 else
1655   echo "configure: failed program was:" >&5
1656   cat conftest.$ac_ext >&5
1657   rm -rf conftest*
1658   eval "ac_cv_lib_$ac_lib_var=no"
1659 fi
1660 rm -f conftest*
1661 LIBS="$ac_save_LIBS"
1662
1663 fi
1664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1665   echo "$ac_t""yes" 1>&6
1666   SDL_LIBS="-lSDL"
1667 else
1668   echo "$ac_t""no" 1>&6
1669 { echo "configure: error: The SDL which is required not found." 1>&2; exit 1; }
1670 fi
1671
1672   for ac_hdr in netipx/ipx.h
1673 do
1674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1676 echo "configure:1677: checking for $ac_hdr" >&5
1677 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1678   echo $ac_n "(cached) $ac_c" 1>&6
1679 else
1680   cat > conftest.$ac_ext <<EOF
1681 #line 1682 "configure"
1682 #include "confdefs.h"
1683 #include <$ac_hdr>
1684 EOF
1685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1686 { (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1688 if test -z "$ac_err"; then
1689   rm -rf conftest*
1690   eval "ac_cv_header_$ac_safe=yes"
1691 else
1692   echo "$ac_err" >&5
1693   echo "configure: failed program was:" >&5
1694   cat conftest.$ac_ext >&5
1695   rm -rf conftest*
1696   eval "ac_cv_header_$ac_safe=no"
1697 fi
1698 rm -f conftest*
1699 fi
1700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1701   echo "$ac_t""yes" 1>&6
1702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1703   cat >> confdefs.h <<EOF
1704 #define $ac_tr_hdr 1
1705 EOF
1706  
1707 else
1708   echo "$ac_t""no" 1>&6
1709 fi
1710 done
1711
1712   
1713
1714   
1715   # Check for OpenGL
1716   # Check whether --with-opengl or --without-opengl was given.
1717 if test "${with_opengl+set}" = set; then
1718   withval="$with_opengl"
1719   case "${withval}" in
1720       yes) opengl=true ;;
1721       no)  opengl=false ;;
1722       *) { echo "configure: error: bad value ${withval} for --with-opengl" 1>&2; exit 1; } ;;
1723     esac
1724 else
1725   opengl=false
1726 fi
1727
1728   
1729   if test x$opengl = xtrue; then
1730     echo $ac_n "checking for main in -lMesaGL""... $ac_c" 1>&6
1731 echo "configure:1732: checking for main in -lMesaGL" >&5
1732 ac_lib_var=`echo MesaGL'_'main | sed 'y%./+-%__p_%'`
1733 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1734   echo $ac_n "(cached) $ac_c" 1>&6
1735 else
1736   ac_save_LIBS="$LIBS"
1737 LIBS="-lMesaGL -L/usr/X11R6/lib -lX11 -lXext -lm $LIBS"
1738 cat > conftest.$ac_ext <<EOF
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1741
1742 int main() {
1743 main()
1744 ; return 0; }
1745 EOF
1746 if { (eval echo configure:1747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1747   rm -rf conftest*
1748   eval "ac_cv_lib_$ac_lib_var=yes"
1749 else
1750   echo "configure: failed program was:" >&5
1751   cat conftest.$ac_ext >&5
1752   rm -rf conftest*
1753   eval "ac_cv_lib_$ac_lib_var=no"
1754 fi
1755 rm -f conftest*
1756 LIBS="$ac_save_LIBS"
1757
1758 fi
1759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1760   echo "$ac_t""yes" 1>&6
1761   OGL_LIBS="-lMesaGL"
1762 else
1763   echo "$ac_t""no" 1>&6
1764 { echo "configure: error: MesaGL not found" 1>&2; exit 1; }
1765        opengl=false
1766 fi
1767
1768     echo $ac_n "checking for main in -lMesaGLU""... $ac_c" 1>&6
1769 echo "configure:1770: checking for main in -lMesaGLU" >&5
1770 ac_lib_var=`echo MesaGLU'_'main | sed 'y%./+-%__p_%'`
1771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1772   echo $ac_n "(cached) $ac_c" 1>&6
1773 else
1774   ac_save_LIBS="$LIBS"
1775 LIBS="-lMesaGLU -lMesaGL -L/usr/X11R6/lib -lX11 -lXext -lm $LIBS"
1776 cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779
1780 int main() {
1781 main()
1782 ; return 0; }
1783 EOF
1784 if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1785   rm -rf conftest*
1786   eval "ac_cv_lib_$ac_lib_var=yes"
1787 else
1788   echo "configure: failed program was:" >&5
1789   cat conftest.$ac_ext >&5
1790   rm -rf conftest*
1791   eval "ac_cv_lib_$ac_lib_var=no"
1792 fi
1793 rm -f conftest*
1794 LIBS="$ac_save_LIBS"
1795
1796 fi
1797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1798   echo "$ac_t""yes" 1>&6
1799   OGL_LIBS="${OGL_LIBS} -lMesaGLU"
1800 else
1801   echo "$ac_t""no" 1>&6
1802 { echo "configure: error: MesaGLU not found" 1>&2; exit 1; }
1803        opengl=false
1804 fi
1805
1806   fi
1807
1808   if test x$opengl = xtrue; then
1809     cat >> confdefs.h <<\EOF
1810 #define OGL 1
1811 EOF
1812
1813     CFLAGS="-I \$(top_srcdir)/input/ggi/include $CFLAGS"
1814   else
1815     CFLAGS="-I \$(top_srcdir)/input/sdl/include $CFLAGS"
1816   fi
1817   
1818
1819 if test x$opengl = xtrue; then
1820   USE_OPENGL_TRUE=
1821   USE_OPENGL_FALSE='#'
1822 else
1823   USE_OPENGL_TRUE='#'
1824   USE_OPENGL_FALSE=
1825 fi
1826
1827   # Extract the first word of "nasm", so it can be a program name with args.
1828 set dummy nasm; ac_word=$2
1829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1830 echo "configure:1831: checking for $ac_word" >&5
1831 if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
1832   echo $ac_n "(cached) $ac_c" 1>&6
1833 else
1834   case "$NASM" in
1835   /*)
1836   ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
1837   ;;
1838   ?:/*)                  
1839   ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
1840   ;;
1841   *)
1842   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1843   ac_dummy="$PATH"
1844   for ac_dir in $ac_dummy; do 
1845     test -z "$ac_dir" && ac_dir=.
1846     if test -f $ac_dir/$ac_word; then
1847       ac_cv_path_NASM="$ac_dir/$ac_word"
1848       break
1849     fi
1850   done
1851   IFS="$ac_save_ifs"
1852   test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
1853   ;;
1854 esac
1855 fi
1856 NASM="$ac_cv_path_NASM"
1857 if test -n "$NASM"; then
1858   echo "$ac_t""$NASM" 1>&6
1859 else
1860   echo "$ac_t""no" 1>&6
1861 fi
1862
1863   CFLAGS="-I \$(top_srcdir)/input/linux/include -I \$(top_srcdir)/arch/linux/include $CFLAGS"
1864
1865 fi
1866
1867 # Check for NASM and network
1868 NO_ASM=0
1869 NO_NETWORK=0
1870 # Check whether --with-assembler or --without-assembler was given.
1871 if test "${with_assembler+set}" = set; then
1872   withval="$with_assembler"
1873   if test x$withval = xno; then
1874         NO_ASM=1
1875       fi
1876 fi
1877
1878 # Check whether --with-network or --without-network was given.
1879 if test "${with_network+set}" = set; then
1880   withval="$with_network"
1881   if test x$withval = xno; then
1882         NO_NETWORK=1
1883       fi
1884 fi
1885
1886       
1887 if test "$NASM" = "no"; then
1888         NO_ASM=1 
1889 fi
1890 if test "$NO_ASM" = 1; then
1891         cat >> confdefs.h <<\EOF
1892 #define NO_ASM 1
1893 EOF
1894
1895         NASMFLAGS=""
1896 else
1897         case $ARCH in
1898           win32)
1899               NASMFLAGS="-f win32"
1900               ;;
1901           *)
1902               if test "$OSTYPE" = "MSDOS"; then
1903                   NASMFLAGS="-f coff"
1904               else
1905                   NASMFLAGS="-f elf -d__ENV_LINUX__"
1906               fi
1907               ;;
1908         esac
1909 fi  
1910 if test "$NO_NETWORK" = 0; then
1911         cat >> confdefs.h <<\EOF
1912 #define NETWORK 1
1913 EOF
1914
1915 fi
1916
1917
1918 if test "$NO_ASM" != 1; then
1919   USE_ASM_TRUE=
1920   USE_ASM_FALSE='#'
1921 else
1922   USE_ASM_TRUE='#'
1923   USE_ASM_FALSE=
1924 fi
1925
1926
1927
1928
1929 if test "$program_transform_name" = s,x,x,; then
1930   program_transform_name=
1931 else
1932   # Double any \ or $.  echo might interpret backslashes.
1933   cat <<\EOF_SED > conftestsed
1934 s,\\,\\\\,g; s,\$,$$,g
1935 EOF_SED
1936   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1937   rm -f conftestsed
1938 fi
1939 test "$program_prefix" != NONE &&
1940   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1941 # Use a double $ so make ignores it.
1942 test "$program_suffix" != NONE &&
1943   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1944
1945 # sed with no file args requires a program.
1946 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1947
1948
1949 #libdir='$(shell pwd)/${top_srcdir}/main'
1950 trap '' 1 2 15
1951 cat > confcache <<\EOF
1952 # This file is a shell script that caches the results of configure
1953 # tests run on this system so they can be shared between configure
1954 # scripts and configure runs.  It is not useful on other systems.
1955 # If it contains results you don't want to keep, you may remove or edit it.
1956 #
1957 # By default, configure uses ./config.cache as the cache file,
1958 # creating it if it does not exist already.  You can give configure
1959 # the --cache-file=FILE option to use a different cache file; that is
1960 # what configure does when it calls configure scripts in
1961 # subdirectories, so they share the cache.
1962 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1963 # config.status only pays attention to the cache file if you give it the
1964 # --recheck option to rerun configure.
1965 #
1966 EOF
1967 # The following way of writing the cache mishandles newlines in values,
1968 # but we know of no workaround that is simple, portable, and efficient.
1969 # So, don't put newlines in cache variables' values.
1970 # Ultrix sh set writes to stderr and can't be redirected directly,
1971 # and sets the high bit in the cache file unless we assign to the vars.
1972 (set) 2>&1 |
1973   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1974   *ac_space=\ *)
1975     # `set' does not quote correctly, so add quotes (double-quote substitution
1976     # turns \\\\ into \\, and sed turns \\ into \).
1977     sed -n \
1978       -e "s/'/'\\\\''/g" \
1979       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1980     ;;
1981   *)
1982     # `set' quotes correctly as required by POSIX, so do not add quotes.
1983     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1984     ;;
1985   esac >> confcache
1986 if cmp -s $cache_file confcache; then
1987   :
1988 else
1989   if test -w $cache_file; then
1990     echo "updating cache $cache_file"
1991     cat confcache > $cache_file
1992   else
1993     echo "not updating unwritable cache $cache_file"
1994   fi
1995 fi
1996 rm -f confcache
1997
1998 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1999
2000 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2001 # Let make expand exec_prefix.
2002 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2003
2004 # Any assignment to VPATH causes Sun make to only execute
2005 # the first set of double-colon rules, so remove it if not needed.
2006 # If there is a colon in the path, we need to keep it.
2007 if test "x$srcdir" = x.; then
2008   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2009 fi
2010
2011 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2012
2013 DEFS=-DHAVE_CONFIG_H
2014
2015 # Without the "./", some shells look in PATH for config.status.
2016 : ${CONFIG_STATUS=./config.status}
2017
2018 echo creating $CONFIG_STATUS
2019 rm -f $CONFIG_STATUS
2020 cat > $CONFIG_STATUS <<EOF
2021 #! /bin/sh
2022 # Generated automatically by configure.
2023 # Run this file to recreate the current configuration.
2024 # This directory was configured as follows,
2025 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2026 #
2027 # $0 $ac_configure_args
2028 #
2029 # Compiler output produced by configure, useful for debugging
2030 # configure, is in ./config.log if it exists.
2031
2032 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2033 for ac_option
2034 do
2035   case "\$ac_option" in
2036   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2037     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2038     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2039   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2040     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2041     exit 0 ;;
2042   -help | --help | --hel | --he | --h)
2043     echo "\$ac_cs_usage"; exit 0 ;;
2044   *) echo "\$ac_cs_usage"; exit 1 ;;
2045   esac
2046 done
2047
2048 ac_given_srcdir=$srcdir
2049 ac_given_INSTALL="$INSTALL"
2050
2051 trap 'rm -fr `echo "Makefile
2052 2d/Makefile
2053 3d/Makefile
2054 maths/Makefile
2055 mem/Makefile
2056 cfile/Makefile
2057 iff/Makefile
2058 texmap/Makefile
2059 misc/Makefile
2060 input/Makefile
2061 video/Makefile
2062 sound/Makefile
2063 arch/Makefile
2064 main/Makefile
2065  conf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2066 EOF
2067 cat >> $CONFIG_STATUS <<EOF
2068
2069 # Protect against being on the right side of a sed subst in config.status.
2070 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2071  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2072 $ac_vpsub
2073 $extrasub
2074 s%@SHELL@%$SHELL%g
2075 s%@CFLAGS@%$CFLAGS%g
2076 s%@CPPFLAGS@%$CPPFLAGS%g
2077 s%@CXXFLAGS@%$CXXFLAGS%g
2078 s%@FFLAGS@%$FFLAGS%g
2079 s%@DEFS@%$DEFS%g
2080 s%@LDFLAGS@%$LDFLAGS%g
2081 s%@LIBS@%$LIBS%g
2082 s%@exec_prefix@%$exec_prefix%g
2083 s%@prefix@%$prefix%g
2084 s%@program_transform_name@%$program_transform_name%g
2085 s%@bindir@%$bindir%g
2086 s%@sbindir@%$sbindir%g
2087 s%@libexecdir@%$libexecdir%g
2088 s%@datadir@%$datadir%g
2089 s%@sysconfdir@%$sysconfdir%g
2090 s%@sharedstatedir@%$sharedstatedir%g
2091 s%@localstatedir@%$localstatedir%g
2092 s%@libdir@%$libdir%g
2093 s%@includedir@%$includedir%g
2094 s%@oldincludedir@%$oldincludedir%g
2095 s%@infodir@%$infodir%g
2096 s%@mandir@%$mandir%g
2097 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2098 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2099 s%@INSTALL_DATA@%$INSTALL_DATA%g
2100 s%@PACKAGE@%$PACKAGE%g
2101 s%@VERSION@%$VERSION%g
2102 s%@ACLOCAL@%$ACLOCAL%g
2103 s%@AUTOCONF@%$AUTOCONF%g
2104 s%@AUTOMAKE@%$AUTOMAKE%g
2105 s%@AUTOHEADER@%$AUTOHEADER%g
2106 s%@MAKEINFO@%$MAKEINFO%g
2107 s%@SET_MAKE@%$SET_MAKE%g
2108 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2109 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2110 s%@MAINT@%$MAINT%g
2111 s%@CC@%$CC%g
2112 s%@RANLIB@%$RANLIB%g
2113 s%@CPP@%$CPP%g
2114 s%@ENV_DJGPP_TRUE@%$ENV_DJGPP_TRUE%g
2115 s%@ENV_DJGPP_FALSE@%$ENV_DJGPP_FALSE%g
2116 s%@NASM@%$NASM%g
2117 s%@ENV_LINUX_TRUE@%$ENV_LINUX_TRUE%g
2118 s%@ENV_LINUX_FALSE@%$ENV_LINUX_FALSE%g
2119 s%@SDL_LIBS@%$SDL_LIBS%g
2120 s%@USE_OPENGL_TRUE@%$USE_OPENGL_TRUE%g
2121 s%@USE_OPENGL_FALSE@%$USE_OPENGL_FALSE%g
2122 s%@USE_ASM_TRUE@%$USE_ASM_TRUE%g
2123 s%@USE_ASM_FALSE@%$USE_ASM_FALSE%g
2124 s%@NASMFLAGS@%$NASMFLAGS%g
2125
2126 CEOF
2127 EOF
2128
2129 cat >> $CONFIG_STATUS <<\EOF
2130
2131 # Split the substitutions into bite-sized pieces for seds with
2132 # small command number limits, like on Digital OSF/1 and HP-UX.
2133 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2134 ac_file=1 # Number of current file.
2135 ac_beg=1 # First line for current file.
2136 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2137 ac_more_lines=:
2138 ac_sed_cmds=""
2139 while $ac_more_lines; do
2140   if test $ac_beg -gt 1; then
2141     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2142   else
2143     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2144   fi
2145   if test ! -s conftest.s$ac_file; then
2146     ac_more_lines=false
2147     rm -f conftest.s$ac_file
2148   else
2149     if test -z "$ac_sed_cmds"; then
2150       ac_sed_cmds="sed -f conftest.s$ac_file"
2151     else
2152       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2153     fi
2154     ac_file=`expr $ac_file + 1`
2155     ac_beg=$ac_end
2156     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2157   fi
2158 done
2159 if test -z "$ac_sed_cmds"; then
2160   ac_sed_cmds=cat
2161 fi
2162 EOF
2163
2164 cat >> $CONFIG_STATUS <<EOF
2165
2166 CONFIG_FILES=\${CONFIG_FILES-"Makefile
2167 2d/Makefile
2168 3d/Makefile
2169 maths/Makefile
2170 mem/Makefile
2171 cfile/Makefile
2172 iff/Makefile
2173 texmap/Makefile
2174 misc/Makefile
2175 input/Makefile
2176 video/Makefile
2177 sound/Makefile
2178 arch/Makefile
2179 main/Makefile
2180 "}
2181 EOF
2182 cat >> $CONFIG_STATUS <<\EOF
2183 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2184   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2185   case "$ac_file" in
2186   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2187        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2188   *) ac_file_in="${ac_file}.in" ;;
2189   esac
2190
2191   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2192
2193   # Remove last slash and all that follows it.  Not all systems have dirname.
2194   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2195   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2196     # The file is in a subdirectory.
2197     test ! -d "$ac_dir" && mkdir "$ac_dir"
2198     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2199     # A "../" for each directory in $ac_dir_suffix.
2200     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2201   else
2202     ac_dir_suffix= ac_dots=
2203   fi
2204
2205   case "$ac_given_srcdir" in
2206   .)  srcdir=.
2207       if test -z "$ac_dots"; then top_srcdir=.
2208       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2209   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2210   *) # Relative path.
2211     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2212     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2213   esac
2214
2215   case "$ac_given_INSTALL" in
2216   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2217   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2218   esac
2219
2220   echo creating "$ac_file"
2221   rm -f "$ac_file"
2222   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2223   case "$ac_file" in
2224   *Makefile*) ac_comsub="1i\\
2225 # $configure_input" ;;
2226   *) ac_comsub= ;;
2227   esac
2228
2229   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2230   sed -e "$ac_comsub
2231 s%@configure_input@%$configure_input%g
2232 s%@srcdir@%$srcdir%g
2233 s%@top_srcdir@%$top_srcdir%g
2234 s%@INSTALL@%$INSTALL%g
2235 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2236 fi; done
2237 rm -f conftest.s*
2238
2239 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2240 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2241 #
2242 # ac_d sets the value in "#define NAME VALUE" lines.
2243 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2244 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2245 ac_dC='\3'
2246 ac_dD='%g'
2247 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2248 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2249 ac_uB='\([      ]\)%\1#\2define\3'
2250 ac_uC=' '
2251 ac_uD='\4%g'
2252 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2253 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2254 ac_eB='$%\1#\2define\3'
2255 ac_eC=' '
2256 ac_eD='%g'
2257
2258 if test "${CONFIG_HEADERS+set}" != set; then
2259 EOF
2260 cat >> $CONFIG_STATUS <<EOF
2261   CONFIG_HEADERS="conf.h"
2262 EOF
2263 cat >> $CONFIG_STATUS <<\EOF
2264 fi
2265 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2266   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2267   case "$ac_file" in
2268   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2269        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2270   *) ac_file_in="${ac_file}.in" ;;
2271   esac
2272
2273   echo creating $ac_file
2274
2275   rm -f conftest.frag conftest.in conftest.out
2276   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2277   cat $ac_file_inputs > conftest.in
2278
2279 EOF
2280
2281 # Transform confdefs.h into a sed script conftest.vals that substitutes
2282 # the proper values into config.h.in to produce config.h.  And first:
2283 # Protect against being on the right side of a sed subst in config.status.
2284 # Protect against being in an unquoted here document in config.status.
2285 rm -f conftest.vals
2286 cat > conftest.hdr <<\EOF
2287 s/[\\&%]/\\&/g
2288 s%[\\$`]%\\&%g
2289 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2290 s%ac_d%ac_u%gp
2291 s%ac_u%ac_e%gp
2292 EOF
2293 sed -n -f conftest.hdr confdefs.h > conftest.vals
2294 rm -f conftest.hdr
2295
2296 # This sed command replaces #undef with comments.  This is necessary, for
2297 # example, in the case of _POSIX_SOURCE, which is predefined and required
2298 # on some systems where configure will not decide to define it.
2299 cat >> conftest.vals <<\EOF
2300 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2301 EOF
2302
2303 # Break up conftest.vals because some shells have a limit on
2304 # the size of here documents, and old seds have small limits too.
2305
2306 rm -f conftest.tail
2307 while :
2308 do
2309   ac_lines=`grep -c . conftest.vals`
2310   # grep -c gives empty output for an empty file on some AIX systems.
2311   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2312   # Write a limited-size here document to conftest.frag.
2313   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2314   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2315   echo 'CEOF
2316   sed -f conftest.frag conftest.in > conftest.out
2317   rm -f conftest.in
2318   mv conftest.out conftest.in
2319 ' >> $CONFIG_STATUS
2320   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2321   rm -f conftest.vals
2322   mv conftest.tail conftest.vals
2323 done
2324 rm -f conftest.vals
2325
2326 cat >> $CONFIG_STATUS <<\EOF
2327   rm -f conftest.frag conftest.h
2328   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2329   cat conftest.in >> conftest.h
2330   rm -f conftest.in
2331   if cmp -s $ac_file conftest.h 2>/dev/null; then
2332     echo "$ac_file is unchanged"
2333     rm -f conftest.h
2334   else
2335     # Remove last slash and all that follows it.  Not all systems have dirname.
2336       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2337       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2338       # The file is in a subdirectory.
2339       test ! -d "$ac_dir" && mkdir "$ac_dir"
2340     fi
2341     rm -f $ac_file
2342     mv conftest.h $ac_file
2343   fi
2344 fi; done
2345
2346 EOF
2347 cat >> $CONFIG_STATUS <<EOF
2348
2349
2350 EOF
2351 cat >> $CONFIG_STATUS <<\EOF
2352 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2353
2354 exit 0
2355 EOF
2356 chmod +x $CONFIG_STATUS
2357 rm -fr confdefs* $ac_clean_files
2358 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2359
2360