]> git.mxchange.org Git - flightgear.git/blob - configure
misc updates.
[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.48
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 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1521 echo "configure:1522: checking how to run the C preprocessor" >&5
1522 # On Suns, sometimes $CPP names a directory.
1523 if test -n "$CPP" && test -d "$CPP"; then
1524   CPP=
1525 fi
1526 if test -z "$CPP"; then
1527 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1528   echo $ac_n "(cached) $ac_c" 1>&6
1529 else
1530     # This must be in double quotes, not single quotes, because CPP may get
1531   # substituted into the Makefile and "${CC-cc}" will confuse make.
1532   CPP="${CC-cc} -E"
1533   # On the NeXT, cc -E runs the code through the compiler's parser,
1534   # not just through cpp.
1535   cat > conftest.$ac_ext <<EOF
1536 #line 1537 "configure"
1537 #include "confdefs.h"
1538 #include <assert.h>
1539 Syntax Error
1540 EOF
1541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1542 { (eval echo configure:1543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1543 ac_err=`grep -v '^ *+' conftest.out`
1544 if test -z "$ac_err"; then
1545   :
1546 else
1547   echo "$ac_err" >&5
1548   echo "configure: failed program was:" >&5
1549   cat conftest.$ac_ext >&5
1550   rm -rf conftest*
1551   CPP="${CC-cc} -E -traditional-cpp"
1552   cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555 #include <assert.h>
1556 Syntax Error
1557 EOF
1558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1559 { (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1560 ac_err=`grep -v '^ *+' conftest.out`
1561 if test -z "$ac_err"; then
1562   :
1563 else
1564   echo "$ac_err" >&5
1565   echo "configure: failed program was:" >&5
1566   cat conftest.$ac_ext >&5
1567   rm -rf conftest*
1568   CPP=/lib/cpp
1569 fi
1570 rm -f conftest*
1571 fi
1572 rm -f conftest*
1573   ac_cv_prog_CPP="$CPP"
1574 fi
1575   CPP="$ac_cv_prog_CPP"
1576 else
1577   ac_cv_prog_CPP="$CPP"
1578 fi
1579 echo "$ac_t""$CPP" 1>&6
1580
1581 ac_safe=`echo "windows.h" | sed 'y%./+-%__p_%'`
1582 echo $ac_n "checking for windows.h""... $ac_c" 1>&6
1583 echo "configure:1584: checking for windows.h" >&5
1584 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1585   echo $ac_n "(cached) $ac_c" 1>&6
1586 else
1587   cat > conftest.$ac_ext <<EOF
1588 #line 1589 "configure"
1589 #include "confdefs.h"
1590 #include <windows.h>
1591 EOF
1592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1593 { (eval echo configure:1594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1594 ac_err=`grep -v '^ *+' conftest.out`
1595 if test -z "$ac_err"; then
1596   rm -rf conftest*
1597   eval "ac_cv_header_$ac_safe=yes"
1598 else
1599   echo "$ac_err" >&5
1600   echo "configure: failed program was:" >&5
1601   cat conftest.$ac_ext >&5
1602   rm -rf conftest*
1603   eval "ac_cv_header_$ac_safe=no"
1604 fi
1605 rm -f conftest*
1606 fi
1607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1608   echo "$ac_t""yes" 1>&6
1609   :
1610 else
1611   echo "$ac_t""no" 1>&6
1612 fi
1613
1614
1615 if test "x$am_cv_header_windows_h" = "xyes" ; then
1616     echo "checking for extra include and lib directories..." 1>&6
1617 exdirs="$prefix /store /usr/local /local /user/local /usr/share \
1618         /usr/X11R6 /opt/X11R6 `pwd`/Win32"
1619
1620 subexdirs=""
1621 if test "$subexdirs" = "" ; then
1622         subexdirs="-"
1623 fi
1624 for subexdir in $subexdirs ; do
1625 if test "$subexdir" = "-" ; then
1626         subexdir=""
1627 else
1628         subexdir="/$subexdir"
1629 fi
1630 for exdir in $exdirs ; do
1631         if test "$exdir" != "/usr" || test "$subexdir" != ""; then
1632                 incdir="${exdir}/include${subexdir}"
1633                 
1634 incdir="$incdir"
1635 if test -r $incdir ; then
1636         case "$CPPFLAGS" in
1637                 *-I${incdir}*)
1638                         # echo "   + already had $incdir" 1>&6
1639                         ;;
1640                 *)
1641                         if test "$CPPFLAGS" = "" ; then
1642                                 CPPFLAGS="-I$incdir"
1643                         else
1644                                 CPPFLAGS="$CPPFLAGS -I$incdir"
1645                         fi
1646                         echo "   + found $incdir" 1>&6
1647                         ;;
1648         esac
1649 fi
1650
1651
1652                 libdir="${exdir}/lib${subexdir}"
1653                 
1654 libdir="$libdir"
1655 if test -r $libdir ; then
1656         case "$LDFLAGS" in
1657                 *-L${libdir}*)
1658                         # echo "   + already had $libdir" 1>&6
1659                         ;;
1660                 *)
1661                         if test "$LDFLAGS" = "" ; then
1662                                 LDFLAGS="-L$libdir"
1663                         else
1664                                 LDFLAGS="$LDFLAGS -L$libdir"
1665                         fi
1666                         echo "   + found $libdir" 1>&6
1667                         ;;
1668         esac
1669 fi
1670
1671
1672                 progdir="${exdir}/bin${subexdirr}"
1673                 
1674 progdir="$progdir"
1675 if test -r $progdir ; then
1676         case "$PATH" in
1677                 *:${progdir}*)
1678                         # echo "   + already had $progdir" 1>&6
1679                         ;;
1680                 *${progdir}:*)
1681                         # echo "   + already had $progdir" 1>&6
1682                         ;;
1683                 *)
1684                         if test "$PATH" = "" ; then
1685                                 PATH="$progdir"
1686                         else
1687                                 PATH="$PATH:$progdir"
1688                         fi
1689                         echo "   + found $progdir" 1>&6
1690                         ;;
1691         esac
1692 fi
1693
1694         fi
1695 done
1696 done
1697
1698 else
1699     echo "checking for extra include and lib directories..." 1>&6
1700 exdirs="$prefix /store /usr/local /local /user/local /usr/share \
1701         /usr/X11R6 /opt/X11R6"
1702
1703 subexdirs=""
1704 if test "$subexdirs" = "" ; then
1705         subexdirs="-"
1706 fi
1707 for subexdir in $subexdirs ; do
1708 if test "$subexdir" = "-" ; then
1709         subexdir=""
1710 else
1711         subexdir="/$subexdir"
1712 fi
1713 for exdir in $exdirs ; do
1714         if test "$exdir" != "/usr" || test "$subexdir" != ""; then
1715                 incdir="${exdir}/include${subexdir}"
1716                 
1717 incdir="$incdir"
1718 if test -r $incdir ; then
1719         case "$CPPFLAGS" in
1720                 *-I${incdir}*)
1721                         # echo "   + already had $incdir" 1>&6
1722                         ;;
1723                 *)
1724                         if test "$CPPFLAGS" = "" ; then
1725                                 CPPFLAGS="-I$incdir"
1726                         else
1727                                 CPPFLAGS="$CPPFLAGS -I$incdir"
1728                         fi
1729                         echo "   + found $incdir" 1>&6
1730                         ;;
1731         esac
1732 fi
1733
1734
1735                 libdir="${exdir}/lib${subexdir}"
1736                 
1737 libdir="$libdir"
1738 if test -r $libdir ; then
1739         case "$LDFLAGS" in
1740                 *-L${libdir}*)
1741                         # echo "   + already had $libdir" 1>&6
1742                         ;;
1743                 *)
1744                         if test "$LDFLAGS" = "" ; then
1745                                 LDFLAGS="-L$libdir"
1746                         else
1747                                 LDFLAGS="$LDFLAGS -L$libdir"
1748                         fi
1749                         echo "   + found $libdir" 1>&6
1750                         ;;
1751         esac
1752 fi
1753
1754
1755                 progdir="${exdir}/bin${subexdirr}"
1756                 
1757 progdir="$progdir"
1758 if test -r $progdir ; then
1759         case "$PATH" in
1760                 *:${progdir}*)
1761                         # echo "   + already had $progdir" 1>&6
1762                         ;;
1763                 *${progdir}:*)
1764                         # echo "   + already had $progdir" 1>&6
1765                         ;;
1766                 *)
1767                         if test "$PATH" = "" ; then
1768                                 PATH="$progdir"
1769                         else
1770                                 PATH="$PATH:$progdir"
1771                         fi
1772                         echo "   + found $progdir" 1>&6
1773                         ;;
1774         esac
1775 fi
1776
1777         fi
1778 done
1779 done
1780
1781 fi
1782
1783 # If we find X, set shell vars x_includes and x_libraries to the
1784 # paths, otherwise set no_x=yes.
1785 # Uses ac_ vars as temps to allow command line to override cache and checks.
1786 # --without-x overrides everything else, but does not touch the cache.
1787 echo $ac_n "checking for X""... $ac_c" 1>&6
1788 echo "configure:1789: checking for X" >&5
1789
1790 # Check whether --with-x or --without-x was given.
1791 if test "${with_x+set}" = set; then
1792   withval="$with_x"
1793   :
1794 fi
1795
1796 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1797 if test "x$with_x" = xno; then
1798   # The user explicitly disabled X.
1799   have_x=disabled
1800 else
1801   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1802     # Both variables are already set.
1803     have_x=yes
1804   else
1805 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1806   echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808   # One or both of the vars are not set, and there is no cached value.
1809 ac_x_includes=NO ac_x_libraries=NO
1810 rm -fr conftestdir
1811 if mkdir conftestdir; then
1812   cd conftestdir
1813   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1814   cat > Imakefile <<'EOF'
1815 acfindx:
1816         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1817 EOF
1818   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1819     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1820     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1821     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1822     for ac_extension in a so sl; do
1823       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1824         test -f $ac_im_libdir/libX11.$ac_extension; then
1825         ac_im_usrlibdir=$ac_im_libdir; break
1826       fi
1827     done
1828     # Screen out bogus values from the imake configuration.  They are
1829     # bogus both because they are the default anyway, and because
1830     # using them would break gcc on systems where it needs fixed includes.
1831     case "$ac_im_incroot" in
1832         /usr/include) ;;
1833         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1834     esac
1835     case "$ac_im_usrlibdir" in
1836         /usr/lib | /lib) ;;
1837         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1838     esac
1839   fi
1840   cd ..
1841   rm -fr conftestdir
1842 fi
1843
1844 if test "$ac_x_includes" = NO; then
1845   # Guess where to find include files, by looking for this one X11 .h file.
1846   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1847
1848   # First, try using that file with no special directory specified.
1849 cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 #include <$x_direct_test_include>
1853 EOF
1854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1855 { (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1856 ac_err=`grep -v '^ *+' conftest.out`
1857 if test -z "$ac_err"; then
1858   rm -rf conftest*
1859   # We can compile using X headers with no special include directory.
1860 ac_x_includes=
1861 else
1862   echo "$ac_err" >&5
1863   echo "configure: failed program was:" >&5
1864   cat conftest.$ac_ext >&5
1865   rm -rf conftest*
1866   # Look for the header file in a standard set of common directories.
1867 # Check X11 before X11Rn because it is often a symlink to the current release.
1868   for ac_dir in               \
1869     /usr/X11/include          \
1870     /usr/X11R6/include        \
1871     /usr/X11R5/include        \
1872     /usr/X11R4/include        \
1873                               \
1874     /usr/include/X11          \
1875     /usr/include/X11R6        \
1876     /usr/include/X11R5        \
1877     /usr/include/X11R4        \
1878                               \
1879     /usr/local/X11/include    \
1880     /usr/local/X11R6/include  \
1881     /usr/local/X11R5/include  \
1882     /usr/local/X11R4/include  \
1883                               \
1884     /usr/local/include/X11    \
1885     /usr/local/include/X11R6  \
1886     /usr/local/include/X11R5  \
1887     /usr/local/include/X11R4  \
1888                               \
1889     /usr/X386/include         \
1890     /usr/x386/include         \
1891     /usr/XFree86/include/X11  \
1892                               \
1893     /usr/include              \
1894     /usr/local/include        \
1895     /usr/unsupported/include  \
1896     /usr/athena/include       \
1897     /usr/local/x11r5/include  \
1898     /usr/lpp/Xamples/include  \
1899                               \
1900     /usr/openwin/include      \
1901     /usr/openwin/share/include \
1902     ; \
1903   do
1904     if test -r "$ac_dir/$x_direct_test_include"; then
1905       ac_x_includes=$ac_dir
1906       break
1907     fi
1908   done
1909 fi
1910 rm -f conftest*
1911 fi # $ac_x_includes = NO
1912
1913 if test "$ac_x_libraries" = NO; then
1914   # Check for the libraries.
1915
1916   test -z "$x_direct_test_library" && x_direct_test_library=Xt
1917   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1918
1919   # See if we find them without any special options.
1920   # Don't add to $LIBS permanently.
1921   ac_save_LIBS="$LIBS"
1922   LIBS="-l$x_direct_test_library $LIBS"
1923 cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926
1927 int main() {
1928 ${x_direct_test_function}()
1929 ; return 0; }
1930 EOF
1931 if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1932   rm -rf conftest*
1933   LIBS="$ac_save_LIBS"
1934 # We can link X programs with no special library path.
1935 ac_x_libraries=
1936 else
1937   echo "configure: failed program was:" >&5
1938   cat conftest.$ac_ext >&5
1939   rm -rf conftest*
1940   LIBS="$ac_save_LIBS"
1941 # First see if replacing the include by lib works.
1942 # Check X11 before X11Rn because it is often a symlink to the current release.
1943 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1944     /usr/X11/lib          \
1945     /usr/X11R6/lib        \
1946     /usr/X11R5/lib        \
1947     /usr/X11R4/lib        \
1948                           \
1949     /usr/lib/X11          \
1950     /usr/lib/X11R6        \
1951     /usr/lib/X11R5        \
1952     /usr/lib/X11R4        \
1953                           \
1954     /usr/local/X11/lib    \
1955     /usr/local/X11R6/lib  \
1956     /usr/local/X11R5/lib  \
1957     /usr/local/X11R4/lib  \
1958                           \
1959     /usr/local/lib/X11    \
1960     /usr/local/lib/X11R6  \
1961     /usr/local/lib/X11R5  \
1962     /usr/local/lib/X11R4  \
1963                           \
1964     /usr/X386/lib         \
1965     /usr/x386/lib         \
1966     /usr/XFree86/lib/X11  \
1967                           \
1968     /usr/lib              \
1969     /usr/local/lib        \
1970     /usr/unsupported/lib  \
1971     /usr/athena/lib       \
1972     /usr/local/x11r5/lib  \
1973     /usr/lpp/Xamples/lib  \
1974     /lib/usr/lib/X11      \
1975                           \
1976     /usr/openwin/lib      \
1977     /usr/openwin/share/lib \
1978     ; \
1979 do
1980   for ac_extension in a so sl; do
1981     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1982       ac_x_libraries=$ac_dir
1983       break 2
1984     fi
1985   done
1986 done
1987 fi
1988 rm -f conftest*
1989 fi # $ac_x_libraries = NO
1990
1991 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1992   # Didn't find X anywhere.  Cache the known absence of X.
1993   ac_cv_have_x="have_x=no"
1994 else
1995   # Record where we found X for the cache.
1996   ac_cv_have_x="have_x=yes \
1997                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1998 fi
1999 fi
2000   fi
2001   eval "$ac_cv_have_x"
2002 fi # $with_x != no
2003
2004 if test "$have_x" != yes; then
2005   echo "$ac_t""$have_x" 1>&6
2006   no_x=yes
2007 else
2008   # If each of the values was on the command line, it overrides each guess.
2009   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2010   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2011   # Update the cache value to reflect the command line values.
2012   ac_cv_have_x="have_x=yes \
2013                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2014   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2015 fi
2016
2017 if test "$no_x" = yes; then
2018   # Not all programs may use this symbol, but it does not hurt to define it.
2019   cat >> confdefs.h <<\EOF
2020 #define X_DISPLAY_MISSING 1
2021 EOF
2022
2023   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2024 else
2025   if test -n "$x_includes"; then
2026     X_CFLAGS="$X_CFLAGS -I$x_includes"
2027   fi
2028
2029   # It would also be nice to do this for all -L options, not just this one.
2030   if test -n "$x_libraries"; then
2031     X_LIBS="$X_LIBS -L$x_libraries"
2032     # For Solaris; some versions of Sun CC require a space after -R and
2033     # others require no space.  Words are not sufficient . . . .
2034     case "`(uname -sr) 2>/dev/null`" in
2035     "SunOS 5"*)
2036       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether -R must be followed by a space" >&5
2038       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2039       cat > conftest.$ac_ext <<EOF
2040 #line 2041 "configure"
2041 #include "confdefs.h"
2042
2043 int main() {
2044
2045 ; return 0; }
2046 EOF
2047 if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2048   rm -rf conftest*
2049   ac_R_nospace=yes
2050 else
2051   echo "configure: failed program was:" >&5
2052   cat conftest.$ac_ext >&5
2053   rm -rf conftest*
2054   ac_R_nospace=no
2055 fi
2056 rm -f conftest*
2057       if test $ac_R_nospace = yes; then
2058         echo "$ac_t""no" 1>&6
2059         X_LIBS="$X_LIBS -R$x_libraries"
2060       else
2061         LIBS="$ac_xsave_LIBS -R $x_libraries"
2062         cat > conftest.$ac_ext <<EOF
2063 #line 2064 "configure"
2064 #include "confdefs.h"
2065
2066 int main() {
2067
2068 ; return 0; }
2069 EOF
2070 if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2071   rm -rf conftest*
2072   ac_R_space=yes
2073 else
2074   echo "configure: failed program was:" >&5
2075   cat conftest.$ac_ext >&5
2076   rm -rf conftest*
2077   ac_R_space=no
2078 fi
2079 rm -f conftest*
2080         if test $ac_R_space = yes; then
2081           echo "$ac_t""yes" 1>&6
2082           X_LIBS="$X_LIBS -R $x_libraries"
2083         else
2084           echo "$ac_t""neither works" 1>&6
2085         fi
2086       fi
2087       LIBS="$ac_xsave_LIBS"
2088     esac
2089   fi
2090
2091   # Check for system-dependent libraries X programs must link with.
2092   # Do this before checking for the system-independent R6 libraries
2093   # (-lICE), since we may need -lsocket or whatever for X linking.
2094
2095   if test "$ISC" = yes; then
2096     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2097   else
2098     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2099     # libraries were built with DECnet support.  And karl@cs.umb.edu says
2100     # the Alpha needs dnet_stub (dnet does not exist).
2101     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2102 echo "configure:2103: checking for dnet_ntoa in -ldnet" >&5
2103 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   ac_save_LIBS="$LIBS"
2108 LIBS="-ldnet  $LIBS"
2109 cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 /* Override any gcc2 internal prototype to avoid an error.  */
2113 /* We use char because int might match the return type of a gcc2
2114     builtin and then its argument prototype would still apply.  */
2115 char dnet_ntoa();
2116
2117 int main() {
2118 dnet_ntoa()
2119 ; return 0; }
2120 EOF
2121 if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2122   rm -rf conftest*
2123   eval "ac_cv_lib_$ac_lib_var=yes"
2124 else
2125   echo "configure: failed program was:" >&5
2126   cat conftest.$ac_ext >&5
2127   rm -rf conftest*
2128   eval "ac_cv_lib_$ac_lib_var=no"
2129 fi
2130 rm -f conftest*
2131 LIBS="$ac_save_LIBS"
2132
2133 fi
2134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2135   echo "$ac_t""yes" 1>&6
2136   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2137 else
2138   echo "$ac_t""no" 1>&6
2139 fi
2140
2141     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2142       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2143 echo "configure:2144: checking for dnet_ntoa in -ldnet_stub" >&5
2144 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2146   echo $ac_n "(cached) $ac_c" 1>&6
2147 else
2148   ac_save_LIBS="$LIBS"
2149 LIBS="-ldnet_stub  $LIBS"
2150 cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 /* Override any gcc2 internal prototype to avoid an error.  */
2154 /* We use char because int might match the return type of a gcc2
2155     builtin and then its argument prototype would still apply.  */
2156 char dnet_ntoa();
2157
2158 int main() {
2159 dnet_ntoa()
2160 ; return 0; }
2161 EOF
2162 if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2163   rm -rf conftest*
2164   eval "ac_cv_lib_$ac_lib_var=yes"
2165 else
2166   echo "configure: failed program was:" >&5
2167   cat conftest.$ac_ext >&5
2168   rm -rf conftest*
2169   eval "ac_cv_lib_$ac_lib_var=no"
2170 fi
2171 rm -f conftest*
2172 LIBS="$ac_save_LIBS"
2173
2174 fi
2175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2176   echo "$ac_t""yes" 1>&6
2177   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2178 else
2179   echo "$ac_t""no" 1>&6
2180 fi
2181
2182     fi
2183
2184     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2185     # to get the SysV transport functions.
2186     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2187     # needs -lnsl.
2188     # The nsl library prevents programs from opening the X display
2189     # on Irix 5.2, according to dickey@clark.net.
2190     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2191 echo "configure:2192: checking for gethostbyname" >&5
2192 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 /* System header to define __stub macros and hopefully few prototypes,
2199     which can conflict with char gethostbyname(); below.  */
2200 #include <assert.h>
2201 /* Override any gcc2 internal prototype to avoid an error.  */
2202 /* We use char because int might match the return type of a gcc2
2203     builtin and then its argument prototype would still apply.  */
2204 char gethostbyname();
2205
2206 int main() {
2207
2208 /* The GNU C library defines this for functions which it implements
2209     to always fail with ENOSYS.  Some functions are actually named
2210     something starting with __ and the normal name is an alias.  */
2211 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2212 choke me
2213 #else
2214 gethostbyname();
2215 #endif
2216
2217 ; return 0; }
2218 EOF
2219 if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2220   rm -rf conftest*
2221   eval "ac_cv_func_gethostbyname=yes"
2222 else
2223   echo "configure: failed program was:" >&5
2224   cat conftest.$ac_ext >&5
2225   rm -rf conftest*
2226   eval "ac_cv_func_gethostbyname=no"
2227 fi
2228 rm -f conftest*
2229 fi
2230
2231 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2232   echo "$ac_t""yes" 1>&6
2233   :
2234 else
2235   echo "$ac_t""no" 1>&6
2236 fi
2237
2238     if test $ac_cv_func_gethostbyname = no; then
2239       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2240 echo "configure:2241: checking for gethostbyname in -lnsl" >&5
2241 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2243   echo $ac_n "(cached) $ac_c" 1>&6
2244 else
2245   ac_save_LIBS="$LIBS"
2246 LIBS="-lnsl  $LIBS"
2247 cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 /* Override any gcc2 internal prototype to avoid an error.  */
2251 /* We use char because int might match the return type of a gcc2
2252     builtin and then its argument prototype would still apply.  */
2253 char gethostbyname();
2254
2255 int main() {
2256 gethostbyname()
2257 ; return 0; }
2258 EOF
2259 if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2260   rm -rf conftest*
2261   eval "ac_cv_lib_$ac_lib_var=yes"
2262 else
2263   echo "configure: failed program was:" >&5
2264   cat conftest.$ac_ext >&5
2265   rm -rf conftest*
2266   eval "ac_cv_lib_$ac_lib_var=no"
2267 fi
2268 rm -f conftest*
2269 LIBS="$ac_save_LIBS"
2270
2271 fi
2272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2273   echo "$ac_t""yes" 1>&6
2274   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2275 else
2276   echo "$ac_t""no" 1>&6
2277 fi
2278
2279     fi
2280
2281     # lieder@skyler.mavd.honeywell.com says without -lsocket,
2282     # socket/setsockopt and other routines are undefined under SCO ODT
2283     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2284     # on later versions), says simon@lia.di.epfl.ch: it contains
2285     # gethostby* variants that don't use the nameserver (or something).
2286     # -lsocket must be given before -lnsl if both are needed.
2287     # We assume that if connect needs -lnsl, so does gethostbyname.
2288     echo $ac_n "checking for connect""... $ac_c" 1>&6
2289 echo "configure:2290: checking for connect" >&5
2290 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 /* System header to define __stub macros and hopefully few prototypes,
2297     which can conflict with char connect(); below.  */
2298 #include <assert.h>
2299 /* Override any gcc2 internal prototype to avoid an error.  */
2300 /* We use char because int might match the return type of a gcc2
2301     builtin and then its argument prototype would still apply.  */
2302 char connect();
2303
2304 int main() {
2305
2306 /* The GNU C library defines this for functions which it implements
2307     to always fail with ENOSYS.  Some functions are actually named
2308     something starting with __ and the normal name is an alias.  */
2309 #if defined (__stub_connect) || defined (__stub___connect)
2310 choke me
2311 #else
2312 connect();
2313 #endif
2314
2315 ; return 0; }
2316 EOF
2317 if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2318   rm -rf conftest*
2319   eval "ac_cv_func_connect=yes"
2320 else
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   eval "ac_cv_func_connect=no"
2325 fi
2326 rm -f conftest*
2327 fi
2328
2329 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2330   echo "$ac_t""yes" 1>&6
2331   :
2332 else
2333   echo "$ac_t""no" 1>&6
2334 fi
2335
2336     if test $ac_cv_func_connect = no; then
2337       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2338 echo "configure:2339: checking for connect in -lsocket" >&5
2339 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   ac_save_LIBS="$LIBS"
2344 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 /* Override any gcc2 internal prototype to avoid an error.  */
2349 /* We use char because int might match the return type of a gcc2
2350     builtin and then its argument prototype would still apply.  */
2351 char connect();
2352
2353 int main() {
2354 connect()
2355 ; return 0; }
2356 EOF
2357 if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2358   rm -rf conftest*
2359   eval "ac_cv_lib_$ac_lib_var=yes"
2360 else
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_lib_$ac_lib_var=no"
2365 fi
2366 rm -f conftest*
2367 LIBS="$ac_save_LIBS"
2368
2369 fi
2370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2371   echo "$ac_t""yes" 1>&6
2372   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2373 else
2374   echo "$ac_t""no" 1>&6
2375 fi
2376
2377     fi
2378
2379     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2380     echo $ac_n "checking for remove""... $ac_c" 1>&6
2381 echo "configure:2382: checking for remove" >&5
2382 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   cat > conftest.$ac_ext <<EOF
2386 #line 2387 "configure"
2387 #include "confdefs.h"
2388 /* System header to define __stub macros and hopefully few prototypes,
2389     which can conflict with char remove(); below.  */
2390 #include <assert.h>
2391 /* Override any gcc2 internal prototype to avoid an error.  */
2392 /* We use char because int might match the return type of a gcc2
2393     builtin and then its argument prototype would still apply.  */
2394 char remove();
2395
2396 int main() {
2397
2398 /* The GNU C library defines this for functions which it implements
2399     to always fail with ENOSYS.  Some functions are actually named
2400     something starting with __ and the normal name is an alias.  */
2401 #if defined (__stub_remove) || defined (__stub___remove)
2402 choke me
2403 #else
2404 remove();
2405 #endif
2406
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2410   rm -rf conftest*
2411   eval "ac_cv_func_remove=yes"
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_func_remove=no"
2417 fi
2418 rm -f conftest*
2419 fi
2420
2421 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2422   echo "$ac_t""yes" 1>&6
2423   :
2424 else
2425   echo "$ac_t""no" 1>&6
2426 fi
2427
2428     if test $ac_cv_func_remove = no; then
2429       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2430 echo "configure:2431: checking for remove in -lposix" >&5
2431 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   ac_save_LIBS="$LIBS"
2436 LIBS="-lposix  $LIBS"
2437 cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 /* Override any gcc2 internal prototype to avoid an error.  */
2441 /* We use char because int might match the return type of a gcc2
2442     builtin and then its argument prototype would still apply.  */
2443 char remove();
2444
2445 int main() {
2446 remove()
2447 ; return 0; }
2448 EOF
2449 if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2450   rm -rf conftest*
2451   eval "ac_cv_lib_$ac_lib_var=yes"
2452 else
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -rf conftest*
2456   eval "ac_cv_lib_$ac_lib_var=no"
2457 fi
2458 rm -f conftest*
2459 LIBS="$ac_save_LIBS"
2460
2461 fi
2462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2463   echo "$ac_t""yes" 1>&6
2464   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2465 else
2466   echo "$ac_t""no" 1>&6
2467 fi
2468
2469     fi
2470
2471     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2472     echo $ac_n "checking for shmat""... $ac_c" 1>&6
2473 echo "configure:2474: checking for shmat" >&5
2474 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2475   echo $ac_n "(cached) $ac_c" 1>&6
2476 else
2477   cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 /* System header to define __stub macros and hopefully few prototypes,
2481     which can conflict with char shmat(); below.  */
2482 #include <assert.h>
2483 /* Override any gcc2 internal prototype to avoid an error.  */
2484 /* We use char because int might match the return type of a gcc2
2485     builtin and then its argument prototype would still apply.  */
2486 char shmat();
2487
2488 int main() {
2489
2490 /* The GNU C library defines this for functions which it implements
2491     to always fail with ENOSYS.  Some functions are actually named
2492     something starting with __ and the normal name is an alias.  */
2493 #if defined (__stub_shmat) || defined (__stub___shmat)
2494 choke me
2495 #else
2496 shmat();
2497 #endif
2498
2499 ; return 0; }
2500 EOF
2501 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2502   rm -rf conftest*
2503   eval "ac_cv_func_shmat=yes"
2504 else
2505   echo "configure: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   rm -rf conftest*
2508   eval "ac_cv_func_shmat=no"
2509 fi
2510 rm -f conftest*
2511 fi
2512
2513 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2514   echo "$ac_t""yes" 1>&6
2515   :
2516 else
2517   echo "$ac_t""no" 1>&6
2518 fi
2519
2520     if test $ac_cv_func_shmat = no; then
2521       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2522 echo "configure:2523: checking for shmat in -lipc" >&5
2523 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2524 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2525   echo $ac_n "(cached) $ac_c" 1>&6
2526 else
2527   ac_save_LIBS="$LIBS"
2528 LIBS="-lipc  $LIBS"
2529 cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532 /* Override any gcc2 internal prototype to avoid an error.  */
2533 /* We use char because int might match the return type of a gcc2
2534     builtin and then its argument prototype would still apply.  */
2535 char shmat();
2536
2537 int main() {
2538 shmat()
2539 ; return 0; }
2540 EOF
2541 if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2542   rm -rf conftest*
2543   eval "ac_cv_lib_$ac_lib_var=yes"
2544 else
2545   echo "configure: failed program was:" >&5
2546   cat conftest.$ac_ext >&5
2547   rm -rf conftest*
2548   eval "ac_cv_lib_$ac_lib_var=no"
2549 fi
2550 rm -f conftest*
2551 LIBS="$ac_save_LIBS"
2552
2553 fi
2554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2555   echo "$ac_t""yes" 1>&6
2556   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2557 else
2558   echo "$ac_t""no" 1>&6
2559 fi
2560
2561     fi
2562   fi
2563
2564   # Check for libraries that X11R6 Xt/Xaw programs need.
2565   ac_save_LDFLAGS="$LDFLAGS"
2566   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2567   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2568   # check for ICE first), but we must link in the order -lSM -lICE or
2569   # we get undefined symbols.  So assume we have SM if we have ICE.
2570   # These have to be linked with before -lX11, unlike the other
2571   # libraries we check for below, so use a different variable.
2572   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2573   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2574 echo "configure:2575: checking for IceConnectionNumber in -lICE" >&5
2575 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   ac_save_LIBS="$LIBS"
2580 LIBS="-lICE  $LIBS"
2581 cat > conftest.$ac_ext <<EOF
2582 #line 2583 "configure"
2583 #include "confdefs.h"
2584 /* Override any gcc2 internal prototype to avoid an error.  */
2585 /* We use char because int might match the return type of a gcc2
2586     builtin and then its argument prototype would still apply.  */
2587 char IceConnectionNumber();
2588
2589 int main() {
2590 IceConnectionNumber()
2591 ; return 0; }
2592 EOF
2593 if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2594   rm -rf conftest*
2595   eval "ac_cv_lib_$ac_lib_var=yes"
2596 else
2597   echo "configure: failed program was:" >&5
2598   cat conftest.$ac_ext >&5
2599   rm -rf conftest*
2600   eval "ac_cv_lib_$ac_lib_var=no"
2601 fi
2602 rm -f conftest*
2603 LIBS="$ac_save_LIBS"
2604
2605 fi
2606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2607   echo "$ac_t""yes" 1>&6
2608   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2609 else
2610   echo "$ac_t""no" 1>&6
2611 fi
2612
2613   LDFLAGS="$ac_save_LDFLAGS"
2614
2615 fi
2616
2617
2618
2619 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
2620 echo "configure:2621: checking for cos in -lm" >&5
2621 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
2622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2623   echo $ac_n "(cached) $ac_c" 1>&6
2624 else
2625   ac_save_LIBS="$LIBS"
2626 LIBS="-lm  $LIBS"
2627 cat > conftest.$ac_ext <<EOF
2628 #line 2629 "configure"
2629 #include "confdefs.h"
2630 /* Override any gcc2 internal prototype to avoid an error.  */
2631 /* We use char because int might match the return type of a gcc2
2632     builtin and then its argument prototype would still apply.  */
2633 char cos();
2634
2635 int main() {
2636 cos()
2637 ; return 0; }
2638 EOF
2639 if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2640   rm -rf conftest*
2641   eval "ac_cv_lib_$ac_lib_var=yes"
2642 else
2643   echo "configure: failed program was:" >&5
2644   cat conftest.$ac_ext >&5
2645   rm -rf conftest*
2646   eval "ac_cv_lib_$ac_lib_var=no"
2647 fi
2648 rm -f conftest*
2649 LIBS="$ac_save_LIBS"
2650
2651 fi
2652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2653   echo "$ac_t""yes" 1>&6
2654     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2655     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2656   cat >> confdefs.h <<EOF
2657 #define $ac_tr_lib 1
2658 EOF
2659
2660   LIBS="-lm $LIBS"
2661
2662 else
2663   echo "$ac_t""no" 1>&6
2664 fi
2665
2666 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2667 echo "configure:2668: checking for socket in -lsocket" >&5
2668 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2669 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2670   echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672   ac_save_LIBS="$LIBS"
2673 LIBS="-lsocket  $LIBS"
2674 cat > conftest.$ac_ext <<EOF
2675 #line 2676 "configure"
2676 #include "confdefs.h"
2677 /* Override any gcc2 internal prototype to avoid an error.  */
2678 /* We use char because int might match the return type of a gcc2
2679     builtin and then its argument prototype would still apply.  */
2680 char socket();
2681
2682 int main() {
2683 socket()
2684 ; return 0; }
2685 EOF
2686 if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2687   rm -rf conftest*
2688   eval "ac_cv_lib_$ac_lib_var=yes"
2689 else
2690   echo "configure: failed program was:" >&5
2691   cat conftest.$ac_ext >&5
2692   rm -rf conftest*
2693   eval "ac_cv_lib_$ac_lib_var=no"
2694 fi
2695 rm -f conftest*
2696 LIBS="$ac_save_LIBS"
2697
2698 fi
2699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2700   echo "$ac_t""yes" 1>&6
2701     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2702     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2703   cat >> confdefs.h <<EOF
2704 #define $ac_tr_lib 1
2705 EOF
2706
2707   LIBS="-lsocket $LIBS"
2708
2709 else
2710   echo "$ac_t""no" 1>&6
2711 fi
2712
2713 echo $ac_n "checking for XCreateWindow in -lX11""... $ac_c" 1>&6
2714 echo "configure:2715: checking for XCreateWindow in -lX11" >&5
2715 ac_lib_var=`echo X11'_'XCreateWindow | sed 'y%./+-%__p_%'`
2716 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   ac_save_LIBS="$LIBS"
2720 LIBS="-lX11  $LIBS"
2721 cat > conftest.$ac_ext <<EOF
2722 #line 2723 "configure"
2723 #include "confdefs.h"
2724 /* Override any gcc2 internal prototype to avoid an error.  */
2725 /* We use char because int might match the return type of a gcc2
2726     builtin and then its argument prototype would still apply.  */
2727 char XCreateWindow();
2728
2729 int main() {
2730 XCreateWindow()
2731 ; return 0; }
2732 EOF
2733 if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2734   rm -rf conftest*
2735   eval "ac_cv_lib_$ac_lib_var=yes"
2736 else
2737   echo "configure: failed program was:" >&5
2738   cat conftest.$ac_ext >&5
2739   rm -rf conftest*
2740   eval "ac_cv_lib_$ac_lib_var=no"
2741 fi
2742 rm -f conftest*
2743 LIBS="$ac_save_LIBS"
2744
2745 fi
2746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2747   echo "$ac_t""yes" 1>&6
2748     ac_tr_lib=HAVE_LIB`echo X11 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2749     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2750   cat >> confdefs.h <<EOF
2751 #define $ac_tr_lib 1
2752 EOF
2753
2754   LIBS="-lX11 $LIBS"
2755
2756 else
2757   echo "$ac_t""no" 1>&6
2758 fi
2759
2760 echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6
2761 echo "configure:2762: checking for XShmCreateImage in -lXext" >&5
2762 ac_lib_var=`echo Xext'_'XShmCreateImage | sed 'y%./+-%__p_%'`
2763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2764   echo $ac_n "(cached) $ac_c" 1>&6
2765 else
2766   ac_save_LIBS="$LIBS"
2767 LIBS="-lXext  $LIBS"
2768 cat > conftest.$ac_ext <<EOF
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2771 /* Override any gcc2 internal prototype to avoid an error.  */
2772 /* We use char because int might match the return type of a gcc2
2773     builtin and then its argument prototype would still apply.  */
2774 char XShmCreateImage();
2775
2776 int main() {
2777 XShmCreateImage()
2778 ; return 0; }
2779 EOF
2780 if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2781   rm -rf conftest*
2782   eval "ac_cv_lib_$ac_lib_var=yes"
2783 else
2784   echo "configure: failed program was:" >&5
2785   cat conftest.$ac_ext >&5
2786   rm -rf conftest*
2787   eval "ac_cv_lib_$ac_lib_var=no"
2788 fi
2789 rm -f conftest*
2790 LIBS="$ac_save_LIBS"
2791
2792 fi
2793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2794   echo "$ac_t""yes" 1>&6
2795     ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2796     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2797   cat >> confdefs.h <<EOF
2798 #define $ac_tr_lib 1
2799 EOF
2800
2801   LIBS="-lXext $LIBS"
2802
2803 else
2804   echo "$ac_t""no" 1>&6
2805 fi
2806
2807 echo $ac_n "checking for XGetExtensionVersion in -lXi""... $ac_c" 1>&6
2808 echo "configure:2809: checking for XGetExtensionVersion in -lXi" >&5
2809 ac_lib_var=`echo Xi'_'XGetExtensionVersion | sed 'y%./+-%__p_%'`
2810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   ac_save_LIBS="$LIBS"
2814 LIBS="-lXi  $LIBS"
2815 cat > conftest.$ac_ext <<EOF
2816 #line 2817 "configure"
2817 #include "confdefs.h"
2818 /* Override any gcc2 internal prototype to avoid an error.  */
2819 /* We use char because int might match the return type of a gcc2
2820     builtin and then its argument prototype would still apply.  */
2821 char XGetExtensionVersion();
2822
2823 int main() {
2824 XGetExtensionVersion()
2825 ; return 0; }
2826 EOF
2827 if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2828   rm -rf conftest*
2829   eval "ac_cv_lib_$ac_lib_var=yes"
2830 else
2831   echo "configure: failed program was:" >&5
2832   cat conftest.$ac_ext >&5
2833   rm -rf conftest*
2834   eval "ac_cv_lib_$ac_lib_var=no"
2835 fi
2836 rm -f conftest*
2837 LIBS="$ac_save_LIBS"
2838
2839 fi
2840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2841   echo "$ac_t""yes" 1>&6
2842     ac_tr_lib=HAVE_LIB`echo Xi | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2843     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2844   cat >> confdefs.h <<EOF
2845 #define $ac_tr_lib 1
2846 EOF
2847
2848   LIBS="-lXi $LIBS"
2849
2850 else
2851   echo "$ac_t""no" 1>&6
2852 fi
2853
2854 echo $ac_n "checking for IceOpenConnection in -lICE""... $ac_c" 1>&6
2855 echo "configure:2856: checking for IceOpenConnection in -lICE" >&5
2856 ac_lib_var=`echo ICE'_'IceOpenConnection | sed 'y%./+-%__p_%'`
2857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2858   echo $ac_n "(cached) $ac_c" 1>&6
2859 else
2860   ac_save_LIBS="$LIBS"
2861 LIBS="-lICE  $LIBS"
2862 cat > conftest.$ac_ext <<EOF
2863 #line 2864 "configure"
2864 #include "confdefs.h"
2865 /* Override any gcc2 internal prototype to avoid an error.  */
2866 /* We use char because int might match the return type of a gcc2
2867     builtin and then its argument prototype would still apply.  */
2868 char IceOpenConnection();
2869
2870 int main() {
2871 IceOpenConnection()
2872 ; return 0; }
2873 EOF
2874 if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2875   rm -rf conftest*
2876   eval "ac_cv_lib_$ac_lib_var=yes"
2877 else
2878   echo "configure: failed program was:" >&5
2879   cat conftest.$ac_ext >&5
2880   rm -rf conftest*
2881   eval "ac_cv_lib_$ac_lib_var=no"
2882 fi
2883 rm -f conftest*
2884 LIBS="$ac_save_LIBS"
2885
2886 fi
2887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2888   echo "$ac_t""yes" 1>&6
2889     ac_tr_lib=HAVE_LIB`echo ICE | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2891   cat >> confdefs.h <<EOF
2892 #define $ac_tr_lib 1
2893 EOF
2894
2895   LIBS="-lICE $LIBS"
2896
2897 else
2898   echo "$ac_t""no" 1>&6
2899 fi
2900
2901 echo $ac_n "checking for SmcOpenConnection in -lSM""... $ac_c" 1>&6
2902 echo "configure:2903: checking for SmcOpenConnection in -lSM" >&5
2903 ac_lib_var=`echo SM'_'SmcOpenConnection | sed 'y%./+-%__p_%'`
2904 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2905   echo $ac_n "(cached) $ac_c" 1>&6
2906 else
2907   ac_save_LIBS="$LIBS"
2908 LIBS="-lSM  $LIBS"
2909 cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912 /* Override any gcc2 internal prototype to avoid an error.  */
2913 /* We use char because int might match the return type of a gcc2
2914     builtin and then its argument prototype would still apply.  */
2915 char SmcOpenConnection();
2916
2917 int main() {
2918 SmcOpenConnection()
2919 ; return 0; }
2920 EOF
2921 if { (eval echo configure:2922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2922   rm -rf conftest*
2923   eval "ac_cv_lib_$ac_lib_var=yes"
2924 else
2925   echo "configure: failed program was:" >&5
2926   cat conftest.$ac_ext >&5
2927   rm -rf conftest*
2928   eval "ac_cv_lib_$ac_lib_var=no"
2929 fi
2930 rm -f conftest*
2931 LIBS="$ac_save_LIBS"
2932
2933 fi
2934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2935   echo "$ac_t""yes" 1>&6
2936     ac_tr_lib=HAVE_LIB`echo SM | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2937     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2938   cat >> confdefs.h <<EOF
2939 #define $ac_tr_lib 1
2940 EOF
2941
2942   LIBS="-lSM $LIBS"
2943
2944 else
2945   echo "$ac_t""no" 1>&6
2946 fi
2947
2948 echo $ac_n "checking for XtMalloc in -lXt""... $ac_c" 1>&6
2949 echo "configure:2950: checking for XtMalloc in -lXt" >&5
2950 ac_lib_var=`echo Xt'_'XtMalloc | sed 'y%./+-%__p_%'`
2951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   ac_save_LIBS="$LIBS"
2955 LIBS="-lXt  $LIBS"
2956 cat > conftest.$ac_ext <<EOF
2957 #line 2958 "configure"
2958 #include "confdefs.h"
2959 /* Override any gcc2 internal prototype to avoid an error.  */
2960 /* We use char because int might match the return type of a gcc2
2961     builtin and then its argument prototype would still apply.  */
2962 char XtMalloc();
2963
2964 int main() {
2965 XtMalloc()
2966 ; return 0; }
2967 EOF
2968 if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2969   rm -rf conftest*
2970   eval "ac_cv_lib_$ac_lib_var=yes"
2971 else
2972   echo "configure: failed program was:" >&5
2973   cat conftest.$ac_ext >&5
2974   rm -rf conftest*
2975   eval "ac_cv_lib_$ac_lib_var=no"
2976 fi
2977 rm -f conftest*
2978 LIBS="$ac_save_LIBS"
2979
2980 fi
2981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2982   echo "$ac_t""yes" 1>&6
2983     ac_tr_lib=HAVE_LIB`echo Xt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2984     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2985   cat >> confdefs.h <<EOF
2986 #define $ac_tr_lib 1
2987 EOF
2988
2989   LIBS="-lXt $LIBS"
2990
2991 else
2992   echo "$ac_t""no" 1>&6
2993 fi
2994
2995 echo $ac_n "checking for XmuLookupStandardColormap in -lXmu""... $ac_c" 1>&6
2996 echo "configure:2997: checking for XmuLookupStandardColormap in -lXmu" >&5
2997 ac_lib_var=`echo Xmu'_'XmuLookupStandardColormap | sed 'y%./+-%__p_%'`
2998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2999   echo $ac_n "(cached) $ac_c" 1>&6
3000 else
3001   ac_save_LIBS="$LIBS"
3002 LIBS="-lXmu  $LIBS"
3003 cat > conftest.$ac_ext <<EOF
3004 #line 3005 "configure"
3005 #include "confdefs.h"
3006 /* Override any gcc2 internal prototype to avoid an error.  */
3007 /* We use char because int might match the return type of a gcc2
3008     builtin and then its argument prototype would still apply.  */
3009 char XmuLookupStandardColormap();
3010
3011 int main() {
3012 XmuLookupStandardColormap()
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3016   rm -rf conftest*
3017   eval "ac_cv_lib_$ac_lib_var=yes"
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   eval "ac_cv_lib_$ac_lib_var=no"
3023 fi
3024 rm -f conftest*
3025 LIBS="$ac_save_LIBS"
3026
3027 fi
3028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3029   echo "$ac_t""yes" 1>&6
3030     ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3031     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3032   cat >> confdefs.h <<EOF
3033 #define $ac_tr_lib 1
3034 EOF
3035
3036   LIBS="-lXmu $LIBS"
3037
3038 else
3039   echo "$ac_t""no" 1>&6
3040 fi
3041
3042
3043 echo $ac_n "checking for glNewList in -lGLcore""... $ac_c" 1>&6
3044 echo "configure:3045: checking for glNewList in -lGLcore" >&5
3045 ac_lib_var=`echo GLcore'_'glNewList | sed 'y%./+-%__p_%'`
3046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3047   echo $ac_n "(cached) $ac_c" 1>&6
3048 else
3049   ac_save_LIBS="$LIBS"
3050 LIBS="-lGLcore  $LIBS"
3051 cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 /* Override any gcc2 internal prototype to avoid an error.  */
3055 /* We use char because int might match the return type of a gcc2
3056     builtin and then its argument prototype would still apply.  */
3057 char glNewList();
3058
3059 int main() {
3060 glNewList()
3061 ; return 0; }
3062 EOF
3063 if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3064   rm -rf conftest*
3065   eval "ac_cv_lib_$ac_lib_var=yes"
3066 else
3067   echo "configure: failed program was:" >&5
3068   cat conftest.$ac_ext >&5
3069   rm -rf conftest*
3070   eval "ac_cv_lib_$ac_lib_var=no"
3071 fi
3072 rm -f conftest*
3073 LIBS="$ac_save_LIBS"
3074
3075 fi
3076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3077   echo "$ac_t""yes" 1>&6
3078     ac_tr_lib=HAVE_LIB`echo GLcore | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3080   cat >> confdefs.h <<EOF
3081 #define $ac_tr_lib 1
3082 EOF
3083
3084   LIBS="-lGLcore $LIBS"
3085
3086 else
3087   echo "$ac_t""no" 1>&6
3088 fi
3089
3090 if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then
3091         echo $ac_n "checking for glNewList in -lGL""... $ac_c" 1>&6
3092 echo "configure:3093: checking for glNewList in -lGL" >&5
3093 ac_lib_var=`echo GL'_'glNewList | sed 'y%./+-%__p_%'`
3094 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3095   echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097   ac_save_LIBS="$LIBS"
3098 LIBS="-lGL  $LIBS"
3099 cat > conftest.$ac_ext <<EOF
3100 #line 3101 "configure"
3101 #include "confdefs.h"
3102 /* Override any gcc2 internal prototype to avoid an error.  */
3103 /* We use char because int might match the return type of a gcc2
3104     builtin and then its argument prototype would still apply.  */
3105 char glNewList();
3106
3107 int main() {
3108 glNewList()
3109 ; return 0; }
3110 EOF
3111 if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3112   rm -rf conftest*
3113   eval "ac_cv_lib_$ac_lib_var=yes"
3114 else
3115   echo "configure: failed program was:" >&5
3116   cat conftest.$ac_ext >&5
3117   rm -rf conftest*
3118   eval "ac_cv_lib_$ac_lib_var=no"
3119 fi
3120 rm -f conftest*
3121 LIBS="$ac_save_LIBS"
3122
3123 fi
3124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3125   echo "$ac_t""yes" 1>&6
3126     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3127     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3128   cat >> confdefs.h <<EOF
3129 #define $ac_tr_lib 1
3130 EOF
3131
3132   LIBS="-lGL $LIBS"
3133
3134 else
3135   echo "$ac_t""no" 1>&6
3136 fi
3137
3138     if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
3139                 echo $ac_n "checking for glNewList in -lMesaGL""... $ac_c" 1>&6
3140 echo "configure:3141: checking for glNewList in -lMesaGL" >&5
3141 ac_lib_var=`echo MesaGL'_'glNewList | sed 'y%./+-%__p_%'`
3142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3143   echo $ac_n "(cached) $ac_c" 1>&6
3144 else
3145   ac_save_LIBS="$LIBS"
3146 LIBS="-lMesaGL  $LIBS"
3147 cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150 /* Override any gcc2 internal prototype to avoid an error.  */
3151 /* We use char because int might match the return type of a gcc2
3152     builtin and then its argument prototype would still apply.  */
3153 char glNewList();
3154
3155 int main() {
3156 glNewList()
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3160   rm -rf conftest*
3161   eval "ac_cv_lib_$ac_lib_var=yes"
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -rf conftest*
3166   eval "ac_cv_lib_$ac_lib_var=no"
3167 fi
3168 rm -f conftest*
3169 LIBS="$ac_save_LIBS"
3170
3171 fi
3172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3173   echo "$ac_t""yes" 1>&6
3174     ac_tr_lib=HAVE_LIB`echo MesaGL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3176   cat >> confdefs.h <<EOF
3177 #define $ac_tr_lib 1
3178 EOF
3179
3180   LIBS="-lMesaGL $LIBS"
3181
3182 else
3183   echo "$ac_t""no" 1>&6
3184 fi
3185
3186     fi
3187 else
3188         echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
3189 echo "configure:3190: checking for glXCreateContext in -lGL" >&5
3190 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3191 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   ac_save_LIBS="$LIBS"
3195 LIBS="-lGL  $LIBS"
3196 cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 /* Override any gcc2 internal prototype to avoid an error.  */
3200 /* We use char because int might match the return type of a gcc2
3201     builtin and then its argument prototype would still apply.  */
3202 char glXCreateContext();
3203
3204 int main() {
3205 glXCreateContext()
3206 ; return 0; }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3209   rm -rf conftest*
3210   eval "ac_cv_lib_$ac_lib_var=yes"
3211 else
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   eval "ac_cv_lib_$ac_lib_var=no"
3216 fi
3217 rm -f conftest*
3218 LIBS="$ac_save_LIBS"
3219
3220 fi
3221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3222   echo "$ac_t""yes" 1>&6
3223     ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3224     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3225   cat >> confdefs.h <<EOF
3226 #define $ac_tr_lib 1
3227 EOF
3228
3229   LIBS="-lGL $LIBS"
3230
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 fi
3236
3237 echo $ac_n "checking for gluLookAt in -lGLU""... $ac_c" 1>&6
3238 echo "configure:3239: checking for gluLookAt in -lGLU" >&5
3239 ac_lib_var=`echo GLU'_'gluLookAt | sed 'y%./+-%__p_%'`
3240 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   ac_save_LIBS="$LIBS"
3244 LIBS="-lGLU  $LIBS"
3245 cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 /* Override any gcc2 internal prototype to avoid an error.  */
3249 /* We use char because int might match the return type of a gcc2
3250     builtin and then its argument prototype would still apply.  */
3251 char gluLookAt();
3252
3253 int main() {
3254 gluLookAt()
3255 ; return 0; }
3256 EOF
3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3258   rm -rf conftest*
3259   eval "ac_cv_lib_$ac_lib_var=yes"
3260 else
3261   echo "configure: failed program was:" >&5
3262   cat conftest.$ac_ext >&5
3263   rm -rf conftest*
3264   eval "ac_cv_lib_$ac_lib_var=no"
3265 fi
3266 rm -f conftest*
3267 LIBS="$ac_save_LIBS"
3268
3269 fi
3270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3271   echo "$ac_t""yes" 1>&6
3272     ac_tr_lib=HAVE_LIB`echo GLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3273     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3274   cat >> confdefs.h <<EOF
3275 #define $ac_tr_lib 1
3276 EOF
3277
3278   LIBS="-lGLU $LIBS"
3279
3280 else
3281   echo "$ac_t""no" 1>&6
3282 fi
3283
3284 if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
3285         echo $ac_n "checking for gluLookAt in -lMesaGLU""... $ac_c" 1>&6
3286 echo "configure:3287: checking for gluLookAt in -lMesaGLU" >&5
3287 ac_lib_var=`echo MesaGLU'_'gluLookAt | sed 'y%./+-%__p_%'`
3288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   ac_save_LIBS="$LIBS"
3292 LIBS="-lMesaGLU  $LIBS"
3293 cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 /* Override any gcc2 internal prototype to avoid an error.  */
3297 /* We use char because int might match the return type of a gcc2
3298     builtin and then its argument prototype would still apply.  */
3299 char gluLookAt();
3300
3301 int main() {
3302 gluLookAt()
3303 ; return 0; }
3304 EOF
3305 if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3306   rm -rf conftest*
3307   eval "ac_cv_lib_$ac_lib_var=yes"
3308 else
3309   echo "configure: failed program was:" >&5
3310   cat conftest.$ac_ext >&5
3311   rm -rf conftest*
3312   eval "ac_cv_lib_$ac_lib_var=no"
3313 fi
3314 rm -f conftest*
3315 LIBS="$ac_save_LIBS"
3316
3317 fi
3318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3319   echo "$ac_t""yes" 1>&6
3320     ac_tr_lib=HAVE_LIB`echo MesaGLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3321     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3322   cat >> confdefs.h <<EOF
3323 #define $ac_tr_lib 1
3324 EOF
3325
3326   LIBS="-lMesaGLU $LIBS"
3327
3328 else
3329   echo "$ac_t""no" 1>&6
3330 fi
3331
3332 fi
3333
3334 echo $ac_n "checking for glutGetModifiers in -lglut""... $ac_c" 1>&6
3335 echo "configure:3336: checking for glutGetModifiers in -lglut" >&5
3336 ac_lib_var=`echo glut'_'glutGetModifiers | sed 'y%./+-%__p_%'`
3337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3338   echo $ac_n "(cached) $ac_c" 1>&6
3339 else
3340   ac_save_LIBS="$LIBS"
3341 LIBS="-lglut  $LIBS"
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 /* Override any gcc2 internal prototype to avoid an error.  */
3346 /* We use char because int might match the return type of a gcc2
3347     builtin and then its argument prototype would still apply.  */
3348 char glutGetModifiers();
3349
3350 int main() {
3351 glutGetModifiers()
3352 ; return 0; }
3353 EOF
3354 if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3355   rm -rf conftest*
3356   eval "ac_cv_lib_$ac_lib_var=yes"
3357 else
3358   echo "configure: failed program was:" >&5
3359   cat conftest.$ac_ext >&5
3360   rm -rf conftest*
3361   eval "ac_cv_lib_$ac_lib_var=no"
3362 fi
3363 rm -f conftest*
3364 LIBS="$ac_save_LIBS"
3365
3366 fi
3367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3368   echo "$ac_t""yes" 1>&6
3369     ac_tr_lib=HAVE_LIB`echo glut | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3370     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3371   cat >> confdefs.h <<EOF
3372 #define $ac_tr_lib 1
3373 EOF
3374
3375   LIBS="-lglut $LIBS"
3376
3377 else
3378   echo "$ac_t""no" 1>&6
3379 fi
3380
3381         
3382 if test "x$ac_cv_header_windows_h" = "xyes" ; then
3383     echo Win32 specific hacks...
3384     cat >> confdefs.h <<\EOF
3385 #define WIN32 1
3386 EOF
3387
3388
3389             if [ -f `pwd`/Win32/glut.dll ]; then
3390         echo "    found glut.dll, adding -lglut"
3391         LIBS="$LIBS -lglut"
3392     else
3393         echo "    Cannot find glut.dll"
3394         exit 1
3395     fi
3396     if [ -f `pwd`/Win32/glu.dll ]; then
3397         echo "    found glu.dll"
3398     else
3399         echo "    Can't find glu.dll, assuming it's someplace"
3400     fi
3401     echo "    adding -lglu"
3402     LIBS="$LIBS -lglu"
3403     if [ -f `pwd`/Win32/opengl.dll ]; then
3404         echo "    found opengl.dll"
3405     else
3406         echo "    Can't find opengl.dll, assuming it's somplace"
3407     fi
3408     echo "    adding -lopengl"
3409     LIBS="$LIBS -lopengl"
3410     echo "    adding -luser32 -lgdi32"
3411     LIBS="$LIBS -luser32 -lgdi32"
3412     ac_cv_lib_glut_glutGetModifiers="yes"
3413 fi
3414
3415 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3416 echo "configure:3417: checking for ANSI C header files" >&5
3417 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3418   echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420   cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 #include <stdlib.h>
3424 #include <stdarg.h>
3425 #include <string.h>
3426 #include <float.h>
3427 EOF
3428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3429 { (eval echo configure:3430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3430 ac_err=`grep -v '^ *+' conftest.out`
3431 if test -z "$ac_err"; then
3432   rm -rf conftest*
3433   ac_cv_header_stdc=yes
3434 else
3435   echo "$ac_err" >&5
3436   echo "configure: failed program was:" >&5
3437   cat conftest.$ac_ext >&5
3438   rm -rf conftest*
3439   ac_cv_header_stdc=no
3440 fi
3441 rm -f conftest*
3442
3443 if test $ac_cv_header_stdc = yes; then
3444   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3445 cat > conftest.$ac_ext <<EOF
3446 #line 3447 "configure"
3447 #include "confdefs.h"
3448 #include <string.h>
3449 EOF
3450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3451   egrep "memchr" >/dev/null 2>&1; then
3452   :
3453 else
3454   rm -rf conftest*
3455   ac_cv_header_stdc=no
3456 fi
3457 rm -f conftest*
3458
3459 fi
3460
3461 if test $ac_cv_header_stdc = yes; then
3462   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #include <stdlib.h>
3467 EOF
3468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3469   egrep "free" >/dev/null 2>&1; then
3470   :
3471 else
3472   rm -rf conftest*
3473   ac_cv_header_stdc=no
3474 fi
3475 rm -f conftest*
3476
3477 fi
3478
3479 if test $ac_cv_header_stdc = yes; then
3480   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3481 if test "$cross_compiling" = yes; then
3482   :
3483 else
3484   cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 #include <ctype.h>
3488 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3489 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3490 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3491 int main () { int i; for (i = 0; i < 256; i++)
3492 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3493 exit (0); }
3494
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3497 then
3498   :
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -fr conftest*
3503   ac_cv_header_stdc=no
3504 fi
3505 rm -fr conftest*
3506 fi
3507
3508 fi
3509 fi
3510
3511 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3512 if test $ac_cv_header_stdc = yes; then
3513   cat >> confdefs.h <<\EOF
3514 #define STDC_HEADERS 1
3515 EOF
3516
3517 fi
3518
3519 for ac_hdr in fcntl.h getopt.h malloc.h stdlib.h sys/time.h sys/timeb.h \
3520         unistd.h windows.h winbase.h values.h 
3521 do
3522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3524 echo "configure:3525: checking for $ac_hdr" >&5
3525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 #include <$ac_hdr>
3532 EOF
3533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3534 { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3535 ac_err=`grep -v '^ *+' conftest.out`
3536 if test -z "$ac_err"; then
3537   rm -rf conftest*
3538   eval "ac_cv_header_$ac_safe=yes"
3539 else
3540   echo "$ac_err" >&5
3541   echo "configure: failed program was:" >&5
3542   cat conftest.$ac_ext >&5
3543   rm -rf conftest*
3544   eval "ac_cv_header_$ac_safe=no"
3545 fi
3546 rm -f conftest*
3547 fi
3548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3549   echo "$ac_t""yes" 1>&6
3550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3551   cat >> confdefs.h <<EOF
3552 #define $ac_tr_hdr 1
3553 EOF
3554  
3555 else
3556   echo "$ac_t""no" 1>&6
3557 fi
3558 done
3559
3560
3561 echo $ac_n "checking for working const""... $ac_c" 1>&6
3562 echo "configure:3563: checking for working const" >&5
3563 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569
3570 int main() {
3571
3572 /* Ultrix mips cc rejects this.  */
3573 typedef int charset[2]; const charset x;
3574 /* SunOS 4.1.1 cc rejects this.  */
3575 char const *const *ccp;
3576 char **p;
3577 /* NEC SVR4.0.2 mips cc rejects this.  */
3578 struct point {int x, y;};
3579 static struct point const zero = {0,0};
3580 /* AIX XL C 1.02.0.0 rejects this.
3581    It does not let you subtract one const X* pointer from another in an arm
3582    of an if-expression whose if-part is not a constant expression */
3583 const char *g = "string";
3584 ccp = &g + (g ? g-g : 0);
3585 /* HPUX 7.0 cc rejects these. */
3586 ++ccp;
3587 p = (char**) ccp;
3588 ccp = (char const *const *) p;
3589 { /* SCO 3.2v4 cc rejects this.  */
3590   char *t;
3591   char const *s = 0 ? (char *) 0 : (char const *) 0;
3592
3593   *t++ = 0;
3594 }
3595 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3596   int x[] = {25, 17};
3597   const int *foo = &x[0];
3598   ++foo;
3599 }
3600 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3601   typedef const int *iptr;
3602   iptr p = 0;
3603   ++p;
3604 }
3605 { /* AIX XL C 1.02.0.0 rejects this saying
3606      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3607   struct s { int j; const int *ap[3]; };
3608   struct s *b; b->j = 5;
3609 }
3610 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3611   const int foo = 10;
3612 }
3613
3614 ; return 0; }
3615 EOF
3616 if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3617   rm -rf conftest*
3618   ac_cv_c_const=yes
3619 else
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   ac_cv_c_const=no
3624 fi
3625 rm -f conftest*
3626 fi
3627
3628 echo "$ac_t""$ac_cv_c_const" 1>&6
3629 if test $ac_cv_c_const = no; then
3630   cat >> confdefs.h <<\EOF
3631 #define const 
3632 EOF
3633
3634 fi
3635
3636 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3637 echo "configure:3638: checking for size_t" >&5
3638 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <sys/types.h>
3645 #if STDC_HEADERS
3646 #include <stdlib.h>
3647 #include <stddef.h>
3648 #endif
3649 EOF
3650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3651   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3652   rm -rf conftest*
3653   ac_cv_type_size_t=yes
3654 else
3655   rm -rf conftest*
3656   ac_cv_type_size_t=no
3657 fi
3658 rm -f conftest*
3659
3660 fi
3661 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3662 if test $ac_cv_type_size_t = no; then
3663   cat >> confdefs.h <<\EOF
3664 #define size_t unsigned
3665 EOF
3666
3667 fi
3668
3669 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3670 echo "configure:3671: checking whether time.h and sys/time.h may both be included" >&5
3671 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3672   echo $ac_n "(cached) $ac_c" 1>&6
3673 else
3674   cat > conftest.$ac_ext <<EOF
3675 #line 3676 "configure"
3676 #include "confdefs.h"
3677 #include <sys/types.h>
3678 #include <sys/time.h>
3679 #include <time.h>
3680 int main() {
3681 struct tm *tp;
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_header_time=yes
3687 else
3688   echo "configure: failed program was:" >&5
3689   cat conftest.$ac_ext >&5
3690   rm -rf conftest*
3691   ac_cv_header_time=no
3692 fi
3693 rm -f conftest*
3694 fi
3695
3696 echo "$ac_t""$ac_cv_header_time" 1>&6
3697 if test $ac_cv_header_time = yes; then
3698   cat >> confdefs.h <<\EOF
3699 #define TIME_WITH_SYS_TIME 1
3700 EOF
3701
3702 fi
3703
3704 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3705 echo "configure:3706: checking whether struct tm is in sys/time.h or time.h" >&5
3706 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   cat > conftest.$ac_ext <<EOF
3710 #line 3711 "configure"
3711 #include "confdefs.h"
3712 #include <sys/types.h>
3713 #include <time.h>
3714 int main() {
3715 struct tm *tp; tp->tm_sec;
3716 ; return 0; }
3717 EOF
3718 if { (eval echo configure:3719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3719   rm -rf conftest*
3720   ac_cv_struct_tm=time.h
3721 else
3722   echo "configure: failed program was:" >&5
3723   cat conftest.$ac_ext >&5
3724   rm -rf conftest*
3725   ac_cv_struct_tm=sys/time.h
3726 fi
3727 rm -f conftest*
3728 fi
3729
3730 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3731 if test $ac_cv_struct_tm = sys/time.h; then
3732   cat >> confdefs.h <<\EOF
3733 #define TM_IN_SYS_TIME 1
3734 EOF
3735
3736 fi
3737
3738
3739 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3740 echo "configure:3741: checking return type of signal handlers" >&5
3741 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3742   echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744   cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747 #include <sys/types.h>
3748 #include <signal.h>
3749 #ifdef signal
3750 #undef signal
3751 #endif
3752 #ifdef __cplusplus
3753 extern "C" void (*signal (int, void (*)(int)))(int);
3754 #else
3755 void (*signal ()) ();
3756 #endif
3757
3758 int main() {
3759 int i;
3760 ; return 0; }
3761 EOF
3762 if { (eval echo configure:3763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3763   rm -rf conftest*
3764   ac_cv_type_signal=void
3765 else
3766   echo "configure: failed program was:" >&5
3767   cat conftest.$ac_ext >&5
3768   rm -rf conftest*
3769   ac_cv_type_signal=int
3770 fi
3771 rm -f conftest*
3772 fi
3773
3774 echo "$ac_t""$ac_cv_type_signal" 1>&6
3775 cat >> confdefs.h <<EOF
3776 #define RETSIGTYPE $ac_cv_type_signal
3777 EOF
3778
3779
3780 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3781 echo "configure:3782: checking for vprintf" >&5
3782 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 /* System header to define __stub macros and hopefully few prototypes,
3789     which can conflict with char vprintf(); below.  */
3790 #include <assert.h>
3791 /* Override any gcc2 internal prototype to avoid an error.  */
3792 /* We use char because int might match the return type of a gcc2
3793     builtin and then its argument prototype would still apply.  */
3794 char vprintf();
3795
3796 int main() {
3797
3798 /* The GNU C library defines this for functions which it implements
3799     to always fail with ENOSYS.  Some functions are actually named
3800     something starting with __ and the normal name is an alias.  */
3801 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3802 choke me
3803 #else
3804 vprintf();
3805 #endif
3806
3807 ; return 0; }
3808 EOF
3809 if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3810   rm -rf conftest*
3811   eval "ac_cv_func_vprintf=yes"
3812 else
3813   echo "configure: failed program was:" >&5
3814   cat conftest.$ac_ext >&5
3815   rm -rf conftest*
3816   eval "ac_cv_func_vprintf=no"
3817 fi
3818 rm -f conftest*
3819 fi
3820
3821 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3822   echo "$ac_t""yes" 1>&6
3823   cat >> confdefs.h <<\EOF
3824 #define HAVE_VPRINTF 1
3825 EOF
3826
3827 else
3828   echo "$ac_t""no" 1>&6
3829 fi
3830
3831 if test "$ac_cv_func_vprintf" != yes; then
3832 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3833 echo "configure:3834: checking for _doprnt" >&5
3834 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3835   echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837   cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840 /* System header to define __stub macros and hopefully few prototypes,
3841     which can conflict with char _doprnt(); below.  */
3842 #include <assert.h>
3843 /* Override any gcc2 internal prototype to avoid an error.  */
3844 /* We use char because int might match the return type of a gcc2
3845     builtin and then its argument prototype would still apply.  */
3846 char _doprnt();
3847
3848 int main() {
3849
3850 /* The GNU C library defines this for functions which it implements
3851     to always fail with ENOSYS.  Some functions are actually named
3852     something starting with __ and the normal name is an alias.  */
3853 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3854 choke me
3855 #else
3856 _doprnt();
3857 #endif
3858
3859 ; return 0; }
3860 EOF
3861 if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3862   rm -rf conftest*
3863   eval "ac_cv_func__doprnt=yes"
3864 else
3865   echo "configure: failed program was:" >&5
3866   cat conftest.$ac_ext >&5
3867   rm -rf conftest*
3868   eval "ac_cv_func__doprnt=no"
3869 fi
3870 rm -f conftest*
3871 fi
3872
3873 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3874   echo "$ac_t""yes" 1>&6
3875   cat >> confdefs.h <<\EOF
3876 #define HAVE_DOPRNT 1
3877 EOF
3878
3879 else
3880   echo "$ac_t""no" 1>&6
3881 fi
3882
3883 fi
3884
3885 for ac_func in ftime gettimeofday mktime strstr rand random \
3886         setitimer getitimer signal GetLocalTime rint 
3887 do
3888 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3889 echo "configure:3890: checking for $ac_func" >&5
3890 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3891   echo $ac_n "(cached) $ac_c" 1>&6
3892 else
3893   cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896 /* System header to define __stub macros and hopefully few prototypes,
3897     which can conflict with char $ac_func(); below.  */
3898 #include <assert.h>
3899 /* Override any gcc2 internal prototype to avoid an error.  */
3900 /* We use char because int might match the return type of a gcc2
3901     builtin and then its argument prototype would still apply.  */
3902 char $ac_func();
3903
3904 int main() {
3905
3906 /* The GNU C library defines this for functions which it implements
3907     to always fail with ENOSYS.  Some functions are actually named
3908     something starting with __ and the normal name is an alias.  */
3909 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3910 choke me
3911 #else
3912 $ac_func();
3913 #endif
3914
3915 ; return 0; }
3916 EOF
3917 if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3918   rm -rf conftest*
3919   eval "ac_cv_func_$ac_func=yes"
3920 else
3921   echo "configure: failed program was:" >&5
3922   cat conftest.$ac_ext >&5
3923   rm -rf conftest*
3924   eval "ac_cv_func_$ac_func=no"
3925 fi
3926 rm -f conftest*
3927 fi
3928
3929 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3930   echo "$ac_t""yes" 1>&6
3931     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3932   cat >> confdefs.h <<EOF
3933 #define $ac_tr_func 1
3934 EOF
3935  
3936 else
3937   echo "$ac_t""no" 1>&6
3938 fi
3939 done
3940
3941
3942 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
3943     echo 
3944     echo "Unable to find the necessary GL libraries."
3945     exit 1
3946 fi
3947
3948
3949
3950
3951
3952 trap '' 1 2 15
3953 cat > confcache <<\EOF
3954 # This file is a shell script that caches the results of configure
3955 # tests run on this system so they can be shared between configure
3956 # scripts and configure runs.  It is not useful on other systems.
3957 # If it contains results you don't want to keep, you may remove or edit it.
3958 #
3959 # By default, configure uses ./config.cache as the cache file,
3960 # creating it if it does not exist already.  You can give configure
3961 # the --cache-file=FILE option to use a different cache file; that is
3962 # what configure does when it calls configure scripts in
3963 # subdirectories, so they share the cache.
3964 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3965 # config.status only pays attention to the cache file if you give it the
3966 # --recheck option to rerun configure.
3967 #
3968 EOF
3969 # The following way of writing the cache mishandles newlines in values,
3970 # but we know of no workaround that is simple, portable, and efficient.
3971 # So, don't put newlines in cache variables' values.
3972 # Ultrix sh set writes to stderr and can't be redirected directly,
3973 # and sets the high bit in the cache file unless we assign to the vars.
3974 (set) 2>&1 |
3975   case `(ac_space=' '; set) 2>&1` in
3976   *ac_space=\ *)
3977     # `set' does not quote correctly, so add quotes (double-quote substitution
3978     # turns \\\\ into \\, and sed turns \\ into \).
3979     sed -n \
3980       -e "s/'/'\\\\''/g" \
3981       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3982     ;;
3983   *)
3984     # `set' quotes correctly as required by POSIX, so do not add quotes.
3985     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3986     ;;
3987   esac >> confcache
3988 if cmp -s $cache_file confcache; then
3989   :
3990 else
3991   if test -w $cache_file; then
3992     echo "updating cache $cache_file"
3993     cat confcache > $cache_file
3994   else
3995     echo "not updating unwritable cache $cache_file"
3996   fi
3997 fi
3998 rm -f confcache
3999
4000 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4001
4002 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4003 # Let make expand exec_prefix.
4004 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4005
4006 # Any assignment to VPATH causes Sun make to only execute
4007 # the first set of double-colon rules, so remove it if not needed.
4008 # If there is a colon in the path, we need to keep it.
4009 if test "x$srcdir" = x.; then
4010   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4011 fi
4012
4013 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4014
4015 DEFS=-DHAVE_CONFIG_H
4016
4017 # Without the "./", some shells look in PATH for config.status.
4018 : ${CONFIG_STATUS=./config.status}
4019
4020 echo creating $CONFIG_STATUS
4021 rm -f $CONFIG_STATUS
4022 cat > $CONFIG_STATUS <<EOF
4023 #! /bin/sh
4024 # Generated automatically by configure.
4025 # Run this file to recreate the current configuration.
4026 # This directory was configured as follows,
4027 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4028 #
4029 # $0 $ac_configure_args
4030 #
4031 # Compiler output produced by configure, useful for debugging
4032 # configure, is in ./config.log if it exists.
4033
4034 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4035 for ac_option
4036 do
4037   case "\$ac_option" in
4038   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4039     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4040     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4041   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4042     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4043     exit 0 ;;
4044   -help | --help | --hel | --he | --h)
4045     echo "\$ac_cs_usage"; exit 0 ;;
4046   *) echo "\$ac_cs_usage"; exit 1 ;;
4047   esac
4048 done
4049
4050 ac_given_srcdir=$srcdir
4051 ac_given_INSTALL="$INSTALL"
4052
4053 trap 'rm -fr `echo "\
4054         Makefile \
4055         Include/Makefile \
4056         Lib/Makefile \
4057         Lib/Bucket/Makefile \
4058         Lib/Debug/Makefile \
4059         Lib/DEM/Makefile \
4060         Lib/Math/Makefile \
4061         Lib/XGL/Makefile \
4062         Lib/zlib/Makefile \
4063         Simulator/Makefile \
4064         Simulator/Aircraft/Makefile \
4065         Simulator/Astro/Makefile \
4066         Simulator/Autopilot/Makefile \
4067         Simulator/Cockpit/Makefile \
4068         Simulator/Controls/Makefile \
4069         Simulator/Flight/LaRCsim/Makefile \
4070         Simulator/Flight/Slew/Makefile \
4071         Simulator/Flight/Makefile \
4072         Simulator/Joystick/Makefile \
4073         Simulator/Main/Makefile \
4074         Simulator/Main/runfg \
4075         Simulator/Main/runfg.bat \
4076         Simulator/Makefile \
4077         Simulator/Scenery/Makefile \
4078         Simulator/Time/Makefile \
4079         Simulator/Weather/Makefile \
4080         Tools/Makefile \
4081         Tools/AssemTris/Makefile \
4082         Tools/Dem2node/Makefile \
4083         Tools/DemRaw2ascii/Makefile \
4084         Tools/FixNode/Makefile \
4085         Tools/FixObj/Makefile \
4086         Tools/SplitTris/Makefile \
4087         Tools/Stripe_u/Makefile \
4088         Tools/Tri2obj/Makefile \
4089         Tools/Triangle/Makefile \
4090         Tests/Makefile \
4091          Include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4092 EOF
4093 cat >> $CONFIG_STATUS <<EOF
4094
4095 # Protect against being on the right side of a sed subst in config.status.
4096 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4097  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4098 $ac_vpsub
4099 $extrasub
4100 s%@CFLAGS@%$CFLAGS%g
4101 s%@CPPFLAGS@%$CPPFLAGS%g
4102 s%@CXXFLAGS@%$CXXFLAGS%g
4103 s%@DEFS@%$DEFS%g
4104 s%@LDFLAGS@%$LDFLAGS%g
4105 s%@LIBS@%$LIBS%g
4106 s%@exec_prefix@%$exec_prefix%g
4107 s%@prefix@%$prefix%g
4108 s%@program_transform_name@%$program_transform_name%g
4109 s%@bindir@%$bindir%g
4110 s%@sbindir@%$sbindir%g
4111 s%@libexecdir@%$libexecdir%g
4112 s%@datadir@%$datadir%g
4113 s%@sysconfdir@%$sysconfdir%g
4114 s%@sharedstatedir@%$sharedstatedir%g
4115 s%@localstatedir@%$localstatedir%g
4116 s%@libdir@%$libdir%g
4117 s%@includedir@%$includedir%g
4118 s%@oldincludedir@%$oldincludedir%g
4119 s%@infodir@%$infodir%g
4120 s%@mandir@%$mandir%g
4121 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4122 s%@INSTALL_DATA@%$INSTALL_DATA%g
4123 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4124 s%@PACKAGE@%$PACKAGE%g
4125 s%@VERSION@%$VERSION%g
4126 s%@ACLOCAL@%$ACLOCAL%g
4127 s%@AUTOCONF@%$AUTOCONF%g
4128 s%@AUTOMAKE@%$AUTOMAKE%g
4129 s%@AUTOHEADER@%$AUTOHEADER%g
4130 s%@MAKEINFO@%$MAKEINFO%g
4131 s%@SET_MAKE@%$SET_MAKE%g
4132 s%@CC@%$CC%g
4133 s%@CXX@%$CXX%g
4134 s%@LN_S@%$LN_S%g
4135 s%@host@%$host%g
4136 s%@host_alias@%$host_alias%g
4137 s%@host_cpu@%$host_cpu%g
4138 s%@host_vendor@%$host_vendor%g
4139 s%@host_os@%$host_os%g
4140 s%@RANLIB@%$RANLIB%g
4141 s%@LD@%$LD%g
4142 s%@NM@%$NM%g
4143 s%@LIBTOOL@%$LIBTOOL%g
4144 s%@MAINT@%$MAINT%g
4145 s%@CPP@%$CPP%g
4146 s%@X_CFLAGS@%$X_CFLAGS%g
4147 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4148 s%@X_LIBS@%$X_LIBS%g
4149 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4150
4151 CEOF
4152 EOF
4153
4154 cat >> $CONFIG_STATUS <<\EOF
4155
4156 # Split the substitutions into bite-sized pieces for seds with
4157 # small command number limits, like on Digital OSF/1 and HP-UX.
4158 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4159 ac_file=1 # Number of current file.
4160 ac_beg=1 # First line for current file.
4161 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4162 ac_more_lines=:
4163 ac_sed_cmds=""
4164 while $ac_more_lines; do
4165   if test $ac_beg -gt 1; then
4166     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4167   else
4168     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4169   fi
4170   if test ! -s conftest.s$ac_file; then
4171     ac_more_lines=false
4172     rm -f conftest.s$ac_file
4173   else
4174     if test -z "$ac_sed_cmds"; then
4175       ac_sed_cmds="sed -f conftest.s$ac_file"
4176     else
4177       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4178     fi
4179     ac_file=`expr $ac_file + 1`
4180     ac_beg=$ac_end
4181     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4182   fi
4183 done
4184 if test -z "$ac_sed_cmds"; then
4185   ac_sed_cmds=cat
4186 fi
4187 EOF
4188
4189 cat >> $CONFIG_STATUS <<EOF
4190
4191 CONFIG_FILES=\${CONFIG_FILES-"\
4192         Makefile \
4193         Include/Makefile \
4194         Lib/Makefile \
4195         Lib/Bucket/Makefile \
4196         Lib/Debug/Makefile \
4197         Lib/DEM/Makefile \
4198         Lib/Math/Makefile \
4199         Lib/XGL/Makefile \
4200         Lib/zlib/Makefile \
4201         Simulator/Makefile \
4202         Simulator/Aircraft/Makefile \
4203         Simulator/Astro/Makefile \
4204         Simulator/Autopilot/Makefile \
4205         Simulator/Cockpit/Makefile \
4206         Simulator/Controls/Makefile \
4207         Simulator/Flight/LaRCsim/Makefile \
4208         Simulator/Flight/Slew/Makefile \
4209         Simulator/Flight/Makefile \
4210         Simulator/Joystick/Makefile \
4211         Simulator/Main/Makefile \
4212         Simulator/Main/runfg \
4213         Simulator/Main/runfg.bat \
4214         Simulator/Makefile \
4215         Simulator/Scenery/Makefile \
4216         Simulator/Time/Makefile \
4217         Simulator/Weather/Makefile \
4218         Tools/Makefile \
4219         Tools/AssemTris/Makefile \
4220         Tools/Dem2node/Makefile \
4221         Tools/DemRaw2ascii/Makefile \
4222         Tools/FixNode/Makefile \
4223         Tools/FixObj/Makefile \
4224         Tools/SplitTris/Makefile \
4225         Tools/Stripe_u/Makefile \
4226         Tools/Tri2obj/Makefile \
4227         Tools/Triangle/Makefile \
4228         Tests/Makefile \
4229         "}
4230 EOF
4231 cat >> $CONFIG_STATUS <<\EOF
4232 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4233   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4234   case "$ac_file" in
4235   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4236        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4237   *) ac_file_in="${ac_file}.in" ;;
4238   esac
4239
4240   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4241
4242   # Remove last slash and all that follows it.  Not all systems have dirname.
4243   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4244   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4245     # The file is in a subdirectory.
4246     test ! -d "$ac_dir" && mkdir "$ac_dir"
4247     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4248     # A "../" for each directory in $ac_dir_suffix.
4249     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4250   else
4251     ac_dir_suffix= ac_dots=
4252   fi
4253
4254   case "$ac_given_srcdir" in
4255   .)  srcdir=.
4256       if test -z "$ac_dots"; then top_srcdir=.
4257       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4258   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4259   *) # Relative path.
4260     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4261     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4262   esac
4263
4264   case "$ac_given_INSTALL" in
4265   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4266   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4267   esac
4268
4269   echo creating "$ac_file"
4270   rm -f "$ac_file"
4271   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4272   case "$ac_file" in
4273   *Makefile*) ac_comsub="1i\\
4274 # $configure_input" ;;
4275   *) ac_comsub= ;;
4276   esac
4277
4278   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4279   sed -e "$ac_comsub
4280 s%@configure_input@%$configure_input%g
4281 s%@srcdir@%$srcdir%g
4282 s%@top_srcdir@%$top_srcdir%g
4283 s%@INSTALL@%$INSTALL%g
4284 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4285 fi; done
4286 rm -f conftest.s*
4287
4288 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4289 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4290 #
4291 # ac_d sets the value in "#define NAME VALUE" lines.
4292 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4293 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4294 ac_dC='\3'
4295 ac_dD='%g'
4296 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4297 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4298 ac_uB='\([      ]\)%\1#\2define\3'
4299 ac_uC=' '
4300 ac_uD='\4%g'
4301 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4302 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4303 ac_eB='$%\1#\2define\3'
4304 ac_eC=' '
4305 ac_eD='%g'
4306
4307 if test "${CONFIG_HEADERS+set}" != set; then
4308 EOF
4309 cat >> $CONFIG_STATUS <<EOF
4310   CONFIG_HEADERS="Include/config.h"
4311 EOF
4312 cat >> $CONFIG_STATUS <<\EOF
4313 fi
4314 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4315   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4316   case "$ac_file" in
4317   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4318        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4319   *) ac_file_in="${ac_file}.in" ;;
4320   esac
4321
4322   echo creating $ac_file
4323
4324   rm -f conftest.frag conftest.in conftest.out
4325   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4326   cat $ac_file_inputs > conftest.in
4327
4328 EOF
4329
4330 # Transform confdefs.h into a sed script conftest.vals that substitutes
4331 # the proper values into config.h.in to produce config.h.  And first:
4332 # Protect against being on the right side of a sed subst in config.status.
4333 # Protect against being in an unquoted here document in config.status.
4334 rm -f conftest.vals
4335 cat > conftest.hdr <<\EOF
4336 s/[\\&%]/\\&/g
4337 s%[\\$`]%\\&%g
4338 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4339 s%ac_d%ac_u%gp
4340 s%ac_u%ac_e%gp
4341 EOF
4342 sed -n -f conftest.hdr confdefs.h > conftest.vals
4343 rm -f conftest.hdr
4344
4345 # This sed command replaces #undef with comments.  This is necessary, for
4346 # example, in the case of _POSIX_SOURCE, which is predefined and required
4347 # on some systems where configure will not decide to define it.
4348 cat >> conftest.vals <<\EOF
4349 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4350 EOF
4351
4352 # Break up conftest.vals because some shells have a limit on
4353 # the size of here documents, and old seds have small limits too.
4354
4355 rm -f conftest.tail
4356 while :
4357 do
4358   ac_lines=`grep -c . conftest.vals`
4359   # grep -c gives empty output for an empty file on some AIX systems.
4360   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4361   # Write a limited-size here document to conftest.frag.
4362   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4363   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4364   echo 'CEOF
4365   sed -f conftest.frag conftest.in > conftest.out
4366   rm -f conftest.in
4367   mv conftest.out conftest.in
4368 ' >> $CONFIG_STATUS
4369   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4370   rm -f conftest.vals
4371   mv conftest.tail conftest.vals
4372 done
4373 rm -f conftest.vals
4374
4375 cat >> $CONFIG_STATUS <<\EOF
4376   rm -f conftest.frag conftest.h
4377   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4378   cat conftest.in >> conftest.h
4379   rm -f conftest.in
4380   if cmp -s $ac_file conftest.h 2>/dev/null; then
4381     echo "$ac_file is unchanged"
4382     rm -f conftest.h
4383   else
4384     # Remove last slash and all that follows it.  Not all systems have dirname.
4385       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4386       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4387       # The file is in a subdirectory.
4388       test ! -d "$ac_dir" && mkdir "$ac_dir"
4389     fi
4390     rm -f $ac_file
4391     mv conftest.h $ac_file
4392   fi
4393 fi; done
4394
4395 EOF
4396 cat >> $CONFIG_STATUS <<EOF
4397
4398
4399 EOF
4400 cat >> $CONFIG_STATUS <<\EOF
4401 test -z "$CONFIG_HEADERS" || echo timestamp > Include/stamp-h
4402
4403 exit 0
4404 EOF
4405 chmod +x $CONFIG_STATUS
4406 rm -fr confdefs* $ac_clean_files
4407 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4408