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