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