1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-glui-libs=DIR    Specify GLUI library location"
16ac_help="$ac_help
17  --with-glui-inc=DIR     Specify GLUI headers location"
18ac_help="$ac_help
19  --with-gl-libs=DIR      Specify OpenGL library location"
20ac_help="$ac_help
21  --with-gl-inc=DIR       Specify OpenGL header file location"
22ac_help="$ac_help
23  --with-glut-libs=DIR    Specify GLUT library location"
24ac_help="$ac_help
25  --with-glut-inc=DIR     Specify GLUT header file location"
26ac_help="$ac_help
27  --with-x                use the X Window System"
28
29# Initialize some variables set by options.
30# The variables have the same names as the options, with
31# dashes changed to underlines.
32build=NONE
33cache_file=./config.cache
34exec_prefix=NONE
35host=NONE
36no_create=
37nonopt=NONE
38no_recursion=
39prefix=NONE
40program_prefix=NONE
41program_suffix=NONE
42program_transform_name=s,x,x,
43silent=
44site=
45srcdir=
46target=NONE
47verbose=
48x_includes=NONE
49x_libraries=NONE
50bindir='${exec_prefix}/bin'
51sbindir='${exec_prefix}/sbin'
52libexecdir='${exec_prefix}/libexec'
53datadir='${prefix}/share'
54sysconfdir='${prefix}/etc'
55sharedstatedir='${prefix}/com'
56localstatedir='${prefix}/var'
57libdir='${exec_prefix}/lib'
58includedir='${prefix}/include'
59oldincludedir='/usr/include'
60infodir='${prefix}/info'
61mandir='${prefix}/man'
62
63# Initialize some other variables.
64subdirs=
65MFLAGS= MAKEFLAGS=
66SHELL=${CONFIG_SHELL-/bin/sh}
67# Maximum number of lines to put in a shell here document.
68ac_max_here_lines=12
69
70ac_prev=
71for ac_option
72do
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
152Usage: configure [options] [host]
153Options: [defaults in brackets after descriptions]
154Configuration:
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
160Directory 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
184EOF
185    cat << EOF
186Host 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]
190Features 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
197EOF
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.13"
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
407done
408
409if test -n "$ac_prev"; then
410  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411fi
412
413trap '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
423if test "$silent" = yes; then
424  exec 6>/dev/null
425else
426  exec 6>&1
427fi
428exec 5>./config.log
429
430echo "\
431This file contains any messages produced by compilers while
432running 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.
437ac_configure_args=
438for ac_arg
439do
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
449done
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.
456if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
457if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
458if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
459if 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.
462rm -rf conftest* confdefs.h
463# AIX cpp loses on an empty file, so make sure it contains at least a newline.
464echo > 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.
468ac_unique_file=src/ou.cpp
469
470# Find the source files, if location was not specified.
471if 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
481else
482  ac_srcdir_defaulted=no
483fi
484if 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
490fi
491srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
492
493# Prefer explicitly selected file to automatically selected ones.
494if 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
500fi
501for 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
506done
507
508if test -r "$cache_file"; then
509  echo "loading cache $cache_file"
510  . $cache_file
511else
512  echo "creating cache $cache_file"
513  > $cache_file
514fi
515
516ac_ext=c
517# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
518ac_cpp='$CPP $CPPFLAGS'
519ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
520ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
521cross_compiling=$ac_cv_prog_cc_cross
522
523ac_exeext=
524ac_objext=o
525if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
526  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
527  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528    ac_n= ac_c='
529' ac_t='	'
530  else
531    ac_n=-n ac_c= ac_t=
532  fi
533else
534  ac_n= ac_c='\c' ac_t=
535fi
536
537
538
539
540
541ac_aux_dir=
542for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
543  if 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  elif test -f $ac_dir/install.sh; then
548    ac_aux_dir=$ac_dir
549    ac_install_sh="$ac_aux_dir/install.sh -c"
550    break
551  fi
552done
553if test -z "$ac_aux_dir"; then
554  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
555fi
556ac_config_guess=$ac_aux_dir/config.guess
557ac_config_sub=$ac_aux_dir/config.sub
558ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
559
560# Find a good install program.  We prefer a C program (faster),
561# so one script is as good as another.  But avoid the broken or
562# incompatible versions:
563# SysV /etc/install, /usr/sbin/install
564# SunOS /usr/etc/install
565# IRIX /sbin/install
566# AIX /bin/install
567# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
568# AFS /usr/afsws/bin/install, which mishandles nonexistent args
569# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
570# ./install, which can be erroneously created by make from ./install.sh.
571echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
572echo "configure:573: checking for a BSD compatible install" >&5
573if test -z "$INSTALL"; then
574if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
575  echo $ac_n "(cached) $ac_c" 1>&6
576else
577    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
578  for ac_dir in $PATH; do
579    # Account for people who put trailing slashes in PATH elements.
580    case "$ac_dir/" in
581    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
582    *)
583      # OSF1 and SCO ODT 3.0 have their own names for install.
584      # Don't use installbsd from OSF since it installs stuff as root
585      # by default.
586      for ac_prog in ginstall scoinst install; do
587        if test -f $ac_dir/$ac_prog; then
588	  if test $ac_prog = install &&
589            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
590	    # AIX install.  It has an incompatible calling convention.
591	    :
592	  else
593	    ac_cv_path_install="$ac_dir/$ac_prog -c"
594	    break 2
595	  fi
596	fi
597      done
598      ;;
599    esac
600  done
601  IFS="$ac_save_IFS"
602
603fi
604  if test "${ac_cv_path_install+set}" = set; then
605    INSTALL="$ac_cv_path_install"
606  else
607    # As a last resort, use the slow shell script.  We don't cache a
608    # path for INSTALL within a source directory, because that will
609    # break other packages using the cache if that directory is
610    # removed, or if the path is relative.
611    INSTALL="$ac_install_sh"
612  fi
613fi
614echo "$ac_t""$INSTALL" 1>&6
615
616# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
617# It thinks the first close brace ends the variable substitution.
618test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
619
620test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
621
622test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
623
624echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
625echo "configure:626: checking whether build environment is sane" >&5
626# Just in case
627sleep 1
628echo timestamp > conftestfile
629# Do `set' in a subshell so we don't clobber the current shell's
630# arguments.  Must try -L first in case configure is actually a
631# symlink; some systems play weird games with the mod time of symlinks
632# (eg FreeBSD returns the mod time of the symlink's containing
633# directory).
634if (
635   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
636   if test "$*" = "X"; then
637      # -L didn't work.
638      set X `ls -t $srcdir/configure conftestfile`
639   fi
640   if test "$*" != "X $srcdir/configure conftestfile" \
641      && test "$*" != "X conftestfile $srcdir/configure"; then
642
643      # If neither matched, then we have a broken ls.  This can happen
644      # if, for instance, CONFIG_SHELL is bash and it inherits a
645      # broken ls alias from the environment.  This has actually
646      # happened.  Such a system could not be considered "sane".
647      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
648alias in your environment" 1>&2; exit 1; }
649   fi
650
651   test "$2" = conftestfile
652   )
653then
654   # Ok.
655   :
656else
657   { echo "configure: error: newly created file is older than distributed files!
658Check your system clock" 1>&2; exit 1; }
659fi
660rm -f conftest*
661echo "$ac_t""yes" 1>&6
662if test "$program_transform_name" = s,x,x,; then
663  program_transform_name=
664else
665  # Double any \ or $.  echo might interpret backslashes.
666  cat <<\EOF_SED > conftestsed
667s,\\,\\\\,g; s,\$,$$,g
668EOF_SED
669  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
670  rm -f conftestsed
671fi
672test "$program_prefix" != NONE &&
673  program_transform_name="s,^,${program_prefix},; $program_transform_name"
674# Use a double $ so make ignores it.
675test "$program_suffix" != NONE &&
676  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
677
678# sed with no file args requires a program.
679test "$program_transform_name" = "" && program_transform_name="s,x,x,"
680
681echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
682echo "configure:683: checking whether ${MAKE-make} sets \${MAKE}" >&5
683set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
684if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
685  echo $ac_n "(cached) $ac_c" 1>&6
686else
687  cat > conftestmake <<\EOF
688all:
689	@echo 'ac_maketemp="${MAKE}"'
690EOF
691# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
692eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
693if test -n "$ac_maketemp"; then
694  eval ac_cv_prog_make_${ac_make}_set=yes
695else
696  eval ac_cv_prog_make_${ac_make}_set=no
697fi
698rm -f conftestmake
699fi
700if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
701  echo "$ac_t""yes" 1>&6
702  SET_MAKE=
703else
704  echo "$ac_t""no" 1>&6
705  SET_MAKE="MAKE=${MAKE-make}"
706fi
707
708
709PACKAGE=openuniverse
710
711VERSION=1.0beta3
712
713if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
714  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
715fi
716cat >> confdefs.h <<EOF
717#define PACKAGE "$PACKAGE"
718EOF
719
720cat >> confdefs.h <<EOF
721#define VERSION "$VERSION"
722EOF
723
724
725
726missing_dir=`cd $ac_aux_dir && pwd`
727echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
728echo "configure:729: checking for working aclocal" >&5
729# Run test in a subshell; some versions of sh will print an error if
730# an executable is not found, even if stderr is redirected.
731# Redirect stdin to placate older versions of autoconf.  Sigh.
732if (aclocal --version) < /dev/null > /dev/null 2>&1; then
733   ACLOCAL=aclocal
734   echo "$ac_t""found" 1>&6
735else
736   ACLOCAL="$missing_dir/missing aclocal"
737   echo "$ac_t""missing" 1>&6
738fi
739
740echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
741echo "configure:742: checking for working autoconf" >&5
742# Run test in a subshell; some versions of sh will print an error if
743# an executable is not found, even if stderr is redirected.
744# Redirect stdin to placate older versions of autoconf.  Sigh.
745if (autoconf --version) < /dev/null > /dev/null 2>&1; then
746   AUTOCONF=autoconf
747   echo "$ac_t""found" 1>&6
748else
749   AUTOCONF="$missing_dir/missing autoconf"
750   echo "$ac_t""missing" 1>&6
751fi
752
753echo $ac_n "checking for working automake""... $ac_c" 1>&6
754echo "configure:755: checking for working automake" >&5
755# Run test in a subshell; some versions of sh will print an error if
756# an executable is not found, even if stderr is redirected.
757# Redirect stdin to placate older versions of autoconf.  Sigh.
758if (automake --version) < /dev/null > /dev/null 2>&1; then
759   AUTOMAKE=automake
760   echo "$ac_t""found" 1>&6
761else
762   AUTOMAKE="$missing_dir/missing automake"
763   echo "$ac_t""missing" 1>&6
764fi
765
766echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
767echo "configure:768: checking for working autoheader" >&5
768# Run test in a subshell; some versions of sh will print an error if
769# an executable is not found, even if stderr is redirected.
770# Redirect stdin to placate older versions of autoconf.  Sigh.
771if (autoheader --version) < /dev/null > /dev/null 2>&1; then
772   AUTOHEADER=autoheader
773   echo "$ac_t""found" 1>&6
774else
775   AUTOHEADER="$missing_dir/missing autoheader"
776   echo "$ac_t""missing" 1>&6
777fi
778
779echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
780echo "configure:781: checking for working makeinfo" >&5
781# Run test in a subshell; some versions of sh will print an error if
782# an executable is not found, even if stderr is redirected.
783# Redirect stdin to placate older versions of autoconf.  Sigh.
784if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
785   MAKEINFO=makeinfo
786   echo "$ac_t""found" 1>&6
787else
788   MAKEINFO="$missing_dir/missing makeinfo"
789   echo "$ac_t""missing" 1>&6
790fi
791
792
793
794# Extract the first word of "gcc", so it can be a program name with args.
795set dummy gcc; ac_word=$2
796echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
797echo "configure:798: checking for $ac_word" >&5
798if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
799  echo $ac_n "(cached) $ac_c" 1>&6
800else
801  if test -n "$CC"; then
802  ac_cv_prog_CC="$CC" # Let the user override the test.
803else
804  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
805  ac_dummy="$PATH"
806  for ac_dir in $ac_dummy; do
807    test -z "$ac_dir" && ac_dir=.
808    if test -f $ac_dir/$ac_word; then
809      ac_cv_prog_CC="gcc"
810      break
811    fi
812  done
813  IFS="$ac_save_ifs"
814fi
815fi
816CC="$ac_cv_prog_CC"
817if test -n "$CC"; then
818  echo "$ac_t""$CC" 1>&6
819else
820  echo "$ac_t""no" 1>&6
821fi
822
823if test -z "$CC"; then
824  # Extract the first word of "cc", so it can be a program name with args.
825set dummy cc; ac_word=$2
826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
827echo "configure:828: checking for $ac_word" >&5
828if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
829  echo $ac_n "(cached) $ac_c" 1>&6
830else
831  if test -n "$CC"; then
832  ac_cv_prog_CC="$CC" # Let the user override the test.
833else
834  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
835  ac_prog_rejected=no
836  ac_dummy="$PATH"
837  for ac_dir in $ac_dummy; do
838    test -z "$ac_dir" && ac_dir=.
839    if test -f $ac_dir/$ac_word; then
840      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
841        ac_prog_rejected=yes
842	continue
843      fi
844      ac_cv_prog_CC="cc"
845      break
846    fi
847  done
848  IFS="$ac_save_ifs"
849if test $ac_prog_rejected = yes; then
850  # We found a bogon in the path, so make sure we never use it.
851  set dummy $ac_cv_prog_CC
852  shift
853  if test $# -gt 0; then
854    # We chose a different compiler from the bogus one.
855    # However, it has the same basename, so the bogon will be chosen
856    # first if we set CC to just the basename; use the full file name.
857    shift
858    set dummy "$ac_dir/$ac_word" "$@"
859    shift
860    ac_cv_prog_CC="$@"
861  fi
862fi
863fi
864fi
865CC="$ac_cv_prog_CC"
866if test -n "$CC"; then
867  echo "$ac_t""$CC" 1>&6
868else
869  echo "$ac_t""no" 1>&6
870fi
871
872  if test -z "$CC"; then
873    case "`uname -s`" in
874    *win32* | *WIN32*)
875      # Extract the first word of "cl", so it can be a program name with args.
876set dummy cl; ac_word=$2
877echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
878echo "configure:879: checking for $ac_word" >&5
879if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
880  echo $ac_n "(cached) $ac_c" 1>&6
881else
882  if test -n "$CC"; then
883  ac_cv_prog_CC="$CC" # Let the user override the test.
884else
885  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
886  ac_dummy="$PATH"
887  for ac_dir in $ac_dummy; do
888    test -z "$ac_dir" && ac_dir=.
889    if test -f $ac_dir/$ac_word; then
890      ac_cv_prog_CC="cl"
891      break
892    fi
893  done
894  IFS="$ac_save_ifs"
895fi
896fi
897CC="$ac_cv_prog_CC"
898if test -n "$CC"; then
899  echo "$ac_t""$CC" 1>&6
900else
901  echo "$ac_t""no" 1>&6
902fi
903 ;;
904    esac
905  fi
906  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
907fi
908
909echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
910echo "configure:911: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
911
912ac_ext=c
913# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
914ac_cpp='$CPP $CPPFLAGS'
915ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
916ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
917cross_compiling=$ac_cv_prog_cc_cross
918
919cat > conftest.$ac_ext << EOF
920
921#line 922 "configure"
922#include "confdefs.h"
923
924main(){return(0);}
925EOF
926if { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
927  ac_cv_prog_cc_works=yes
928  # If we can't run a trivial program, we are probably using a cross compiler.
929  if (./conftest; exit) 2>/dev/null; then
930    ac_cv_prog_cc_cross=no
931  else
932    ac_cv_prog_cc_cross=yes
933  fi
934else
935  echo "configure: failed program was:" >&5
936  cat conftest.$ac_ext >&5
937  ac_cv_prog_cc_works=no
938fi
939rm -fr conftest*
940ac_ext=c
941# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
942ac_cpp='$CPP $CPPFLAGS'
943ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
944ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
945cross_compiling=$ac_cv_prog_cc_cross
946
947echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
948if test $ac_cv_prog_cc_works = no; then
949  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
950fi
951echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
952echo "configure:953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
953echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
954cross_compiling=$ac_cv_prog_cc_cross
955
956echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
957echo "configure:958: checking whether we are using GNU C" >&5
958if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
959  echo $ac_n "(cached) $ac_c" 1>&6
960else
961  cat > conftest.c <<EOF
962#ifdef __GNUC__
963  yes;
964#endif
965EOF
966if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
967  ac_cv_prog_gcc=yes
968else
969  ac_cv_prog_gcc=no
970fi
971fi
972
973echo "$ac_t""$ac_cv_prog_gcc" 1>&6
974
975if test $ac_cv_prog_gcc = yes; then
976  GCC=yes
977else
978  GCC=
979fi
980
981ac_test_CFLAGS="${CFLAGS+set}"
982ac_save_CFLAGS="$CFLAGS"
983CFLAGS=
984echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
985echo "configure:986: checking whether ${CC-cc} accepts -g" >&5
986if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
987  echo $ac_n "(cached) $ac_c" 1>&6
988else
989  echo 'void f(){}' > conftest.c
990if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
991  ac_cv_prog_cc_g=yes
992else
993  ac_cv_prog_cc_g=no
994fi
995rm -f conftest*
996
997fi
998
999echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1000if test "$ac_test_CFLAGS" = set; then
1001  CFLAGS="$ac_save_CFLAGS"
1002elif test $ac_cv_prog_cc_g = yes; then
1003  if test "$GCC" = yes; then
1004    CFLAGS="-g -O2"
1005  else
1006    CFLAGS="-g"
1007  fi
1008else
1009  if test "$GCC" = yes; then
1010    CFLAGS="-O2"
1011  else
1012    CFLAGS=
1013  fi
1014fi
1015
1016for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1017do
1018# Extract the first word of "$ac_prog", so it can be a program name with args.
1019set dummy $ac_prog; ac_word=$2
1020echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1021echo "configure:1022: checking for $ac_word" >&5
1022if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1023  echo $ac_n "(cached) $ac_c" 1>&6
1024else
1025  if test -n "$CXX"; then
1026  ac_cv_prog_CXX="$CXX" # Let the user override the test.
1027else
1028  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1029  ac_dummy="$PATH"
1030  for ac_dir in $ac_dummy; do
1031    test -z "$ac_dir" && ac_dir=.
1032    if test -f $ac_dir/$ac_word; then
1033      ac_cv_prog_CXX="$ac_prog"
1034      break
1035    fi
1036  done
1037  IFS="$ac_save_ifs"
1038fi
1039fi
1040CXX="$ac_cv_prog_CXX"
1041if test -n "$CXX"; then
1042  echo "$ac_t""$CXX" 1>&6
1043else
1044  echo "$ac_t""no" 1>&6
1045fi
1046
1047test -n "$CXX" && break
1048done
1049test -n "$CXX" || CXX="gcc"
1050
1051
1052echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1053echo "configure:1054: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1054
1055ac_ext=C
1056# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1057ac_cpp='$CXXCPP $CPPFLAGS'
1058ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1059ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1060cross_compiling=$ac_cv_prog_cxx_cross
1061
1062cat > conftest.$ac_ext << EOF
1063
1064#line 1065 "configure"
1065#include "confdefs.h"
1066
1067int main(){return(0);}
1068EOF
1069if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1070  ac_cv_prog_cxx_works=yes
1071  # If we can't run a trivial program, we are probably using a cross compiler.
1072  if (./conftest; exit) 2>/dev/null; then
1073    ac_cv_prog_cxx_cross=no
1074  else
1075    ac_cv_prog_cxx_cross=yes
1076  fi
1077else
1078  echo "configure: failed program was:" >&5
1079  cat conftest.$ac_ext >&5
1080  ac_cv_prog_cxx_works=no
1081fi
1082rm -fr conftest*
1083ac_ext=c
1084# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1085ac_cpp='$CPP $CPPFLAGS'
1086ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1087ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1088cross_compiling=$ac_cv_prog_cc_cross
1089
1090echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1091if test $ac_cv_prog_cxx_works = no; then
1092  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1093fi
1094echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1095echo "configure:1096: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1096echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1097cross_compiling=$ac_cv_prog_cxx_cross
1098
1099echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1100echo "configure:1101: checking whether we are using GNU C++" >&5
1101if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1102  echo $ac_n "(cached) $ac_c" 1>&6
1103else
1104  cat > conftest.C <<EOF
1105#ifdef __GNUC__
1106  yes;
1107#endif
1108EOF
1109if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1110  ac_cv_prog_gxx=yes
1111else
1112  ac_cv_prog_gxx=no
1113fi
1114fi
1115
1116echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1117
1118if test $ac_cv_prog_gxx = yes; then
1119  GXX=yes
1120else
1121  GXX=
1122fi
1123
1124ac_test_CXXFLAGS="${CXXFLAGS+set}"
1125ac_save_CXXFLAGS="$CXXFLAGS"
1126CXXFLAGS=
1127echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1128echo "configure:1129: checking whether ${CXX-g++} accepts -g" >&5
1129if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1130  echo $ac_n "(cached) $ac_c" 1>&6
1131else
1132  echo 'void f(){}' > conftest.cc
1133if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1134  ac_cv_prog_cxx_g=yes
1135else
1136  ac_cv_prog_cxx_g=no
1137fi
1138rm -f conftest*
1139
1140fi
1141
1142echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1143if test "$ac_test_CXXFLAGS" = set; then
1144  CXXFLAGS="$ac_save_CXXFLAGS"
1145elif test $ac_cv_prog_cxx_g = yes; then
1146  if test "$GXX" = yes; then
1147    CXXFLAGS="-g -O2"
1148  else
1149    CXXFLAGS="-g"
1150  fi
1151else
1152  if test "$GXX" = yes; then
1153    CXXFLAGS="-O2"
1154  else
1155    CXXFLAGS=
1156  fi
1157fi
1158
1159echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1160echo "configure:1161: checking how to run the C preprocessor" >&5
1161# On Suns, sometimes $CPP names a directory.
1162if test -n "$CPP" && test -d "$CPP"; then
1163  CPP=
1164fi
1165if test -z "$CPP"; then
1166if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1167  echo $ac_n "(cached) $ac_c" 1>&6
1168else
1169    # This must be in double quotes, not single quotes, because CPP may get
1170  # substituted into the Makefile and "${CC-cc}" will confuse make.
1171  CPP="${CC-cc} -E"
1172  # On the NeXT, cc -E runs the code through the compiler's parser,
1173  # not just through cpp.
1174  cat > conftest.$ac_ext <<EOF
1175#line 1176 "configure"
1176#include "confdefs.h"
1177#include <assert.h>
1178Syntax Error
1179EOF
1180ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1181{ (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1182ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1183if test -z "$ac_err"; then
1184  :
1185else
1186  echo "$ac_err" >&5
1187  echo "configure: failed program was:" >&5
1188  cat conftest.$ac_ext >&5
1189  rm -rf conftest*
1190  CPP="${CC-cc} -E -traditional-cpp"
1191  cat > conftest.$ac_ext <<EOF
1192#line 1193 "configure"
1193#include "confdefs.h"
1194#include <assert.h>
1195Syntax Error
1196EOF
1197ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1198{ (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1199ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1200if test -z "$ac_err"; then
1201  :
1202else
1203  echo "$ac_err" >&5
1204  echo "configure: failed program was:" >&5
1205  cat conftest.$ac_ext >&5
1206  rm -rf conftest*
1207  CPP="${CC-cc} -nologo -E"
1208  cat > conftest.$ac_ext <<EOF
1209#line 1210 "configure"
1210#include "confdefs.h"
1211#include <assert.h>
1212Syntax Error
1213EOF
1214ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1215{ (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1216ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1217if test -z "$ac_err"; then
1218  :
1219else
1220  echo "$ac_err" >&5
1221  echo "configure: failed program was:" >&5
1222  cat conftest.$ac_ext >&5
1223  rm -rf conftest*
1224  CPP=/lib/cpp
1225fi
1226rm -f conftest*
1227fi
1228rm -f conftest*
1229fi
1230rm -f conftest*
1231  ac_cv_prog_CPP="$CPP"
1232fi
1233  CPP="$ac_cv_prog_CPP"
1234else
1235  ac_cv_prog_CPP="$CPP"
1236fi
1237echo "$ac_t""$CPP" 1>&6
1238
1239echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1240echo "configure:1241: checking how to run the C++ preprocessor" >&5
1241if test -z "$CXXCPP"; then
1242if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1243  echo $ac_n "(cached) $ac_c" 1>&6
1244else
1245  ac_ext=C
1246# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1247ac_cpp='$CXXCPP $CPPFLAGS'
1248ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1249ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1250cross_compiling=$ac_cv_prog_cxx_cross
1251  CXXCPP="${CXX-g++} -E"
1252  cat > conftest.$ac_ext <<EOF
1253#line 1254 "configure"
1254#include "confdefs.h"
1255#include <stdlib.h>
1256EOF
1257ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1258{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1259ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1260if test -z "$ac_err"; then
1261  :
1262else
1263  echo "$ac_err" >&5
1264  echo "configure: failed program was:" >&5
1265  cat conftest.$ac_ext >&5
1266  rm -rf conftest*
1267  CXXCPP=/lib/cpp
1268fi
1269rm -f conftest*
1270  ac_cv_prog_CXXCPP="$CXXCPP"
1271ac_ext=c
1272# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1273ac_cpp='$CPP $CPPFLAGS'
1274ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1275ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1276cross_compiling=$ac_cv_prog_cc_cross
1277fi
1278fi
1279CXXCPP="$ac_cv_prog_CXXCPP"
1280echo "$ac_t""$CXXCPP" 1>&6
1281
1282# Find a good install program.  We prefer a C program (faster),
1283# so one script is as good as another.  But avoid the broken or
1284# incompatible versions:
1285# SysV /etc/install, /usr/sbin/install
1286# SunOS /usr/etc/install
1287# IRIX /sbin/install
1288# AIX /bin/install
1289# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1290# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1291# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1292# ./install, which can be erroneously created by make from ./install.sh.
1293echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1294echo "configure:1295: checking for a BSD compatible install" >&5
1295if test -z "$INSTALL"; then
1296if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1297  echo $ac_n "(cached) $ac_c" 1>&6
1298else
1299    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
1300  for ac_dir in $PATH; do
1301    # Account for people who put trailing slashes in PATH elements.
1302    case "$ac_dir/" in
1303    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1304    *)
1305      # OSF1 and SCO ODT 3.0 have their own names for install.
1306      # Don't use installbsd from OSF since it installs stuff as root
1307      # by default.
1308      for ac_prog in ginstall scoinst install; do
1309        if test -f $ac_dir/$ac_prog; then
1310	  if test $ac_prog = install &&
1311            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1312	    # AIX install.  It has an incompatible calling convention.
1313	    :
1314	  else
1315	    ac_cv_path_install="$ac_dir/$ac_prog -c"
1316	    break 2
1317	  fi
1318	fi
1319      done
1320      ;;
1321    esac
1322  done
1323  IFS="$ac_save_IFS"
1324
1325fi
1326  if test "${ac_cv_path_install+set}" = set; then
1327    INSTALL="$ac_cv_path_install"
1328  else
1329    # As a last resort, use the slow shell script.  We don't cache a
1330    # path for INSTALL within a source directory, because that will
1331    # break other packages using the cache if that directory is
1332    # removed, or if the path is relative.
1333    INSTALL="$ac_install_sh"
1334  fi
1335fi
1336echo "$ac_t""$INSTALL" 1>&6
1337
1338# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1339# It thinks the first close brace ends the variable substitution.
1340test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1341
1342test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1343
1344test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1345
1346missing_dir=`cd $ac_aux_dir && pwd`
1347for ac_prog in flex lex
1348do
1349# Extract the first word of "$ac_prog", so it can be a program name with args.
1350set dummy $ac_prog; ac_word=$2
1351echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1352echo "configure:1353: checking for $ac_word" >&5
1353if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1354  echo $ac_n "(cached) $ac_c" 1>&6
1355else
1356  if test -n "$LEX"; then
1357  ac_cv_prog_LEX="$LEX" # Let the user override the test.
1358else
1359  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1360  ac_dummy="$PATH"
1361  for ac_dir in $ac_dummy; do
1362    test -z "$ac_dir" && ac_dir=.
1363    if test -f $ac_dir/$ac_word; then
1364      ac_cv_prog_LEX="$ac_prog"
1365      break
1366    fi
1367  done
1368  IFS="$ac_save_ifs"
1369fi
1370fi
1371LEX="$ac_cv_prog_LEX"
1372if test -n "$LEX"; then
1373  echo "$ac_t""$LEX" 1>&6
1374else
1375  echo "$ac_t""no" 1>&6
1376fi
1377
1378test -n "$LEX" && break
1379done
1380test -n "$LEX" || LEX=""$missing_dir/missing flex""
1381
1382# Extract the first word of "flex", so it can be a program name with args.
1383set dummy flex; ac_word=$2
1384echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1385echo "configure:1386: checking for $ac_word" >&5
1386if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1387  echo $ac_n "(cached) $ac_c" 1>&6
1388else
1389  if test -n "$LEX"; then
1390  ac_cv_prog_LEX="$LEX" # Let the user override the test.
1391else
1392  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1393  ac_dummy="$PATH"
1394  for ac_dir in $ac_dummy; do
1395    test -z "$ac_dir" && ac_dir=.
1396    if test -f $ac_dir/$ac_word; then
1397      ac_cv_prog_LEX="flex"
1398      break
1399    fi
1400  done
1401  IFS="$ac_save_ifs"
1402  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1403fi
1404fi
1405LEX="$ac_cv_prog_LEX"
1406if test -n "$LEX"; then
1407  echo "$ac_t""$LEX" 1>&6
1408else
1409  echo "$ac_t""no" 1>&6
1410fi
1411
1412if test -z "$LEXLIB"
1413then
1414  case "$LEX" in
1415  flex*) ac_lib=fl ;;
1416  *) ac_lib=l ;;
1417  esac
1418  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1419echo "configure:1420: checking for yywrap in -l$ac_lib" >&5
1420ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1421if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1422  echo $ac_n "(cached) $ac_c" 1>&6
1423else
1424  ac_save_LIBS="$LIBS"
1425LIBS="-l$ac_lib  $LIBS"
1426cat > conftest.$ac_ext <<EOF
1427#line 1428 "configure"
1428#include "confdefs.h"
1429/* Override any gcc2 internal prototype to avoid an error.  */
1430/* We use char because int might match the return type of a gcc2
1431    builtin and then its argument prototype would still apply.  */
1432char yywrap();
1433
1434int main() {
1435yywrap()
1436; return 0; }
1437EOF
1438if { (eval echo configure:1439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1439  rm -rf conftest*
1440  eval "ac_cv_lib_$ac_lib_var=yes"
1441else
1442  echo "configure: failed program was:" >&5
1443  cat conftest.$ac_ext >&5
1444  rm -rf conftest*
1445  eval "ac_cv_lib_$ac_lib_var=no"
1446fi
1447rm -f conftest*
1448LIBS="$ac_save_LIBS"
1449
1450fi
1451if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1452  echo "$ac_t""yes" 1>&6
1453  LEXLIB="-l$ac_lib"
1454else
1455  echo "$ac_t""no" 1>&6
1456fi
1457
1458fi
1459
1460echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1461echo "configure:1462: checking lex output file root" >&5
1462if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1463  echo $ac_n "(cached) $ac_c" 1>&6
1464else
1465  # The minimal lex program is just a single line: %%.  But some broken lexes
1466# (Solaris, I think it was) want two %% lines, so accommodate them.
1467echo '%%
1468%%' | $LEX
1469if test -f lex.yy.c; then
1470  ac_cv_prog_lex_root=lex.yy
1471elif test -f lexyy.c; then
1472  ac_cv_prog_lex_root=lexyy
1473else
1474  { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1475fi
1476fi
1477
1478echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1479LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1480
1481echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1482echo "configure:1483: checking whether yytext is a pointer" >&5
1483if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1484  echo $ac_n "(cached) $ac_c" 1>&6
1485else
1486  # POSIX says lex can declare yytext either as a pointer or an array; the
1487# default is implementation-dependent. Figure out which it is, since
1488# not all implementations provide the %pointer and %array declarations.
1489ac_cv_prog_lex_yytext_pointer=no
1490echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1491ac_save_LIBS="$LIBS"
1492LIBS="$LIBS $LEXLIB"
1493cat > conftest.$ac_ext <<EOF
1494#line 1495 "configure"
1495#include "confdefs.h"
1496`cat $LEX_OUTPUT_ROOT.c`
1497int main() {
1498
1499; return 0; }
1500EOF
1501if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1502  rm -rf conftest*
1503  ac_cv_prog_lex_yytext_pointer=yes
1504else
1505  echo "configure: failed program was:" >&5
1506  cat conftest.$ac_ext >&5
1507fi
1508rm -f conftest*
1509LIBS="$ac_save_LIBS"
1510rm -f "${LEX_OUTPUT_ROOT}.c"
1511
1512fi
1513
1514echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1515if test $ac_cv_prog_lex_yytext_pointer = yes; then
1516  cat >> confdefs.h <<\EOF
1517#define YYTEXT_POINTER 1
1518EOF
1519
1520fi
1521
1522for ac_prog in 'bison -y' byacc
1523do
1524# Extract the first word of "$ac_prog", so it can be a program name with args.
1525set dummy $ac_prog; ac_word=$2
1526echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1527echo "configure:1528: checking for $ac_word" >&5
1528if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1529  echo $ac_n "(cached) $ac_c" 1>&6
1530else
1531  if test -n "$YACC"; then
1532  ac_cv_prog_YACC="$YACC" # Let the user override the test.
1533else
1534  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1535  ac_dummy="$PATH"
1536  for ac_dir in $ac_dummy; do
1537    test -z "$ac_dir" && ac_dir=.
1538    if test -f $ac_dir/$ac_word; then
1539      ac_cv_prog_YACC="$ac_prog"
1540      break
1541    fi
1542  done
1543  IFS="$ac_save_ifs"
1544fi
1545fi
1546YACC="$ac_cv_prog_YACC"
1547if test -n "$YACC"; then
1548  echo "$ac_t""$YACC" 1>&6
1549else
1550  echo "$ac_t""no" 1>&6
1551fi
1552
1553test -n "$YACC" && break
1554done
1555test -n "$YACC" || YACC="yacc"
1556
1557
1558# Check whether --with-glui-libs or --without-glui-libs was given.
1559if test "${with_glui_libs+set}" = set; then
1560  withval="$with_glui_libs"
1561  GLUI_LIB="$withval"
1562fi
1563
1564# Check whether --with-glui-inc or --without-glui-inc was given.
1565if test "${with_glui_inc+set}" = set; then
1566  withval="$with_glui_inc"
1567  OU_EXTRA_CFLAGS="$OU_EXTRA_CFLAGS -I$withval -DHAVE_GLUI"
1568fi
1569
1570
1571
1572# Check whether --with-gl-libs or --without-gl-libs was given.
1573if test "${with_gl_libs+set}" = set; then
1574  withval="$with_gl_libs"
1575  OULIBS="$OULIBS -L$withval"
1576fi
1577
1578
1579# Check whether --with-gl-inc or --without-gl-inc was given.
1580if test "${with_gl_inc+set}" = set; then
1581  withval="$with_gl_inc"
1582  OUFLAGS="$OUFLAGS -I$withval"
1583fi
1584
1585
1586# Check whether --with-glut-libs or --without-glut-libs was given.
1587if test "${with_glut_libs+set}" = set; then
1588  withval="$with_glut_libs"
1589  OULIBS="$OULIBS -L$withval"
1590fi
1591
1592
1593# Check whether --with-glut-inc or --without-glut-inc was given.
1594if test "${with_glut_inc+set}" = set; then
1595  withval="$with_glut_inc"
1596  OUFLAGS="$OUFLAGS -I$withval"
1597fi
1598
1599
1600
1601
1602CFLAGS="$CFLAGS $OUFLAGS $OU_EXTRA_CFLAGS"
1603CXXFLAGS="$CXXFLAGS $OUFLAGS $OU_EXTRA_CFLAGS"
1604LIBS="$LIBS $OULIBS $GLUI_LIB"
1605
1606# If we find X, set shell vars x_includes and x_libraries to the
1607# paths, otherwise set no_x=yes.
1608# Uses ac_ vars as temps to allow command line to override cache and checks.
1609# --without-x overrides everything else, but does not touch the cache.
1610echo $ac_n "checking for X""... $ac_c" 1>&6
1611echo "configure:1612: checking for X" >&5
1612
1613# Check whether --with-x or --without-x was given.
1614if test "${with_x+set}" = set; then
1615  withval="$with_x"
1616  :
1617fi
1618
1619# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1620if test "x$with_x" = xno; then
1621  # The user explicitly disabled X.
1622  have_x=disabled
1623else
1624  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1625    # Both variables are already set.
1626    have_x=yes
1627  else
1628if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1629  echo $ac_n "(cached) $ac_c" 1>&6
1630else
1631  # One or both of the vars are not set, and there is no cached value.
1632ac_x_includes=NO ac_x_libraries=NO
1633rm -fr conftestdir
1634if mkdir conftestdir; then
1635  cd conftestdir
1636  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1637  cat > Imakefile <<'EOF'
1638acfindx:
1639	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1640EOF
1641  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1642    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1643    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1644    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1645    for ac_extension in a so sl; do
1646      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1647        test -f $ac_im_libdir/libX11.$ac_extension; then
1648        ac_im_usrlibdir=$ac_im_libdir; break
1649      fi
1650    done
1651    # Screen out bogus values from the imake configuration.  They are
1652    # bogus both because they are the default anyway, and because
1653    # using them would break gcc on systems where it needs fixed includes.
1654    case "$ac_im_incroot" in
1655	/usr/include) ;;
1656	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1657    esac
1658    case "$ac_im_usrlibdir" in
1659	/usr/lib | /lib) ;;
1660	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1661    esac
1662  fi
1663  cd ..
1664  rm -fr conftestdir
1665fi
1666
1667if test "$ac_x_includes" = NO; then
1668  # Guess where to find include files, by looking for this one X11 .h file.
1669  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1670
1671  # First, try using that file with no special directory specified.
1672cat > conftest.$ac_ext <<EOF
1673#line 1674 "configure"
1674#include "confdefs.h"
1675#include <$x_direct_test_include>
1676EOF
1677ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1678{ (eval echo configure:1679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1679ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1680if test -z "$ac_err"; then
1681  rm -rf conftest*
1682  # We can compile using X headers with no special include directory.
1683ac_x_includes=
1684else
1685  echo "$ac_err" >&5
1686  echo "configure: failed program was:" >&5
1687  cat conftest.$ac_ext >&5
1688  rm -rf conftest*
1689  # Look for the header file in a standard set of common directories.
1690# Check X11 before X11Rn because it is often a symlink to the current release.
1691  for ac_dir in               \
1692    /usr/X11/include          \
1693    /usr/X11R6/include        \
1694    /usr/X11R5/include        \
1695    /usr/X11R4/include        \
1696                              \
1697    /usr/include/X11          \
1698    /usr/include/X11R6        \
1699    /usr/include/X11R5        \
1700    /usr/include/X11R4        \
1701                              \
1702    /usr/local/X11/include    \
1703    /usr/local/X11R6/include  \
1704    /usr/local/X11R5/include  \
1705    /usr/local/X11R4/include  \
1706                              \
1707    /usr/local/include/X11    \
1708    /usr/local/include/X11R6  \
1709    /usr/local/include/X11R5  \
1710    /usr/local/include/X11R4  \
1711                              \
1712    /usr/X386/include         \
1713    /usr/x386/include         \
1714    /usr/XFree86/include/X11  \
1715                              \
1716    /usr/include              \
1717    /usr/local/include        \
1718    /usr/unsupported/include  \
1719    /usr/athena/include       \
1720    /usr/local/x11r5/include  \
1721    /usr/lpp/Xamples/include  \
1722                              \
1723    /usr/openwin/include      \
1724    /usr/openwin/share/include \
1725    ; \
1726  do
1727    if test -r "$ac_dir/$x_direct_test_include"; then
1728      ac_x_includes=$ac_dir
1729      break
1730    fi
1731  done
1732fi
1733rm -f conftest*
1734fi # $ac_x_includes = NO
1735
1736if test "$ac_x_libraries" = NO; then
1737  # Check for the libraries.
1738
1739  test -z "$x_direct_test_library" && x_direct_test_library=Xt
1740  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1741
1742  # See if we find them without any special options.
1743  # Don't add to $LIBS permanently.
1744  ac_save_LIBS="$LIBS"
1745  LIBS="-l$x_direct_test_library $LIBS"
1746cat > conftest.$ac_ext <<EOF
1747#line 1748 "configure"
1748#include "confdefs.h"
1749
1750int main() {
1751${x_direct_test_function}()
1752; return 0; }
1753EOF
1754if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1755  rm -rf conftest*
1756  LIBS="$ac_save_LIBS"
1757# We can link X programs with no special library path.
1758ac_x_libraries=
1759else
1760  echo "configure: failed program was:" >&5
1761  cat conftest.$ac_ext >&5
1762  rm -rf conftest*
1763  LIBS="$ac_save_LIBS"
1764# First see if replacing the include by lib works.
1765# Check X11 before X11Rn because it is often a symlink to the current release.
1766for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1767    /usr/X11/lib          \
1768    /usr/X11R6/lib        \
1769    /usr/X11R5/lib        \
1770    /usr/X11R4/lib        \
1771                          \
1772    /usr/lib/X11          \
1773    /usr/lib/X11R6        \
1774    /usr/lib/X11R5        \
1775    /usr/lib/X11R4        \
1776                          \
1777    /usr/local/X11/lib    \
1778    /usr/local/X11R6/lib  \
1779    /usr/local/X11R5/lib  \
1780    /usr/local/X11R4/lib  \
1781                          \
1782    /usr/local/lib/X11    \
1783    /usr/local/lib/X11R6  \
1784    /usr/local/lib/X11R5  \
1785    /usr/local/lib/X11R4  \
1786                          \
1787    /usr/X386/lib         \
1788    /usr/x386/lib         \
1789    /usr/XFree86/lib/X11  \
1790                          \
1791    /usr/lib              \
1792    /usr/local/lib        \
1793    /usr/unsupported/lib  \
1794    /usr/athena/lib       \
1795    /usr/local/x11r5/lib  \
1796    /usr/lpp/Xamples/lib  \
1797    /lib/usr/lib/X11	  \
1798                          \
1799    /usr/openwin/lib      \
1800    /usr/openwin/share/lib \
1801    ; \
1802do
1803  for ac_extension in a so sl; do
1804    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1805      ac_x_libraries=$ac_dir
1806      break 2
1807    fi
1808  done
1809done
1810fi
1811rm -f conftest*
1812fi # $ac_x_libraries = NO
1813
1814if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1815  # Didn't find X anywhere.  Cache the known absence of X.
1816  ac_cv_have_x="have_x=no"
1817else
1818  # Record where we found X for the cache.
1819  ac_cv_have_x="have_x=yes \
1820	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1821fi
1822fi
1823  fi
1824  eval "$ac_cv_have_x"
1825fi # $with_x != no
1826
1827if test "$have_x" != yes; then
1828  echo "$ac_t""$have_x" 1>&6
1829  no_x=yes
1830else
1831  # If each of the values was on the command line, it overrides each guess.
1832  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1833  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1834  # Update the cache value to reflect the command line values.
1835  ac_cv_have_x="have_x=yes \
1836		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1837  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1838fi
1839
1840if test "$no_x" = yes; then
1841  # Not all programs may use this symbol, but it does not hurt to define it.
1842  cat >> confdefs.h <<\EOF
1843#define X_DISPLAY_MISSING 1
1844EOF
1845
1846  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1847else
1848  if test -n "$x_includes"; then
1849    X_CFLAGS="$X_CFLAGS -I$x_includes"
1850  fi
1851
1852  # It would also be nice to do this for all -L options, not just this one.
1853  if test -n "$x_libraries"; then
1854    X_LIBS="$X_LIBS -L$x_libraries"
1855    # For Solaris; some versions of Sun CC require a space after -R and
1856    # others require no space.  Words are not sufficient . . . .
1857    case "`(uname -sr) 2>/dev/null`" in
1858    "SunOS 5"*)
1859      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1860echo "configure:1861: checking whether -R must be followed by a space" >&5
1861      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1862      cat > conftest.$ac_ext <<EOF
1863#line 1864 "configure"
1864#include "confdefs.h"
1865
1866int main() {
1867
1868; return 0; }
1869EOF
1870if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1871  rm -rf conftest*
1872  ac_R_nospace=yes
1873else
1874  echo "configure: failed program was:" >&5
1875  cat conftest.$ac_ext >&5
1876  rm -rf conftest*
1877  ac_R_nospace=no
1878fi
1879rm -f conftest*
1880      if test $ac_R_nospace = yes; then
1881	echo "$ac_t""no" 1>&6
1882	X_LIBS="$X_LIBS -R$x_libraries"
1883      else
1884	LIBS="$ac_xsave_LIBS -R $x_libraries"
1885	cat > conftest.$ac_ext <<EOF
1886#line 1887 "configure"
1887#include "confdefs.h"
1888
1889int main() {
1890
1891; return 0; }
1892EOF
1893if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1894  rm -rf conftest*
1895  ac_R_space=yes
1896else
1897  echo "configure: failed program was:" >&5
1898  cat conftest.$ac_ext >&5
1899  rm -rf conftest*
1900  ac_R_space=no
1901fi
1902rm -f conftest*
1903	if test $ac_R_space = yes; then
1904	  echo "$ac_t""yes" 1>&6
1905	  X_LIBS="$X_LIBS -R $x_libraries"
1906	else
1907	  echo "$ac_t""neither works" 1>&6
1908	fi
1909      fi
1910      LIBS="$ac_xsave_LIBS"
1911    esac
1912  fi
1913
1914  # Check for system-dependent libraries X programs must link with.
1915  # Do this before checking for the system-independent R6 libraries
1916  # (-lICE), since we may need -lsocket or whatever for X linking.
1917
1918  if test "$ISC" = yes; then
1919    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1920  else
1921    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1922    # libraries were built with DECnet support.  And karl@cs.umb.edu says
1923    # the Alpha needs dnet_stub (dnet does not exist).
1924    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1925echo "configure:1926: checking for dnet_ntoa in -ldnet" >&5
1926ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1927if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1928  echo $ac_n "(cached) $ac_c" 1>&6
1929else
1930  ac_save_LIBS="$LIBS"
1931LIBS="-ldnet  $LIBS"
1932cat > conftest.$ac_ext <<EOF
1933#line 1934 "configure"
1934#include "confdefs.h"
1935/* Override any gcc2 internal prototype to avoid an error.  */
1936/* We use char because int might match the return type of a gcc2
1937    builtin and then its argument prototype would still apply.  */
1938char dnet_ntoa();
1939
1940int main() {
1941dnet_ntoa()
1942; return 0; }
1943EOF
1944if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1945  rm -rf conftest*
1946  eval "ac_cv_lib_$ac_lib_var=yes"
1947else
1948  echo "configure: failed program was:" >&5
1949  cat conftest.$ac_ext >&5
1950  rm -rf conftest*
1951  eval "ac_cv_lib_$ac_lib_var=no"
1952fi
1953rm -f conftest*
1954LIBS="$ac_save_LIBS"
1955
1956fi
1957if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1958  echo "$ac_t""yes" 1>&6
1959  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1960else
1961  echo "$ac_t""no" 1>&6
1962fi
1963
1964    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1965      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1966echo "configure:1967: checking for dnet_ntoa in -ldnet_stub" >&5
1967ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1968if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1969  echo $ac_n "(cached) $ac_c" 1>&6
1970else
1971  ac_save_LIBS="$LIBS"
1972LIBS="-ldnet_stub  $LIBS"
1973cat > conftest.$ac_ext <<EOF
1974#line 1975 "configure"
1975#include "confdefs.h"
1976/* Override any gcc2 internal prototype to avoid an error.  */
1977/* We use char because int might match the return type of a gcc2
1978    builtin and then its argument prototype would still apply.  */
1979char dnet_ntoa();
1980
1981int main() {
1982dnet_ntoa()
1983; return 0; }
1984EOF
1985if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1986  rm -rf conftest*
1987  eval "ac_cv_lib_$ac_lib_var=yes"
1988else
1989  echo "configure: failed program was:" >&5
1990  cat conftest.$ac_ext >&5
1991  rm -rf conftest*
1992  eval "ac_cv_lib_$ac_lib_var=no"
1993fi
1994rm -f conftest*
1995LIBS="$ac_save_LIBS"
1996
1997fi
1998if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1999  echo "$ac_t""yes" 1>&6
2000  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2001else
2002  echo "$ac_t""no" 1>&6
2003fi
2004
2005    fi
2006
2007    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2008    # to get the SysV transport functions.
2009    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2010    # needs -lnsl.
2011    # The nsl library prevents programs from opening the X display
2012    # on Irix 5.2, according to dickey@clark.net.
2013    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2014echo "configure:2015: checking for gethostbyname" >&5
2015if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2016  echo $ac_n "(cached) $ac_c" 1>&6
2017else
2018  cat > conftest.$ac_ext <<EOF
2019#line 2020 "configure"
2020#include "confdefs.h"
2021/* System header to define __stub macros and hopefully few prototypes,
2022    which can conflict with char gethostbyname(); below.  */
2023#include <assert.h>
2024/* Override any gcc2 internal prototype to avoid an error.  */
2025/* We use char because int might match the return type of a gcc2
2026    builtin and then its argument prototype would still apply.  */
2027char gethostbyname();
2028
2029int main() {
2030
2031/* The GNU C library defines this for functions which it implements
2032    to always fail with ENOSYS.  Some functions are actually named
2033    something starting with __ and the normal name is an alias.  */
2034#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2035choke me
2036#else
2037gethostbyname();
2038#endif
2039
2040; return 0; }
2041EOF
2042if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2043  rm -rf conftest*
2044  eval "ac_cv_func_gethostbyname=yes"
2045else
2046  echo "configure: failed program was:" >&5
2047  cat conftest.$ac_ext >&5
2048  rm -rf conftest*
2049  eval "ac_cv_func_gethostbyname=no"
2050fi
2051rm -f conftest*
2052fi
2053
2054if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2055  echo "$ac_t""yes" 1>&6
2056  :
2057else
2058  echo "$ac_t""no" 1>&6
2059fi
2060
2061    if test $ac_cv_func_gethostbyname = no; then
2062      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2063echo "configure:2064: checking for gethostbyname in -lnsl" >&5
2064ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2065if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2066  echo $ac_n "(cached) $ac_c" 1>&6
2067else
2068  ac_save_LIBS="$LIBS"
2069LIBS="-lnsl  $LIBS"
2070cat > conftest.$ac_ext <<EOF
2071#line 2072 "configure"
2072#include "confdefs.h"
2073/* Override any gcc2 internal prototype to avoid an error.  */
2074/* We use char because int might match the return type of a gcc2
2075    builtin and then its argument prototype would still apply.  */
2076char gethostbyname();
2077
2078int main() {
2079gethostbyname()
2080; return 0; }
2081EOF
2082if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2083  rm -rf conftest*
2084  eval "ac_cv_lib_$ac_lib_var=yes"
2085else
2086  echo "configure: failed program was:" >&5
2087  cat conftest.$ac_ext >&5
2088  rm -rf conftest*
2089  eval "ac_cv_lib_$ac_lib_var=no"
2090fi
2091rm -f conftest*
2092LIBS="$ac_save_LIBS"
2093
2094fi
2095if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2096  echo "$ac_t""yes" 1>&6
2097  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2098else
2099  echo "$ac_t""no" 1>&6
2100fi
2101
2102    fi
2103
2104    # lieder@skyler.mavd.honeywell.com says without -lsocket,
2105    # socket/setsockopt and other routines are undefined under SCO ODT
2106    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2107    # on later versions), says simon@lia.di.epfl.ch: it contains
2108    # gethostby* variants that don't use the nameserver (or something).
2109    # -lsocket must be given before -lnsl if both are needed.
2110    # We assume that if connect needs -lnsl, so does gethostbyname.
2111    echo $ac_n "checking for connect""... $ac_c" 1>&6
2112echo "configure:2113: checking for connect" >&5
2113if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2114  echo $ac_n "(cached) $ac_c" 1>&6
2115else
2116  cat > conftest.$ac_ext <<EOF
2117#line 2118 "configure"
2118#include "confdefs.h"
2119/* System header to define __stub macros and hopefully few prototypes,
2120    which can conflict with char connect(); below.  */
2121#include <assert.h>
2122/* Override any gcc2 internal prototype to avoid an error.  */
2123/* We use char because int might match the return type of a gcc2
2124    builtin and then its argument prototype would still apply.  */
2125char connect();
2126
2127int main() {
2128
2129/* The GNU C library defines this for functions which it implements
2130    to always fail with ENOSYS.  Some functions are actually named
2131    something starting with __ and the normal name is an alias.  */
2132#if defined (__stub_connect) || defined (__stub___connect)
2133choke me
2134#else
2135connect();
2136#endif
2137
2138; return 0; }
2139EOF
2140if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2141  rm -rf conftest*
2142  eval "ac_cv_func_connect=yes"
2143else
2144  echo "configure: failed program was:" >&5
2145  cat conftest.$ac_ext >&5
2146  rm -rf conftest*
2147  eval "ac_cv_func_connect=no"
2148fi
2149rm -f conftest*
2150fi
2151
2152if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2153  echo "$ac_t""yes" 1>&6
2154  :
2155else
2156  echo "$ac_t""no" 1>&6
2157fi
2158
2159    if test $ac_cv_func_connect = no; then
2160      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2161echo "configure:2162: checking for connect in -lsocket" >&5
2162ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2163if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2164  echo $ac_n "(cached) $ac_c" 1>&6
2165else
2166  ac_save_LIBS="$LIBS"
2167LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2168cat > conftest.$ac_ext <<EOF
2169#line 2170 "configure"
2170#include "confdefs.h"
2171/* Override any gcc2 internal prototype to avoid an error.  */
2172/* We use char because int might match the return type of a gcc2
2173    builtin and then its argument prototype would still apply.  */
2174char connect();
2175
2176int main() {
2177connect()
2178; return 0; }
2179EOF
2180if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2181  rm -rf conftest*
2182  eval "ac_cv_lib_$ac_lib_var=yes"
2183else
2184  echo "configure: failed program was:" >&5
2185  cat conftest.$ac_ext >&5
2186  rm -rf conftest*
2187  eval "ac_cv_lib_$ac_lib_var=no"
2188fi
2189rm -f conftest*
2190LIBS="$ac_save_LIBS"
2191
2192fi
2193if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2194  echo "$ac_t""yes" 1>&6
2195  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2196else
2197  echo "$ac_t""no" 1>&6
2198fi
2199
2200    fi
2201
2202    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2203    echo $ac_n "checking for remove""... $ac_c" 1>&6
2204echo "configure:2205: checking for remove" >&5
2205if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2206  echo $ac_n "(cached) $ac_c" 1>&6
2207else
2208  cat > conftest.$ac_ext <<EOF
2209#line 2210 "configure"
2210#include "confdefs.h"
2211/* System header to define __stub macros and hopefully few prototypes,
2212    which can conflict with char remove(); below.  */
2213#include <assert.h>
2214/* Override any gcc2 internal prototype to avoid an error.  */
2215/* We use char because int might match the return type of a gcc2
2216    builtin and then its argument prototype would still apply.  */
2217char remove();
2218
2219int main() {
2220
2221/* The GNU C library defines this for functions which it implements
2222    to always fail with ENOSYS.  Some functions are actually named
2223    something starting with __ and the normal name is an alias.  */
2224#if defined (__stub_remove) || defined (__stub___remove)
2225choke me
2226#else
2227remove();
2228#endif
2229
2230; return 0; }
2231EOF
2232if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2233  rm -rf conftest*
2234  eval "ac_cv_func_remove=yes"
2235else
2236  echo "configure: failed program was:" >&5
2237  cat conftest.$ac_ext >&5
2238  rm -rf conftest*
2239  eval "ac_cv_func_remove=no"
2240fi
2241rm -f conftest*
2242fi
2243
2244if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2245  echo "$ac_t""yes" 1>&6
2246  :
2247else
2248  echo "$ac_t""no" 1>&6
2249fi
2250
2251    if test $ac_cv_func_remove = no; then
2252      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2253echo "configure:2254: checking for remove in -lposix" >&5
2254ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2255if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2256  echo $ac_n "(cached) $ac_c" 1>&6
2257else
2258  ac_save_LIBS="$LIBS"
2259LIBS="-lposix  $LIBS"
2260cat > conftest.$ac_ext <<EOF
2261#line 2262 "configure"
2262#include "confdefs.h"
2263/* Override any gcc2 internal prototype to avoid an error.  */
2264/* We use char because int might match the return type of a gcc2
2265    builtin and then its argument prototype would still apply.  */
2266char remove();
2267
2268int main() {
2269remove()
2270; return 0; }
2271EOF
2272if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2273  rm -rf conftest*
2274  eval "ac_cv_lib_$ac_lib_var=yes"
2275else
2276  echo "configure: failed program was:" >&5
2277  cat conftest.$ac_ext >&5
2278  rm -rf conftest*
2279  eval "ac_cv_lib_$ac_lib_var=no"
2280fi
2281rm -f conftest*
2282LIBS="$ac_save_LIBS"
2283
2284fi
2285if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2286  echo "$ac_t""yes" 1>&6
2287  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2288else
2289  echo "$ac_t""no" 1>&6
2290fi
2291
2292    fi
2293
2294    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2295    echo $ac_n "checking for shmat""... $ac_c" 1>&6
2296echo "configure:2297: checking for shmat" >&5
2297if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2298  echo $ac_n "(cached) $ac_c" 1>&6
2299else
2300  cat > conftest.$ac_ext <<EOF
2301#line 2302 "configure"
2302#include "confdefs.h"
2303/* System header to define __stub macros and hopefully few prototypes,
2304    which can conflict with char shmat(); below.  */
2305#include <assert.h>
2306/* Override any gcc2 internal prototype to avoid an error.  */
2307/* We use char because int might match the return type of a gcc2
2308    builtin and then its argument prototype would still apply.  */
2309char shmat();
2310
2311int main() {
2312
2313/* The GNU C library defines this for functions which it implements
2314    to always fail with ENOSYS.  Some functions are actually named
2315    something starting with __ and the normal name is an alias.  */
2316#if defined (__stub_shmat) || defined (__stub___shmat)
2317choke me
2318#else
2319shmat();
2320#endif
2321
2322; return 0; }
2323EOF
2324if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2325  rm -rf conftest*
2326  eval "ac_cv_func_shmat=yes"
2327else
2328  echo "configure: failed program was:" >&5
2329  cat conftest.$ac_ext >&5
2330  rm -rf conftest*
2331  eval "ac_cv_func_shmat=no"
2332fi
2333rm -f conftest*
2334fi
2335
2336if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2337  echo "$ac_t""yes" 1>&6
2338  :
2339else
2340  echo "$ac_t""no" 1>&6
2341fi
2342
2343    if test $ac_cv_func_shmat = no; then
2344      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2345echo "configure:2346: checking for shmat in -lipc" >&5
2346ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2347if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2348  echo $ac_n "(cached) $ac_c" 1>&6
2349else
2350  ac_save_LIBS="$LIBS"
2351LIBS="-lipc  $LIBS"
2352cat > conftest.$ac_ext <<EOF
2353#line 2354 "configure"
2354#include "confdefs.h"
2355/* Override any gcc2 internal prototype to avoid an error.  */
2356/* We use char because int might match the return type of a gcc2
2357    builtin and then its argument prototype would still apply.  */
2358char shmat();
2359
2360int main() {
2361shmat()
2362; return 0; }
2363EOF
2364if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2365  rm -rf conftest*
2366  eval "ac_cv_lib_$ac_lib_var=yes"
2367else
2368  echo "configure: failed program was:" >&5
2369  cat conftest.$ac_ext >&5
2370  rm -rf conftest*
2371  eval "ac_cv_lib_$ac_lib_var=no"
2372fi
2373rm -f conftest*
2374LIBS="$ac_save_LIBS"
2375
2376fi
2377if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2378  echo "$ac_t""yes" 1>&6
2379  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2380else
2381  echo "$ac_t""no" 1>&6
2382fi
2383
2384    fi
2385  fi
2386
2387  # Check for libraries that X11R6 Xt/Xaw programs need.
2388  ac_save_LDFLAGS="$LDFLAGS"
2389  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2390  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2391  # check for ICE first), but we must link in the order -lSM -lICE or
2392  # we get undefined symbols.  So assume we have SM if we have ICE.
2393  # These have to be linked with before -lX11, unlike the other
2394  # libraries we check for below, so use a different variable.
2395  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2396  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2397echo "configure:2398: checking for IceConnectionNumber in -lICE" >&5
2398ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2399if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2400  echo $ac_n "(cached) $ac_c" 1>&6
2401else
2402  ac_save_LIBS="$LIBS"
2403LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2404cat > conftest.$ac_ext <<EOF
2405#line 2406 "configure"
2406#include "confdefs.h"
2407/* Override any gcc2 internal prototype to avoid an error.  */
2408/* We use char because int might match the return type of a gcc2
2409    builtin and then its argument prototype would still apply.  */
2410char IceConnectionNumber();
2411
2412int main() {
2413IceConnectionNumber()
2414; return 0; }
2415EOF
2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2417  rm -rf conftest*
2418  eval "ac_cv_lib_$ac_lib_var=yes"
2419else
2420  echo "configure: failed program was:" >&5
2421  cat conftest.$ac_ext >&5
2422  rm -rf conftest*
2423  eval "ac_cv_lib_$ac_lib_var=no"
2424fi
2425rm -f conftest*
2426LIBS="$ac_save_LIBS"
2427
2428fi
2429if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2430  echo "$ac_t""yes" 1>&6
2431  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2432else
2433  echo "$ac_t""no" 1>&6
2434fi
2435
2436  LDFLAGS="$ac_save_LDFLAGS"
2437
2438fi
2439
2440
2441LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lXmu -lXi -lXext -lX11 $X_EXTRA_LIBS"
2442CFLAGS="$CFLAGS $X_CFLAGS"
2443
2444echo $ac_n "checking for glNewList in -lGL""... $ac_c" 1>&6
2445echo "configure:2446: checking for glNewList in -lGL" >&5
2446ac_lib_var=`echo GL'_'glNewList | sed 'y%./+-%__p_%'`
2447if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2448  echo $ac_n "(cached) $ac_c" 1>&6
2449else
2450  ac_save_LIBS="$LIBS"
2451LIBS="-lGL  $LIBS"
2452cat > conftest.$ac_ext <<EOF
2453#line 2454 "configure"
2454#include "confdefs.h"
2455/* Override any gcc2 internal prototype to avoid an error.  */
2456/* We use char because int might match the return type of a gcc2
2457    builtin and then its argument prototype would still apply.  */
2458char glNewList();
2459
2460int main() {
2461glNewList()
2462; return 0; }
2463EOF
2464if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2465  rm -rf conftest*
2466  eval "ac_cv_lib_$ac_lib_var=yes"
2467else
2468  echo "configure: failed program was:" >&5
2469  cat conftest.$ac_ext >&5
2470  rm -rf conftest*
2471  eval "ac_cv_lib_$ac_lib_var=no"
2472fi
2473rm -f conftest*
2474LIBS="$ac_save_LIBS"
2475
2476fi
2477if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2478  echo "$ac_t""yes" 1>&6
2479    ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2480    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2481  cat >> confdefs.h <<EOF
2482#define $ac_tr_lib 1
2483EOF
2484
2485  LIBS="-lGL $LIBS"
2486
2487else
2488  echo "$ac_t""no" 1>&6
2489fi
2490
2491
2492if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
2493                echo $ac_n "checking for glNewList in -lMesaGL""... $ac_c" 1>&6
2494echo "configure:2495: checking for glNewList in -lMesaGL" >&5
2495ac_lib_var=`echo MesaGL'_'glNewList | sed 'y%./+-%__p_%'`
2496if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2497  echo $ac_n "(cached) $ac_c" 1>&6
2498else
2499  ac_save_LIBS="$LIBS"
2500LIBS="-lMesaGL  $LIBS"
2501cat > conftest.$ac_ext <<EOF
2502#line 2503 "configure"
2503#include "confdefs.h"
2504/* Override any gcc2 internal prototype to avoid an error.  */
2505/* We use char because int might match the return type of a gcc2
2506    builtin and then its argument prototype would still apply.  */
2507char glNewList();
2508
2509int main() {
2510glNewList()
2511; return 0; }
2512EOF
2513if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2514  rm -rf conftest*
2515  eval "ac_cv_lib_$ac_lib_var=yes"
2516else
2517  echo "configure: failed program was:" >&5
2518  cat conftest.$ac_ext >&5
2519  rm -rf conftest*
2520  eval "ac_cv_lib_$ac_lib_var=no"
2521fi
2522rm -f conftest*
2523LIBS="$ac_save_LIBS"
2524
2525fi
2526if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2527  echo "$ac_t""yes" 1>&6
2528    ac_tr_lib=HAVE_LIB`echo MesaGL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2529    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2530  cat >> confdefs.h <<EOF
2531#define $ac_tr_lib 1
2532EOF
2533
2534  LIBS="-lMesaGL $LIBS"
2535
2536else
2537  echo "$ac_t""no" 1>&6
2538{ echo "configure: error: GL library was not found" 1>&2; exit 1; }
2539fi
2540
2541fi
2542
2543echo $ac_n "checking for gluLookAt in -lGLU""... $ac_c" 1>&6
2544echo "configure:2545: checking for gluLookAt in -lGLU" >&5
2545ac_lib_var=`echo GLU'_'gluLookAt | sed 'y%./+-%__p_%'`
2546if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2547  echo $ac_n "(cached) $ac_c" 1>&6
2548else
2549  ac_save_LIBS="$LIBS"
2550LIBS="-lGLU  $LIBS"
2551cat > conftest.$ac_ext <<EOF
2552#line 2553 "configure"
2553#include "confdefs.h"
2554/* Override any gcc2 internal prototype to avoid an error.  */
2555/* We use char because int might match the return type of a gcc2
2556    builtin and then its argument prototype would still apply.  */
2557char gluLookAt();
2558
2559int main() {
2560gluLookAt()
2561; return 0; }
2562EOF
2563if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2564  rm -rf conftest*
2565  eval "ac_cv_lib_$ac_lib_var=yes"
2566else
2567  echo "configure: failed program was:" >&5
2568  cat conftest.$ac_ext >&5
2569  rm -rf conftest*
2570  eval "ac_cv_lib_$ac_lib_var=no"
2571fi
2572rm -f conftest*
2573LIBS="$ac_save_LIBS"
2574
2575fi
2576if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2577  echo "$ac_t""yes" 1>&6
2578    ac_tr_lib=HAVE_LIB`echo GLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2579    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2580  cat >> confdefs.h <<EOF
2581#define $ac_tr_lib 1
2582EOF
2583
2584  LIBS="-lGLU $LIBS"
2585
2586else
2587  echo "$ac_t""no" 1>&6
2588fi
2589
2590
2591if test "x$ac_cv_lib_GLU_gluLookAt" = "xno"; then
2592                echo $ac_n "checking for gluLookAt in -lMesaGLU""... $ac_c" 1>&6
2593echo "configure:2594: checking for gluLookAt in -lMesaGLU" >&5
2594ac_lib_var=`echo MesaGLU'_'gluLookAt | sed 'y%./+-%__p_%'`
2595if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2596  echo $ac_n "(cached) $ac_c" 1>&6
2597else
2598  ac_save_LIBS="$LIBS"
2599LIBS="-lMesaGLU  $LIBS"
2600cat > conftest.$ac_ext <<EOF
2601#line 2602 "configure"
2602#include "confdefs.h"
2603/* Override any gcc2 internal prototype to avoid an error.  */
2604/* We use char because int might match the return type of a gcc2
2605    builtin and then its argument prototype would still apply.  */
2606char gluLookAt();
2607
2608int main() {
2609gluLookAt()
2610; return 0; }
2611EOF
2612if { (eval echo configure:2613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2613  rm -rf conftest*
2614  eval "ac_cv_lib_$ac_lib_var=yes"
2615else
2616  echo "configure: failed program was:" >&5
2617  cat conftest.$ac_ext >&5
2618  rm -rf conftest*
2619  eval "ac_cv_lib_$ac_lib_var=no"
2620fi
2621rm -f conftest*
2622LIBS="$ac_save_LIBS"
2623
2624fi
2625if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2626  echo "$ac_t""yes" 1>&6
2627    ac_tr_lib=HAVE_LIB`echo MesaGLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2628    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2629  cat >> confdefs.h <<EOF
2630#define $ac_tr_lib 1
2631EOF
2632
2633  LIBS="-lMesaGLU $LIBS"
2634
2635else
2636  echo "$ac_t""no" 1>&6
2637{ echo "configure: error: GLU library was not found" 1>&2; exit 1; }
2638fi
2639
2640fi
2641
2642
2643echo $ac_n "checking for glutKeyboardUpFunc in -lglut""... $ac_c" 1>&6
2644echo "configure:2645: checking for glutKeyboardUpFunc in -lglut" >&5
2645ac_lib_var=`echo glut'_'glutKeyboardUpFunc | sed 'y%./+-%__p_%'`
2646if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2647  echo $ac_n "(cached) $ac_c" 1>&6
2648else
2649  ac_save_LIBS="$LIBS"
2650LIBS="-lglut  $LIBS"
2651cat > conftest.$ac_ext <<EOF
2652#line 2653 "configure"
2653#include "confdefs.h"
2654/* Override any gcc2 internal prototype to avoid an error.  */
2655/* We use char because int might match the return type of a gcc2
2656    builtin and then its argument prototype would still apply.  */
2657char glutKeyboardUpFunc();
2658
2659int main() {
2660glutKeyboardUpFunc()
2661; return 0; }
2662EOF
2663if { (eval echo configure:2664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2664  rm -rf conftest*
2665  eval "ac_cv_lib_$ac_lib_var=yes"
2666else
2667  echo "configure: failed program was:" >&5
2668  cat conftest.$ac_ext >&5
2669  rm -rf conftest*
2670  eval "ac_cv_lib_$ac_lib_var=no"
2671fi
2672rm -f conftest*
2673LIBS="$ac_save_LIBS"
2674
2675fi
2676if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2677  echo "$ac_t""yes" 1>&6
2678    ac_tr_lib=HAVE_LIB`echo glut | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2679    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2680  cat >> confdefs.h <<EOF
2681#define $ac_tr_lib 1
2682EOF
2683
2684  LIBS="-lglut $LIBS"
2685
2686else
2687  echo "$ac_t""no" 1>&6
2688{ echo "configure: error: GLUT library version >= 3.7 not found" 1>&2; exit 1; }
2689fi
2690
2691
2692echo $ac_n "checking for jpeg_start_decompress in -ljpeg""... $ac_c" 1>&6
2693echo "configure:2694: checking for jpeg_start_decompress in -ljpeg" >&5
2694ac_lib_var=`echo jpeg'_'jpeg_start_decompress | sed 'y%./+-%__p_%'`
2695if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2696  echo $ac_n "(cached) $ac_c" 1>&6
2697else
2698  ac_save_LIBS="$LIBS"
2699LIBS="-ljpeg  $LIBS"
2700cat > conftest.$ac_ext <<EOF
2701#line 2702 "configure"
2702#include "confdefs.h"
2703/* Override any gcc2 internal prototype to avoid an error.  */
2704/* We use char because int might match the return type of a gcc2
2705    builtin and then its argument prototype would still apply.  */
2706char jpeg_start_decompress();
2707
2708int main() {
2709jpeg_start_decompress()
2710; return 0; }
2711EOF
2712if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2713  rm -rf conftest*
2714  eval "ac_cv_lib_$ac_lib_var=yes"
2715else
2716  echo "configure: failed program was:" >&5
2717  cat conftest.$ac_ext >&5
2718  rm -rf conftest*
2719  eval "ac_cv_lib_$ac_lib_var=no"
2720fi
2721rm -f conftest*
2722LIBS="$ac_save_LIBS"
2723
2724fi
2725if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2726  echo "$ac_t""yes" 1>&6
2727    ac_tr_lib=HAVE_LIB`echo jpeg | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2728    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2729  cat >> confdefs.h <<EOF
2730#define $ac_tr_lib 1
2731EOF
2732
2733  LIBS="-ljpeg $LIBS"
2734
2735else
2736  echo "$ac_t""no" 1>&6
2737{ echo "configure: error: jpeg library not found" 1>&2; exit 1; }
2738fi
2739
2740
2741
2742
2743
2744echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2745echo "configure:2746: checking for ANSI C header files" >&5
2746if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2747  echo $ac_n "(cached) $ac_c" 1>&6
2748else
2749  cat > conftest.$ac_ext <<EOF
2750#line 2751 "configure"
2751#include "confdefs.h"
2752#include <stdlib.h>
2753#include <stdarg.h>
2754#include <string.h>
2755#include <float.h>
2756EOF
2757ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2758{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2759ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2760if test -z "$ac_err"; then
2761  rm -rf conftest*
2762  ac_cv_header_stdc=yes
2763else
2764  echo "$ac_err" >&5
2765  echo "configure: failed program was:" >&5
2766  cat conftest.$ac_ext >&5
2767  rm -rf conftest*
2768  ac_cv_header_stdc=no
2769fi
2770rm -f conftest*
2771
2772if test $ac_cv_header_stdc = yes; then
2773  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2774cat > conftest.$ac_ext <<EOF
2775#line 2776 "configure"
2776#include "confdefs.h"
2777#include <string.h>
2778EOF
2779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2780  egrep "memchr" >/dev/null 2>&1; then
2781  :
2782else
2783  rm -rf conftest*
2784  ac_cv_header_stdc=no
2785fi
2786rm -f conftest*
2787
2788fi
2789
2790if test $ac_cv_header_stdc = yes; then
2791  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2792cat > conftest.$ac_ext <<EOF
2793#line 2794 "configure"
2794#include "confdefs.h"
2795#include <stdlib.h>
2796EOF
2797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2798  egrep "free" >/dev/null 2>&1; then
2799  :
2800else
2801  rm -rf conftest*
2802  ac_cv_header_stdc=no
2803fi
2804rm -f conftest*
2805
2806fi
2807
2808if test $ac_cv_header_stdc = yes; then
2809  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2810if test "$cross_compiling" = yes; then
2811  :
2812else
2813  cat > conftest.$ac_ext <<EOF
2814#line 2815 "configure"
2815#include "confdefs.h"
2816#include <ctype.h>
2817#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2818#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2819#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2820int main () { int i; for (i = 0; i < 256; i++)
2821if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2822exit (0); }
2823
2824EOF
2825if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2826then
2827  :
2828else
2829  echo "configure: failed program was:" >&5
2830  cat conftest.$ac_ext >&5
2831  rm -fr conftest*
2832  ac_cv_header_stdc=no
2833fi
2834rm -fr conftest*
2835fi
2836
2837fi
2838fi
2839
2840echo "$ac_t""$ac_cv_header_stdc" 1>&6
2841if test $ac_cv_header_stdc = yes; then
2842  cat >> confdefs.h <<\EOF
2843#define STDC_HEADERS 1
2844EOF
2845
2846fi
2847
2848
2849for ac_hdr in GL/gl.h GL/glut.h
2850do
2851ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2852echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2853echo "configure:2854: checking for $ac_hdr" >&5
2854if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2855  echo $ac_n "(cached) $ac_c" 1>&6
2856else
2857  cat > conftest.$ac_ext <<EOF
2858#line 2859 "configure"
2859#include "confdefs.h"
2860#include <$ac_hdr>
2861EOF
2862ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2863{ (eval echo configure:2864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2864ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2865if test -z "$ac_err"; then
2866  rm -rf conftest*
2867  eval "ac_cv_header_$ac_safe=yes"
2868else
2869  echo "$ac_err" >&5
2870  echo "configure: failed program was:" >&5
2871  cat conftest.$ac_ext >&5
2872  rm -rf conftest*
2873  eval "ac_cv_header_$ac_safe=no"
2874fi
2875rm -f conftest*
2876fi
2877if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2878  echo "$ac_t""yes" 1>&6
2879    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2880  cat >> confdefs.h <<EOF
2881#define $ac_tr_hdr 1
2882EOF
2883
2884else
2885  echo "$ac_t""no" 1>&6
2886fi
2887done
2888
2889ac_safe=`echo "joystick.h" | sed 'y%./+-%__p_%'`
2890echo $ac_n "checking for joystick.h""... $ac_c" 1>&6
2891echo "configure:2892: checking for joystick.h" >&5
2892if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2893  echo $ac_n "(cached) $ac_c" 1>&6
2894else
2895  cat > conftest.$ac_ext <<EOF
2896#line 2897 "configure"
2897#include "confdefs.h"
2898#include <joystick.h>
2899EOF
2900ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2901{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2902ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2903if test -z "$ac_err"; then
2904  rm -rf conftest*
2905  eval "ac_cv_header_$ac_safe=yes"
2906else
2907  echo "$ac_err" >&5
2908  echo "configure: failed program was:" >&5
2909  cat conftest.$ac_ext >&5
2910  rm -rf conftest*
2911  eval "ac_cv_header_$ac_safe=no"
2912fi
2913rm -f conftest*
2914fi
2915if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2916  echo "$ac_t""yes" 1>&6
2917  cat >> confdefs.h <<\EOF
2918#define JOYSTICK_IS_PRESENT 1
2919EOF
2920
2921else
2922  echo "$ac_t""no" 1>&6
2923fi
2924
2925ac_safe=`echo "linux/joystick.h" | sed 'y%./+-%__p_%'`
2926echo $ac_n "checking for linux/joystick.h""... $ac_c" 1>&6
2927echo "configure:2928: checking for linux/joystick.h" >&5
2928if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2929  echo $ac_n "(cached) $ac_c" 1>&6
2930else
2931  cat > conftest.$ac_ext <<EOF
2932#line 2933 "configure"
2933#include "confdefs.h"
2934#include <linux/joystick.h>
2935EOF
2936ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2937{ (eval echo configure:2938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2938ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2939if test -z "$ac_err"; then
2940  rm -rf conftest*
2941  eval "ac_cv_header_$ac_safe=yes"
2942else
2943  echo "$ac_err" >&5
2944  echo "configure: failed program was:" >&5
2945  cat conftest.$ac_ext >&5
2946  rm -rf conftest*
2947  eval "ac_cv_header_$ac_safe=no"
2948fi
2949rm -f conftest*
2950fi
2951if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2952  echo "$ac_t""yes" 1>&6
2953  cat >> confdefs.h <<\EOF
2954#define LINUX_JOYSTICK_IS_PRESENT 1
2955EOF
2956
2957else
2958  echo "$ac_t""no" 1>&6
2959fi
2960
2961
2962cat >> confdefs.h <<\EOF
2963#define TEXTURE_DIR "$texture_dir"
2964EOF
2965
2966cat >> confdefs.h <<\EOF
2967#define FONT_DIR "$font_dir"
2968EOF
2969
2970cat >> confdefs.h <<\EOF
2971#define MODEL_DIR "$model_dir"
2972EOF
2973
2974cat >> confdefs.h <<\EOF
2975#define DATA_DIR "$data_dir"
2976EOF
2977
2978cat >> confdefs.h <<\EOF
2979#define CONF_DIR "$conf_dir"
2980EOF
2981
2982cat >> confdefs.h <<\EOF
2983#define SHOTS_DIR "$shots_dir"
2984EOF
2985
2986cat >> confdefs.h <<\EOF
2987#define EVENTS_DIR "$events_dir"
2988EOF
2989
2990
2991trap '' 1 2 15
2992cat > confcache <<\EOF
2993# This file is a shell script that caches the results of configure
2994# tests run on this system so they can be shared between configure
2995# scripts and configure runs.  It is not useful on other systems.
2996# If it contains results you don't want to keep, you may remove or edit it.
2997#
2998# By default, configure uses ./config.cache as the cache file,
2999# creating it if it does not exist already.  You can give configure
3000# the --cache-file=FILE option to use a different cache file; that is
3001# what configure does when it calls configure scripts in
3002# subdirectories, so they share the cache.
3003# Giving --cache-file=/dev/null disables caching, for debugging configure.
3004# config.status only pays attention to the cache file if you give it the
3005# --recheck option to rerun configure.
3006#
3007EOF
3008# The following way of writing the cache mishandles newlines in values,
3009# but we know of no workaround that is simple, portable, and efficient.
3010# So, don't put newlines in cache variables' values.
3011# Ultrix sh set writes to stderr and can't be redirected directly,
3012# and sets the high bit in the cache file unless we assign to the vars.
3013(set) 2>&1 |
3014  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3015  *ac_space=\ *)
3016    # `set' does not quote correctly, so add quotes (double-quote substitution
3017    # turns \\\\ into \\, and sed turns \\ into \).
3018    sed -n \
3019      -e "s/'/'\\\\''/g" \
3020      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3021    ;;
3022  *)
3023    # `set' quotes correctly as required by POSIX, so do not add quotes.
3024    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3025    ;;
3026  esac >> confcache
3027if cmp -s $cache_file confcache; then
3028  :
3029else
3030  if test -w $cache_file; then
3031    echo "updating cache $cache_file"
3032    cat confcache > $cache_file
3033  else
3034    echo "not updating unwritable cache $cache_file"
3035  fi
3036fi
3037rm -f confcache
3038
3039trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3040
3041test "x$prefix" = xNONE && prefix=$ac_default_prefix
3042# Let make expand exec_prefix.
3043test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3044
3045# Any assignment to VPATH causes Sun make to only execute
3046# the first set of double-colon rules, so remove it if not needed.
3047# If there is a colon in the path, we need to keep it.
3048if test "x$srcdir" = x.; then
3049  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
3050fi
3051
3052trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3053
3054DEFS=-DHAVE_CONFIG_H
3055
3056# Without the "./", some shells look in PATH for config.status.
3057: ${CONFIG_STATUS=./config.status}
3058
3059echo creating $CONFIG_STATUS
3060rm -f $CONFIG_STATUS
3061cat > $CONFIG_STATUS <<EOF
3062#! /bin/sh
3063# Generated automatically by configure.
3064# Run this file to recreate the current configuration.
3065# This directory was configured as follows,
3066# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3067#
3068# $0 $ac_configure_args
3069#
3070# Compiler output produced by configure, useful for debugging
3071# configure, is in ./config.log if it exists.
3072
3073ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3074for ac_option
3075do
3076  case "\$ac_option" in
3077  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3078    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3079    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3080  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3081    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3082    exit 0 ;;
3083  -help | --help | --hel | --he | --h)
3084    echo "\$ac_cs_usage"; exit 0 ;;
3085  *) echo "\$ac_cs_usage"; exit 1 ;;
3086  esac
3087done
3088
3089ac_given_srcdir=$srcdir
3090ac_given_INSTALL="$INSTALL"
3091
3092trap 'rm -fr `echo "Makefile          \
3093           src/Makefile     \
3094           data/Makefile     \
3095           3dmodels/Makefile     \
3096           textures/Makefile     \
3097           fonts/Makefile     \
3098           conf/Makefile     \
3099           docs/Makefile     \
3100           config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3101EOF
3102cat >> $CONFIG_STATUS <<EOF
3103
3104# Protect against being on the right side of a sed subst in config.status.
3105sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3106 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3107$ac_vpsub
3108$extrasub
3109s%@SHELL@%$SHELL%g
3110s%@CFLAGS@%$CFLAGS%g
3111s%@CPPFLAGS@%$CPPFLAGS%g
3112s%@CXXFLAGS@%$CXXFLAGS%g
3113s%@FFLAGS@%$FFLAGS%g
3114s%@DEFS@%$DEFS%g
3115s%@LDFLAGS@%$LDFLAGS%g
3116s%@LIBS@%$LIBS%g
3117s%@exec_prefix@%$exec_prefix%g
3118s%@prefix@%$prefix%g
3119s%@program_transform_name@%$program_transform_name%g
3120s%@bindir@%$bindir%g
3121s%@sbindir@%$sbindir%g
3122s%@libexecdir@%$libexecdir%g
3123s%@datadir@%$datadir%g
3124s%@sysconfdir@%$sysconfdir%g
3125s%@sharedstatedir@%$sharedstatedir%g
3126s%@localstatedir@%$localstatedir%g
3127s%@libdir@%$libdir%g
3128s%@includedir@%$includedir%g
3129s%@oldincludedir@%$oldincludedir%g
3130s%@infodir@%$infodir%g
3131s%@mandir@%$mandir%g
3132s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3133s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3134s%@INSTALL_DATA@%$INSTALL_DATA%g
3135s%@PACKAGE@%$PACKAGE%g
3136s%@VERSION@%$VERSION%g
3137s%@ACLOCAL@%$ACLOCAL%g
3138s%@AUTOCONF@%$AUTOCONF%g
3139s%@AUTOMAKE@%$AUTOMAKE%g
3140s%@AUTOHEADER@%$AUTOHEADER%g
3141s%@MAKEINFO@%$MAKEINFO%g
3142s%@SET_MAKE@%$SET_MAKE%g
3143s%@CC@%$CC%g
3144s%@CXX@%$CXX%g
3145s%@CPP@%$CPP%g
3146s%@CXXCPP@%$CXXCPP%g
3147s%@LEX@%$LEX%g
3148s%@LEXLIB@%$LEXLIB%g
3149s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
3150s%@YACC@%$YACC%g
3151s%@X_CFLAGS@%$X_CFLAGS%g
3152s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3153s%@X_LIBS@%$X_LIBS%g
3154s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3155
3156CEOF
3157EOF
3158
3159cat >> $CONFIG_STATUS <<\EOF
3160
3161# Split the substitutions into bite-sized pieces for seds with
3162# small command number limits, like on Digital OSF/1 and HP-UX.
3163ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3164ac_file=1 # Number of current file.
3165ac_beg=1 # First line for current file.
3166ac_end=$ac_max_sed_cmds # Line after last line for current file.
3167ac_more_lines=:
3168ac_sed_cmds=""
3169while $ac_more_lines; do
3170  if test $ac_beg -gt 1; then
3171    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3172  else
3173    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3174  fi
3175  if test ! -s conftest.s$ac_file; then
3176    ac_more_lines=false
3177    rm -f conftest.s$ac_file
3178  else
3179    if test -z "$ac_sed_cmds"; then
3180      ac_sed_cmds="sed -f conftest.s$ac_file"
3181    else
3182      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3183    fi
3184    ac_file=`expr $ac_file + 1`
3185    ac_beg=$ac_end
3186    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3187  fi
3188done
3189if test -z "$ac_sed_cmds"; then
3190  ac_sed_cmds=cat
3191fi
3192EOF
3193
3194cat >> $CONFIG_STATUS <<EOF
3195
3196CONFIG_FILES=\${CONFIG_FILES-"Makefile          \
3197           src/Makefile     \
3198           data/Makefile     \
3199           3dmodels/Makefile     \
3200           textures/Makefile     \
3201           fonts/Makefile     \
3202           conf/Makefile     \
3203           docs/Makefile     \
3204          "}
3205EOF
3206cat >> $CONFIG_STATUS <<\EOF
3207for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3208  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3209  case "$ac_file" in
3210  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3211       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3212  *) ac_file_in="${ac_file}.in" ;;
3213  esac
3214
3215  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3216
3217  # Remove last slash and all that follows it.  Not all systems have dirname.
3218  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3219  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3220    # The file is in a subdirectory.
3221    test ! -d "$ac_dir" && mkdir "$ac_dir"
3222    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3223    # A "../" for each directory in $ac_dir_suffix.
3224    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3225  else
3226    ac_dir_suffix= ac_dots=
3227  fi
3228
3229  case "$ac_given_srcdir" in
3230  .)  srcdir=.
3231      if test -z "$ac_dots"; then top_srcdir=.
3232      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3233  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3234  *) # Relative path.
3235    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3236    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3237  esac
3238
3239  case "$ac_given_INSTALL" in
3240  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3241  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3242  esac
3243
3244  echo creating "$ac_file"
3245  rm -f "$ac_file"
3246  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3247  case "$ac_file" in
3248  *Makefile*) ac_comsub="1i\\
3249# $configure_input" ;;
3250  *) ac_comsub= ;;
3251  esac
3252
3253  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3254  sed -e "$ac_comsub
3255s%@configure_input@%$configure_input%g
3256s%@srcdir@%$srcdir%g
3257s%@top_srcdir@%$top_srcdir%g
3258s%@INSTALL@%$INSTALL%g
3259" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3260fi; done
3261rm -f conftest.s*
3262
3263# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3264# NAME is the cpp macro being defined and VALUE is the value it is being given.
3265#
3266# ac_d sets the value in "#define NAME VALUE" lines.
3267ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
3268ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
3269ac_dC='\3'
3270ac_dD='%g'
3271# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3272ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3273ac_uB='\([ 	]\)%\1#\2define\3'
3274ac_uC=' '
3275ac_uD='\4%g'
3276# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3277ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3278ac_eB='$%\1#\2define\3'
3279ac_eC=' '
3280ac_eD='%g'
3281
3282if test "${CONFIG_HEADERS+set}" != set; then
3283EOF
3284cat >> $CONFIG_STATUS <<EOF
3285  CONFIG_HEADERS="config.h"
3286EOF
3287cat >> $CONFIG_STATUS <<\EOF
3288fi
3289for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3290  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3291  case "$ac_file" in
3292  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3293       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3294  *) ac_file_in="${ac_file}.in" ;;
3295  esac
3296
3297  echo creating $ac_file
3298
3299  rm -f conftest.frag conftest.in conftest.out
3300  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3301  cat $ac_file_inputs > conftest.in
3302
3303EOF
3304
3305# Transform confdefs.h into a sed script conftest.vals that substitutes
3306# the proper values into config.h.in to produce config.h.  And first:
3307# Protect against being on the right side of a sed subst in config.status.
3308# Protect against being in an unquoted here document in config.status.
3309rm -f conftest.vals
3310cat > conftest.hdr <<\EOF
3311s/[\\&%]/\\&/g
3312s%[\\$`]%\\&%g
3313s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3314s%ac_d%ac_u%gp
3315s%ac_u%ac_e%gp
3316EOF
3317sed -n -f conftest.hdr confdefs.h > conftest.vals
3318rm -f conftest.hdr
3319
3320# This sed command replaces #undef with comments.  This is necessary, for
3321# example, in the case of _POSIX_SOURCE, which is predefined and required
3322# on some systems where configure will not decide to define it.
3323cat >> conftest.vals <<\EOF
3324s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3325EOF
3326
3327# Break up conftest.vals because some shells have a limit on
3328# the size of here documents, and old seds have small limits too.
3329
3330rm -f conftest.tail
3331while :
3332do
3333  ac_lines=`grep -c . conftest.vals`
3334  # grep -c gives empty output for an empty file on some AIX systems.
3335  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3336  # Write a limited-size here document to conftest.frag.
3337  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3338  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3339  echo 'CEOF
3340  sed -f conftest.frag conftest.in > conftest.out
3341  rm -f conftest.in
3342  mv conftest.out conftest.in
3343' >> $CONFIG_STATUS
3344  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3345  rm -f conftest.vals
3346  mv conftest.tail conftest.vals
3347done
3348rm -f conftest.vals
3349
3350cat >> $CONFIG_STATUS <<\EOF
3351  rm -f conftest.frag conftest.h
3352  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3353  cat conftest.in >> conftest.h
3354  rm -f conftest.in
3355  if cmp -s $ac_file conftest.h 2>/dev/null; then
3356    echo "$ac_file is unchanged"
3357    rm -f conftest.h
3358  else
3359    # Remove last slash and all that follows it.  Not all systems have dirname.
3360      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3361      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3362      # The file is in a subdirectory.
3363      test ! -d "$ac_dir" && mkdir "$ac_dir"
3364    fi
3365    rm -f $ac_file
3366    mv conftest.h $ac_file
3367  fi
3368fi; done
3369
3370EOF
3371cat >> $CONFIG_STATUS <<EOF
3372
3373
3374EOF
3375cat >> $CONFIG_STATUS <<\EOF
3376test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3377
3378exit 0
3379EOF
3380chmod +x $CONFIG_STATUS
3381rm -fr confdefs* $ac_clean_files
3382test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3383
3384
3385echo "$ac_t""" 1>&6
3386echo "$ac_t""" 1>&6
3387echo "$ac_t""********************************************************************" 1>&6
3388echo "$ac_t""*** Before compiling OpenUniverse take a look at the configuration " 1>&6
3389echo "$ac_t""*** file in the conf directory. Default configuration file is tuned " 1>&6
3390echo "$ac_t""*** for a GeForce card so if you own a less powerful card you'll " 1>&6
3391echo "$ac_t""*** have to edit that file and read carefully " 1>&6
3392echo "$ac_t""********************************************************************" 1>&6
3393echo "$ac_t""" 1>&6
3394echo "$ac_t""" 1>&6
3395