]> git.mxchange.org Git - simgear.git/blob - configure
Removed autogen'd files.
[simgear.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
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   --with-logging          Include logging output (default)"
16 ac_help="$ac_help
17   --with-efence           Specify if we are building with "electric-fence""
18 ac_help="$ac_help
19   --with-x                use the X Window System"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 # Maximum number of lines to put in a shell here document.
59 ac_max_here_lines=12
60
61 ac_prev=
62 for ac_option
63 do
64
65   # If the previous option needs an argument, assign it.
66   if test -n "$ac_prev"; then
67     eval "$ac_prev=\$ac_option"
68     ac_prev=
69     continue
70   fi
71
72   case "$ac_option" in
73   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
74   *) ac_optarg= ;;
75   esac
76
77   # Accept the important Cygnus configure options, so we can diagnose typos.
78
79   case "$ac_option" in
80
81   -bindir | --bindir | --bindi | --bind | --bin | --bi)
82     ac_prev=bindir ;;
83   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84     bindir="$ac_optarg" ;;
85
86   -build | --build | --buil | --bui | --bu)
87     ac_prev=build ;;
88   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
89     build="$ac_optarg" ;;
90
91   -cache-file | --cache-file | --cache-fil | --cache-fi \
92   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93     ac_prev=cache_file ;;
94   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96     cache_file="$ac_optarg" ;;
97
98   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99     ac_prev=datadir ;;
100   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101   | --da=*)
102     datadir="$ac_optarg" ;;
103
104   -disable-* | --disable-*)
105     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106     # Reject names that are not valid shell variable names.
107     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109     fi
110     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111     eval "enable_${ac_feature}=no" ;;
112
113   -enable-* | --enable-*)
114     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115     # Reject names that are not valid shell variable names.
116     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118     fi
119     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120     case "$ac_option" in
121       *=*) ;;
122       *) ac_optarg=yes ;;
123     esac
124     eval "enable_${ac_feature}='$ac_optarg'" ;;
125
126   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128   | --exec | --exe | --ex)
129     ac_prev=exec_prefix ;;
130   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132   | --exec=* | --exe=* | --ex=*)
133     exec_prefix="$ac_optarg" ;;
134
135   -gas | --gas | --ga | --g)
136     # Obsolete; use --with-gas.
137     with_gas=yes ;;
138
139   -help | --help | --hel | --he)
140     # Omit some internal or obsolete options to make the list less imposing.
141     # This message is too long to be a string in the A/UX 3.1 sh.
142     cat << EOF
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
145 Configuration:
146   --cache-file=FILE       cache test results in FILE
147   --help                  print this message
148   --no-create             do not create output files
149   --quiet, --silent       do not print \`checking...' messages
150   --version               print the version of autoconf that created configure
151 Directory and file names:
152   --prefix=PREFIX         install architecture-independent files in PREFIX
153                           [$ac_default_prefix]
154   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
155                           [same as prefix]
156   --bindir=DIR            user executables in DIR [EPREFIX/bin]
157   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
158   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
159   --datadir=DIR           read-only architecture-independent data in DIR
160                           [PREFIX/share]
161   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
162   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
163                           [PREFIX/com]
164   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
165   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
166   --includedir=DIR        C header files in DIR [PREFIX/include]
167   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
168   --infodir=DIR           info documentation in DIR [PREFIX/info]
169   --mandir=DIR            man documentation in DIR [PREFIX/man]
170   --srcdir=DIR            find the sources in DIR [configure dir or ..]
171   --program-prefix=PREFIX prepend PREFIX to installed program names
172   --program-suffix=SUFFIX append SUFFIX to installed program names
173   --program-transform-name=PROGRAM
174                           run sed PROGRAM on installed program names
175 EOF
176     cat << EOF
177 Host type:
178   --build=BUILD           configure for building on BUILD [BUILD=HOST]
179   --host=HOST             configure for HOST [guessed]
180   --target=TARGET         configure for TARGET [TARGET=HOST]
181 Features and packages:
182   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
183   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
184   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
185   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
186   --x-includes=DIR        X include files are in DIR
187   --x-libraries=DIR       X library files are in DIR
188 EOF
189     if test -n "$ac_help"; then
190       echo "--enable and --with options recognized:$ac_help"
191     fi
192     exit 0 ;;
193
194   -host | --host | --hos | --ho)
195     ac_prev=host ;;
196   -host=* | --host=* | --hos=* | --ho=*)
197     host="$ac_optarg" ;;
198
199   -includedir | --includedir | --includedi | --included | --include \
200   | --includ | --inclu | --incl | --inc)
201     ac_prev=includedir ;;
202   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203   | --includ=* | --inclu=* | --incl=* | --inc=*)
204     includedir="$ac_optarg" ;;
205
206   -infodir | --infodir | --infodi | --infod | --info | --inf)
207     ac_prev=infodir ;;
208   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209     infodir="$ac_optarg" ;;
210
211   -libdir | --libdir | --libdi | --libd)
212     ac_prev=libdir ;;
213   -libdir=* | --libdir=* | --libdi=* | --libd=*)
214     libdir="$ac_optarg" ;;
215
216   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217   | --libexe | --libex | --libe)
218     ac_prev=libexecdir ;;
219   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220   | --libexe=* | --libex=* | --libe=*)
221     libexecdir="$ac_optarg" ;;
222
223   -localstatedir | --localstatedir | --localstatedi | --localstated \
224   | --localstate | --localstat | --localsta | --localst \
225   | --locals | --local | --loca | --loc | --lo)
226     ac_prev=localstatedir ;;
227   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230     localstatedir="$ac_optarg" ;;
231
232   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233     ac_prev=mandir ;;
234   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235     mandir="$ac_optarg" ;;
236
237   -nfp | --nfp | --nf)
238     # Obsolete; use --without-fp.
239     with_fp=no ;;
240
241   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
242   | --no-cr | --no-c)
243     no_create=yes ;;
244
245   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
247     no_recursion=yes ;;
248
249   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251   | --oldin | --oldi | --old | --ol | --o)
252     ac_prev=oldincludedir ;;
253   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256     oldincludedir="$ac_optarg" ;;
257
258   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259     ac_prev=prefix ;;
260   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261     prefix="$ac_optarg" ;;
262
263   -program-prefix | --program-prefix | --program-prefi | --program-pref \
264   | --program-pre | --program-pr | --program-p)
265     ac_prev=program_prefix ;;
266   -program-prefix=* | --program-prefix=* | --program-prefi=* \
267   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268     program_prefix="$ac_optarg" ;;
269
270   -program-suffix | --program-suffix | --program-suffi | --program-suff \
271   | --program-suf | --program-su | --program-s)
272     ac_prev=program_suffix ;;
273   -program-suffix=* | --program-suffix=* | --program-suffi=* \
274   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275     program_suffix="$ac_optarg" ;;
276
277   -program-transform-name | --program-transform-name \
278   | --program-transform-nam | --program-transform-na \
279   | --program-transform-n | --program-transform- \
280   | --program-transform | --program-transfor \
281   | --program-transfo | --program-transf \
282   | --program-trans | --program-tran \
283   | --progr-tra | --program-tr | --program-t)
284     ac_prev=program_transform_name ;;
285   -program-transform-name=* | --program-transform-name=* \
286   | --program-transform-nam=* | --program-transform-na=* \
287   | --program-transform-n=* | --program-transform-=* \
288   | --program-transform=* | --program-transfor=* \
289   | --program-transfo=* | --program-transf=* \
290   | --program-trans=* | --program-tran=* \
291   | --progr-tra=* | --program-tr=* | --program-t=*)
292     program_transform_name="$ac_optarg" ;;
293
294   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295   | -silent | --silent | --silen | --sile | --sil)
296     silent=yes ;;
297
298   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299     ac_prev=sbindir ;;
300   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301   | --sbi=* | --sb=*)
302     sbindir="$ac_optarg" ;;
303
304   -sharedstatedir | --sharedstatedir | --sharedstatedi \
305   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306   | --sharedst | --shareds | --shared | --share | --shar \
307   | --sha | --sh)
308     ac_prev=sharedstatedir ;;
309   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312   | --sha=* | --sh=*)
313     sharedstatedir="$ac_optarg" ;;
314
315   -site | --site | --sit)
316     ac_prev=site ;;
317   -site=* | --site=* | --sit=*)
318     site="$ac_optarg" ;;
319
320   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321     ac_prev=srcdir ;;
322   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323     srcdir="$ac_optarg" ;;
324
325   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326   | --syscon | --sysco | --sysc | --sys | --sy)
327     ac_prev=sysconfdir ;;
328   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330     sysconfdir="$ac_optarg" ;;
331
332   -target | --target | --targe | --targ | --tar | --ta | --t)
333     ac_prev=target ;;
334   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335     target="$ac_optarg" ;;
336
337   -v | -verbose | --verbose | --verbos | --verbo | --verb)
338     verbose=yes ;;
339
340   -version | --version | --versio | --versi | --vers)
341     echo "configure generated by autoconf version 2.12"
342     exit 0 ;;
343
344   -with-* | --with-*)
345     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346     # Reject names that are not valid shell variable names.
347     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349     fi
350     ac_package=`echo $ac_package| sed 's/-/_/g'`
351     case "$ac_option" in
352       *=*) ;;
353       *) ac_optarg=yes ;;
354     esac
355     eval "with_${ac_package}='$ac_optarg'" ;;
356
357   -without-* | --without-*)
358     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359     # Reject names that are not valid shell variable names.
360     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362     fi
363     ac_package=`echo $ac_package| sed 's/-/_/g'`
364     eval "with_${ac_package}=no" ;;
365
366   --x)
367     # Obsolete; use --with-x.
368     with_x=yes ;;
369
370   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371   | --x-incl | --x-inc | --x-in | --x-i)
372     ac_prev=x_includes ;;
373   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375     x_includes="$ac_optarg" ;;
376
377   -x-libraries | --x-libraries | --x-librarie | --x-librari \
378   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379     ac_prev=x_libraries ;;
380   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382     x_libraries="$ac_optarg" ;;
383
384   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
385     ;;
386
387   *)
388     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389       echo "configure: warning: $ac_option: invalid host type" 1>&2
390     fi
391     if test "x$nonopt" != xNONE; then
392       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
393     fi
394     nonopt="$ac_option"
395     ;;
396
397   esac
398 done
399
400 if test -n "$ac_prev"; then
401   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402 fi
403
404 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405
406 # File descriptor usage:
407 # 0 standard input
408 # 1 file creation
409 # 2 errors and warnings
410 # 3 some systems may open it to /dev/tty
411 # 4 used on the Kubota Titan
412 # 6 checking for... messages and results
413 # 5 compiler messages saved in config.log
414 if test "$silent" = yes; then
415   exec 6>/dev/null
416 else
417   exec 6>&1
418 fi
419 exec 5>./config.log
420
421 echo "\
422 This file contains any messages produced by compilers while
423 running configure, to aid debugging if configure makes a mistake.
424 " 1>&5
425
426 # Strip out --no-create and --no-recursion so they do not pile up.
427 # Also quote any args containing shell metacharacters.
428 ac_configure_args=
429 for ac_arg
430 do
431   case "$ac_arg" in
432   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433   | --no-cr | --no-c) ;;
434   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
439   esac
440 done
441
442 # NLS nuisances.
443 # Only set these to C if already set.  These must not be set unconditionally
444 # because not all systems understand e.g. LANG=C (notably SCO).
445 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
446 # Non-C LC_CTYPE values break the ctype check.
447 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
448 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
451
452 # confdefs.h avoids OS command line length limits that DEFS can exceed.
453 rm -rf conftest* confdefs.h
454 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
455 echo > confdefs.h
456
457 # A filename unique to this package, relative to the directory that
458 # configure is in, which we can look for to find out if srcdir is correct.
459 ac_unique_file=bucket/newbucket.cxx
460
461 # Find the source files, if location was not specified.
462 if test -z "$srcdir"; then
463   ac_srcdir_defaulted=yes
464   # Try the directory containing this script, then its parent.
465   ac_prog=$0
466   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
467   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468   srcdir=$ac_confdir
469   if test ! -r $srcdir/$ac_unique_file; then
470     srcdir=..
471   fi
472 else
473   ac_srcdir_defaulted=no
474 fi
475 if test ! -r $srcdir/$ac_unique_file; then
476   if test "$ac_srcdir_defaulted" = yes; then
477     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478   else
479     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
480   fi
481 fi
482 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484 # Prefer explicitly selected file to automatically selected ones.
485 if test -z "$CONFIG_SITE"; then
486   if test "x$prefix" != xNONE; then
487     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488   else
489     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
490   fi
491 fi
492 for ac_site_file in $CONFIG_SITE; do
493   if test -r "$ac_site_file"; then
494     echo "loading site script $ac_site_file"
495     . "$ac_site_file"
496   fi
497 done
498
499 if test -r "$cache_file"; then
500   echo "loading cache $cache_file"
501   . $cache_file
502 else
503   echo "creating cache $cache_file"
504   > $cache_file
505 fi
506
507 ac_ext=c
508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
509 ac_cpp='$CPP $CPPFLAGS'
510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512 cross_compiling=$ac_cv_prog_cc_cross
513
514 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517     ac_n= ac_c='
518 ' ac_t='        '
519   else
520     ac_n=-n ac_c= ac_t=
521   fi
522 else
523   ac_n= ac_c='\c' ac_t=
524 fi
525
526
527
528 ac_aux_dir=
529 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
530   if test -f $ac_dir/install-sh; then
531     ac_aux_dir=$ac_dir
532     ac_install_sh="$ac_aux_dir/install-sh -c"
533     break
534   elif test -f $ac_dir/install.sh; then
535     ac_aux_dir=$ac_dir
536     ac_install_sh="$ac_aux_dir/install.sh -c"
537     break
538   fi
539 done
540 if test -z "$ac_aux_dir"; then
541   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
542 fi
543 ac_config_guess=$ac_aux_dir/config.guess
544 ac_config_sub=$ac_aux_dir/config.sub
545 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
546
547 # Find a good install program.  We prefer a C program (faster),
548 # so one script is as good as another.  But avoid the broken or
549 # incompatible versions:
550 # SysV /etc/install, /usr/sbin/install
551 # SunOS /usr/etc/install
552 # IRIX /sbin/install
553 # AIX /bin/install
554 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
555 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
556 # ./install, which can be erroneously created by make from ./install.sh.
557 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
558 echo "configure:559: checking for a BSD compatible install" >&5
559 if test -z "$INSTALL"; then
560 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
561   echo $ac_n "(cached) $ac_c" 1>&6
562 else
563     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
564   for ac_dir in $PATH; do
565     # Account for people who put trailing slashes in PATH elements.
566     case "$ac_dir/" in
567     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
568     *)
569       # OSF1 and SCO ODT 3.0 have their own names for install.
570       for ac_prog in ginstall installbsd scoinst install; do
571         if test -f $ac_dir/$ac_prog; then
572           if test $ac_prog = install &&
573             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
574             # AIX install.  It has an incompatible calling convention.
575             # OSF/1 installbsd also uses dspmsg, but is usable.
576             :
577           else
578             ac_cv_path_install="$ac_dir/$ac_prog -c"
579             break 2
580           fi
581         fi
582       done
583       ;;
584     esac
585   done
586   IFS="$ac_save_IFS"
587
588 fi
589   if test "${ac_cv_path_install+set}" = set; then
590     INSTALL="$ac_cv_path_install"
591   else
592     # As a last resort, use the slow shell script.  We don't cache a
593     # path for INSTALL within a source directory, because that will
594     # break other packages using the cache if that directory is
595     # removed, or if the path is relative.
596     INSTALL="$ac_install_sh"
597   fi
598 fi
599 echo "$ac_t""$INSTALL" 1>&6
600
601 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
602 # It thinks the first close brace ends the variable substitution.
603 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
604
605 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
606
607
608 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
609
610 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
611 echo "configure:612: checking whether build environment is sane" >&5
612 # Just in case
613 sleep 1
614 echo timestamp > conftestfile
615 # Do `set' in a subshell so we don't clobber the current shell's
616 # arguments.  Must try -L first in case configure is actually a
617 # symlink; some systems play weird games with the mod time of symlinks
618 # (eg FreeBSD returns the mod time of the symlink's containing
619 # directory).
620 if (
621    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
622    if test "$*" = "X"; then
623       # -L didn't work.
624       set X `ls -t $srcdir/configure conftestfile`
625    fi
626    if test "$*" != "X $srcdir/configure conftestfile" \
627       && test "$*" != "X conftestfile $srcdir/configure"; then
628
629       # If neither matched, then we have a broken ls.  This can happen
630       # if, for instance, CONFIG_SHELL is bash and it inherits a
631       # broken ls alias from the environment.  This has actually
632       # happened.  Such a system could not be considered "sane".
633       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
634 alias in your environment" 1>&2; exit 1; }
635    fi
636
637    test "$2" = conftestfile
638    )
639 then
640    # Ok.
641    :
642 else
643    { echo "configure: error: newly created file is older than distributed files!
644 Check your system clock" 1>&2; exit 1; }
645 fi
646 rm -f conftest*
647 echo "$ac_t""yes" 1>&6
648 if test "$program_transform_name" = s,x,x,; then
649   program_transform_name=
650 else
651   # Double any \ or $.  echo might interpret backslashes.
652   cat <<\EOF_SED > conftestsed
653 s,\\,\\\\,g; s,\$,$$,g
654 EOF_SED
655   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
656   rm -f conftestsed
657 fi
658 test "$program_prefix" != NONE &&
659   program_transform_name="s,^,${program_prefix},; $program_transform_name"
660 # Use a double $ so make ignores it.
661 test "$program_suffix" != NONE &&
662   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
663
664 # sed with no file args requires a program.
665 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
666
667 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
668 echo "configure:669: checking whether ${MAKE-make} sets \${MAKE}" >&5
669 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
670 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
671   echo $ac_n "(cached) $ac_c" 1>&6
672 else
673   cat > conftestmake <<\EOF
674 all:
675         @echo 'ac_maketemp="${MAKE}"'
676 EOF
677 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
678 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
679 if test -n "$ac_maketemp"; then
680   eval ac_cv_prog_make_${ac_make}_set=yes
681 else
682   eval ac_cv_prog_make_${ac_make}_set=no
683 fi
684 rm -f conftestmake
685 fi
686 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
687   echo "$ac_t""yes" 1>&6
688   SET_MAKE=
689 else
690   echo "$ac_t""no" 1>&6
691   SET_MAKE="MAKE=${MAKE-make}"
692 fi
693
694
695 PACKAGE=SimGear
696
697 VERSION=0.0.0
698
699 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
700   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
701 fi
702 cat >> confdefs.h <<EOF
703 #define PACKAGE "$PACKAGE"
704 EOF
705
706 cat >> confdefs.h <<EOF
707 #define VERSION "$VERSION"
708 EOF
709
710
711
712 missing_dir=`cd $ac_aux_dir && pwd`
713 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
714 echo "configure:715: checking for working aclocal" >&5
715 # Run test in a subshell; some versions of sh will print an error if
716 # an executable is not found, even if stderr is redirected.
717 # Redirect stdin to placate older versions of autoconf.  Sigh.
718 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
719    ACLOCAL=aclocal
720    echo "$ac_t""found" 1>&6
721 else
722    ACLOCAL="$missing_dir/missing aclocal"
723    echo "$ac_t""missing" 1>&6
724 fi
725
726 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
727 echo "configure:728: checking for working autoconf" >&5
728 # Run test in a subshell; some versions of sh will print an error if
729 # an executable is not found, even if stderr is redirected.
730 # Redirect stdin to placate older versions of autoconf.  Sigh.
731 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
732    AUTOCONF=autoconf
733    echo "$ac_t""found" 1>&6
734 else
735    AUTOCONF="$missing_dir/missing autoconf"
736    echo "$ac_t""missing" 1>&6
737 fi
738
739 echo $ac_n "checking for working automake""... $ac_c" 1>&6
740 echo "configure:741: checking for working automake" >&5
741 # Run test in a subshell; some versions of sh will print an error if
742 # an executable is not found, even if stderr is redirected.
743 # Redirect stdin to placate older versions of autoconf.  Sigh.
744 if (automake --version) < /dev/null > /dev/null 2>&1; then
745    AUTOMAKE=automake
746    echo "$ac_t""found" 1>&6
747 else
748    AUTOMAKE="$missing_dir/missing automake"
749    echo "$ac_t""missing" 1>&6
750 fi
751
752 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
753 echo "configure:754: checking for working autoheader" >&5
754 # Run test in a subshell; some versions of sh will print an error if
755 # an executable is not found, even if stderr is redirected.
756 # Redirect stdin to placate older versions of autoconf.  Sigh.
757 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
758    AUTOHEADER=autoheader
759    echo "$ac_t""found" 1>&6
760 else
761    AUTOHEADER="$missing_dir/missing autoheader"
762    echo "$ac_t""missing" 1>&6
763 fi
764
765 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
766 echo "configure:767: checking for working makeinfo" >&5
767 # Run test in a subshell; some versions of sh will print an error if
768 # an executable is not found, even if stderr is redirected.
769 # Redirect stdin to placate older versions of autoconf.  Sigh.
770 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
771    MAKEINFO=makeinfo
772    echo "$ac_t""found" 1>&6
773 else
774    MAKEINFO="$missing_dir/missing makeinfo"
775    echo "$ac_t""missing" 1>&6
776 fi
777
778
779
780 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
781 echo "configure:782: checking whether ${MAKE-make} sets \${MAKE}" >&5
782 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
783 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
784   echo $ac_n "(cached) $ac_c" 1>&6
785 else
786   cat > conftestmake <<\EOF
787 all:
788         @echo 'ac_maketemp="${MAKE}"'
789 EOF
790 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
791 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
792 if test -n "$ac_maketemp"; then
793   eval ac_cv_prog_make_${ac_make}_set=yes
794 else
795   eval ac_cv_prog_make_${ac_make}_set=no
796 fi
797 rm -f conftestmake
798 fi
799 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
800   echo "$ac_t""yes" 1>&6
801   SET_MAKE=
802 else
803   echo "$ac_t""no" 1>&6
804   SET_MAKE="MAKE=${MAKE-make}"
805 fi
806
807 # Extract the first word of "gcc", so it can be a program name with args.
808 set dummy gcc; ac_word=$2
809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
810 echo "configure:811: checking for $ac_word" >&5
811 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
812   echo $ac_n "(cached) $ac_c" 1>&6
813 else
814   if test -n "$CC"; then
815   ac_cv_prog_CC="$CC" # Let the user override the test.
816 else
817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
818   for ac_dir in $PATH; do
819     test -z "$ac_dir" && ac_dir=.
820     if test -f $ac_dir/$ac_word; then
821       ac_cv_prog_CC="gcc"
822       break
823     fi
824   done
825   IFS="$ac_save_ifs"
826 fi
827 fi
828 CC="$ac_cv_prog_CC"
829 if test -n "$CC"; then
830   echo "$ac_t""$CC" 1>&6
831 else
832   echo "$ac_t""no" 1>&6
833 fi
834
835 if test -z "$CC"; then
836   # Extract the first word of "cc", so it can be a program name with args.
837 set dummy cc; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 echo "configure:840: checking for $ac_word" >&5
840 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
843   if test -n "$CC"; then
844   ac_cv_prog_CC="$CC" # Let the user override the test.
845 else
846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
847   ac_prog_rejected=no
848   for ac_dir in $PATH; do
849     test -z "$ac_dir" && ac_dir=.
850     if test -f $ac_dir/$ac_word; then
851       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
852         ac_prog_rejected=yes
853         continue
854       fi
855       ac_cv_prog_CC="cc"
856       break
857     fi
858   done
859   IFS="$ac_save_ifs"
860 if test $ac_prog_rejected = yes; then
861   # We found a bogon in the path, so make sure we never use it.
862   set dummy $ac_cv_prog_CC
863   shift
864   if test $# -gt 0; then
865     # We chose a different compiler from the bogus one.
866     # However, it has the same basename, so the bogon will be chosen
867     # first if we set CC to just the basename; use the full file name.
868     shift
869     set dummy "$ac_dir/$ac_word" "$@"
870     shift
871     ac_cv_prog_CC="$@"
872   fi
873 fi
874 fi
875 fi
876 CC="$ac_cv_prog_CC"
877 if test -n "$CC"; then
878   echo "$ac_t""$CC" 1>&6
879 else
880   echo "$ac_t""no" 1>&6
881 fi
882
883   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
884 fi
885
886 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
887 echo "configure:888: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
888
889 ac_ext=c
890 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
891 ac_cpp='$CPP $CPPFLAGS'
892 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
893 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
894 cross_compiling=$ac_cv_prog_cc_cross
895
896 cat > conftest.$ac_ext <<EOF
897 #line 898 "configure"
898 #include "confdefs.h"
899 main(){return(0);}
900 EOF
901 if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
902   ac_cv_prog_cc_works=yes
903   # If we can't run a trivial program, we are probably using a cross compiler.
904   if (./conftest; exit) 2>/dev/null; then
905     ac_cv_prog_cc_cross=no
906   else
907     ac_cv_prog_cc_cross=yes
908   fi
909 else
910   echo "configure: failed program was:" >&5
911   cat conftest.$ac_ext >&5
912   ac_cv_prog_cc_works=no
913 fi
914 rm -fr conftest*
915
916 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
917 if test $ac_cv_prog_cc_works = no; then
918   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
919 fi
920 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
921 echo "configure:922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
922 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
923 cross_compiling=$ac_cv_prog_cc_cross
924
925 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
926 echo "configure:927: checking whether we are using GNU C" >&5
927 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
928   echo $ac_n "(cached) $ac_c" 1>&6
929 else
930   cat > conftest.c <<EOF
931 #ifdef __GNUC__
932   yes;
933 #endif
934 EOF
935 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
936   ac_cv_prog_gcc=yes
937 else
938   ac_cv_prog_gcc=no
939 fi
940 fi
941
942 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
943
944 if test $ac_cv_prog_gcc = yes; then
945   GCC=yes
946   ac_test_CFLAGS="${CFLAGS+set}"
947   ac_save_CFLAGS="$CFLAGS"
948   CFLAGS=
949   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
950 echo "configure:951: checking whether ${CC-cc} accepts -g" >&5
951 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
952   echo $ac_n "(cached) $ac_c" 1>&6
953 else
954   echo 'void f(){}' > conftest.c
955 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
956   ac_cv_prog_cc_g=yes
957 else
958   ac_cv_prog_cc_g=no
959 fi
960 rm -f conftest*
961
962 fi
963
964 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
965   if test "$ac_test_CFLAGS" = set; then
966     CFLAGS="$ac_save_CFLAGS"
967   elif test $ac_cv_prog_cc_g = yes; then
968     CFLAGS="-g -O2"
969   else
970     CFLAGS="-O2"
971   fi
972 else
973   GCC=
974   test "${CFLAGS+set}" = set || CFLAGS="-g"
975 fi
976
977 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
978 do
979 # Extract the first word of "$ac_prog", so it can be a program name with args.
980 set dummy $ac_prog; ac_word=$2
981 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
982 echo "configure:983: checking for $ac_word" >&5
983 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
984   echo $ac_n "(cached) $ac_c" 1>&6
985 else
986   if test -n "$CXX"; then
987   ac_cv_prog_CXX="$CXX" # Let the user override the test.
988 else
989   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
990   for ac_dir in $PATH; do
991     test -z "$ac_dir" && ac_dir=.
992     if test -f $ac_dir/$ac_word; then
993       ac_cv_prog_CXX="$ac_prog"
994       break
995     fi
996   done
997   IFS="$ac_save_ifs"
998 fi
999 fi
1000 CXX="$ac_cv_prog_CXX"
1001 if test -n "$CXX"; then
1002   echo "$ac_t""$CXX" 1>&6
1003 else
1004   echo "$ac_t""no" 1>&6
1005 fi
1006
1007 test -n "$CXX" && break
1008 done
1009 test -n "$CXX" || CXX="gcc"
1010
1011
1012 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1013 echo "configure:1014: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1014
1015 ac_ext=C
1016 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1017 ac_cpp='$CXXCPP $CPPFLAGS'
1018 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1019 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1020 cross_compiling=$ac_cv_prog_cxx_cross
1021
1022 cat > conftest.$ac_ext <<EOF
1023 #line 1024 "configure"
1024 #include "confdefs.h"
1025 main(){return(0);}
1026 EOF
1027 if { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1028   ac_cv_prog_cxx_works=yes
1029   # If we can't run a trivial program, we are probably using a cross compiler.
1030   if (./conftest; exit) 2>/dev/null; then
1031     ac_cv_prog_cxx_cross=no
1032   else
1033     ac_cv_prog_cxx_cross=yes
1034   fi
1035 else
1036   echo "configure: failed program was:" >&5
1037   cat conftest.$ac_ext >&5
1038   ac_cv_prog_cxx_works=no
1039 fi
1040 rm -fr conftest*
1041 ac_ext=c
1042 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1043 ac_cpp='$CPP $CPPFLAGS'
1044 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1045 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1046 cross_compiling=$ac_cv_prog_cc_cross
1047
1048 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1049 if test $ac_cv_prog_cxx_works = no; then
1050   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1051 fi
1052 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1053 echo "configure:1054: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1054 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1055 cross_compiling=$ac_cv_prog_cxx_cross
1056
1057 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1058 echo "configure:1059: checking whether we are using GNU C++" >&5
1059 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1060   echo $ac_n "(cached) $ac_c" 1>&6
1061 else
1062   cat > conftest.C <<EOF
1063 #ifdef __GNUC__
1064   yes;
1065 #endif
1066 EOF
1067 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1068   ac_cv_prog_gxx=yes
1069 else
1070   ac_cv_prog_gxx=no
1071 fi
1072 fi
1073
1074 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1075
1076 if test $ac_cv_prog_gxx = yes; then
1077   GXX=yes
1078   ac_test_CXXFLAGS="${CXXFLAGS+set}"
1079   ac_save_CXXFLAGS="$CXXFLAGS"
1080   CXXFLAGS=
1081   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1082 echo "configure:1083: checking whether ${CXX-g++} accepts -g" >&5
1083 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1084   echo $ac_n "(cached) $ac_c" 1>&6
1085 else
1086   echo 'void f(){}' > conftest.cc
1087 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1088   ac_cv_prog_cxx_g=yes
1089 else
1090   ac_cv_prog_cxx_g=no
1091 fi
1092 rm -f conftest*
1093
1094 fi
1095
1096 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1097   if test "$ac_test_CXXFLAGS" = set; then
1098     CXXFLAGS="$ac_save_CXXFLAGS"
1099   elif test $ac_cv_prog_cxx_g = yes; then
1100     CXXFLAGS="-g -O2"
1101   else
1102     CXXFLAGS="-O2"
1103   fi
1104 else
1105   GXX=
1106   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1107 fi
1108
1109 # Extract the first word of "ranlib", so it can be a program name with args.
1110 set dummy ranlib; ac_word=$2
1111 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1112 echo "configure:1113: checking for $ac_word" >&5
1113 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1114   echo $ac_n "(cached) $ac_c" 1>&6
1115 else
1116   if test -n "$RANLIB"; then
1117   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1118 else
1119   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1120   for ac_dir in $PATH; do
1121     test -z "$ac_dir" && ac_dir=.
1122     if test -f $ac_dir/$ac_word; then
1123       ac_cv_prog_RANLIB="ranlib"
1124       break
1125     fi
1126   done
1127   IFS="$ac_save_ifs"
1128   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1129 fi
1130 fi
1131 RANLIB="$ac_cv_prog_RANLIB"
1132 if test -n "$RANLIB"; then
1133   echo "$ac_t""$RANLIB" 1>&6
1134 else
1135   echo "$ac_t""no" 1>&6
1136 fi
1137
1138 # Find a good install program.  We prefer a C program (faster),
1139 # so one script is as good as another.  But avoid the broken or
1140 # incompatible versions:
1141 # SysV /etc/install, /usr/sbin/install
1142 # SunOS /usr/etc/install
1143 # IRIX /sbin/install
1144 # AIX /bin/install
1145 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1146 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1147 # ./install, which can be erroneously created by make from ./install.sh.
1148 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1149 echo "configure:1150: checking for a BSD compatible install" >&5
1150 if test -z "$INSTALL"; then
1151 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1152   echo $ac_n "(cached) $ac_c" 1>&6
1153 else
1154     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1155   for ac_dir in $PATH; do
1156     # Account for people who put trailing slashes in PATH elements.
1157     case "$ac_dir/" in
1158     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1159     *)
1160       # OSF1 and SCO ODT 3.0 have their own names for install.
1161       for ac_prog in ginstall installbsd scoinst install; do
1162         if test -f $ac_dir/$ac_prog; then
1163           if test $ac_prog = install &&
1164             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1165             # AIX install.  It has an incompatible calling convention.
1166             # OSF/1 installbsd also uses dspmsg, but is usable.
1167             :
1168           else
1169             ac_cv_path_install="$ac_dir/$ac_prog -c"
1170             break 2
1171           fi
1172         fi
1173       done
1174       ;;
1175     esac
1176   done
1177   IFS="$ac_save_IFS"
1178
1179 fi
1180   if test "${ac_cv_path_install+set}" = set; then
1181     INSTALL="$ac_cv_path_install"
1182   else
1183     # As a last resort, use the slow shell script.  We don't cache a
1184     # path for INSTALL within a source directory, because that will
1185     # break other packages using the cache if that directory is
1186     # removed, or if the path is relative.
1187     INSTALL="$ac_install_sh"
1188   fi
1189 fi
1190 echo "$ac_t""$INSTALL" 1>&6
1191
1192 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1193 # It thinks the first close brace ends the variable substitution.
1194 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1195
1196 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1197
1198 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1199 echo "configure:1200: checking whether ln -s works" >&5
1200 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   rm -f conftestdata
1204 if ln -s X conftestdata 2>/dev/null
1205 then
1206   rm -f conftestdata
1207   ac_cv_prog_LN_S="ln -s"
1208 else
1209   ac_cv_prog_LN_S=ln
1210 fi
1211 fi
1212 LN_S="$ac_cv_prog_LN_S"
1213 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1214   echo "$ac_t""yes" 1>&6
1215 else
1216   echo "$ac_t""no" 1>&6
1217 fi
1218
1219
1220 if echo $includedir | egrep "simgear$" > /dev/null; then
1221     echo "includedir is" $includedir "libdir is" $libdir
1222 else
1223     includedir="${includedir}/simgear"
1224     echo "includedir changed to" $includedir "libdir is" $libdir
1225 fi
1226
1227
1228 # set logging default value
1229 # with_logging=yes
1230 # Check whether --with-logging or --without-logging was given.
1231 if test "${with_logging+set}" = set; then
1232   withval="$with_logging"
1233   :
1234 fi
1235
1236 if test "x$with_logging" = "xno" ; then
1237     cat >> confdefs.h <<\EOF
1238 #define FG_NDEBUG 1
1239 EOF
1240
1241 fi
1242
1243 # Check whether --with-efence or --without-efence was given.
1244 if test "${with_efence+set}" = set; then
1245   withval="$with_efence"
1246   :
1247 fi
1248
1249
1250 if test "x$with_efence" = "xyes" ; then
1251     echo "Building with efence"
1252     LIBS= "$LIBS -lefence"
1253 fi
1254
1255 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1256 echo "configure:1257: checking how to run the C preprocessor" >&5
1257 # On Suns, sometimes $CPP names a directory.
1258 if test -n "$CPP" && test -d "$CPP"; then
1259   CPP=
1260 fi
1261 if test -z "$CPP"; then
1262 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1263   echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265     # This must be in double quotes, not single quotes, because CPP may get
1266   # substituted into the Makefile and "${CC-cc}" will confuse make.
1267   CPP="${CC-cc} -E"
1268   # On the NeXT, cc -E runs the code through the compiler's parser,
1269   # not just through cpp.
1270   cat > conftest.$ac_ext <<EOF
1271 #line 1272 "configure"
1272 #include "confdefs.h"
1273 #include <assert.h>
1274 Syntax Error
1275 EOF
1276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1277 { (eval echo configure:1278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1278 ac_err=`grep -v '^ *+' conftest.out`
1279 if test -z "$ac_err"; then
1280   :
1281 else
1282   echo "$ac_err" >&5
1283   echo "configure: failed program was:" >&5
1284   cat conftest.$ac_ext >&5
1285   rm -rf conftest*
1286   CPP="${CC-cc} -E -traditional-cpp"
1287   cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1290 #include <assert.h>
1291 Syntax Error
1292 EOF
1293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1294 { (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1295 ac_err=`grep -v '^ *+' conftest.out`
1296 if test -z "$ac_err"; then
1297   :
1298 else
1299   echo "$ac_err" >&5
1300   echo "configure: failed program was:" >&5
1301   cat conftest.$ac_ext >&5
1302   rm -rf conftest*
1303   CPP=/lib/cpp
1304 fi
1305 rm -f conftest*
1306 fi
1307 rm -f conftest*
1308   ac_cv_prog_CPP="$CPP"
1309 fi
1310   CPP="$ac_cv_prog_CPP"
1311 else
1312   ac_cv_prog_CPP="$CPP"
1313 fi
1314 echo "$ac_t""$CPP" 1>&6
1315
1316 ac_safe=`echo "windows.h" | sed 'y%./+-%__p_%'`
1317 echo $ac_n "checking for windows.h""... $ac_c" 1>&6
1318 echo "configure:1319: checking for windows.h" >&5
1319 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1320   echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322   cat > conftest.$ac_ext <<EOF
1323 #line 1324 "configure"
1324 #include "confdefs.h"
1325 #include <windows.h>
1326 EOF
1327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1328 { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1329 ac_err=`grep -v '^ *+' conftest.out`
1330 if test -z "$ac_err"; then
1331   rm -rf conftest*
1332   eval "ac_cv_header_$ac_safe=yes"
1333 else
1334   echo "$ac_err" >&5
1335   echo "configure: failed program was:" >&5
1336   cat conftest.$ac_ext >&5
1337   rm -rf conftest*
1338   eval "ac_cv_header_$ac_safe=no"
1339 fi
1340 rm -f conftest*
1341 fi
1342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1343   echo "$ac_t""yes" 1>&6
1344   :
1345 else
1346   echo "$ac_t""no" 1>&6
1347 fi
1348
1349
1350 EXTRA_DIRS="/usr/local /usr/local/plib /usr/X11R6"
1351
1352 if test -d /opt/X11R6 ; then
1353      EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6"
1354 fi
1355
1356 if test "x$ac_cv_header_windows_h" = "xyes" ; then
1357     EXTRA_DIRS="${EXTRA_DIRS} `pwd`/Win32"
1358 # elif test `uname -s` = "SunOS" ; then
1359 #   EXTRA_DIRS="${EXTRA_DIRS} `pwd`/SunOS"
1360 fi
1361 echo "checking for extra include and lib directories..." 1>&6
1362 exdirs="$prefix ${EXTRA_DIRS}"
1363
1364 subexdirs=""
1365 if test "$subexdirs" = "" ; then
1366         subexdirs="-"
1367 fi
1368 for subexdir in $subexdirs ; do
1369 if test "$subexdir" = "-" ; then
1370         subexdir=""
1371 else
1372         subexdir="/$subexdir"
1373 fi
1374 for exdir in $exdirs ; do
1375         if test "$exdir" != "/usr" || test "$subexdir" != ""; then
1376                 incdir="${exdir}/include${subexdir}"
1377                 
1378 incdir="$incdir"
1379 if test -r $incdir ; then
1380         case "$CPPFLAGS" in
1381                 *-I${incdir}*)
1382                         # echo "   + already had $incdir" 1>&6
1383                         ;;
1384                 *)
1385                         if test "$CPPFLAGS" = "" ; then
1386                                 CPPFLAGS="-I$incdir"
1387                         else
1388                                 CPPFLAGS="$CPPFLAGS -I$incdir"
1389                         fi
1390                         echo "   + found $incdir" 1>&6
1391                         ;;
1392         esac
1393 fi
1394
1395
1396                 mylibdir="${exdir}/lib${subexdir}"
1397                 
1398 mylibdir="$mylibdir"
1399 if test -r $mylibdir ; then
1400         case "$LDFLAGS" in
1401                 *-L${mylibdir}*)
1402                         # echo "   + already had $mylibdir" 1>&6
1403                         ;;
1404                 *)
1405                         if test "$LDFLAGS" = "" ; then
1406                                 LDFLAGS="-L$mylibdir"
1407                         else
1408                                 LDFLAGS="$LDFLAGS -L$mylibdir"
1409                         fi
1410                         echo "   + found $mylibdir" 1>&6
1411                         ;;
1412         esac
1413 fi
1414
1415
1416                 progdir="${exdir}/bin${subexdirr}"
1417                 
1418 progdir="$progdir"
1419 if test -r $progdir ; then
1420         case "$PATH" in
1421                 *:${progdir}*)
1422                         # echo "   + already had $progdir" 1>&6
1423                         ;;
1424                 *${progdir}:*)
1425                         # echo "   + already had $progdir" 1>&6
1426                         ;;
1427                 *)
1428                         if test "$PATH" = "" ; then
1429                                 PATH="$progdir"
1430                         else
1431                                 PATH="$PATH:$progdir"
1432                         fi
1433                         echo "   + found $progdir" 1>&6
1434                         ;;
1435         esac
1436 fi
1437
1438         fi
1439 done
1440 done
1441
1442
1443
1444
1445
1446 if true; then
1447   ENABLE_UNIX_SERIAL_TRUE=
1448   ENABLE_UNIX_SERIAL_FALSE='#'
1449 else
1450   ENABLE_UNIX_SERIAL_TRUE='#'
1451   ENABLE_UNIX_SERIAL_FALSE=
1452 fi
1453
1454 # If we find X, set shell vars x_includes and x_libraries to the
1455 # paths, otherwise set no_x=yes.
1456 # Uses ac_ vars as temps to allow command line to override cache and checks.
1457 # --without-x overrides everything else, but does not touch the cache.
1458 echo $ac_n "checking for X""... $ac_c" 1>&6
1459 echo "configure:1460: checking for X" >&5
1460
1461 # Check whether --with-x or --without-x was given.
1462 if test "${with_x+set}" = set; then
1463   withval="$with_x"
1464   :
1465 fi
1466
1467 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1468 if test "x$with_x" = xno; then
1469   # The user explicitly disabled X.
1470   have_x=disabled
1471 else
1472   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1473     # Both variables are already set.
1474     have_x=yes
1475   else
1476 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1477   echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479   # One or both of the vars are not set, and there is no cached value.
1480 ac_x_includes=NO ac_x_libraries=NO
1481 rm -fr conftestdir
1482 if mkdir conftestdir; then
1483   cd conftestdir
1484   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1485   cat > Imakefile <<'EOF'
1486 acfindx:
1487         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1488 EOF
1489   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1490     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1491     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1492     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1493     for ac_extension in a so sl; do
1494       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1495         test -f $ac_im_libdir/libX11.$ac_extension; then
1496         ac_im_usrlibdir=$ac_im_libdir; break
1497       fi
1498     done
1499     # Screen out bogus values from the imake configuration.  They are
1500     # bogus both because they are the default anyway, and because
1501     # using them would break gcc on systems where it needs fixed includes.
1502     case "$ac_im_incroot" in
1503         /usr/include) ;;
1504         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1505     esac
1506     case "$ac_im_usrlibdir" in
1507         /usr/lib | /lib) ;;
1508         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1509     esac
1510   fi
1511   cd ..
1512   rm -fr conftestdir
1513 fi
1514
1515 if test "$ac_x_includes" = NO; then
1516   # Guess where to find include files, by looking for this one X11 .h file.
1517   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1518
1519   # First, try using that file with no special directory specified.
1520 cat > conftest.$ac_ext <<EOF
1521 #line 1522 "configure"
1522 #include "confdefs.h"
1523 #include <$x_direct_test_include>
1524 EOF
1525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1526 { (eval echo configure:1527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1527 ac_err=`grep -v '^ *+' conftest.out`
1528 if test -z "$ac_err"; then
1529   rm -rf conftest*
1530   # We can compile using X headers with no special include directory.
1531 ac_x_includes=
1532 else
1533   echo "$ac_err" >&5
1534   echo "configure: failed program was:" >&5
1535   cat conftest.$ac_ext >&5
1536   rm -rf conftest*
1537   # Look for the header file in a standard set of common directories.
1538 # Check X11 before X11Rn because it is often a symlink to the current release.
1539   for ac_dir in               \
1540     /usr/X11/include          \
1541     /usr/X11R6/include        \
1542     /usr/X11R5/include        \
1543     /usr/X11R4/include        \
1544                               \
1545     /usr/include/X11          \
1546     /usr/include/X11R6        \
1547     /usr/include/X11R5        \
1548     /usr/include/X11R4        \
1549                               \
1550     /usr/local/X11/include    \
1551     /usr/local/X11R6/include  \
1552     /usr/local/X11R5/include  \
1553     /usr/local/X11R4/include  \
1554                               \
1555     /usr/local/include/X11    \
1556     /usr/local/include/X11R6  \
1557     /usr/local/include/X11R5  \
1558     /usr/local/include/X11R4  \
1559                               \
1560     /usr/X386/include         \
1561     /usr/x386/include         \
1562     /usr/XFree86/include/X11  \
1563                               \
1564     /usr/include              \
1565     /usr/local/include        \
1566     /usr/unsupported/include  \
1567     /usr/athena/include       \
1568     /usr/local/x11r5/include  \
1569     /usr/lpp/Xamples/include  \
1570                               \
1571     /usr/openwin/include      \
1572     /usr/openwin/share/include \
1573     ; \
1574   do
1575     if test -r "$ac_dir/$x_direct_test_include"; then
1576       ac_x_includes=$ac_dir
1577       break
1578     fi
1579   done
1580 fi
1581 rm -f conftest*
1582 fi # $ac_x_includes = NO
1583
1584 if test "$ac_x_libraries" = NO; then
1585   # Check for the libraries.
1586
1587   test -z "$x_direct_test_library" && x_direct_test_library=Xt
1588   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1589
1590   # See if we find them without any special options.
1591   # Don't add to $LIBS permanently.
1592   ac_save_LIBS="$LIBS"
1593   LIBS="-l$x_direct_test_library $LIBS"
1594 cat > conftest.$ac_ext <<EOF
1595 #line 1596 "configure"
1596 #include "confdefs.h"
1597
1598 int main() {
1599 ${x_direct_test_function}()
1600 ; return 0; }
1601 EOF
1602 if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1603   rm -rf conftest*
1604   LIBS="$ac_save_LIBS"
1605 # We can link X programs with no special library path.
1606 ac_x_libraries=
1607 else
1608   echo "configure: failed program was:" >&5
1609   cat conftest.$ac_ext >&5
1610   rm -rf conftest*
1611   LIBS="$ac_save_LIBS"
1612 # First see if replacing the include by lib works.
1613 # Check X11 before X11Rn because it is often a symlink to the current release.
1614 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1615     /usr/X11/lib          \
1616     /usr/X11R6/lib        \
1617     /usr/X11R5/lib        \
1618     /usr/X11R4/lib        \
1619                           \
1620     /usr/lib/X11          \
1621     /usr/lib/X11R6        \
1622     /usr/lib/X11R5        \
1623     /usr/lib/X11R4        \
1624                           \
1625     /usr/local/X11/lib    \
1626     /usr/local/X11R6/lib  \
1627     /usr/local/X11R5/lib  \
1628     /usr/local/X11R4/lib  \
1629                           \
1630     /usr/local/lib/X11    \
1631     /usr/local/lib/X11R6  \
1632     /usr/local/lib/X11R5  \
1633     /usr/local/lib/X11R4  \
1634                           \
1635     /usr/X386/lib         \
1636     /usr/x386/lib         \
1637     /usr/XFree86/lib/X11  \
1638                           \
1639     /usr/lib              \
1640     /usr/local/lib        \
1641     /usr/unsupported/lib  \
1642     /usr/athena/lib       \
1643     /usr/local/x11r5/lib  \
1644     /usr/lpp/Xamples/lib  \
1645     /lib/usr/lib/X11      \
1646                           \
1647     /usr/openwin/lib      \
1648     /usr/openwin/share/lib \
1649     ; \
1650 do
1651   for ac_extension in a so sl; do
1652     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1653       ac_x_libraries=$ac_dir
1654       break 2
1655     fi
1656   done
1657 done
1658 fi
1659 rm -f conftest*
1660 fi # $ac_x_libraries = NO
1661
1662 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1663   # Didn't find X anywhere.  Cache the known absence of X.
1664   ac_cv_have_x="have_x=no"
1665 else
1666   # Record where we found X for the cache.
1667   ac_cv_have_x="have_x=yes \
1668                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1669 fi
1670 fi
1671   fi
1672   eval "$ac_cv_have_x"
1673 fi # $with_x != no
1674
1675 if test "$have_x" != yes; then
1676   echo "$ac_t""$have_x" 1>&6
1677   no_x=yes
1678 else
1679   # If each of the values was on the command line, it overrides each guess.
1680   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1681   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1682   # Update the cache value to reflect the command line values.
1683   ac_cv_have_x="have_x=yes \
1684                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1685   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1686 fi
1687
1688 if test "$no_x" = yes; then
1689   # Not all programs may use this symbol, but it does not hurt to define it.
1690   cat >> confdefs.h <<\EOF
1691 #define X_DISPLAY_MISSING 1
1692 EOF
1693
1694   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1695 else
1696   if test -n "$x_includes"; then
1697     X_CFLAGS="$X_CFLAGS -I$x_includes"
1698   fi
1699
1700   # It would also be nice to do this for all -L options, not just this one.
1701   if test -n "$x_libraries"; then
1702     X_LIBS="$X_LIBS -L$x_libraries"
1703     # For Solaris; some versions of Sun CC require a space after -R and
1704     # others require no space.  Words are not sufficient . . . .
1705     case "`(uname -sr) 2>/dev/null`" in
1706     "SunOS 5"*)
1707       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1708 echo "configure:1709: checking whether -R must be followed by a space" >&5
1709       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1710       cat > conftest.$ac_ext <<EOF
1711 #line 1712 "configure"
1712 #include "confdefs.h"
1713
1714 int main() {
1715
1716 ; return 0; }
1717 EOF
1718 if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1719   rm -rf conftest*
1720   ac_R_nospace=yes
1721 else
1722   echo "configure: failed program was:" >&5
1723   cat conftest.$ac_ext >&5
1724   rm -rf conftest*
1725   ac_R_nospace=no
1726 fi
1727 rm -f conftest*
1728       if test $ac_R_nospace = yes; then
1729         echo "$ac_t""no" 1>&6
1730         X_LIBS="$X_LIBS -R$x_libraries"
1731       else
1732         LIBS="$ac_xsave_LIBS -R $x_libraries"
1733         cat > conftest.$ac_ext <<EOF
1734 #line 1735 "configure"
1735 #include "confdefs.h"
1736
1737 int main() {
1738
1739 ; return 0; }
1740 EOF
1741 if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1742   rm -rf conftest*
1743   ac_R_space=yes
1744 else
1745   echo "configure: failed program was:" >&5
1746   cat conftest.$ac_ext >&5
1747   rm -rf conftest*
1748   ac_R_space=no
1749 fi
1750 rm -f conftest*
1751         if test $ac_R_space = yes; then
1752           echo "$ac_t""yes" 1>&6
1753           X_LIBS="$X_LIBS -R $x_libraries"
1754         else
1755           echo "$ac_t""neither works" 1>&6
1756         fi
1757       fi
1758       LIBS="$ac_xsave_LIBS"
1759     esac
1760   fi
1761
1762   # Check for system-dependent libraries X programs must link with.
1763   # Do this before checking for the system-independent R6 libraries
1764   # (-lICE), since we may need -lsocket or whatever for X linking.
1765
1766   if test "$ISC" = yes; then
1767     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1768   else
1769     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1770     # libraries were built with DECnet support.  And karl@cs.umb.edu says
1771     # the Alpha needs dnet_stub (dnet does not exist).
1772     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1773 echo "configure:1774: checking for dnet_ntoa in -ldnet" >&5
1774 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1776   echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778   ac_save_LIBS="$LIBS"
1779 LIBS="-ldnet  $LIBS"
1780 cat > conftest.$ac_ext <<EOF
1781 #line 1782 "configure"
1782 #include "confdefs.h"
1783 /* Override any gcc2 internal prototype to avoid an error.  */
1784 /* We use char because int might match the return type of a gcc2
1785     builtin and then its argument prototype would still apply.  */
1786 char dnet_ntoa();
1787
1788 int main() {
1789 dnet_ntoa()
1790 ; return 0; }
1791 EOF
1792 if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1793   rm -rf conftest*
1794   eval "ac_cv_lib_$ac_lib_var=yes"
1795 else
1796   echo "configure: failed program was:" >&5
1797   cat conftest.$ac_ext >&5
1798   rm -rf conftest*
1799   eval "ac_cv_lib_$ac_lib_var=no"
1800 fi
1801 rm -f conftest*
1802 LIBS="$ac_save_LIBS"
1803
1804 fi
1805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1806   echo "$ac_t""yes" 1>&6
1807   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1808 else
1809   echo "$ac_t""no" 1>&6
1810 fi
1811
1812     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1813       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1814 echo "configure:1815: checking for dnet_ntoa in -ldnet_stub" >&5
1815 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1817   echo $ac_n "(cached) $ac_c" 1>&6
1818 else
1819   ac_save_LIBS="$LIBS"
1820 LIBS="-ldnet_stub  $LIBS"
1821 cat > conftest.$ac_ext <<EOF
1822 #line 1823 "configure"
1823 #include "confdefs.h"
1824 /* Override any gcc2 internal prototype to avoid an error.  */
1825 /* We use char because int might match the return type of a gcc2
1826     builtin and then its argument prototype would still apply.  */
1827 char dnet_ntoa();
1828
1829 int main() {
1830 dnet_ntoa()
1831 ; return 0; }
1832 EOF
1833 if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1834   rm -rf conftest*
1835   eval "ac_cv_lib_$ac_lib_var=yes"
1836 else
1837   echo "configure: failed program was:" >&5
1838   cat conftest.$ac_ext >&5
1839   rm -rf conftest*
1840   eval "ac_cv_lib_$ac_lib_var=no"
1841 fi
1842 rm -f conftest*
1843 LIBS="$ac_save_LIBS"
1844
1845 fi
1846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1847   echo "$ac_t""yes" 1>&6
1848   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1849 else
1850   echo "$ac_t""no" 1>&6
1851 fi
1852
1853     fi
1854
1855     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1856     # to get the SysV transport functions.
1857     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1858     # needs -lnsl.
1859     # The nsl library prevents programs from opening the X display
1860     # on Irix 5.2, according to dickey@clark.net.
1861     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1862 echo "configure:1863: checking for gethostbyname" >&5
1863 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1864   echo $ac_n "(cached) $ac_c" 1>&6
1865 else
1866   cat > conftest.$ac_ext <<EOF
1867 #line 1868 "configure"
1868 #include "confdefs.h"
1869 /* System header to define __stub macros and hopefully few prototypes,
1870     which can conflict with char gethostbyname(); below.  */
1871 #include <assert.h>
1872 /* Override any gcc2 internal prototype to avoid an error.  */
1873 /* We use char because int might match the return type of a gcc2
1874     builtin and then its argument prototype would still apply.  */
1875 char gethostbyname();
1876
1877 int main() {
1878
1879 /* The GNU C library defines this for functions which it implements
1880     to always fail with ENOSYS.  Some functions are actually named
1881     something starting with __ and the normal name is an alias.  */
1882 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1883 choke me
1884 #else
1885 gethostbyname();
1886 #endif
1887
1888 ; return 0; }
1889 EOF
1890 if { (eval echo configure:1891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1891   rm -rf conftest*
1892   eval "ac_cv_func_gethostbyname=yes"
1893 else
1894   echo "configure: failed program was:" >&5
1895   cat conftest.$ac_ext >&5
1896   rm -rf conftest*
1897   eval "ac_cv_func_gethostbyname=no"
1898 fi
1899 rm -f conftest*
1900 fi
1901
1902 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1903   echo "$ac_t""yes" 1>&6
1904   :
1905 else
1906   echo "$ac_t""no" 1>&6
1907 fi
1908
1909     if test $ac_cv_func_gethostbyname = no; then
1910       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1911 echo "configure:1912: checking for gethostbyname in -lnsl" >&5
1912 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1913 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1914   echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916   ac_save_LIBS="$LIBS"
1917 LIBS="-lnsl  $LIBS"
1918 cat > conftest.$ac_ext <<EOF
1919 #line 1920 "configure"
1920 #include "confdefs.h"
1921 /* Override any gcc2 internal prototype to avoid an error.  */
1922 /* We use char because int might match the return type of a gcc2
1923     builtin and then its argument prototype would still apply.  */
1924 char gethostbyname();
1925
1926 int main() {
1927 gethostbyname()
1928 ; return 0; }
1929 EOF
1930 if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1931   rm -rf conftest*
1932   eval "ac_cv_lib_$ac_lib_var=yes"
1933 else
1934   echo "configure: failed program was:" >&5
1935   cat conftest.$ac_ext >&5
1936   rm -rf conftest*
1937   eval "ac_cv_lib_$ac_lib_var=no"
1938 fi
1939 rm -f conftest*
1940 LIBS="$ac_save_LIBS"
1941
1942 fi
1943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1944   echo "$ac_t""yes" 1>&6
1945   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1946 else
1947   echo "$ac_t""no" 1>&6
1948 fi
1949
1950     fi
1951
1952     # lieder@skyler.mavd.honeywell.com says without -lsocket,
1953     # socket/setsockopt and other routines are undefined under SCO ODT
1954     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
1955     # on later versions), says simon@lia.di.epfl.ch: it contains
1956     # gethostby* variants that don't use the nameserver (or something).
1957     # -lsocket must be given before -lnsl if both are needed.
1958     # We assume that if connect needs -lnsl, so does gethostbyname.
1959     echo $ac_n "checking for connect""... $ac_c" 1>&6
1960 echo "configure:1961: checking for connect" >&5
1961 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1962   echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964   cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 /* System header to define __stub macros and hopefully few prototypes,
1968     which can conflict with char connect(); below.  */
1969 #include <assert.h>
1970 /* Override any gcc2 internal prototype to avoid an error.  */
1971 /* We use char because int might match the return type of a gcc2
1972     builtin and then its argument prototype would still apply.  */
1973 char connect();
1974
1975 int main() {
1976
1977 /* The GNU C library defines this for functions which it implements
1978     to always fail with ENOSYS.  Some functions are actually named
1979     something starting with __ and the normal name is an alias.  */
1980 #if defined (__stub_connect) || defined (__stub___connect)
1981 choke me
1982 #else
1983 connect();
1984 #endif
1985
1986 ; return 0; }
1987 EOF
1988 if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1989   rm -rf conftest*
1990   eval "ac_cv_func_connect=yes"
1991 else
1992   echo "configure: failed program was:" >&5
1993   cat conftest.$ac_ext >&5
1994   rm -rf conftest*
1995   eval "ac_cv_func_connect=no"
1996 fi
1997 rm -f conftest*
1998 fi
1999
2000 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2001   echo "$ac_t""yes" 1>&6
2002   :
2003 else
2004   echo "$ac_t""no" 1>&6
2005 fi
2006
2007     if test $ac_cv_func_connect = no; then
2008       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2009 echo "configure:2010: checking for connect in -lsocket" >&5
2010 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2011 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2012   echo $ac_n "(cached) $ac_c" 1>&6
2013 else
2014   ac_save_LIBS="$LIBS"
2015 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2016 cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 /* Override any gcc2 internal prototype to avoid an error.  */
2020 /* We use char because int might match the return type of a gcc2
2021     builtin and then its argument prototype would still apply.  */
2022 char connect();
2023
2024 int main() {
2025 connect()
2026 ; return 0; }
2027 EOF
2028 if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2029   rm -rf conftest*
2030   eval "ac_cv_lib_$ac_lib_var=yes"
2031 else
2032   echo "configure: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   rm -rf conftest*
2035   eval "ac_cv_lib_$ac_lib_var=no"
2036 fi
2037 rm -f conftest*
2038 LIBS="$ac_save_LIBS"
2039
2040 fi
2041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2042   echo "$ac_t""yes" 1>&6
2043   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2044 else
2045   echo "$ac_t""no" 1>&6
2046 fi
2047
2048     fi
2049
2050     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2051     echo $ac_n "checking for remove""... $ac_c" 1>&6
2052 echo "configure:2053: checking for remove" >&5
2053 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2054   echo $ac_n "(cached) $ac_c" 1>&6
2055 else
2056   cat > conftest.$ac_ext <<EOF
2057 #line 2058 "configure"
2058 #include "confdefs.h"
2059 /* System header to define __stub macros and hopefully few prototypes,
2060     which can conflict with char remove(); below.  */
2061 #include <assert.h>
2062 /* Override any gcc2 internal prototype to avoid an error.  */
2063 /* We use char because int might match the return type of a gcc2
2064     builtin and then its argument prototype would still apply.  */
2065 char remove();
2066
2067 int main() {
2068
2069 /* The GNU C library defines this for functions which it implements
2070     to always fail with ENOSYS.  Some functions are actually named
2071     something starting with __ and the normal name is an alias.  */
2072 #if defined (__stub_remove) || defined (__stub___remove)
2073 choke me
2074 #else
2075 remove();
2076 #endif
2077
2078 ; return 0; }
2079 EOF
2080 if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2081   rm -rf conftest*
2082   eval "ac_cv_func_remove=yes"
2083 else
2084   echo "configure: failed program was:" >&5
2085   cat conftest.$ac_ext >&5
2086   rm -rf conftest*
2087   eval "ac_cv_func_remove=no"
2088 fi
2089 rm -f conftest*
2090 fi
2091
2092 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2093   echo "$ac_t""yes" 1>&6
2094   :
2095 else
2096   echo "$ac_t""no" 1>&6
2097 fi
2098
2099     if test $ac_cv_func_remove = no; then
2100       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2101 echo "configure:2102: checking for remove in -lposix" >&5
2102 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   ac_save_LIBS="$LIBS"
2107 LIBS="-lposix  $LIBS"
2108 cat > conftest.$ac_ext <<EOF
2109 #line 2110 "configure"
2110 #include "confdefs.h"
2111 /* Override any gcc2 internal prototype to avoid an error.  */
2112 /* We use char because int might match the return type of a gcc2
2113     builtin and then its argument prototype would still apply.  */
2114 char remove();
2115
2116 int main() {
2117 remove()
2118 ; return 0; }
2119 EOF
2120 if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2121   rm -rf conftest*
2122   eval "ac_cv_lib_$ac_lib_var=yes"
2123 else
2124   echo "configure: failed program was:" >&5
2125   cat conftest.$ac_ext >&5
2126   rm -rf conftest*
2127   eval "ac_cv_lib_$ac_lib_var=no"
2128 fi
2129 rm -f conftest*
2130 LIBS="$ac_save_LIBS"
2131
2132 fi
2133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2134   echo "$ac_t""yes" 1>&6
2135   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2136 else
2137   echo "$ac_t""no" 1>&6
2138 fi
2139
2140     fi
2141
2142     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2143     echo $ac_n "checking for shmat""... $ac_c" 1>&6
2144 echo "configure:2145: checking for shmat" >&5
2145 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2146   echo $ac_n "(cached) $ac_c" 1>&6
2147 else
2148   cat > conftest.$ac_ext <<EOF
2149 #line 2150 "configure"
2150 #include "confdefs.h"
2151 /* System header to define __stub macros and hopefully few prototypes,
2152     which can conflict with char shmat(); below.  */
2153 #include <assert.h>
2154 /* Override any gcc2 internal prototype to avoid an error.  */
2155 /* We use char because int might match the return type of a gcc2
2156     builtin and then its argument prototype would still apply.  */
2157 char shmat();
2158
2159 int main() {
2160
2161 /* The GNU C library defines this for functions which it implements
2162     to always fail with ENOSYS.  Some functions are actually named
2163     something starting with __ and the normal name is an alias.  */
2164 #if defined (__stub_shmat) || defined (__stub___shmat)
2165 choke me
2166 #else
2167 shmat();
2168 #endif
2169
2170 ; return 0; }
2171 EOF
2172 if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2173   rm -rf conftest*
2174   eval "ac_cv_func_shmat=yes"
2175 else
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   rm -rf conftest*
2179   eval "ac_cv_func_shmat=no"
2180 fi
2181 rm -f conftest*
2182 fi
2183
2184 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2185   echo "$ac_t""yes" 1>&6
2186   :
2187 else
2188   echo "$ac_t""no" 1>&6
2189 fi
2190
2191     if test $ac_cv_func_shmat = no; then
2192       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2193 echo "configure:2194: checking for shmat in -lipc" >&5
2194 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2195 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2196   echo $ac_n "(cached) $ac_c" 1>&6
2197 else
2198   ac_save_LIBS="$LIBS"
2199 LIBS="-lipc  $LIBS"
2200 cat > conftest.$ac_ext <<EOF
2201 #line 2202 "configure"
2202 #include "confdefs.h"
2203 /* Override any gcc2 internal prototype to avoid an error.  */
2204 /* We use char because int might match the return type of a gcc2
2205     builtin and then its argument prototype would still apply.  */
2206 char shmat();
2207
2208 int main() {
2209 shmat()
2210 ; return 0; }
2211 EOF
2212 if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2213   rm -rf conftest*
2214   eval "ac_cv_lib_$ac_lib_var=yes"
2215 else
2216   echo "configure: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   rm -rf conftest*
2219   eval "ac_cv_lib_$ac_lib_var=no"
2220 fi
2221 rm -f conftest*
2222 LIBS="$ac_save_LIBS"
2223
2224 fi
2225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2226   echo "$ac_t""yes" 1>&6
2227   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2228 else
2229   echo "$ac_t""no" 1>&6
2230 fi
2231
2232     fi
2233   fi
2234
2235   # Check for libraries that X11R6 Xt/Xaw programs need.
2236   ac_save_LDFLAGS="$LDFLAGS"
2237   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2238   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2239   # check for ICE first), but we must link in the order -lSM -lICE or
2240   # we get undefined symbols.  So assume we have SM if we have ICE.
2241   # These have to be linked with before -lX11, unlike the other
2242   # libraries we check for below, so use a different variable.
2243   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2244   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2245 echo "configure:2246: checking for IceConnectionNumber in -lICE" >&5
2246 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2247 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2248   echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250   ac_save_LIBS="$LIBS"
2251 LIBS="-lICE  $LIBS"
2252 cat > conftest.$ac_ext <<EOF
2253 #line 2254 "configure"
2254 #include "confdefs.h"
2255 /* Override any gcc2 internal prototype to avoid an error.  */
2256 /* We use char because int might match the return type of a gcc2
2257     builtin and then its argument prototype would still apply.  */
2258 char IceConnectionNumber();
2259
2260 int main() {
2261 IceConnectionNumber()
2262 ; return 0; }
2263 EOF
2264 if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2265   rm -rf conftest*
2266   eval "ac_cv_lib_$ac_lib_var=yes"
2267 else
2268   echo "configure: failed program was:" >&5
2269   cat conftest.$ac_ext >&5
2270   rm -rf conftest*
2271   eval "ac_cv_lib_$ac_lib_var=no"
2272 fi
2273 rm -f conftest*
2274 LIBS="$ac_save_LIBS"
2275
2276 fi
2277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2278   echo "$ac_t""yes" 1>&6
2279   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2280 else
2281   echo "$ac_t""no" 1>&6
2282 fi
2283
2284   LDFLAGS="$ac_save_LDFLAGS"
2285
2286 fi
2287
2288
2289
2290 null_LIBS="$LIBS"
2291
2292 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
2293 echo "configure:2294: checking for cos in -lm" >&5
2294 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
2295 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2296   echo $ac_n "(cached) $ac_c" 1>&6
2297 else
2298   ac_save_LIBS="$LIBS"
2299 LIBS="-lm  $LIBS"
2300 cat > conftest.$ac_ext <<EOF
2301 #line 2302 "configure"
2302 #include "confdefs.h"
2303 /* Override any gcc2 internal prototype to avoid an error.  */
2304 /* We use char because int might match the return type of a gcc2
2305     builtin and then its argument prototype would still apply.  */
2306 char cos();
2307
2308 int main() {
2309 cos()
2310 ; return 0; }
2311 EOF
2312 if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2313   rm -rf conftest*
2314   eval "ac_cv_lib_$ac_lib_var=yes"
2315 else
2316   echo "configure: failed program was:" >&5
2317   cat conftest.$ac_ext >&5
2318   rm -rf conftest*
2319   eval "ac_cv_lib_$ac_lib_var=no"
2320 fi
2321 rm -f conftest*
2322 LIBS="$ac_save_LIBS"
2323
2324 fi
2325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2326   echo "$ac_t""yes" 1>&6
2327     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2328     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2329   cat >> confdefs.h <<EOF
2330 #define $ac_tr_lib 1
2331 EOF
2332
2333   LIBS="-lm $LIBS"
2334
2335 else
2336   echo "$ac_t""no" 1>&6
2337 fi
2338
2339
2340 base_LIBS="$LIBS"
2341
2342 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2343 echo "configure:2344: checking for socket in -lsocket" >&5
2344 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2345 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   ac_save_LIBS="$LIBS"
2349 LIBS="-lsocket  $LIBS"
2350 cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 /* Override any gcc2 internal prototype to avoid an error.  */
2354 /* We use char because int might match the return type of a gcc2
2355     builtin and then its argument prototype would still apply.  */
2356 char socket();
2357
2358 int main() {
2359 socket()
2360 ; return 0; }
2361 EOF
2362 if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2363   rm -rf conftest*
2364   eval "ac_cv_lib_$ac_lib_var=yes"
2365 else
2366   echo "configure: failed program was:" >&5
2367   cat conftest.$ac_ext >&5
2368   rm -rf conftest*
2369   eval "ac_cv_lib_$ac_lib_var=no"
2370 fi
2371 rm -f conftest*
2372 LIBS="$ac_save_LIBS"
2373
2374 fi
2375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2376   echo "$ac_t""yes" 1>&6
2377     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2378     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2379   cat >> confdefs.h <<EOF
2380 #define $ac_tr_lib 1
2381 EOF
2382
2383   LIBS="-lsocket $LIBS"
2384
2385 else
2386   echo "$ac_t""no" 1>&6
2387 fi
2388
2389 echo $ac_n "checking for XCreateWindow in -lX11""... $ac_c" 1>&6
2390 echo "configure:2391: checking for XCreateWindow in -lX11" >&5
2391 ac_lib_var=`echo X11'_'XCreateWindow | sed 'y%./+-%__p_%'`
2392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2393   echo $ac_n "(cached) $ac_c" 1>&6
2394 else
2395   ac_save_LIBS="$LIBS"
2396 LIBS="-lX11  $LIBS"
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 /* Override any gcc2 internal prototype to avoid an error.  */
2401 /* We use char because int might match the return type of a gcc2
2402     builtin and then its argument prototype would still apply.  */
2403 char XCreateWindow();
2404
2405 int main() {
2406 XCreateWindow()
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2410   rm -rf conftest*
2411   eval "ac_cv_lib_$ac_lib_var=yes"
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_lib_$ac_lib_var=no"
2417 fi
2418 rm -f conftest*
2419 LIBS="$ac_save_LIBS"
2420
2421 fi
2422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2423   echo "$ac_t""yes" 1>&6
2424     ac_tr_lib=HAVE_LIB`echo X11 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2425     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2426   cat >> confdefs.h <<EOF
2427 #define $ac_tr_lib 1
2428 EOF
2429
2430   LIBS="-lX11 $LIBS"
2431
2432 else
2433   echo "$ac_t""no" 1>&6
2434 fi
2435
2436 echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6
2437 echo "configure:2438: checking for XShmCreateImage in -lXext" >&5
2438 ac_lib_var=`echo Xext'_'XShmCreateImage | sed 'y%./+-%__p_%'`
2439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   ac_save_LIBS="$LIBS"
2443 LIBS="-lXext  $LIBS"
2444 cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 /* Override any gcc2 internal prototype to avoid an error.  */
2448 /* We use char because int might match the return type of a gcc2
2449     builtin and then its argument prototype would still apply.  */
2450 char XShmCreateImage();
2451
2452 int main() {
2453 XShmCreateImage()
2454 ; return 0; }
2455 EOF
2456 if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2457   rm -rf conftest*
2458   eval "ac_cv_lib_$ac_lib_var=yes"
2459 else
2460   echo "configure: failed program was:" >&5
2461   cat conftest.$ac_ext >&5
2462   rm -rf conftest*
2463   eval "ac_cv_lib_$ac_lib_var=no"
2464 fi
2465 rm -f conftest*
2466 LIBS="$ac_save_LIBS"
2467
2468 fi
2469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2470   echo "$ac_t""yes" 1>&6
2471     ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2472     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2473   cat >> confdefs.h <<EOF
2474 #define $ac_tr_lib 1
2475 EOF
2476
2477   LIBS="-lXext $LIBS"
2478
2479 else
2480   echo "$ac_t""no" 1>&6
2481 fi
2482
2483 echo $ac_n "checking for XGetExtensionVersion in -lXi""... $ac_c" 1>&6
2484 echo "configure:2485: checking for XGetExtensionVersion in -lXi" >&5
2485 ac_lib_var=`echo Xi'_'XGetExtensionVersion | sed 'y%./+-%__p_%'`
2486 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2487   echo $ac_n "(cached) $ac_c" 1>&6
2488 else
2489   ac_save_LIBS="$LIBS"
2490 LIBS="-lXi  $LIBS"
2491 cat > conftest.$ac_ext <<EOF
2492 #line 2493 "configure"
2493 #include "confdefs.h"
2494 /* Override any gcc2 internal prototype to avoid an error.  */
2495 /* We use char because int might match the return type of a gcc2
2496     builtin and then its argument prototype would still apply.  */
2497 char XGetExtensionVersion();
2498
2499 int main() {
2500 XGetExtensionVersion()
2501 ; return 0; }
2502 EOF
2503 if { (eval echo configure:2504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2504   rm -rf conftest*
2505   eval "ac_cv_lib_$ac_lib_var=yes"
2506 else
2507   echo "configure: failed program was:" >&5
2508   cat conftest.$ac_ext >&5
2509   rm -rf conftest*
2510   eval "ac_cv_lib_$ac_lib_var=no"
2511 fi
2512 rm -f conftest*
2513 LIBS="$ac_save_LIBS"
2514
2515 fi
2516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2517   echo "$ac_t""yes" 1>&6
2518     ac_tr_lib=HAVE_LIB`echo Xi | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2519     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2520   cat >> confdefs.h <<EOF
2521 #define $ac_tr_lib 1
2522 EOF
2523
2524   LIBS="-lXi $LIBS"
2525
2526 else
2527   echo "$ac_t""no" 1>&6
2528 fi
2529
2530 echo $ac_n "checking for IceOpenConnection in -lICE""... $ac_c" 1>&6
2531 echo "configure:2532: checking for IceOpenConnection in -lICE" >&5
2532 ac_lib_var=`echo ICE'_'IceOpenConnection | sed 'y%./+-%__p_%'`
2533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2534   echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536   ac_save_LIBS="$LIBS"
2537 LIBS="-lICE  $LIBS"
2538 cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2541 /* Override any gcc2 internal prototype to avoid an error.  */
2542 /* We use char because int might match the return type of a gcc2
2543     builtin and then its argument prototype would still apply.  */
2544 char IceOpenConnection();
2545
2546 int main() {
2547 IceOpenConnection()
2548 ; return 0; }
2549 EOF
2550 if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2551   rm -rf conftest*
2552   eval "ac_cv_lib_$ac_lib_var=yes"
2553 else
2554   echo "configure: failed program was:" >&5
2555   cat conftest.$ac_ext >&5
2556   rm -rf conftest*
2557   eval "ac_cv_lib_$ac_lib_var=no"
2558 fi
2559 rm -f conftest*
2560 LIBS="$ac_save_LIBS"
2561
2562 fi
2563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2564   echo "$ac_t""yes" 1>&6
2565     ac_tr_lib=HAVE_LIB`echo ICE | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2566     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2567   cat >> confdefs.h <<EOF
2568 #define $ac_tr_lib 1
2569 EOF
2570
2571   LIBS="-lICE $LIBS"
2572
2573 else
2574   echo "$ac_t""no" 1>&6
2575 fi
2576
2577 echo $ac_n "checking for SmcOpenConnection in -lSM""... $ac_c" 1>&6
2578 echo "configure:2579: checking for SmcOpenConnection in -lSM" >&5
2579 ac_lib_var=`echo SM'_'SmcOpenConnection | sed 'y%./+-%__p_%'`
2580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   ac_save_LIBS="$LIBS"
2584 LIBS="-lSM  $LIBS"
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 /* Override any gcc2 internal prototype to avoid an error.  */
2589 /* We use char because int might match the return type of a gcc2
2590     builtin and then its argument prototype would still apply.  */
2591 char SmcOpenConnection();
2592
2593 int main() {
2594 SmcOpenConnection()
2595 ; return 0; }
2596 EOF
2597 if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2598   rm -rf conftest*
2599   eval "ac_cv_lib_$ac_lib_var=yes"
2600 else
2601   echo "configure: failed program was:" >&5
2602   cat conftest.$ac_ext >&5
2603   rm -rf conftest*
2604   eval "ac_cv_lib_$ac_lib_var=no"
2605 fi
2606 rm -f conftest*
2607 LIBS="$ac_save_LIBS"
2608
2609 fi
2610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2611   echo "$ac_t""yes" 1>&6
2612     ac_tr_lib=HAVE_LIB`echo SM | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2613     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2614   cat >> confdefs.h <<EOF
2615 #define $ac_tr_lib 1
2616 EOF
2617
2618   LIBS="-lSM $LIBS"
2619
2620 else
2621   echo "$ac_t""no" 1>&6
2622 fi
2623
2624 echo $ac_n "checking for XtMalloc in -lXt""... $ac_c" 1>&6
2625 echo "configure:2626: checking for XtMalloc in -lXt" >&5
2626 ac_lib_var=`echo Xt'_'XtMalloc | sed 'y%./+-%__p_%'`
2627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2628   echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630   ac_save_LIBS="$LIBS"
2631 LIBS="-lXt  $LIBS"
2632 cat > conftest.$ac_ext <<EOF
2633 #line 2634 "configure"
2634 #include "confdefs.h"
2635 /* Override any gcc2 internal prototype to avoid an error.  */
2636 /* We use char because int might match the return type of a gcc2
2637     builtin and then its argument prototype would still apply.  */
2638 char XtMalloc();
2639
2640 int main() {
2641 XtMalloc()
2642 ; return 0; }
2643 EOF
2644 if { (eval echo configure:2645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2645   rm -rf conftest*
2646   eval "ac_cv_lib_$ac_lib_var=yes"
2647 else
2648   echo "configure: failed program was:" >&5
2649   cat conftest.$ac_ext >&5
2650   rm -rf conftest*
2651   eval "ac_cv_lib_$ac_lib_var=no"
2652 fi
2653 rm -f conftest*
2654 LIBS="$ac_save_LIBS"
2655
2656 fi
2657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2658   echo "$ac_t""yes" 1>&6
2659     ac_tr_lib=HAVE_LIB`echo Xt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2660     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2661   cat >> confdefs.h <<EOF
2662 #define $ac_tr_lib 1
2663 EOF
2664
2665   LIBS="-lXt $LIBS"
2666
2667 else
2668   echo "$ac_t""no" 1>&6
2669 fi
2670
2671 echo $ac_n "checking for XmuLookupStandardColormap in -lXmu""... $ac_c" 1>&6
2672 echo "configure:2673: checking for XmuLookupStandardColormap in -lXmu" >&5
2673 ac_lib_var=`echo Xmu'_'XmuLookupStandardColormap | sed 'y%./+-%__p_%'`
2674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677   ac_save_LIBS="$LIBS"
2678 LIBS="-lXmu  $LIBS"
2679 cat > conftest.$ac_ext <<EOF
2680 #line 2681 "configure"
2681 #include "confdefs.h"
2682 /* Override any gcc2 internal prototype to avoid an error.  */
2683 /* We use char because int might match the return type of a gcc2
2684     builtin and then its argument prototype would still apply.  */
2685 char XmuLookupStandardColormap();
2686
2687 int main() {
2688 XmuLookupStandardColormap()
2689 ; return 0; }
2690 EOF
2691 if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2692   rm -rf conftest*
2693   eval "ac_cv_lib_$ac_lib_var=yes"
2694 else
2695   echo "configure: failed program was:" >&5
2696   cat conftest.$ac_ext >&5
2697   rm -rf conftest*
2698   eval "ac_cv_lib_$ac_lib_var=no"
2699 fi
2700 rm -f conftest*
2701 LIBS="$ac_save_LIBS"
2702
2703 fi
2704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2705   echo "$ac_t""yes" 1>&6
2706     ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2707     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2708   cat >> confdefs.h <<EOF
2709 #define $ac_tr_lib 1
2710 EOF
2711
2712   LIBS="-lXmu $LIBS"
2713
2714 else
2715   echo "$ac_t""no" 1>&6
2716 fi
2717
2718
2719
2720 if test "x$ac_cv_header_windows_h" != "xyes" ; then
2721     
2722     echo $ac_n "checking for glNewList in -lGLcore""... $ac_c" 1>&6
2723 echo "configure:2724: checking for glNewList in -lGLcore" >&5
2724 ac_lib_var=`echo GLcore'_'glNewList | sed 'y%./+-%__p_%'`
2725 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   ac_save_LIBS="$LIBS"
2729 LIBS="-lGLcore  $LIBS"
2730 cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733 /* Override any gcc2 internal prototype to avoid an error.  */
2734 /* We use char because int might match the return type of a gcc2
2735     builtin and then its argument prototype would still apply.  */
2736 char glNewList();
2737
2738 int main() {
2739 glNewList()
2740 ; return 0; }
2741 EOF
2742 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2743   rm -rf conftest*
2744   eval "ac_cv_lib_$ac_lib_var=yes"
2745 else
2746   echo "configure: failed program was:" >&5
2747   cat conftest.$ac_ext >&5
2748   rm -rf conftest*
2749   eval "ac_cv_lib_$ac_lib_var=no"
2750 fi
2751 rm -f conftest*
2752 LIBS="$ac_save_LIBS"
2753
2754 fi
2755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2756   echo "$ac_t""yes" 1>&6
2757     ac_tr_lib=HAVE_LIB`echo GLcore | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2758     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2759   cat >> confdefs.h <<EOF
2760 #define $ac_tr_lib 1
2761 EOF
2762
2763   LIBS="-lGLcore $LIBS"
2764
2765 else
2766   echo "$ac_t""no" 1>&6
2767 fi
2768
2769     if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then
2770                 echo $ac_n "checking for glNewList in -lGL""... $ac_c" 1>&6
2771 echo "configure:2772: checking for glNewList in -lGL" >&5
2772 ac_lib_var=`echo GL'_'glNewList | sed 'y%./+-%__p_%'`
2773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2774   echo $ac_n "(cached) $ac_c" 1>&6
2775 else
2776   ac_save_LIBS="$LIBS"
2777 LIBS="-lGL  $LIBS"
2778 cat > conftest.$ac_ext <<EOF
2779 #line 2780 "configure"
2780 #include "confdefs.h"
2781 /* Override any gcc2 internal prototype to avoid an error.  */
2782 /* We use char because int might match the return type of a gcc2
2783     builtin and then its argument prototype would still apply.  */
2784 char glNewList();
2785
2786 int main() {
2787 glNewList()
2788 ; return 0; }
2789 EOF
2790 if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2791   rm -rf conftest*
2792   eval "ac_cv_lib_$ac_lib_var=yes"
2793 else
2794   echo "configure: failed program was:" >&5
2795   cat conftest.$ac_ext >&5
2796   rm -rf conftest*
2797   eval "ac_cv_lib_$ac_lib_var=no"
2798 fi
2799 rm -f conftest*
2800 LIBS="$ac_save_LIBS"
2801
2802 fi
2803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2804   echo "$ac_t""yes" 1>&6
2805     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2806     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2807   cat >> confdefs.h <<EOF
2808 #define $ac_tr_lib 1
2809 EOF
2810
2811   LIBS="-lGL $LIBS"
2812
2813 else
2814   echo "$ac_t""no" 1>&6
2815 fi
2816
2817         if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
2818                     echo $ac_n "checking for glNewList in -lMesaGL""... $ac_c" 1>&6
2819 echo "configure:2820: checking for glNewList in -lMesaGL" >&5
2820 ac_lib_var=`echo MesaGL'_'glNewList | sed 'y%./+-%__p_%'`
2821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   ac_save_LIBS="$LIBS"
2825 LIBS="-lMesaGL  $LIBS"
2826 cat > conftest.$ac_ext <<EOF
2827 #line 2828 "configure"
2828 #include "confdefs.h"
2829 /* Override any gcc2 internal prototype to avoid an error.  */
2830 /* We use char because int might match the return type of a gcc2
2831     builtin and then its argument prototype would still apply.  */
2832 char glNewList();
2833
2834 int main() {
2835 glNewList()
2836 ; return 0; }
2837 EOF
2838 if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2839   rm -rf conftest*
2840   eval "ac_cv_lib_$ac_lib_var=yes"
2841 else
2842   echo "configure: failed program was:" >&5
2843   cat conftest.$ac_ext >&5
2844   rm -rf conftest*
2845   eval "ac_cv_lib_$ac_lib_var=no"
2846 fi
2847 rm -f conftest*
2848 LIBS="$ac_save_LIBS"
2849
2850 fi
2851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2852   echo "$ac_t""yes" 1>&6
2853     ac_tr_lib=HAVE_LIB`echo MesaGL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2854     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2855   cat >> confdefs.h <<EOF
2856 #define $ac_tr_lib 1
2857 EOF
2858
2859   LIBS="-lMesaGL $LIBS"
2860
2861 else
2862   echo "$ac_t""no" 1>&6
2863 fi
2864
2865         fi
2866     else
2867                 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
2868 echo "configure:2869: checking for glXCreateContext in -lGL" >&5
2869 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
2870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2871   echo $ac_n "(cached) $ac_c" 1>&6
2872 else
2873   ac_save_LIBS="$LIBS"
2874 LIBS="-lGL  $LIBS"
2875 cat > conftest.$ac_ext <<EOF
2876 #line 2877 "configure"
2877 #include "confdefs.h"
2878 /* Override any gcc2 internal prototype to avoid an error.  */
2879 /* We use char because int might match the return type of a gcc2
2880     builtin and then its argument prototype would still apply.  */
2881 char glXCreateContext();
2882
2883 int main() {
2884 glXCreateContext()
2885 ; return 0; }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2888   rm -rf conftest*
2889   eval "ac_cv_lib_$ac_lib_var=yes"
2890 else
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -rf conftest*
2894   eval "ac_cv_lib_$ac_lib_var=no"
2895 fi
2896 rm -f conftest*
2897 LIBS="$ac_save_LIBS"
2898
2899 fi
2900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2901   echo "$ac_t""yes" 1>&6
2902     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2903     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2904   cat >> confdefs.h <<EOF
2905 #define $ac_tr_lib 1
2906 EOF
2907
2908   LIBS="-lGL $LIBS"
2909
2910 else
2911   echo "$ac_t""no" 1>&6
2912 fi
2913
2914     fi
2915
2916         if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then
2917         ac_safe=`echo "GL/xmesa.h" | sed 'y%./+-%__p_%'`
2918 echo $ac_n "checking for GL/xmesa.h""... $ac_c" 1>&6
2919 echo "configure:2920: checking for GL/xmesa.h" >&5
2920 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2921   echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923   cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926 #include <GL/xmesa.h>
2927 EOF
2928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2929 { (eval echo configure:2930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2930 ac_err=`grep -v '^ *+' conftest.out`
2931 if test -z "$ac_err"; then
2932   rm -rf conftest*
2933   eval "ac_cv_header_$ac_safe=yes"
2934 else
2935   echo "$ac_err" >&5
2936   echo "configure: failed program was:" >&5
2937   cat conftest.$ac_ext >&5
2938   rm -rf conftest*
2939   eval "ac_cv_header_$ac_safe=no"
2940 fi
2941 rm -f conftest*
2942 fi
2943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2944   echo "$ac_t""yes" 1>&6
2945   :
2946 else
2947   echo "$ac_t""no" 1>&6
2948 fi
2949
2950         if test "x$ac_cv_header_GL_xmesa_h" = "xyes"; then
2951             cat >> confdefs.h <<\EOF
2952 #define XMESA  1
2953 EOF
2954
2955             cat >> confdefs.h <<\EOF
2956 #define FX  1
2957 EOF
2958
2959         fi
2960     fi
2961
2962     echo $ac_n "checking for gluLookAt in -lGLU""... $ac_c" 1>&6
2963 echo "configure:2964: checking for gluLookAt in -lGLU" >&5
2964 ac_lib_var=`echo GLU'_'gluLookAt | sed 'y%./+-%__p_%'`
2965 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2966   echo $ac_n "(cached) $ac_c" 1>&6
2967 else
2968   ac_save_LIBS="$LIBS"
2969 LIBS="-lGLU  $LIBS"
2970 cat > conftest.$ac_ext <<EOF
2971 #line 2972 "configure"
2972 #include "confdefs.h"
2973 /* Override any gcc2 internal prototype to avoid an error.  */
2974 /* We use char because int might match the return type of a gcc2
2975     builtin and then its argument prototype would still apply.  */
2976 char gluLookAt();
2977
2978 int main() {
2979 gluLookAt()
2980 ; return 0; }
2981 EOF
2982 if { (eval echo configure:2983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2983   rm -rf conftest*
2984   eval "ac_cv_lib_$ac_lib_var=yes"
2985 else
2986   echo "configure: failed program was:" >&5
2987   cat conftest.$ac_ext >&5
2988   rm -rf conftest*
2989   eval "ac_cv_lib_$ac_lib_var=no"
2990 fi
2991 rm -f conftest*
2992 LIBS="$ac_save_LIBS"
2993
2994 fi
2995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2996   echo "$ac_t""yes" 1>&6
2997     ac_tr_lib=HAVE_LIB`echo GLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2998     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2999   cat >> confdefs.h <<EOF
3000 #define $ac_tr_lib 1
3001 EOF
3002
3003   LIBS="-lGLU $LIBS"
3004
3005 else
3006   echo "$ac_t""no" 1>&6
3007 fi
3008
3009     if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
3010                 echo $ac_n "checking for gluLookAt in -lMesaGLU""... $ac_c" 1>&6
3011 echo "configure:3012: checking for gluLookAt in -lMesaGLU" >&5
3012 ac_lib_var=`echo MesaGLU'_'gluLookAt | sed 'y%./+-%__p_%'`
3013 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3014   echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016   ac_save_LIBS="$LIBS"
3017 LIBS="-lMesaGLU  $LIBS"
3018 cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 /* Override any gcc2 internal prototype to avoid an error.  */
3022 /* We use char because int might match the return type of a gcc2
3023     builtin and then its argument prototype would still apply.  */
3024 char gluLookAt();
3025
3026 int main() {
3027 gluLookAt()
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3031   rm -rf conftest*
3032   eval "ac_cv_lib_$ac_lib_var=yes"
3033 else
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   eval "ac_cv_lib_$ac_lib_var=no"
3038 fi
3039 rm -f conftest*
3040 LIBS="$ac_save_LIBS"
3041
3042 fi
3043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3044   echo "$ac_t""yes" 1>&6
3045     ac_tr_lib=HAVE_LIB`echo MesaGLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3046     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3047   cat >> confdefs.h <<EOF
3048 #define $ac_tr_lib 1
3049 EOF
3050
3051   LIBS="-lMesaGLU $LIBS"
3052
3053 else
3054   echo "$ac_t""no" 1>&6
3055 fi
3056
3057     fi
3058
3059         echo $ac_n "checking for glutGetModifiers in -lglut""... $ac_c" 1>&6
3060 echo "configure:3061: checking for glutGetModifiers in -lglut" >&5
3061 ac_lib_var=`echo glut'_'glutGetModifiers | sed 'y%./+-%__p_%'`
3062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   ac_save_LIBS="$LIBS"
3066 LIBS="-lglut  $LIBS"
3067 cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070 /* Override any gcc2 internal prototype to avoid an error.  */
3071 /* We use char because int might match the return type of a gcc2
3072     builtin and then its argument prototype would still apply.  */
3073 char glutGetModifiers();
3074
3075 int main() {
3076 glutGetModifiers()
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3080   rm -rf conftest*
3081   eval "ac_cv_lib_$ac_lib_var=yes"
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -rf conftest*
3086   eval "ac_cv_lib_$ac_lib_var=no"
3087 fi
3088 rm -f conftest*
3089 LIBS="$ac_save_LIBS"
3090
3091 fi
3092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3093   echo "$ac_t""yes" 1>&6
3094     ac_tr_lib=HAVE_LIB`echo glut | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3095     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3096   cat >> confdefs.h <<EOF
3097 #define $ac_tr_lib 1
3098 EOF
3099
3100   LIBS="-lglut $LIBS"
3101
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106
3107             save_LIBS="$LIBS"
3108     echo $ac_n "checking for glutGameModeString in -lglut""... $ac_c" 1>&6
3109 echo "configure:3110: checking for glutGameModeString in -lglut" >&5
3110 ac_lib_var=`echo glut'_'glutGameModeString | sed 'y%./+-%__p_%'`
3111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   ac_save_LIBS="$LIBS"
3115 LIBS="-lglut  $LIBS"
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119 /* Override any gcc2 internal prototype to avoid an error.  */
3120 /* We use char because int might match the return type of a gcc2
3121     builtin and then its argument prototype would still apply.  */
3122 char glutGameModeString();
3123
3124 int main() {
3125 glutGameModeString()
3126 ; return 0; }
3127 EOF
3128 if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3129   rm -rf conftest*
3130   eval "ac_cv_lib_$ac_lib_var=yes"
3131 else
3132   echo "configure: failed program was:" >&5
3133   cat conftest.$ac_ext >&5
3134   rm -rf conftest*
3135   eval "ac_cv_lib_$ac_lib_var=no"
3136 fi
3137 rm -f conftest*
3138 LIBS="$ac_save_LIBS"
3139
3140 fi
3141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3142   echo "$ac_t""yes" 1>&6
3143     ac_tr_lib=HAVE_LIB`echo glut | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3145   cat >> confdefs.h <<EOF
3146 #define $ac_tr_lib 1
3147 EOF
3148
3149   LIBS="-lglut $LIBS"
3150
3151 else
3152   echo "$ac_t""no" 1>&6
3153 fi
3154
3155     LIBS="$save_LIBS"
3156 else
3157         
3158     echo Win32 specific hacks...
3159     cat >> confdefs.h <<\EOF
3160 #define WIN32 1
3161 EOF
3162
3163
3164         
3165
3166 if test "no" = "yes"; then
3167   ENABLE_XMESA_FX_TRUE=
3168   ENABLE_XMESA_FX_FALSE='#'
3169 else
3170   ENABLE_XMESA_FX_TRUE='#'
3171   ENABLE_XMESA_FX_FALSE=
3172 fi
3173
3174         ac_cv_lib_glut_glutGetModifiers="yes"
3175     ac_cv_lib_glut_glutGameModeString="yes"
3176
3177     if test "x$with_sgi_opengl" = "xyes" ; then
3178         echo "Building with glut.dll, glu.dll, and opengl.dll"
3179         WIN32_GLUT=glut
3180         WIN32_GLU=glu
3181         WIN32_OPENGL=opengl
3182     else 
3183         echo "Building with glut32.dll, glu32.dll, and opengl32.dll"
3184         WIN32_GLUT=glut32
3185         WIN32_GLU=glu32
3186         WIN32_OPENGL=opengl32
3187     fi
3188
3189     LIBS="$LIBS -l${WIN32_GLUT} -l${WIN32_GLU} -l${WIN32_OPENGL}"
3190     LIBS="$LIBS -luser32 -lgdi32"
3191     echo "Will link apps with $LIBS"
3192 fi
3193
3194 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
3195     echo 
3196     echo "Unable to find the necessary OpenGL or GLUT libraries."
3197     echo "See config.log for automated test details and results ..."
3198     exit 1
3199 fi
3200
3201 if test "x$ac_cv_lib_glut_glutGameModeString" = "xno"; then
3202     echo
3203     echo "Your version of glut doesn't support game mode."
3204     echo "You need to fetch and install the latest version of glut from:"
3205     echo
3206     echo "    http://reality.sgi.com/opengl/glut3/glut3.html"
3207     exit 1
3208 fi
3209
3210 opengl_LIBS="$LIBS"
3211 LIBS="$base_LIBS"
3212
3213
3214
3215
3216
3217
3218 if test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" ; then
3219   HAVE_XWINDOWS_TRUE=
3220   HAVE_XWINDOWS_FALSE='#'
3221 else
3222   HAVE_XWINDOWS_TRUE='#'
3223   HAVE_XWINDOWS_FALSE=
3224 fi
3225
3226 ac_safe=`echo "plib/pu.h" | sed 'y%./+-%__p_%'`
3227 echo $ac_n "checking for plib/pu.h""... $ac_c" 1>&6
3228 echo "configure:3229: checking for plib/pu.h" >&5
3229 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3230   echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <plib/pu.h>
3236 EOF
3237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3238 { (eval echo configure:3239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3239 ac_err=`grep -v '^ *+' conftest.out`
3240 if test -z "$ac_err"; then
3241   rm -rf conftest*
3242   eval "ac_cv_header_$ac_safe=yes"
3243 else
3244   echo "$ac_err" >&5
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247   rm -rf conftest*
3248   eval "ac_cv_header_$ac_safe=no"
3249 fi
3250 rm -f conftest*
3251 fi
3252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3253   echo "$ac_t""yes" 1>&6
3254   :
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258
3259 if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
3260     echo
3261     echo "You *must* have the plib library installed on your system to build"
3262     echo "the FGFS simulator!"
3263     echo
3264     echo "Please see README.plib for more details."
3265     echo
3266     echo "configure aborted."
3267     exit
3268 fi
3269
3270 ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
3271 echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
3272 echo "configure:3273: checking for zlib.h" >&5
3273 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3274   echo $ac_n "(cached) $ac_c" 1>&6
3275 else
3276   cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 #include <zlib.h>
3280 EOF
3281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3282 { (eval echo configure:3283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3283 ac_err=`grep -v '^ *+' conftest.out`
3284 if test -z "$ac_err"; then
3285   rm -rf conftest*
3286   eval "ac_cv_header_$ac_safe=yes"
3287 else
3288   echo "$ac_err" >&5
3289   echo "configure: failed program was:" >&5
3290   cat conftest.$ac_ext >&5
3291   rm -rf conftest*
3292   eval "ac_cv_header_$ac_safe=no"
3293 fi
3294 rm -f conftest*
3295 fi
3296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3297   echo "$ac_t""yes" 1>&6
3298   :
3299 else
3300   echo "$ac_t""no" 1>&6
3301 fi
3302
3303 if test "x$ac_cv_header_zlib_h" != "xyes"; then
3304     echo "no zlib found, building."
3305 fi
3306
3307
3308 if test "x$ac_cv_header_zlib_h" = "xyes" ; then
3309   HAVE_ZLIB_TRUE=
3310   HAVE_ZLIB_FALSE='#'
3311 else
3312   HAVE_ZLIB_TRUE='#'
3313   HAVE_ZLIB_FALSE=
3314 fi
3315
3316 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3317 echo "configure:3318: checking for ANSI C header files" >&5
3318 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3319   echo $ac_n "(cached) $ac_c" 1>&6
3320 else
3321   cat > conftest.$ac_ext <<EOF
3322 #line 3323 "configure"
3323 #include "confdefs.h"
3324 #include <stdlib.h>
3325 #include <stdarg.h>
3326 #include <string.h>
3327 #include <float.h>
3328 EOF
3329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3330 { (eval echo configure:3331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3331 ac_err=`grep -v '^ *+' conftest.out`
3332 if test -z "$ac_err"; then
3333   rm -rf conftest*
3334   ac_cv_header_stdc=yes
3335 else
3336   echo "$ac_err" >&5
3337   echo "configure: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   rm -rf conftest*
3340   ac_cv_header_stdc=no
3341 fi
3342 rm -f conftest*
3343
3344 if test $ac_cv_header_stdc = yes; then
3345   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3346 cat > conftest.$ac_ext <<EOF
3347 #line 3348 "configure"
3348 #include "confdefs.h"
3349 #include <string.h>
3350 EOF
3351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3352   egrep "memchr" >/dev/null 2>&1; then
3353   :
3354 else
3355   rm -rf conftest*
3356   ac_cv_header_stdc=no
3357 fi
3358 rm -f conftest*
3359
3360 fi
3361
3362 if test $ac_cv_header_stdc = yes; then
3363   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 #include <stdlib.h>
3368 EOF
3369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3370   egrep "free" >/dev/null 2>&1; then
3371   :
3372 else
3373   rm -rf conftest*
3374   ac_cv_header_stdc=no
3375 fi
3376 rm -f conftest*
3377
3378 fi
3379
3380 if test $ac_cv_header_stdc = yes; then
3381   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3382 if test "$cross_compiling" = yes; then
3383   :
3384 else
3385   cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 #include <ctype.h>
3389 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3390 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3391 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3392 int main () { int i; for (i = 0; i < 256; i++)
3393 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3394 exit (0); }
3395
3396 EOF
3397 if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3398 then
3399   :
3400 else
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -fr conftest*
3404   ac_cv_header_stdc=no
3405 fi
3406 rm -fr conftest*
3407 fi
3408
3409 fi
3410 fi
3411
3412 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3413 if test $ac_cv_header_stdc = yes; then
3414   cat >> confdefs.h <<\EOF
3415 #define STDC_HEADERS 1
3416 EOF
3417
3418 fi
3419
3420 for ac_hdr in \
3421         fcntl.h getopt.h malloc.h memory.h stdlib.h sys/param.h sys/stat.h \
3422         sys/time.h sys/timeb.h unistd.h windows.h winbase.h values.h 
3423 do
3424 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3425 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3426 echo "configure:3427: checking for $ac_hdr" >&5
3427 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3428   echo $ac_n "(cached) $ac_c" 1>&6
3429 else
3430   cat > conftest.$ac_ext <<EOF
3431 #line 3432 "configure"
3432 #include "confdefs.h"
3433 #include <$ac_hdr>
3434 EOF
3435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3436 { (eval echo configure:3437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3437 ac_err=`grep -v '^ *+' conftest.out`
3438 if test -z "$ac_err"; then
3439   rm -rf conftest*
3440   eval "ac_cv_header_$ac_safe=yes"
3441 else
3442   echo "$ac_err" >&5
3443   echo "configure: failed program was:" >&5
3444   cat conftest.$ac_ext >&5
3445   rm -rf conftest*
3446   eval "ac_cv_header_$ac_safe=no"
3447 fi
3448 rm -f conftest*
3449 fi
3450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3451   echo "$ac_t""yes" 1>&6
3452     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3453   cat >> confdefs.h <<EOF
3454 #define $ac_tr_hdr 1
3455 EOF
3456  
3457 else
3458   echo "$ac_t""no" 1>&6
3459 fi
3460 done
3461
3462
3463 echo $ac_n "checking for working const""... $ac_c" 1>&6
3464 echo "configure:3465: checking for working const" >&5
3465 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471
3472 int main() {
3473
3474 /* Ultrix mips cc rejects this.  */
3475 typedef int charset[2]; const charset x;
3476 /* SunOS 4.1.1 cc rejects this.  */
3477 char const *const *ccp;
3478 char **p;
3479 /* NEC SVR4.0.2 mips cc rejects this.  */
3480 struct point {int x, y;};
3481 static struct point const zero = {0,0};
3482 /* AIX XL C 1.02.0.0 rejects this.
3483    It does not let you subtract one const X* pointer from another in an arm
3484    of an if-expression whose if-part is not a constant expression */
3485 const char *g = "string";
3486 ccp = &g + (g ? g-g : 0);
3487 /* HPUX 7.0 cc rejects these. */
3488 ++ccp;
3489 p = (char**) ccp;
3490 ccp = (char const *const *) p;
3491 { /* SCO 3.2v4 cc rejects this.  */
3492   char *t;
3493   char const *s = 0 ? (char *) 0 : (char const *) 0;
3494
3495   *t++ = 0;
3496 }
3497 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3498   int x[] = {25, 17};
3499   const int *foo = &x[0];
3500   ++foo;
3501 }
3502 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3503   typedef const int *iptr;
3504   iptr p = 0;
3505   ++p;
3506 }
3507 { /* AIX XL C 1.02.0.0 rejects this saying
3508      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3509   struct s { int j; const int *ap[3]; };
3510   struct s *b; b->j = 5;
3511 }
3512 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3513   const int foo = 10;
3514 }
3515
3516 ; return 0; }
3517 EOF
3518 if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3519   rm -rf conftest*
3520   ac_cv_c_const=yes
3521 else
3522   echo "configure: failed program was:" >&5
3523   cat conftest.$ac_ext >&5
3524   rm -rf conftest*
3525   ac_cv_c_const=no
3526 fi
3527 rm -f conftest*
3528 fi
3529
3530 echo "$ac_t""$ac_cv_c_const" 1>&6
3531 if test $ac_cv_c_const = no; then
3532   cat >> confdefs.h <<\EOF
3533 #define const 
3534 EOF
3535
3536 fi
3537
3538 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3539 echo "configure:3540: checking for size_t" >&5
3540 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3541   echo $ac_n "(cached) $ac_c" 1>&6
3542 else
3543   cat > conftest.$ac_ext <<EOF
3544 #line 3545 "configure"
3545 #include "confdefs.h"
3546 #include <sys/types.h>
3547 #if STDC_HEADERS
3548 #include <stdlib.h>
3549 #include <stddef.h>
3550 #endif
3551 EOF
3552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3553   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3554   rm -rf conftest*
3555   ac_cv_type_size_t=yes
3556 else
3557   rm -rf conftest*
3558   ac_cv_type_size_t=no
3559 fi
3560 rm -f conftest*
3561
3562 fi
3563 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3564 if test $ac_cv_type_size_t = no; then
3565   cat >> confdefs.h <<\EOF
3566 #define size_t unsigned
3567 EOF
3568
3569 fi
3570
3571 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3572 echo "configure:3573: checking whether time.h and sys/time.h may both be included" >&5
3573 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   cat > conftest.$ac_ext <<EOF
3577 #line 3578 "configure"
3578 #include "confdefs.h"
3579 #include <sys/types.h>
3580 #include <sys/time.h>
3581 #include <time.h>
3582 int main() {
3583 struct tm *tp;
3584 ; return 0; }
3585 EOF
3586 if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3587   rm -rf conftest*
3588   ac_cv_header_time=yes
3589 else
3590   echo "configure: failed program was:" >&5
3591   cat conftest.$ac_ext >&5
3592   rm -rf conftest*
3593   ac_cv_header_time=no
3594 fi
3595 rm -f conftest*
3596 fi
3597
3598 echo "$ac_t""$ac_cv_header_time" 1>&6
3599 if test $ac_cv_header_time = yes; then
3600   cat >> confdefs.h <<\EOF
3601 #define TIME_WITH_SYS_TIME 1
3602 EOF
3603
3604 fi
3605
3606 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3607 echo "configure:3608: checking whether struct tm is in sys/time.h or time.h" >&5
3608 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3609   echo $ac_n "(cached) $ac_c" 1>&6
3610 else
3611   cat > conftest.$ac_ext <<EOF
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614 #include <sys/types.h>
3615 #include <time.h>
3616 int main() {
3617 struct tm *tp; tp->tm_sec;
3618 ; return 0; }
3619 EOF
3620 if { (eval echo configure:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3621   rm -rf conftest*
3622   ac_cv_struct_tm=time.h
3623 else
3624   echo "configure: failed program was:" >&5
3625   cat conftest.$ac_ext >&5
3626   rm -rf conftest*
3627   ac_cv_struct_tm=sys/time.h
3628 fi
3629 rm -f conftest*
3630 fi
3631
3632 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3633 if test $ac_cv_struct_tm = sys/time.h; then
3634   cat >> confdefs.h <<\EOF
3635 #define TM_IN_SYS_TIME 1
3636 EOF
3637
3638 fi
3639
3640
3641 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3642 echo "configure:3643: checking return type of signal handlers" >&5
3643 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 #include <sys/types.h>
3650 #include <signal.h>
3651 #ifdef signal
3652 #undef signal
3653 #endif
3654 #ifdef __cplusplus
3655 extern "C" void (*signal (int, void (*)(int)))(int);
3656 #else
3657 void (*signal ()) ();
3658 #endif
3659
3660 int main() {
3661 int i;
3662 ; return 0; }
3663 EOF
3664 if { (eval echo configure:3665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3665   rm -rf conftest*
3666   ac_cv_type_signal=void
3667 else
3668   echo "configure: failed program was:" >&5
3669   cat conftest.$ac_ext >&5
3670   rm -rf conftest*
3671   ac_cv_type_signal=int
3672 fi
3673 rm -f conftest*
3674 fi
3675
3676 echo "$ac_t""$ac_cv_type_signal" 1>&6
3677 cat >> confdefs.h <<EOF
3678 #define RETSIGTYPE $ac_cv_type_signal
3679 EOF
3680
3681
3682 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3683 echo "configure:3684: checking for vprintf" >&5
3684 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690 /* System header to define __stub macros and hopefully few prototypes,
3691     which can conflict with char vprintf(); below.  */
3692 #include <assert.h>
3693 /* Override any gcc2 internal prototype to avoid an error.  */
3694 /* We use char because int might match the return type of a gcc2
3695     builtin and then its argument prototype would still apply.  */
3696 char vprintf();
3697
3698 int main() {
3699
3700 /* The GNU C library defines this for functions which it implements
3701     to always fail with ENOSYS.  Some functions are actually named
3702     something starting with __ and the normal name is an alias.  */
3703 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3704 choke me
3705 #else
3706 vprintf();
3707 #endif
3708
3709 ; return 0; }
3710 EOF
3711 if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3712   rm -rf conftest*
3713   eval "ac_cv_func_vprintf=yes"
3714 else
3715   echo "configure: failed program was:" >&5
3716   cat conftest.$ac_ext >&5
3717   rm -rf conftest*
3718   eval "ac_cv_func_vprintf=no"
3719 fi
3720 rm -f conftest*
3721 fi
3722
3723 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3724   echo "$ac_t""yes" 1>&6
3725   cat >> confdefs.h <<\EOF
3726 #define HAVE_VPRINTF 1
3727 EOF
3728
3729 else
3730   echo "$ac_t""no" 1>&6
3731 fi
3732
3733 if test "$ac_cv_func_vprintf" != yes; then
3734 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3735 echo "configure:3736: checking for _doprnt" >&5
3736 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 /* System header to define __stub macros and hopefully few prototypes,
3743     which can conflict with char _doprnt(); below.  */
3744 #include <assert.h>
3745 /* Override any gcc2 internal prototype to avoid an error.  */
3746 /* We use char because int might match the return type of a gcc2
3747     builtin and then its argument prototype would still apply.  */
3748 char _doprnt();
3749
3750 int main() {
3751
3752 /* The GNU C library defines this for functions which it implements
3753     to always fail with ENOSYS.  Some functions are actually named
3754     something starting with __ and the normal name is an alias.  */
3755 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3756 choke me
3757 #else
3758 _doprnt();
3759 #endif
3760
3761 ; return 0; }
3762 EOF
3763 if { (eval echo configure:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3764   rm -rf conftest*
3765   eval "ac_cv_func__doprnt=yes"
3766 else
3767   echo "configure: failed program was:" >&5
3768   cat conftest.$ac_ext >&5
3769   rm -rf conftest*
3770   eval "ac_cv_func__doprnt=no"
3771 fi
3772 rm -f conftest*
3773 fi
3774
3775 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3776   echo "$ac_t""yes" 1>&6
3777   cat >> confdefs.h <<\EOF
3778 #define HAVE_DOPRNT 1
3779 EOF
3780
3781 else
3782   echo "$ac_t""no" 1>&6
3783 fi
3784
3785 fi
3786
3787 for ac_func in ftime gettimeofday timegm memcpy bcopy mktime strstr rand \
3788         random setitimer getitimer signal GetLocalTime rint getrusage 
3789 do
3790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3791 echo "configure:3792: checking for $ac_func" >&5
3792 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 /* System header to define __stub macros and hopefully few prototypes,
3799     which can conflict with char $ac_func(); below.  */
3800 #include <assert.h>
3801 /* Override any gcc2 internal prototype to avoid an error.  */
3802 /* We use char because int might match the return type of a gcc2
3803     builtin and then its argument prototype would still apply.  */
3804 char $ac_func();
3805
3806 int main() {
3807
3808 /* The GNU C library defines this for functions which it implements
3809     to always fail with ENOSYS.  Some functions are actually named
3810     something starting with __ and the normal name is an alias.  */
3811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3812 choke me
3813 #else
3814 $ac_func();
3815 #endif
3816
3817 ; return 0; }
3818 EOF
3819 if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3820   rm -rf conftest*
3821   eval "ac_cv_func_$ac_func=yes"
3822 else
3823   echo "configure: failed program was:" >&5
3824   cat conftest.$ac_ext >&5
3825   rm -rf conftest*
3826   eval "ac_cv_func_$ac_func=no"
3827 fi
3828 rm -f conftest*
3829 fi
3830
3831 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3832   echo "$ac_t""yes" 1>&6
3833     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3834   cat >> confdefs.h <<EOF
3835 #define $ac_tr_func 1
3836 EOF
3837  
3838 else
3839   echo "$ac_t""no" 1>&6
3840 fi
3841 done
3842
3843
3844
3845
3846
3847
3848 trap '' 1 2 15
3849 cat > confcache <<\EOF
3850 # This file is a shell script that caches the results of configure
3851 # tests run on this system so they can be shared between configure
3852 # scripts and configure runs.  It is not useful on other systems.
3853 # If it contains results you don't want to keep, you may remove or edit it.
3854 #
3855 # By default, configure uses ./config.cache as the cache file,
3856 # creating it if it does not exist already.  You can give configure
3857 # the --cache-file=FILE option to use a different cache file; that is
3858 # what configure does when it calls configure scripts in
3859 # subdirectories, so they share the cache.
3860 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3861 # config.status only pays attention to the cache file if you give it the
3862 # --recheck option to rerun configure.
3863 #
3864 EOF
3865 # The following way of writing the cache mishandles newlines in values,
3866 # but we know of no workaround that is simple, portable, and efficient.
3867 # So, don't put newlines in cache variables' values.
3868 # Ultrix sh set writes to stderr and can't be redirected directly,
3869 # and sets the high bit in the cache file unless we assign to the vars.
3870 (set) 2>&1 |
3871   case `(ac_space=' '; set) 2>&1` in
3872   *ac_space=\ *)
3873     # `set' does not quote correctly, so add quotes (double-quote substitution
3874     # turns \\\\ into \\, and sed turns \\ into \).
3875     sed -n \
3876       -e "s/'/'\\\\''/g" \
3877       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3878     ;;
3879   *)
3880     # `set' quotes correctly as required by POSIX, so do not add quotes.
3881     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3882     ;;
3883   esac >> confcache
3884 if cmp -s $cache_file confcache; then
3885   :
3886 else
3887   if test -w $cache_file; then
3888     echo "updating cache $cache_file"
3889     cat confcache > $cache_file
3890   else
3891     echo "not updating unwritable cache $cache_file"
3892   fi
3893 fi
3894 rm -f confcache
3895
3896 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3897
3898 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3899 # Let make expand exec_prefix.
3900 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3901
3902 # Any assignment to VPATH causes Sun make to only execute
3903 # the first set of double-colon rules, so remove it if not needed.
3904 # If there is a colon in the path, we need to keep it.
3905 if test "x$srcdir" = x.; then
3906   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3907 fi
3908
3909 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3910
3911 DEFS=-DHAVE_CONFIG_H
3912
3913 # Without the "./", some shells look in PATH for config.status.
3914 : ${CONFIG_STATUS=./config.status}
3915
3916 echo creating $CONFIG_STATUS
3917 rm -f $CONFIG_STATUS
3918 cat > $CONFIG_STATUS <<EOF
3919 #! /bin/sh
3920 # Generated automatically by configure.
3921 # Run this file to recreate the current configuration.
3922 # This directory was configured as follows,
3923 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3924 #
3925 # $0 $ac_configure_args
3926 #
3927 # Compiler output produced by configure, useful for debugging
3928 # configure, is in ./config.log if it exists.
3929
3930 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3931 for ac_option
3932 do
3933   case "\$ac_option" in
3934   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3935     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3936     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3937   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3938     echo "$CONFIG_STATUS generated by autoconf version 2.12"
3939     exit 0 ;;
3940   -help | --help | --hel | --he | --h)
3941     echo "\$ac_cs_usage"; exit 0 ;;
3942   *) echo "\$ac_cs_usage"; exit 1 ;;
3943   esac
3944 done
3945
3946 ac_given_srcdir=$srcdir
3947 ac_given_INSTALL="$INSTALL"
3948
3949 trap 'rm -fr `echo "\
3950         VERSION \
3951         Makefile \
3952         include/Makefile \
3953         bucket/Makefile \
3954         debug/Makefile \
3955         math/Makefile \
3956         misc/Makefile \
3957         screen/Makefile \
3958         serial/Makefile \
3959         xgl/Makefile \
3960         zlib/Makefile \
3961  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3962 EOF
3963 cat >> $CONFIG_STATUS <<EOF
3964
3965 # Protect against being on the right side of a sed subst in config.status.
3966 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3967  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3968 $ac_vpsub
3969 $extrasub
3970 s%@CFLAGS@%$CFLAGS%g
3971 s%@CPPFLAGS@%$CPPFLAGS%g
3972 s%@CXXFLAGS@%$CXXFLAGS%g
3973 s%@DEFS@%$DEFS%g
3974 s%@LDFLAGS@%$LDFLAGS%g
3975 s%@LIBS@%$LIBS%g
3976 s%@exec_prefix@%$exec_prefix%g
3977 s%@prefix@%$prefix%g
3978 s%@program_transform_name@%$program_transform_name%g
3979 s%@bindir@%$bindir%g
3980 s%@sbindir@%$sbindir%g
3981 s%@libexecdir@%$libexecdir%g
3982 s%@datadir@%$datadir%g
3983 s%@sysconfdir@%$sysconfdir%g
3984 s%@sharedstatedir@%$sharedstatedir%g
3985 s%@localstatedir@%$localstatedir%g
3986 s%@libdir@%$libdir%g
3987 s%@includedir@%$includedir%g
3988 s%@oldincludedir@%$oldincludedir%g
3989 s%@infodir@%$infodir%g
3990 s%@mandir@%$mandir%g
3991 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3992 s%@INSTALL_DATA@%$INSTALL_DATA%g
3993 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3994 s%@PACKAGE@%$PACKAGE%g
3995 s%@VERSION@%$VERSION%g
3996 s%@ACLOCAL@%$ACLOCAL%g
3997 s%@AUTOCONF@%$AUTOCONF%g
3998 s%@AUTOMAKE@%$AUTOMAKE%g
3999 s%@AUTOHEADER@%$AUTOHEADER%g
4000 s%@MAKEINFO@%$MAKEINFO%g
4001 s%@SET_MAKE@%$SET_MAKE%g
4002 s%@CC@%$CC%g
4003 s%@CXX@%$CXX%g
4004 s%@RANLIB@%$RANLIB%g
4005 s%@LN_S@%$LN_S%g
4006 s%@CPP@%$CPP%g
4007 s%@ENABLE_UNIX_SERIAL_TRUE@%$ENABLE_UNIX_SERIAL_TRUE%g
4008 s%@ENABLE_UNIX_SERIAL_FALSE@%$ENABLE_UNIX_SERIAL_FALSE%g
4009 s%@X_CFLAGS@%$X_CFLAGS%g
4010 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4011 s%@X_LIBS@%$X_LIBS%g
4012 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4013 s%@ENABLE_XMESA_FX_TRUE@%$ENABLE_XMESA_FX_TRUE%g
4014 s%@ENABLE_XMESA_FX_FALSE@%$ENABLE_XMESA_FX_FALSE%g
4015 s%@base_LIBS@%$base_LIBS%g
4016 s%@opengl_LIBS@%$opengl_LIBS%g
4017 s%@HAVE_XWINDOWS_TRUE@%$HAVE_XWINDOWS_TRUE%g
4018 s%@HAVE_XWINDOWS_FALSE@%$HAVE_XWINDOWS_FALSE%g
4019 s%@HAVE_ZLIB_TRUE@%$HAVE_ZLIB_TRUE%g
4020 s%@HAVE_ZLIB_FALSE@%$HAVE_ZLIB_FALSE%g
4021
4022 CEOF
4023 EOF
4024
4025 cat >> $CONFIG_STATUS <<\EOF
4026
4027 # Split the substitutions into bite-sized pieces for seds with
4028 # small command number limits, like on Digital OSF/1 and HP-UX.
4029 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4030 ac_file=1 # Number of current file.
4031 ac_beg=1 # First line for current file.
4032 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4033 ac_more_lines=:
4034 ac_sed_cmds=""
4035 while $ac_more_lines; do
4036   if test $ac_beg -gt 1; then
4037     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4038   else
4039     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4040   fi
4041   if test ! -s conftest.s$ac_file; then
4042     ac_more_lines=false
4043     rm -f conftest.s$ac_file
4044   else
4045     if test -z "$ac_sed_cmds"; then
4046       ac_sed_cmds="sed -f conftest.s$ac_file"
4047     else
4048       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4049     fi
4050     ac_file=`expr $ac_file + 1`
4051     ac_beg=$ac_end
4052     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4053   fi
4054 done
4055 if test -z "$ac_sed_cmds"; then
4056   ac_sed_cmds=cat
4057 fi
4058 EOF
4059
4060 cat >> $CONFIG_STATUS <<EOF
4061
4062 CONFIG_FILES=\${CONFIG_FILES-"\
4063         VERSION \
4064         Makefile \
4065         include/Makefile \
4066         bucket/Makefile \
4067         debug/Makefile \
4068         math/Makefile \
4069         misc/Makefile \
4070         screen/Makefile \
4071         serial/Makefile \
4072         xgl/Makefile \
4073         zlib/Makefile \
4074 "}
4075 EOF
4076 cat >> $CONFIG_STATUS <<\EOF
4077 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4078   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4079   case "$ac_file" in
4080   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4081        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4082   *) ac_file_in="${ac_file}.in" ;;
4083   esac
4084
4085   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4086
4087   # Remove last slash and all that follows it.  Not all systems have dirname.
4088   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4089   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4090     # The file is in a subdirectory.
4091     test ! -d "$ac_dir" && mkdir "$ac_dir"
4092     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4093     # A "../" for each directory in $ac_dir_suffix.
4094     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4095   else
4096     ac_dir_suffix= ac_dots=
4097   fi
4098
4099   case "$ac_given_srcdir" in
4100   .)  srcdir=.
4101       if test -z "$ac_dots"; then top_srcdir=.
4102       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4103   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4104   *) # Relative path.
4105     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4106     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4107   esac
4108
4109   case "$ac_given_INSTALL" in
4110   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4111   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4112   esac
4113
4114   echo creating "$ac_file"
4115   rm -f "$ac_file"
4116   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4117   case "$ac_file" in
4118   *Makefile*) ac_comsub="1i\\
4119 # $configure_input" ;;
4120   *) ac_comsub= ;;
4121   esac
4122
4123   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4124   sed -e "$ac_comsub
4125 s%@configure_input@%$configure_input%g
4126 s%@srcdir@%$srcdir%g
4127 s%@top_srcdir@%$top_srcdir%g
4128 s%@INSTALL@%$INSTALL%g
4129 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4130 fi; done
4131 rm -f conftest.s*
4132
4133 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4134 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4135 #
4136 # ac_d sets the value in "#define NAME VALUE" lines.
4137 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4138 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4139 ac_dC='\3'
4140 ac_dD='%g'
4141 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4142 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4143 ac_uB='\([      ]\)%\1#\2define\3'
4144 ac_uC=' '
4145 ac_uD='\4%g'
4146 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4147 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4148 ac_eB='$%\1#\2define\3'
4149 ac_eC=' '
4150 ac_eD='%g'
4151
4152 if test "${CONFIG_HEADERS+set}" != set; then
4153 EOF
4154 cat >> $CONFIG_STATUS <<EOF
4155   CONFIG_HEADERS="include/config.h"
4156 EOF
4157 cat >> $CONFIG_STATUS <<\EOF
4158 fi
4159 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4160   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4161   case "$ac_file" in
4162   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4163        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4164   *) ac_file_in="${ac_file}.in" ;;
4165   esac
4166
4167   echo creating $ac_file
4168
4169   rm -f conftest.frag conftest.in conftest.out
4170   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4171   cat $ac_file_inputs > conftest.in
4172
4173 EOF
4174
4175 # Transform confdefs.h into a sed script conftest.vals that substitutes
4176 # the proper values into config.h.in to produce config.h.  And first:
4177 # Protect against being on the right side of a sed subst in config.status.
4178 # Protect against being in an unquoted here document in config.status.
4179 rm -f conftest.vals
4180 cat > conftest.hdr <<\EOF
4181 s/[\\&%]/\\&/g
4182 s%[\\$`]%\\&%g
4183 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4184 s%ac_d%ac_u%gp
4185 s%ac_u%ac_e%gp
4186 EOF
4187 sed -n -f conftest.hdr confdefs.h > conftest.vals
4188 rm -f conftest.hdr
4189
4190 # This sed command replaces #undef with comments.  This is necessary, for
4191 # example, in the case of _POSIX_SOURCE, which is predefined and required
4192 # on some systems where configure will not decide to define it.
4193 cat >> conftest.vals <<\EOF
4194 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4195 EOF
4196
4197 # Break up conftest.vals because some shells have a limit on
4198 # the size of here documents, and old seds have small limits too.
4199
4200 rm -f conftest.tail
4201 while :
4202 do
4203   ac_lines=`grep -c . conftest.vals`
4204   # grep -c gives empty output for an empty file on some AIX systems.
4205   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4206   # Write a limited-size here document to conftest.frag.
4207   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4208   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4209   echo 'CEOF
4210   sed -f conftest.frag conftest.in > conftest.out
4211   rm -f conftest.in
4212   mv conftest.out conftest.in
4213 ' >> $CONFIG_STATUS
4214   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4215   rm -f conftest.vals
4216   mv conftest.tail conftest.vals
4217 done
4218 rm -f conftest.vals
4219
4220 cat >> $CONFIG_STATUS <<\EOF
4221   rm -f conftest.frag conftest.h
4222   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4223   cat conftest.in >> conftest.h
4224   rm -f conftest.in
4225   if cmp -s $ac_file conftest.h 2>/dev/null; then
4226     echo "$ac_file is unchanged"
4227     rm -f conftest.h
4228   else
4229     # Remove last slash and all that follows it.  Not all systems have dirname.
4230       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4231       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4232       # The file is in a subdirectory.
4233       test ! -d "$ac_dir" && mkdir "$ac_dir"
4234     fi
4235     rm -f $ac_file
4236     mv conftest.h $ac_file
4237   fi
4238 fi; done
4239
4240 EOF
4241 cat >> $CONFIG_STATUS <<EOF
4242
4243
4244 EOF
4245 cat >> $CONFIG_STATUS <<\EOF
4246 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
4247
4248 exit 0
4249 EOF
4250 chmod +x $CONFIG_STATUS
4251 rm -fr confdefs* $ac_clean_files
4252 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4253
4254
4255
4256
4257 echo ""
4258 echo "Configure Summary"
4259 echo "================="
4260
4261 echo "Prefix: $prefix"
4262
4263 if test "x$with_logging" != "x"; then
4264     echo "Debug messages: $with_logging"
4265 else
4266     echo "Debug messages: yes"
4267 fi
4268
4269 if test "x$with_efence" != "x"; then
4270     echo "Electric fence: $with_efence"
4271 else
4272     echo "Electric fence: no"
4273 fi
4274 ./mksymlinks.sh
4275