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