]> git.mxchange.org Git - flightgear.git/blob - configure
Added a "Tests/" subdirectory.
[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=Simulator/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.44
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 IceOpenConnection in -lICE""... $ac_c" 1>&6
2821 echo "configure:2822: checking for IceOpenConnection in -lICE" >&5
2822 ac_lib_var=`echo ICE'_'IceOpenConnection | 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="-lICE  $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 IceOpenConnection();
2835
2836 int main() {
2837 IceOpenConnection()
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 ICE | 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="-lICE $LIBS"
2862
2863 else
2864   echo "$ac_t""no" 1>&6
2865 fi
2866
2867 echo $ac_n "checking for SmcOpenConnection in -lSM""... $ac_c" 1>&6
2868 echo "configure:2869: checking for SmcOpenConnection in -lSM" >&5
2869 ac_lib_var=`echo SM'_'SmcOpenConnection | sed 'y%./+-%__p_%'`
2870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2871   echo $ac_n "(cached) $ac_c" 1>&6
2872 else
2873   ac_save_LIBS="$LIBS"
2874 LIBS="-lSM  $LIBS"
2875 cat > conftest.$ac_ext <<EOF
2876 #line 2877 "configure"
2877 #include "confdefs.h"
2878 /* Override any gcc2 internal prototype to avoid an error.  */
2879 /* We use char because int might match the return type of a gcc2
2880     builtin and then its argument prototype would still apply.  */
2881 char SmcOpenConnection();
2882
2883 int main() {
2884 SmcOpenConnection()
2885 ; return 0; }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2888   rm -rf conftest*
2889   eval "ac_cv_lib_$ac_lib_var=yes"
2890 else
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -rf conftest*
2894   eval "ac_cv_lib_$ac_lib_var=no"
2895 fi
2896 rm -f conftest*
2897 LIBS="$ac_save_LIBS"
2898
2899 fi
2900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2901   echo "$ac_t""yes" 1>&6
2902     ac_tr_lib=HAVE_LIB`echo SM | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2903     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2904   cat >> confdefs.h <<EOF
2905 #define $ac_tr_lib 1
2906 EOF
2907
2908   LIBS="-lSM $LIBS"
2909
2910 else
2911   echo "$ac_t""no" 1>&6
2912 fi
2913
2914 echo $ac_n "checking for XtMalloc in -lXt""... $ac_c" 1>&6
2915 echo "configure:2916: checking for XtMalloc in -lXt" >&5
2916 ac_lib_var=`echo Xt'_'XtMalloc | sed 'y%./+-%__p_%'`
2917 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   ac_save_LIBS="$LIBS"
2921 LIBS="-lXt  $LIBS"
2922 cat > conftest.$ac_ext <<EOF
2923 #line 2924 "configure"
2924 #include "confdefs.h"
2925 /* Override any gcc2 internal prototype to avoid an error.  */
2926 /* We use char because int might match the return type of a gcc2
2927     builtin and then its argument prototype would still apply.  */
2928 char XtMalloc();
2929
2930 int main() {
2931 XtMalloc()
2932 ; return 0; }
2933 EOF
2934 if { (eval echo configure:2935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2935   rm -rf conftest*
2936   eval "ac_cv_lib_$ac_lib_var=yes"
2937 else
2938   echo "configure: failed program was:" >&5
2939   cat conftest.$ac_ext >&5
2940   rm -rf conftest*
2941   eval "ac_cv_lib_$ac_lib_var=no"
2942 fi
2943 rm -f conftest*
2944 LIBS="$ac_save_LIBS"
2945
2946 fi
2947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2948   echo "$ac_t""yes" 1>&6
2949     ac_tr_lib=HAVE_LIB`echo Xt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2951   cat >> confdefs.h <<EOF
2952 #define $ac_tr_lib 1
2953 EOF
2954
2955   LIBS="-lXt $LIBS"
2956
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961 echo $ac_n "checking for XmuLookupStandardColormap in -lXmu""... $ac_c" 1>&6
2962 echo "configure:2963: checking for XmuLookupStandardColormap in -lXmu" >&5
2963 ac_lib_var=`echo Xmu'_'XmuLookupStandardColormap | sed 'y%./+-%__p_%'`
2964 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967   ac_save_LIBS="$LIBS"
2968 LIBS="-lXmu  $LIBS"
2969 cat > conftest.$ac_ext <<EOF
2970 #line 2971 "configure"
2971 #include "confdefs.h"
2972 /* Override any gcc2 internal prototype to avoid an error.  */
2973 /* We use char because int might match the return type of a gcc2
2974     builtin and then its argument prototype would still apply.  */
2975 char XmuLookupStandardColormap();
2976
2977 int main() {
2978 XmuLookupStandardColormap()
2979 ; return 0; }
2980 EOF
2981 if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2982   rm -rf conftest*
2983   eval "ac_cv_lib_$ac_lib_var=yes"
2984 else
2985   echo "configure: failed program was:" >&5
2986   cat conftest.$ac_ext >&5
2987   rm -rf conftest*
2988   eval "ac_cv_lib_$ac_lib_var=no"
2989 fi
2990 rm -f conftest*
2991 LIBS="$ac_save_LIBS"
2992
2993 fi
2994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2995   echo "$ac_t""yes" 1>&6
2996     ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2997     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2998   cat >> confdefs.h <<EOF
2999 #define $ac_tr_lib 1
3000 EOF
3001
3002   LIBS="-lXmu $LIBS"
3003
3004 else
3005   echo "$ac_t""no" 1>&6
3006 fi
3007
3008
3009 echo $ac_n "checking for glNewList in -lGLcore""... $ac_c" 1>&6
3010 echo "configure:3011: checking for glNewList in -lGLcore" >&5
3011 ac_lib_var=`echo GLcore'_'glNewList | sed 'y%./+-%__p_%'`
3012 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   ac_save_LIBS="$LIBS"
3016 LIBS="-lGLcore  $LIBS"
3017 cat > conftest.$ac_ext <<EOF
3018 #line 3019 "configure"
3019 #include "confdefs.h"
3020 /* Override any gcc2 internal prototype to avoid an error.  */
3021 /* We use char because int might match the return type of a gcc2
3022     builtin and then its argument prototype would still apply.  */
3023 char glNewList();
3024
3025 int main() {
3026 glNewList()
3027 ; return 0; }
3028 EOF
3029 if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3030   rm -rf conftest*
3031   eval "ac_cv_lib_$ac_lib_var=yes"
3032 else
3033   echo "configure: failed program was:" >&5
3034   cat conftest.$ac_ext >&5
3035   rm -rf conftest*
3036   eval "ac_cv_lib_$ac_lib_var=no"
3037 fi
3038 rm -f conftest*
3039 LIBS="$ac_save_LIBS"
3040
3041 fi
3042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3043   echo "$ac_t""yes" 1>&6
3044     ac_tr_lib=HAVE_LIB`echo GLcore | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3046   cat >> confdefs.h <<EOF
3047 #define $ac_tr_lib 1
3048 EOF
3049
3050   LIBS="-lGLcore $LIBS"
3051
3052 else
3053   echo "$ac_t""no" 1>&6
3054 fi
3055
3056 if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then
3057         echo $ac_n "checking for glNewList in -lGL""... $ac_c" 1>&6
3058 echo "configure:3059: checking for glNewList in -lGL" >&5
3059 ac_lib_var=`echo GL'_'glNewList | sed 'y%./+-%__p_%'`
3060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   ac_save_LIBS="$LIBS"
3064 LIBS="-lGL  $LIBS"
3065 cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068 /* Override any gcc2 internal prototype to avoid an error.  */
3069 /* We use char because int might match the return type of a gcc2
3070     builtin and then its argument prototype would still apply.  */
3071 char glNewList();
3072
3073 int main() {
3074 glNewList()
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3078   rm -rf conftest*
3079   eval "ac_cv_lib_$ac_lib_var=yes"
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   eval "ac_cv_lib_$ac_lib_var=no"
3085 fi
3086 rm -f conftest*
3087 LIBS="$ac_save_LIBS"
3088
3089 fi
3090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3091   echo "$ac_t""yes" 1>&6
3092     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3094   cat >> confdefs.h <<EOF
3095 #define $ac_tr_lib 1
3096 EOF
3097
3098   LIBS="-lGL $LIBS"
3099
3100 else
3101   echo "$ac_t""no" 1>&6
3102 fi
3103
3104     if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
3105                 echo $ac_n "checking for glNewList in -lMesaGL""... $ac_c" 1>&6
3106 echo "configure:3107: checking for glNewList in -lMesaGL" >&5
3107 ac_lib_var=`echo MesaGL'_'glNewList | sed 'y%./+-%__p_%'`
3108 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   ac_save_LIBS="$LIBS"
3112 LIBS="-lMesaGL  $LIBS"
3113 cat > conftest.$ac_ext <<EOF
3114 #line 3115 "configure"
3115 #include "confdefs.h"
3116 /* Override any gcc2 internal prototype to avoid an error.  */
3117 /* We use char because int might match the return type of a gcc2
3118     builtin and then its argument prototype would still apply.  */
3119 char glNewList();
3120
3121 int main() {
3122 glNewList()
3123 ; return 0; }
3124 EOF
3125 if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3126   rm -rf conftest*
3127   eval "ac_cv_lib_$ac_lib_var=yes"
3128 else
3129   echo "configure: failed program was:" >&5
3130   cat conftest.$ac_ext >&5
3131   rm -rf conftest*
3132   eval "ac_cv_lib_$ac_lib_var=no"
3133 fi
3134 rm -f conftest*
3135 LIBS="$ac_save_LIBS"
3136
3137 fi
3138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3139   echo "$ac_t""yes" 1>&6
3140     ac_tr_lib=HAVE_LIB`echo MesaGL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3142   cat >> confdefs.h <<EOF
3143 #define $ac_tr_lib 1
3144 EOF
3145
3146   LIBS="-lMesaGL $LIBS"
3147
3148 else
3149   echo "$ac_t""no" 1>&6
3150 fi
3151
3152     fi
3153 else
3154         echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
3155 echo "configure:3156: checking for glXCreateContext in -lGL" >&5
3156 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3157 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3158   echo $ac_n "(cached) $ac_c" 1>&6
3159 else
3160   ac_save_LIBS="$LIBS"
3161 LIBS="-lGL  $LIBS"
3162 cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 /* Override any gcc2 internal prototype to avoid an error.  */
3166 /* We use char because int might match the return type of a gcc2
3167     builtin and then its argument prototype would still apply.  */
3168 char glXCreateContext();
3169
3170 int main() {
3171 glXCreateContext()
3172 ; return 0; }
3173 EOF
3174 if { (eval echo configure:3175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3175   rm -rf conftest*
3176   eval "ac_cv_lib_$ac_lib_var=yes"
3177 else
3178   echo "configure: failed program was:" >&5
3179   cat conftest.$ac_ext >&5
3180   rm -rf conftest*
3181   eval "ac_cv_lib_$ac_lib_var=no"
3182 fi
3183 rm -f conftest*
3184 LIBS="$ac_save_LIBS"
3185
3186 fi
3187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3188   echo "$ac_t""yes" 1>&6
3189     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3190     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3191   cat >> confdefs.h <<EOF
3192 #define $ac_tr_lib 1
3193 EOF
3194
3195   LIBS="-lGL $LIBS"
3196
3197 else
3198   echo "$ac_t""no" 1>&6
3199 fi
3200
3201 fi
3202
3203 echo $ac_n "checking for gluLookAt in -lGLU""... $ac_c" 1>&6
3204 echo "configure:3205: checking for gluLookAt in -lGLU" >&5
3205 ac_lib_var=`echo GLU'_'gluLookAt | sed 'y%./+-%__p_%'`
3206 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3207   echo $ac_n "(cached) $ac_c" 1>&6
3208 else
3209   ac_save_LIBS="$LIBS"
3210 LIBS="-lGLU  $LIBS"
3211 cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214 /* Override any gcc2 internal prototype to avoid an error.  */
3215 /* We use char because int might match the return type of a gcc2
3216     builtin and then its argument prototype would still apply.  */
3217 char gluLookAt();
3218
3219 int main() {
3220 gluLookAt()
3221 ; return 0; }
3222 EOF
3223 if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3224   rm -rf conftest*
3225   eval "ac_cv_lib_$ac_lib_var=yes"
3226 else
3227   echo "configure: failed program was:" >&5
3228   cat conftest.$ac_ext >&5
3229   rm -rf conftest*
3230   eval "ac_cv_lib_$ac_lib_var=no"
3231 fi
3232 rm -f conftest*
3233 LIBS="$ac_save_LIBS"
3234
3235 fi
3236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3237   echo "$ac_t""yes" 1>&6
3238     ac_tr_lib=HAVE_LIB`echo GLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3239     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3240   cat >> confdefs.h <<EOF
3241 #define $ac_tr_lib 1
3242 EOF
3243
3244   LIBS="-lGLU $LIBS"
3245
3246 else
3247   echo "$ac_t""no" 1>&6
3248 fi
3249
3250 if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
3251         echo $ac_n "checking for gluLookAt in -lMesaGLU""... $ac_c" 1>&6
3252 echo "configure:3253: checking for gluLookAt in -lMesaGLU" >&5
3253 ac_lib_var=`echo MesaGLU'_'gluLookAt | sed 'y%./+-%__p_%'`
3254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3255   echo $ac_n "(cached) $ac_c" 1>&6
3256 else
3257   ac_save_LIBS="$LIBS"
3258 LIBS="-lMesaGLU  $LIBS"
3259 cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 /* Override any gcc2 internal prototype to avoid an error.  */
3263 /* We use char because int might match the return type of a gcc2
3264     builtin and then its argument prototype would still apply.  */
3265 char gluLookAt();
3266
3267 int main() {
3268 gluLookAt()
3269 ; return 0; }
3270 EOF
3271 if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3272   rm -rf conftest*
3273   eval "ac_cv_lib_$ac_lib_var=yes"
3274 else
3275   echo "configure: failed program was:" >&5
3276   cat conftest.$ac_ext >&5
3277   rm -rf conftest*
3278   eval "ac_cv_lib_$ac_lib_var=no"
3279 fi
3280 rm -f conftest*
3281 LIBS="$ac_save_LIBS"
3282
3283 fi
3284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3285   echo "$ac_t""yes" 1>&6
3286     ac_tr_lib=HAVE_LIB`echo MesaGLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3288   cat >> confdefs.h <<EOF
3289 #define $ac_tr_lib 1
3290 EOF
3291
3292   LIBS="-lMesaGLU $LIBS"
3293
3294 else
3295   echo "$ac_t""no" 1>&6
3296 fi
3297
3298 fi
3299
3300 echo $ac_n "checking for glutGetModifiers in -lglut""... $ac_c" 1>&6
3301 echo "configure:3302: checking for glutGetModifiers in -lglut" >&5
3302 ac_lib_var=`echo glut'_'glutGetModifiers | sed 'y%./+-%__p_%'`
3303 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   ac_save_LIBS="$LIBS"
3307 LIBS="-lglut  $LIBS"
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 /* Override any gcc2 internal prototype to avoid an error.  */
3312 /* We use char because int might match the return type of a gcc2
3313     builtin and then its argument prototype would still apply.  */
3314 char glutGetModifiers();
3315
3316 int main() {
3317 glutGetModifiers()
3318 ; return 0; }
3319 EOF
3320 if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3321   rm -rf conftest*
3322   eval "ac_cv_lib_$ac_lib_var=yes"
3323 else
3324   echo "configure: failed program was:" >&5
3325   cat conftest.$ac_ext >&5
3326   rm -rf conftest*
3327   eval "ac_cv_lib_$ac_lib_var=no"
3328 fi
3329 rm -f conftest*
3330 LIBS="$ac_save_LIBS"
3331
3332 fi
3333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3334   echo "$ac_t""yes" 1>&6
3335     ac_tr_lib=HAVE_LIB`echo glut | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3336     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3337   cat >> confdefs.h <<EOF
3338 #define $ac_tr_lib 1
3339 EOF
3340
3341   LIBS="-lglut $LIBS"
3342
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346
3347         
3348 if test "x$am_cv_cygwin32" = "xyes" ; then
3349     echo Cygnus Win32 specific hacks...
3350     cat >> confdefs.h <<\EOF
3351 #define WIN32 1
3352 EOF
3353
3354
3355             if [ -f `pwd`/Win32/glut.dll ]; then
3356         echo "    found glut.dll, adding -lglut"
3357         LIBS="$LIBS -lglut"
3358     else
3359         echo "    Cannot find glut.dll"
3360         exit 1
3361     fi
3362     if [ -f `pwd`/Win32/glu.dll ]; then
3363         echo "    found glu.dll"
3364     else
3365         echo "    Can't find glu.dll, assuming it's someplace"
3366     fi
3367     echo "    adding -lglu"
3368     LIBS="$LIBS -lglu"
3369     if [ -f `pwd`/Win32/opengl.dll ]; then
3370         echo "    found opengl.dll"
3371     else
3372         echo "    Can't find opengl.dll, assuming it's somplace"
3373     fi
3374     echo "    adding -lopengl"
3375     LIBS="$LIBS -lopengl"
3376     echo "    adding -luser32 -lgdi32"
3377     LIBS="$LIBS -luser32 -lgdi32"
3378     ac_cv_lib_glut_glutGetModifiers="yes"
3379 fi
3380
3381 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3382 echo "configure:3383: checking for ANSI C header files" >&5
3383 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
3388 #include "confdefs.h"
3389 #include <stdlib.h>
3390 #include <stdarg.h>
3391 #include <string.h>
3392 #include <float.h>
3393 EOF
3394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3395 { (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3396 ac_err=`grep -v '^ *+' conftest.out`
3397 if test -z "$ac_err"; then
3398   rm -rf conftest*
3399   ac_cv_header_stdc=yes
3400 else
3401   echo "$ac_err" >&5
3402   echo "configure: failed program was:" >&5
3403   cat conftest.$ac_ext >&5
3404   rm -rf conftest*
3405   ac_cv_header_stdc=no
3406 fi
3407 rm -f conftest*
3408
3409 if test $ac_cv_header_stdc = yes; then
3410   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3411 cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414 #include <string.h>
3415 EOF
3416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3417   egrep "memchr" >/dev/null 2>&1; then
3418   :
3419 else
3420   rm -rf conftest*
3421   ac_cv_header_stdc=no
3422 fi
3423 rm -f conftest*
3424
3425 fi
3426
3427 if test $ac_cv_header_stdc = yes; then
3428   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3429 cat > conftest.$ac_ext <<EOF
3430 #line 3431 "configure"
3431 #include "confdefs.h"
3432 #include <stdlib.h>
3433 EOF
3434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3435   egrep "free" >/dev/null 2>&1; then
3436   :
3437 else
3438   rm -rf conftest*
3439   ac_cv_header_stdc=no
3440 fi
3441 rm -f conftest*
3442
3443 fi
3444
3445 if test $ac_cv_header_stdc = yes; then
3446   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3447 if test "$cross_compiling" = yes; then
3448   :
3449 else
3450   cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453 #include <ctype.h>
3454 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3455 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3456 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3457 int main () { int i; for (i = 0; i < 256; i++)
3458 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3459 exit (0); }
3460
3461 EOF
3462 if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3463 then
3464   :
3465 else
3466   echo "configure: failed program was:" >&5
3467   cat conftest.$ac_ext >&5
3468   rm -fr conftest*
3469   ac_cv_header_stdc=no
3470 fi
3471 rm -fr conftest*
3472 fi
3473
3474 fi
3475 fi
3476
3477 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3478 if test $ac_cv_header_stdc = yes; then
3479   cat >> confdefs.h <<\EOF
3480 #define STDC_HEADERS 1
3481 EOF
3482
3483 fi
3484
3485 for ac_hdr in fcntl.h getopt.h malloc.h stdlib.h sys/time.h sys/timeb.h \
3486         unistd.h windows.h winbase.h values.h 
3487 do
3488 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3489 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3490 echo "configure:3491: checking for $ac_hdr" >&5
3491 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3492   echo $ac_n "(cached) $ac_c" 1>&6
3493 else
3494   cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497 #include <$ac_hdr>
3498 EOF
3499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3500 { (eval echo configure:3501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3501 ac_err=`grep -v '^ *+' conftest.out`
3502 if test -z "$ac_err"; then
3503   rm -rf conftest*
3504   eval "ac_cv_header_$ac_safe=yes"
3505 else
3506   echo "$ac_err" >&5
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   rm -rf conftest*
3510   eval "ac_cv_header_$ac_safe=no"
3511 fi
3512 rm -f conftest*
3513 fi
3514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3515   echo "$ac_t""yes" 1>&6
3516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3517   cat >> confdefs.h <<EOF
3518 #define $ac_tr_hdr 1
3519 EOF
3520  
3521 else
3522   echo "$ac_t""no" 1>&6
3523 fi
3524 done
3525
3526
3527 echo $ac_n "checking for working const""... $ac_c" 1>&6
3528 echo "configure:3529: checking for working const" >&5
3529 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535
3536 int main() {
3537
3538 /* Ultrix mips cc rejects this.  */
3539 typedef int charset[2]; const charset x;
3540 /* SunOS 4.1.1 cc rejects this.  */
3541 char const *const *ccp;
3542 char **p;
3543 /* NEC SVR4.0.2 mips cc rejects this.  */
3544 struct point {int x, y;};
3545 static struct point const zero = {0,0};
3546 /* AIX XL C 1.02.0.0 rejects this.
3547    It does not let you subtract one const X* pointer from another in an arm
3548    of an if-expression whose if-part is not a constant expression */
3549 const char *g = "string";
3550 ccp = &g + (g ? g-g : 0);
3551 /* HPUX 7.0 cc rejects these. */
3552 ++ccp;
3553 p = (char**) ccp;
3554 ccp = (char const *const *) p;
3555 { /* SCO 3.2v4 cc rejects this.  */
3556   char *t;
3557   char const *s = 0 ? (char *) 0 : (char const *) 0;
3558
3559   *t++ = 0;
3560 }
3561 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3562   int x[] = {25, 17};
3563   const int *foo = &x[0];
3564   ++foo;
3565 }
3566 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3567   typedef const int *iptr;
3568   iptr p = 0;
3569   ++p;
3570 }
3571 { /* AIX XL C 1.02.0.0 rejects this saying
3572      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3573   struct s { int j; const int *ap[3]; };
3574   struct s *b; b->j = 5;
3575 }
3576 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3577   const int foo = 10;
3578 }
3579
3580 ; return 0; }
3581 EOF
3582 if { (eval echo configure:3583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3583   rm -rf conftest*
3584   ac_cv_c_const=yes
3585 else
3586   echo "configure: failed program was:" >&5
3587   cat conftest.$ac_ext >&5
3588   rm -rf conftest*
3589   ac_cv_c_const=no
3590 fi
3591 rm -f conftest*
3592 fi
3593
3594 echo "$ac_t""$ac_cv_c_const" 1>&6
3595 if test $ac_cv_c_const = no; then
3596   cat >> confdefs.h <<\EOF
3597 #define const 
3598 EOF
3599
3600 fi
3601
3602 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3603 echo "configure:3604: checking for size_t" >&5
3604 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 #include <sys/types.h>
3611 #if STDC_HEADERS
3612 #include <stdlib.h>
3613 #include <stddef.h>
3614 #endif
3615 EOF
3616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3617   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3618   rm -rf conftest*
3619   ac_cv_type_size_t=yes
3620 else
3621   rm -rf conftest*
3622   ac_cv_type_size_t=no
3623 fi
3624 rm -f conftest*
3625
3626 fi
3627 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3628 if test $ac_cv_type_size_t = no; then
3629   cat >> confdefs.h <<\EOF
3630 #define size_t unsigned
3631 EOF
3632
3633 fi
3634
3635 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3636 echo "configure:3637: checking whether time.h and sys/time.h may both be included" >&5
3637 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <sys/types.h>
3644 #include <sys/time.h>
3645 #include <time.h>
3646 int main() {
3647 struct tm *tp;
3648 ; return 0; }
3649 EOF
3650 if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3651   rm -rf conftest*
3652   ac_cv_header_time=yes
3653 else
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   ac_cv_header_time=no
3658 fi
3659 rm -f conftest*
3660 fi
3661
3662 echo "$ac_t""$ac_cv_header_time" 1>&6
3663 if test $ac_cv_header_time = yes; then
3664   cat >> confdefs.h <<\EOF
3665 #define TIME_WITH_SYS_TIME 1
3666 EOF
3667
3668 fi
3669
3670 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3671 echo "configure:3672: checking whether struct tm is in sys/time.h or time.h" >&5
3672 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3673   echo $ac_n "(cached) $ac_c" 1>&6
3674 else
3675   cat > conftest.$ac_ext <<EOF
3676 #line 3677 "configure"
3677 #include "confdefs.h"
3678 #include <sys/types.h>
3679 #include <time.h>
3680 int main() {
3681 struct tm *tp; tp->tm_sec;
3682 ; return 0; }
3683 EOF
3684 if { (eval echo configure:3685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3685   rm -rf conftest*
3686   ac_cv_struct_tm=time.h
3687 else
3688   echo "configure: failed program was:" >&5
3689   cat conftest.$ac_ext >&5
3690   rm -rf conftest*
3691   ac_cv_struct_tm=sys/time.h
3692 fi
3693 rm -f conftest*
3694 fi
3695
3696 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3697 if test $ac_cv_struct_tm = sys/time.h; then
3698   cat >> confdefs.h <<\EOF
3699 #define TM_IN_SYS_TIME 1
3700 EOF
3701
3702 fi
3703
3704
3705 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3706 echo "configure:3707: checking return type of signal handlers" >&5
3707 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3713 #include <sys/types.h>
3714 #include <signal.h>
3715 #ifdef signal
3716 #undef signal
3717 #endif
3718 #ifdef __cplusplus
3719 extern "C" void (*signal (int, void (*)(int)))(int);
3720 #else
3721 void (*signal ()) ();
3722 #endif
3723
3724 int main() {
3725 int i;
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3729   rm -rf conftest*
3730   ac_cv_type_signal=void
3731 else
3732   echo "configure: failed program was:" >&5
3733   cat conftest.$ac_ext >&5
3734   rm -rf conftest*
3735   ac_cv_type_signal=int
3736 fi
3737 rm -f conftest*
3738 fi
3739
3740 echo "$ac_t""$ac_cv_type_signal" 1>&6
3741 cat >> confdefs.h <<EOF
3742 #define RETSIGTYPE $ac_cv_type_signal
3743 EOF
3744
3745
3746 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3747 echo "configure:3748: checking for vprintf" >&5
3748 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3749   echo $ac_n "(cached) $ac_c" 1>&6
3750 else
3751   cat > conftest.$ac_ext <<EOF
3752 #line 3753 "configure"
3753 #include "confdefs.h"
3754 /* System header to define __stub macros and hopefully few prototypes,
3755     which can conflict with char vprintf(); below.  */
3756 #include <assert.h>
3757 /* Override any gcc2 internal prototype to avoid an error.  */
3758 /* We use char because int might match the return type of a gcc2
3759     builtin and then its argument prototype would still apply.  */
3760 char vprintf();
3761
3762 int main() {
3763
3764 /* The GNU C library defines this for functions which it implements
3765     to always fail with ENOSYS.  Some functions are actually named
3766     something starting with __ and the normal name is an alias.  */
3767 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3768 choke me
3769 #else
3770 vprintf();
3771 #endif
3772
3773 ; return 0; }
3774 EOF
3775 if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3776   rm -rf conftest*
3777   eval "ac_cv_func_vprintf=yes"
3778 else
3779   echo "configure: failed program was:" >&5
3780   cat conftest.$ac_ext >&5
3781   rm -rf conftest*
3782   eval "ac_cv_func_vprintf=no"
3783 fi
3784 rm -f conftest*
3785 fi
3786
3787 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3788   echo "$ac_t""yes" 1>&6
3789   cat >> confdefs.h <<\EOF
3790 #define HAVE_VPRINTF 1
3791 EOF
3792
3793 else
3794   echo "$ac_t""no" 1>&6
3795 fi
3796
3797 if test "$ac_cv_func_vprintf" != yes; then
3798 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3799 echo "configure:3800: checking for _doprnt" >&5
3800 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806 /* System header to define __stub macros and hopefully few prototypes,
3807     which can conflict with char _doprnt(); below.  */
3808 #include <assert.h>
3809 /* Override any gcc2 internal prototype to avoid an error.  */
3810 /* We use char because int might match the return type of a gcc2
3811     builtin and then its argument prototype would still apply.  */
3812 char _doprnt();
3813
3814 int main() {
3815
3816 /* The GNU C library defines this for functions which it implements
3817     to always fail with ENOSYS.  Some functions are actually named
3818     something starting with __ and the normal name is an alias.  */
3819 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3820 choke me
3821 #else
3822 _doprnt();
3823 #endif
3824
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3828   rm -rf conftest*
3829   eval "ac_cv_func__doprnt=yes"
3830 else
3831   echo "configure: failed program was:" >&5
3832   cat conftest.$ac_ext >&5
3833   rm -rf conftest*
3834   eval "ac_cv_func__doprnt=no"
3835 fi
3836 rm -f conftest*
3837 fi
3838
3839 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3840   echo "$ac_t""yes" 1>&6
3841   cat >> confdefs.h <<\EOF
3842 #define HAVE_DOPRNT 1
3843 EOF
3844
3845 else
3846   echo "$ac_t""no" 1>&6
3847 fi
3848
3849 fi
3850
3851 for ac_func in ftime gettimeofday mktime strstr rand random \
3852         setitimer getitimer signal GetLocalTime 
3853 do
3854 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3855 echo "configure:3856: checking for $ac_func" >&5
3856 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 /* System header to define __stub macros and hopefully few prototypes,
3863     which can conflict with char $ac_func(); below.  */
3864 #include <assert.h>
3865 /* Override any gcc2 internal prototype to avoid an error.  */
3866 /* We use char because int might match the return type of a gcc2
3867     builtin and then its argument prototype would still apply.  */
3868 char $ac_func();
3869
3870 int main() {
3871
3872 /* The GNU C library defines this for functions which it implements
3873     to always fail with ENOSYS.  Some functions are actually named
3874     something starting with __ and the normal name is an alias.  */
3875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3876 choke me
3877 #else
3878 $ac_func();
3879 #endif
3880
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3884   rm -rf conftest*
3885   eval "ac_cv_func_$ac_func=yes"
3886 else
3887   echo "configure: failed program was:" >&5
3888   cat conftest.$ac_ext >&5
3889   rm -rf conftest*
3890   eval "ac_cv_func_$ac_func=no"
3891 fi
3892 rm -f conftest*
3893 fi
3894
3895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3896   echo "$ac_t""yes" 1>&6
3897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3898   cat >> confdefs.h <<EOF
3899 #define $ac_tr_func 1
3900 EOF
3901  
3902 else
3903   echo "$ac_t""no" 1>&6
3904 fi
3905 done
3906
3907
3908 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
3909     echo 
3910     echo "Unable to find the necessary GL libraries."
3911     exit 1
3912 fi
3913
3914
3915
3916
3917
3918 trap '' 1 2 15
3919 cat > confcache <<\EOF
3920 # This file is a shell script that caches the results of configure
3921 # tests run on this system so they can be shared between configure
3922 # scripts and configure runs.  It is not useful on other systems.
3923 # If it contains results you don't want to keep, you may remove or edit it.
3924 #
3925 # By default, configure uses ./config.cache as the cache file,
3926 # creating it if it does not exist already.  You can give configure
3927 # the --cache-file=FILE option to use a different cache file; that is
3928 # what configure does when it calls configure scripts in
3929 # subdirectories, so they share the cache.
3930 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3931 # config.status only pays attention to the cache file if you give it the
3932 # --recheck option to rerun configure.
3933 #
3934 EOF
3935 # The following way of writing the cache mishandles newlines in values,
3936 # but we know of no workaround that is simple, portable, and efficient.
3937 # So, don't put newlines in cache variables' values.
3938 # Ultrix sh set writes to stderr and can't be redirected directly,
3939 # and sets the high bit in the cache file unless we assign to the vars.
3940 (set) 2>&1 |
3941   case `(ac_space=' '; set) 2>&1` in
3942   *ac_space=\ *)
3943     # `set' does not quote correctly, so add quotes (double-quote substitution
3944     # turns \\\\ into \\, and sed turns \\ into \).
3945     sed -n \
3946       -e "s/'/'\\\\''/g" \
3947       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3948     ;;
3949   *)
3950     # `set' quotes correctly as required by POSIX, so do not add quotes.
3951     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3952     ;;
3953   esac >> confcache
3954 if cmp -s $cache_file confcache; then
3955   :
3956 else
3957   if test -w $cache_file; then
3958     echo "updating cache $cache_file"
3959     cat confcache > $cache_file
3960   else
3961     echo "not updating unwritable cache $cache_file"
3962   fi
3963 fi
3964 rm -f confcache
3965
3966 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3967
3968 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3969 # Let make expand exec_prefix.
3970 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3971
3972 # Any assignment to VPATH causes Sun make to only execute
3973 # the first set of double-colon rules, so remove it if not needed.
3974 # If there is a colon in the path, we need to keep it.
3975 if test "x$srcdir" = x.; then
3976   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3977 fi
3978
3979 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3980
3981 DEFS=-DHAVE_CONFIG_H
3982
3983 # Without the "./", some shells look in PATH for config.status.
3984 : ${CONFIG_STATUS=./config.status}
3985
3986 echo creating $CONFIG_STATUS
3987 rm -f $CONFIG_STATUS
3988 cat > $CONFIG_STATUS <<EOF
3989 #! /bin/sh
3990 # Generated automatically by configure.
3991 # Run this file to recreate the current configuration.
3992 # This directory was configured as follows,
3993 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3994 #
3995 # $0 $ac_configure_args
3996 #
3997 # Compiler output produced by configure, useful for debugging
3998 # configure, is in ./config.log if it exists.
3999
4000 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4001 for ac_option
4002 do
4003   case "\$ac_option" in
4004   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4005     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4006     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4007   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4008     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4009     exit 0 ;;
4010   -help | --help | --hel | --he | --h)
4011     echo "\$ac_cs_usage"; exit 0 ;;
4012   *) echo "\$ac_cs_usage"; exit 1 ;;
4013   esac
4014 done
4015
4016 ac_given_srcdir=$srcdir
4017 ac_given_INSTALL="$INSTALL"
4018
4019 trap 'rm -fr `echo "\
4020         Makefile \
4021         Include/Makefile \
4022         Lib/Makefile \
4023         Lib/Bucket/Makefile \
4024         Lib/Debug/Makefile \
4025         Lib/DEM/Makefile \
4026         Lib/Math/Makefile \
4027         Lib/XGL/Makefile \
4028         Lib/zlib/Makefile \
4029         Simulator/Makefile \
4030         Simulator/Aircraft/Makefile \
4031         Simulator/Astro/Makefile \
4032         Simulator/Autopilot/Makefile \
4033         Simulator/Cockpit/Makefile \
4034         Simulator/Controls/Makefile \
4035         Simulator/Flight/LaRCsim/Makefile \
4036         Simulator/Flight/Slew/Makefile \
4037         Simulator/Flight/Makefile \
4038         Simulator/Joystick/Makefile \
4039         Simulator/Main/Makefile \
4040         Simulator/Main/runfg \
4041         Simulator/Main/runfg.bat \
4042         Simulator/Makefile \
4043         Simulator/Scenery/Makefile \
4044         Simulator/Time/Makefile \
4045         Simulator/Weather/Makefile \
4046         Tools/Makefile \
4047         Tools/AssemTris/Makefile \
4048         Tools/Dem2node/Makefile \
4049         Tools/DemRaw2ascii/Makefile \
4050         Tools/FixNode/Makefile \
4051         Tools/FixObj/Makefile \
4052         Tools/SplitTris/Makefile \
4053         Tools/Stripe_u/Makefile \
4054         Tools/Tri2obj/Makefile \
4055         Tools/Triangle/Makefile \
4056         Tests/Makefile \
4057          Include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4058 EOF
4059 cat >> $CONFIG_STATUS <<EOF
4060
4061 # Protect against being on the right side of a sed subst in config.status.
4062 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4063  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4064 $ac_vpsub
4065 $extrasub
4066 s%@CFLAGS@%$CFLAGS%g
4067 s%@CPPFLAGS@%$CPPFLAGS%g
4068 s%@CXXFLAGS@%$CXXFLAGS%g
4069 s%@DEFS@%$DEFS%g
4070 s%@LDFLAGS@%$LDFLAGS%g
4071 s%@LIBS@%$LIBS%g
4072 s%@exec_prefix@%$exec_prefix%g
4073 s%@prefix@%$prefix%g
4074 s%@program_transform_name@%$program_transform_name%g
4075 s%@bindir@%$bindir%g
4076 s%@sbindir@%$sbindir%g
4077 s%@libexecdir@%$libexecdir%g
4078 s%@datadir@%$datadir%g
4079 s%@sysconfdir@%$sysconfdir%g
4080 s%@sharedstatedir@%$sharedstatedir%g
4081 s%@localstatedir@%$localstatedir%g
4082 s%@libdir@%$libdir%g
4083 s%@includedir@%$includedir%g
4084 s%@oldincludedir@%$oldincludedir%g
4085 s%@infodir@%$infodir%g
4086 s%@mandir@%$mandir%g
4087 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4088 s%@INSTALL_DATA@%$INSTALL_DATA%g
4089 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4090 s%@PACKAGE@%$PACKAGE%g
4091 s%@VERSION@%$VERSION%g
4092 s%@ACLOCAL@%$ACLOCAL%g
4093 s%@AUTOCONF@%$AUTOCONF%g
4094 s%@AUTOMAKE@%$AUTOMAKE%g
4095 s%@AUTOHEADER@%$AUTOHEADER%g
4096 s%@MAKEINFO@%$MAKEINFO%g
4097 s%@SET_MAKE@%$SET_MAKE%g
4098 s%@CC@%$CC%g
4099 s%@CXX@%$CXX%g
4100 s%@LN_S@%$LN_S%g
4101 s%@host@%$host%g
4102 s%@host_alias@%$host_alias%g
4103 s%@host_cpu@%$host_cpu%g
4104 s%@host_vendor@%$host_vendor%g
4105 s%@host_os@%$host_os%g
4106 s%@RANLIB@%$RANLIB%g
4107 s%@LD@%$LD%g
4108 s%@NM@%$NM%g
4109 s%@LIBTOOL@%$LIBTOOL%g
4110 s%@MAINT@%$MAINT%g
4111 s%@CPP@%$CPP%g
4112 s%@X_CFLAGS@%$X_CFLAGS%g
4113 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4114 s%@X_LIBS@%$X_LIBS%g
4115 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4116
4117 CEOF
4118 EOF
4119
4120 cat >> $CONFIG_STATUS <<\EOF
4121
4122 # Split the substitutions into bite-sized pieces for seds with
4123 # small command number limits, like on Digital OSF/1 and HP-UX.
4124 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4125 ac_file=1 # Number of current file.
4126 ac_beg=1 # First line for current file.
4127 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4128 ac_more_lines=:
4129 ac_sed_cmds=""
4130 while $ac_more_lines; do
4131   if test $ac_beg -gt 1; then
4132     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4133   else
4134     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4135   fi
4136   if test ! -s conftest.s$ac_file; then
4137     ac_more_lines=false
4138     rm -f conftest.s$ac_file
4139   else
4140     if test -z "$ac_sed_cmds"; then
4141       ac_sed_cmds="sed -f conftest.s$ac_file"
4142     else
4143       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4144     fi
4145     ac_file=`expr $ac_file + 1`
4146     ac_beg=$ac_end
4147     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4148   fi
4149 done
4150 if test -z "$ac_sed_cmds"; then
4151   ac_sed_cmds=cat
4152 fi
4153 EOF
4154
4155 cat >> $CONFIG_STATUS <<EOF
4156
4157 CONFIG_FILES=\${CONFIG_FILES-"\
4158         Makefile \
4159         Include/Makefile \
4160         Lib/Makefile \
4161         Lib/Bucket/Makefile \
4162         Lib/Debug/Makefile \
4163         Lib/DEM/Makefile \
4164         Lib/Math/Makefile \
4165         Lib/XGL/Makefile \
4166         Lib/zlib/Makefile \
4167         Simulator/Makefile \
4168         Simulator/Aircraft/Makefile \
4169         Simulator/Astro/Makefile \
4170         Simulator/Autopilot/Makefile \
4171         Simulator/Cockpit/Makefile \
4172         Simulator/Controls/Makefile \
4173         Simulator/Flight/LaRCsim/Makefile \
4174         Simulator/Flight/Slew/Makefile \
4175         Simulator/Flight/Makefile \
4176         Simulator/Joystick/Makefile \
4177         Simulator/Main/Makefile \
4178         Simulator/Main/runfg \
4179         Simulator/Main/runfg.bat \
4180         Simulator/Makefile \
4181         Simulator/Scenery/Makefile \
4182         Simulator/Time/Makefile \
4183         Simulator/Weather/Makefile \
4184         Tools/Makefile \
4185         Tools/AssemTris/Makefile \
4186         Tools/Dem2node/Makefile \
4187         Tools/DemRaw2ascii/Makefile \
4188         Tools/FixNode/Makefile \
4189         Tools/FixObj/Makefile \
4190         Tools/SplitTris/Makefile \
4191         Tools/Stripe_u/Makefile \
4192         Tools/Tri2obj/Makefile \
4193         Tools/Triangle/Makefile \
4194         Tests/Makefile \
4195         "}
4196 EOF
4197 cat >> $CONFIG_STATUS <<\EOF
4198 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4199   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4200   case "$ac_file" in
4201   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4202        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4203   *) ac_file_in="${ac_file}.in" ;;
4204   esac
4205
4206   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4207
4208   # Remove last slash and all that follows it.  Not all systems have dirname.
4209   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4210   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4211     # The file is in a subdirectory.
4212     test ! -d "$ac_dir" && mkdir "$ac_dir"
4213     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4214     # A "../" for each directory in $ac_dir_suffix.
4215     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4216   else
4217     ac_dir_suffix= ac_dots=
4218   fi
4219
4220   case "$ac_given_srcdir" in
4221   .)  srcdir=.
4222       if test -z "$ac_dots"; then top_srcdir=.
4223       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4224   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4225   *) # Relative path.
4226     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4227     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4228   esac
4229
4230   case "$ac_given_INSTALL" in
4231   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4232   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4233   esac
4234
4235   echo creating "$ac_file"
4236   rm -f "$ac_file"
4237   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4238   case "$ac_file" in
4239   *Makefile*) ac_comsub="1i\\
4240 # $configure_input" ;;
4241   *) ac_comsub= ;;
4242   esac
4243
4244   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4245   sed -e "$ac_comsub
4246 s%@configure_input@%$configure_input%g
4247 s%@srcdir@%$srcdir%g
4248 s%@top_srcdir@%$top_srcdir%g
4249 s%@INSTALL@%$INSTALL%g
4250 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4251 fi; done
4252 rm -f conftest.s*
4253
4254 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4255 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4256 #
4257 # ac_d sets the value in "#define NAME VALUE" lines.
4258 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4259 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4260 ac_dC='\3'
4261 ac_dD='%g'
4262 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4263 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4264 ac_uB='\([      ]\)%\1#\2define\3'
4265 ac_uC=' '
4266 ac_uD='\4%g'
4267 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4268 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4269 ac_eB='$%\1#\2define\3'
4270 ac_eC=' '
4271 ac_eD='%g'
4272
4273 if test "${CONFIG_HEADERS+set}" != set; then
4274 EOF
4275 cat >> $CONFIG_STATUS <<EOF
4276   CONFIG_HEADERS="Include/config.h"
4277 EOF
4278 cat >> $CONFIG_STATUS <<\EOF
4279 fi
4280 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4281   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4282   case "$ac_file" in
4283   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4284        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4285   *) ac_file_in="${ac_file}.in" ;;
4286   esac
4287
4288   echo creating $ac_file
4289
4290   rm -f conftest.frag conftest.in conftest.out
4291   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4292   cat $ac_file_inputs > conftest.in
4293
4294 EOF
4295
4296 # Transform confdefs.h into a sed script conftest.vals that substitutes
4297 # the proper values into config.h.in to produce config.h.  And first:
4298 # Protect against being on the right side of a sed subst in config.status.
4299 # Protect against being in an unquoted here document in config.status.
4300 rm -f conftest.vals
4301 cat > conftest.hdr <<\EOF
4302 s/[\\&%]/\\&/g
4303 s%[\\$`]%\\&%g
4304 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4305 s%ac_d%ac_u%gp
4306 s%ac_u%ac_e%gp
4307 EOF
4308 sed -n -f conftest.hdr confdefs.h > conftest.vals
4309 rm -f conftest.hdr
4310
4311 # This sed command replaces #undef with comments.  This is necessary, for
4312 # example, in the case of _POSIX_SOURCE, which is predefined and required
4313 # on some systems where configure will not decide to define it.
4314 cat >> conftest.vals <<\EOF
4315 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4316 EOF
4317
4318 # Break up conftest.vals because some shells have a limit on
4319 # the size of here documents, and old seds have small limits too.
4320
4321 rm -f conftest.tail
4322 while :
4323 do
4324   ac_lines=`grep -c . conftest.vals`
4325   # grep -c gives empty output for an empty file on some AIX systems.
4326   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4327   # Write a limited-size here document to conftest.frag.
4328   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4329   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4330   echo 'CEOF
4331   sed -f conftest.frag conftest.in > conftest.out
4332   rm -f conftest.in
4333   mv conftest.out conftest.in
4334 ' >> $CONFIG_STATUS
4335   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4336   rm -f conftest.vals
4337   mv conftest.tail conftest.vals
4338 done
4339 rm -f conftest.vals
4340
4341 cat >> $CONFIG_STATUS <<\EOF
4342   rm -f conftest.frag conftest.h
4343   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4344   cat conftest.in >> conftest.h
4345   rm -f conftest.in
4346   if cmp -s $ac_file conftest.h 2>/dev/null; then
4347     echo "$ac_file is unchanged"
4348     rm -f conftest.h
4349   else
4350     # Remove last slash and all that follows it.  Not all systems have dirname.
4351       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4352       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4353       # The file is in a subdirectory.
4354       test ! -d "$ac_dir" && mkdir "$ac_dir"
4355     fi
4356     rm -f $ac_file
4357     mv conftest.h $ac_file
4358   fi
4359 fi; done
4360
4361 EOF
4362 cat >> $CONFIG_STATUS <<EOF
4363
4364
4365 EOF
4366 cat >> $CONFIG_STATUS <<\EOF
4367 test -z "$CONFIG_HEADERS" || echo timestamp > Include/stamp-h
4368
4369 exit 0
4370 EOF
4371 chmod +x $CONFIG_STATUS
4372 rm -fr confdefs* $ac_clean_files
4373 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4374