r123: *** 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/pjrec.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.9
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 echo $ac_n "checking debug""... $ac_c" 1>&6
2823 echo "configure:2824: checking debug" >&5
2824 # Check whether --enable-debug or --disable-debug was given.
2825 if test "${enable_debug+set}" = set; then
2826   enableval="$enable_debug"
2827   case "${enableval}" in
2828   yes) debug=true 
2829        CFLAGS="-g -DDEBUG"
2830        echo "$ac_t""yes" 1>&6
2831        ;;
2832   no)  debug=false 
2833        echo "$ac_t""no" 1>&6
2834        CFLAGS="-g -O"
2835        ;;
2836   *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
2837        ;;
2838 esac
2839 else
2840   debug=false
2841 fi
2842
2843
2844
2845 if test "$debug" = "true"; then
2846   DEBUG_TRUE=
2847   DEBUG_FALSE='#'
2848 else
2849   DEBUG_TRUE='#'
2850   DEBUG_FALSE=
2851 fi
2852
2853 # Check whether --with-lam or --without-lam was given.
2854 if test "${with_lam+set}" = set; then
2855   withval="$with_lam"
2856       if test "$withval" != "no" ; then
2857          trylamdir=$withval
2858      fi 
2859
2860 fi
2861
2862
2863 if test "$withval" != "no" ; then
2864   if test "$prefix" != "NONE" ; then
2865      trylamdir="$trylamdir $prefix"
2866   fi
2867
2868   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
2869 echo "configure:2870: checking for LAM MPI installation" >&5
2870   for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do
2871     if test -x "$testlamdir/bin/hcc" ; then
2872       LDFLAGS="$LDFLAGS -L$testlamdir/lib"
2873       CFLAGS="$CFLAGS -I$testlamdir/include"
2874       lamdir="$testlamdir"
2875       
2876       mpienable="true"
2877       
2878       break
2879     fi
2880   done
2881   echo "$ac_t""$lamdir" 1>&6
2882 else
2883   echo "$ac_t""no" 1>&6
2884 fi
2885
2886 echo $ac_n "checking for web access""... $ac_c" 1>&6
2887 echo "configure:2888: checking for web access" >&5
2888 # Check whether --with-cgibin-dir or --without-cgibin-dir was given.
2889 if test "${with_cgibin_dir+set}" = set; then
2890   withval="$with_cgibin_dir"
2891    cgibindir=$withval ;   
2892 fi
2893
2894
2895 # Check whether --with-cgibin-url or --without-cgibin-url was given.
2896 if test "${with_cgibin_url+set}" = set; then
2897   withval="$with_cgibin_url"
2898    cgibinurl=$withval ;   
2899 fi
2900
2901
2902 # Check whether --with-webdata-dir or --without-webdata-dir was given.
2903 if test "${with_webdata_dir+set}" = set; then
2904   withval="$with_webdata_dir"
2905    webdatadir=$withval ;    
2906 fi
2907
2908
2909 # Check whether --with-webdata-url or --without-webdata-url was given.
2910 if test "${with_webdata_url+set}" = set; then
2911   withval="$with_webdata_url"
2912    webdataurl=$withval ;   
2913 fi
2914
2915
2916 # Check whether --with-html-dir or --without-html-dir was given.
2917 if test "${with_html_dir+set}" = set; then
2918   withval="$with_html_dir"
2919    htmldir=$withval ;   
2920 fi
2921
2922
2923 if test -n "$cgibindir" -o -n "$cgibinurl" ; then
2924   cgiprograms="ctsim.cgi ctsim.conf"
2925   
2926 fi
2927
2928 if test -n "$htmldir" ; then
2929   htmldata=simulate.html
2930   
2931 fi
2932
2933
2934 if test -n "$htmldir"; then
2935   USE_HTML_TRUE=
2936   USE_HTML_FALSE='#'
2937 else
2938   USE_HTML_TRUE='#'
2939   USE_HTML_FALSE=
2940 fi
2941
2942 if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$htmldir" ; then
2943   webenabled=true
2944   
2945   echo "$ac_t""yes" 1>&6
2946   if test -z "$cgibindir" ; then
2947     { echo "configure: error: --with-cgibin-dir not set for web access" 1>&2; exit 1; }
2948   elif test -z "$cgibinurl" ; then
2949     { echo "configure: error: --with-cgibin-url not set for web access" 1>&2; exit 1; }
2950   elif test -z "$webdatadir" ; then
2951     { echo "configure: error: --with-webdata-dir not set for web access" 1>&2; exit 1; }
2952   elif test -z "$webdataurl" ; then
2953     { echo "configure: error: --with-webdata-url not set for web access" 1>&2; exit 1; }
2954   elif test -z "$htmldir" ; then
2955     { echo "configure: error: --with-html-dir not set for web access" 1>&2; exit 1; }
2956   fi
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961
2962
2963 if test -n "$lamdir"; then
2964   USE_LAM_TRUE=
2965   USE_LAM_FALSE='#'
2966 else
2967   USE_LAM_TRUE='#'
2968   USE_LAM_FALSE=
2969 fi
2970
2971
2972 # If we find X, set shell vars x_includes and x_libraries to the
2973 # paths, otherwise set no_x=yes.
2974 # Uses ac_ vars as temps to allow command line to override cache and checks.
2975 # --without-x overrides everything else, but does not touch the cache.
2976 echo $ac_n "checking for X""... $ac_c" 1>&6
2977 echo "configure:2978: checking for X" >&5
2978
2979 # Check whether --with-x or --without-x was given.
2980 if test "${with_x+set}" = set; then
2981   withval="$with_x"
2982   :
2983 fi
2984
2985 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2986 if test "x$with_x" = xno; then
2987   # The user explicitly disabled X.
2988   have_x=disabled
2989 else
2990   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2991     # Both variables are already set.
2992     have_x=yes
2993   else
2994 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2995   echo $ac_n "(cached) $ac_c" 1>&6
2996 else
2997   # One or both of the vars are not set, and there is no cached value.
2998 ac_x_includes=NO ac_x_libraries=NO
2999 rm -fr conftestdir
3000 if mkdir conftestdir; then
3001   cd conftestdir
3002   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3003   cat > Imakefile <<'EOF'
3004 acfindx:
3005         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3006 EOF
3007   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3008     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3009     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3010     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3011     for ac_extension in a so sl; do
3012       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3013         test -f $ac_im_libdir/libX11.$ac_extension; then
3014         ac_im_usrlibdir=$ac_im_libdir; break
3015       fi
3016     done
3017     # Screen out bogus values from the imake configuration.  They are
3018     # bogus both because they are the default anyway, and because
3019     # using them would break gcc on systems where it needs fixed includes.
3020     case "$ac_im_incroot" in
3021         /usr/include) ;;
3022         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3023     esac
3024     case "$ac_im_usrlibdir" in
3025         /usr/lib | /lib) ;;
3026         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3027     esac
3028   fi
3029   cd ..
3030   rm -fr conftestdir
3031 fi
3032
3033 if test "$ac_x_includes" = NO; then
3034   # Guess where to find include files, by looking for this one X11 .h file.
3035   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3036
3037   # First, try using that file with no special directory specified.
3038 cat > conftest.$ac_ext <<EOF
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3041 #include <$x_direct_test_include>
3042 EOF
3043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3044 { (eval echo configure:3045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3046 if test -z "$ac_err"; then
3047   rm -rf conftest*
3048   # We can compile using X headers with no special include directory.
3049 ac_x_includes=
3050 else
3051   echo "$ac_err" >&5
3052   echo "configure: failed program was:" >&5
3053   cat conftest.$ac_ext >&5
3054   rm -rf conftest*
3055   # Look for the header file in a standard set of common directories.
3056 # Check X11 before X11Rn because it is often a symlink to the current release.
3057   for ac_dir in               \
3058     /usr/X11/include          \
3059     /usr/X11R6/include        \
3060     /usr/X11R5/include        \
3061     /usr/X11R4/include        \
3062                               \
3063     /usr/include/X11          \
3064     /usr/include/X11R6        \
3065     /usr/include/X11R5        \
3066     /usr/include/X11R4        \
3067                               \
3068     /usr/local/X11/include    \
3069     /usr/local/X11R6/include  \
3070     /usr/local/X11R5/include  \
3071     /usr/local/X11R4/include  \
3072                               \
3073     /usr/local/include/X11    \
3074     /usr/local/include/X11R6  \
3075     /usr/local/include/X11R5  \
3076     /usr/local/include/X11R4  \
3077                               \
3078     /usr/X386/include         \
3079     /usr/x386/include         \
3080     /usr/XFree86/include/X11  \
3081                               \
3082     /usr/include              \
3083     /usr/local/include        \
3084     /usr/unsupported/include  \
3085     /usr/athena/include       \
3086     /usr/local/x11r5/include  \
3087     /usr/lpp/Xamples/include  \
3088                               \
3089     /usr/openwin/include      \
3090     /usr/openwin/share/include \
3091     ; \
3092   do
3093     if test -r "$ac_dir/$x_direct_test_include"; then
3094       ac_x_includes=$ac_dir
3095       break
3096     fi
3097   done
3098 fi
3099 rm -f conftest*
3100 fi # $ac_x_includes = NO
3101
3102 if test "$ac_x_libraries" = NO; then
3103   # Check for the libraries.
3104
3105   test -z "$x_direct_test_library" && x_direct_test_library=Xt
3106   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3107
3108   # See if we find them without any special options.
3109   # Don't add to $LIBS permanently.
3110   ac_save_LIBS="$LIBS"
3111   LIBS="-l$x_direct_test_library $LIBS"
3112 cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115
3116 int main() {
3117 ${x_direct_test_function}()
3118 ; return 0; }
3119 EOF
3120 if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3121   rm -rf conftest*
3122   LIBS="$ac_save_LIBS"
3123 # We can link X programs with no special library path.
3124 ac_x_libraries=
3125 else
3126   echo "configure: failed program was:" >&5
3127   cat conftest.$ac_ext >&5
3128   rm -rf conftest*
3129   LIBS="$ac_save_LIBS"
3130 # First see if replacing the include by lib works.
3131 # Check X11 before X11Rn because it is often a symlink to the current release.
3132 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3133     /usr/X11/lib          \
3134     /usr/X11R6/lib        \
3135     /usr/X11R5/lib        \
3136     /usr/X11R4/lib        \
3137                           \
3138     /usr/lib/X11          \
3139     /usr/lib/X11R6        \
3140     /usr/lib/X11R5        \
3141     /usr/lib/X11R4        \
3142                           \
3143     /usr/local/X11/lib    \
3144     /usr/local/X11R6/lib  \
3145     /usr/local/X11R5/lib  \
3146     /usr/local/X11R4/lib  \
3147                           \
3148     /usr/local/lib/X11    \
3149     /usr/local/lib/X11R6  \
3150     /usr/local/lib/X11R5  \
3151     /usr/local/lib/X11R4  \
3152                           \
3153     /usr/X386/lib         \
3154     /usr/x386/lib         \
3155     /usr/XFree86/lib/X11  \
3156                           \
3157     /usr/lib              \
3158     /usr/local/lib        \
3159     /usr/unsupported/lib  \
3160     /usr/athena/lib       \
3161     /usr/local/x11r5/lib  \
3162     /usr/lpp/Xamples/lib  \
3163     /lib/usr/lib/X11      \
3164                           \
3165     /usr/openwin/lib      \
3166     /usr/openwin/share/lib \
3167     ; \
3168 do
3169   for ac_extension in a so sl; do
3170     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3171       ac_x_libraries=$ac_dir
3172       break 2
3173     fi
3174   done
3175 done
3176 fi
3177 rm -f conftest*
3178 fi # $ac_x_libraries = NO
3179
3180 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3181   # Didn't find X anywhere.  Cache the known absence of X.
3182   ac_cv_have_x="have_x=no"
3183 else
3184   # Record where we found X for the cache.
3185   ac_cv_have_x="have_x=yes \
3186                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3187 fi
3188 fi
3189   fi
3190   eval "$ac_cv_have_x"
3191 fi # $with_x != no
3192
3193 if test "$have_x" != yes; then
3194   echo "$ac_t""$have_x" 1>&6
3195   no_x=yes
3196 else
3197   # If each of the values was on the command line, it overrides each guess.
3198   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3199   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3200   # Update the cache value to reflect the command line values.
3201   ac_cv_have_x="have_x=yes \
3202                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3203   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3204 fi
3205
3206 if test "$no_x" = yes; then
3207   # Not all programs may use this symbol, but it does not hurt to define it.
3208   cat >> confdefs.h <<\EOF
3209 #define X_DISPLAY_MISSING 1
3210 EOF
3211
3212   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3213 else
3214   if test -n "$x_includes"; then
3215     X_CFLAGS="$X_CFLAGS -I$x_includes"
3216   fi
3217
3218   # It would also be nice to do this for all -L options, not just this one.
3219   if test -n "$x_libraries"; then
3220     X_LIBS="$X_LIBS -L$x_libraries"
3221     # For Solaris; some versions of Sun CC require a space after -R and
3222     # others require no space.  Words are not sufficient . . . .
3223     case "`(uname -sr) 2>/dev/null`" in
3224     "SunOS 5"*)
3225       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3226 echo "configure:3227: checking whether -R must be followed by a space" >&5
3227       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3228       cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231
3232 int main() {
3233
3234 ; return 0; }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3237   rm -rf conftest*
3238   ac_R_nospace=yes
3239 else
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   ac_R_nospace=no
3244 fi
3245 rm -f conftest*
3246       if test $ac_R_nospace = yes; then
3247         echo "$ac_t""no" 1>&6
3248         X_LIBS="$X_LIBS -R$x_libraries"
3249       else
3250         LIBS="$ac_xsave_LIBS -R $x_libraries"
3251         cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254
3255 int main() {
3256
3257 ; return 0; }
3258 EOF
3259 if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3260   rm -rf conftest*
3261   ac_R_space=yes
3262 else
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   ac_R_space=no
3267 fi
3268 rm -f conftest*
3269         if test $ac_R_space = yes; then
3270           echo "$ac_t""yes" 1>&6
3271           X_LIBS="$X_LIBS -R $x_libraries"
3272         else
3273           echo "$ac_t""neither works" 1>&6
3274         fi
3275       fi
3276       LIBS="$ac_xsave_LIBS"
3277     esac
3278   fi
3279
3280   # Check for system-dependent libraries X programs must link with.
3281   # Do this before checking for the system-independent R6 libraries
3282   # (-lICE), since we may need -lsocket or whatever for X linking.
3283
3284   if test "$ISC" = yes; then
3285     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3286   else
3287     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3288     # libraries were built with DECnet support.  And karl@cs.umb.edu says
3289     # the Alpha needs dnet_stub (dnet does not exist).
3290     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3291 echo "configure:3292: checking for dnet_ntoa in -ldnet" >&5
3292 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3294   echo $ac_n "(cached) $ac_c" 1>&6
3295 else
3296   ac_save_LIBS="$LIBS"
3297 LIBS="-ldnet  $LIBS"
3298 cat > conftest.$ac_ext <<EOF
3299 #line 3300 "configure"
3300 #include "confdefs.h"
3301 /* Override any gcc2 internal prototype to avoid an error.  */
3302 /* We use char because int might match the return type of a gcc2
3303     builtin and then its argument prototype would still apply.  */
3304 char dnet_ntoa();
3305
3306 int main() {
3307 dnet_ntoa()
3308 ; return 0; }
3309 EOF
3310 if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3311   rm -rf conftest*
3312   eval "ac_cv_lib_$ac_lib_var=yes"
3313 else
3314   echo "configure: failed program was:" >&5
3315   cat conftest.$ac_ext >&5
3316   rm -rf conftest*
3317   eval "ac_cv_lib_$ac_lib_var=no"
3318 fi
3319 rm -f conftest*
3320 LIBS="$ac_save_LIBS"
3321
3322 fi
3323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3324   echo "$ac_t""yes" 1>&6
3325   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3326 else
3327   echo "$ac_t""no" 1>&6
3328 fi
3329
3330     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3331       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3332 echo "configure:3333: checking for dnet_ntoa in -ldnet_stub" >&5
3333 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   ac_save_LIBS="$LIBS"
3338 LIBS="-ldnet_stub  $LIBS"
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 /* Override any gcc2 internal prototype to avoid an error.  */
3343 /* We use char because int might match the return type of a gcc2
3344     builtin and then its argument prototype would still apply.  */
3345 char dnet_ntoa();
3346
3347 int main() {
3348 dnet_ntoa()
3349 ; return 0; }
3350 EOF
3351 if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3352   rm -rf conftest*
3353   eval "ac_cv_lib_$ac_lib_var=yes"
3354 else
3355   echo "configure: failed program was:" >&5
3356   cat conftest.$ac_ext >&5
3357   rm -rf conftest*
3358   eval "ac_cv_lib_$ac_lib_var=no"
3359 fi
3360 rm -f conftest*
3361 LIBS="$ac_save_LIBS"
3362
3363 fi
3364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3365   echo "$ac_t""yes" 1>&6
3366   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370
3371     fi
3372
3373     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3374     # to get the SysV transport functions.
3375     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3376     # needs -lnsl.
3377     # The nsl library prevents programs from opening the X display
3378     # on Irix 5.2, according to dickey@clark.net.
3379     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3380 echo "configure:3381: checking for gethostbyname" >&5
3381 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3382   echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384   cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 /* System header to define __stub macros and hopefully few prototypes,
3388     which can conflict with char gethostbyname(); below.  */
3389 #include <assert.h>
3390 /* Override any gcc2 internal prototype to avoid an error.  */
3391 /* We use char because int might match the return type of a gcc2
3392     builtin and then its argument prototype would still apply.  */
3393 char gethostbyname();
3394
3395 int main() {
3396
3397 /* The GNU C library defines this for functions which it implements
3398     to always fail with ENOSYS.  Some functions are actually named
3399     something starting with __ and the normal name is an alias.  */
3400 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3401 choke me
3402 #else
3403 gethostbyname();
3404 #endif
3405
3406 ; return 0; }
3407 EOF
3408 if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3409   rm -rf conftest*
3410   eval "ac_cv_func_gethostbyname=yes"
3411 else
3412   echo "configure: failed program was:" >&5
3413   cat conftest.$ac_ext >&5
3414   rm -rf conftest*
3415   eval "ac_cv_func_gethostbyname=no"
3416 fi
3417 rm -f conftest*
3418 fi
3419
3420 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3421   echo "$ac_t""yes" 1>&6
3422   :
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427     if test $ac_cv_func_gethostbyname = no; then
3428       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3429 echo "configure:3430: checking for gethostbyname in -lnsl" >&5
3430 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3431 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   ac_save_LIBS="$LIBS"
3435 LIBS="-lnsl  $LIBS"
3436 cat > conftest.$ac_ext <<EOF
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439 /* Override any gcc2 internal prototype to avoid an error.  */
3440 /* We use char because int might match the return type of a gcc2
3441     builtin and then its argument prototype would still apply.  */
3442 char gethostbyname();
3443
3444 int main() {
3445 gethostbyname()
3446 ; return 0; }
3447 EOF
3448 if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3449   rm -rf conftest*
3450   eval "ac_cv_lib_$ac_lib_var=yes"
3451 else
3452   echo "configure: failed program was:" >&5
3453   cat conftest.$ac_ext >&5
3454   rm -rf conftest*
3455   eval "ac_cv_lib_$ac_lib_var=no"
3456 fi
3457 rm -f conftest*
3458 LIBS="$ac_save_LIBS"
3459
3460 fi
3461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3462   echo "$ac_t""yes" 1>&6
3463   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3464 else
3465   echo "$ac_t""no" 1>&6
3466 fi
3467
3468     fi
3469
3470     # lieder@skyler.mavd.honeywell.com says without -lsocket,
3471     # socket/setsockopt and other routines are undefined under SCO ODT
3472     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
3473     # on later versions), says simon@lia.di.epfl.ch: it contains
3474     # gethostby* variants that don't use the nameserver (or something).
3475     # -lsocket must be given before -lnsl if both are needed.
3476     # We assume that if connect needs -lnsl, so does gethostbyname.
3477     echo $ac_n "checking for connect""... $ac_c" 1>&6
3478 echo "configure:3479: checking for connect" >&5
3479 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   cat > conftest.$ac_ext <<EOF
3483 #line 3484 "configure"
3484 #include "confdefs.h"
3485 /* System header to define __stub macros and hopefully few prototypes,
3486     which can conflict with char connect(); below.  */
3487 #include <assert.h>
3488 /* Override any gcc2 internal prototype to avoid an error.  */
3489 /* We use char because int might match the return type of a gcc2
3490     builtin and then its argument prototype would still apply.  */
3491 char connect();
3492
3493 int main() {
3494
3495 /* The GNU C library defines this for functions which it implements
3496     to always fail with ENOSYS.  Some functions are actually named
3497     something starting with __ and the normal name is an alias.  */
3498 #if defined (__stub_connect) || defined (__stub___connect)
3499 choke me
3500 #else
3501 connect();
3502 #endif
3503
3504 ; return 0; }
3505 EOF
3506 if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3507   rm -rf conftest*
3508   eval "ac_cv_func_connect=yes"
3509 else
3510   echo "configure: failed program was:" >&5
3511   cat conftest.$ac_ext >&5
3512   rm -rf conftest*
3513   eval "ac_cv_func_connect=no"
3514 fi
3515 rm -f conftest*
3516 fi
3517
3518 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3519   echo "$ac_t""yes" 1>&6
3520   :
3521 else
3522   echo "$ac_t""no" 1>&6
3523 fi
3524
3525     if test $ac_cv_func_connect = no; then
3526       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3527 echo "configure:3528: checking for connect in -lsocket" >&5
3528 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   ac_save_LIBS="$LIBS"
3533 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 /* Override any gcc2 internal prototype to avoid an error.  */
3538 /* We use char because int might match the return type of a gcc2
3539     builtin and then its argument prototype would still apply.  */
3540 char connect();
3541
3542 int main() {
3543 connect()
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3547   rm -rf conftest*
3548   eval "ac_cv_lib_$ac_lib_var=yes"
3549 else
3550   echo "configure: failed program was:" >&5
3551   cat conftest.$ac_ext >&5
3552   rm -rf conftest*
3553   eval "ac_cv_lib_$ac_lib_var=no"
3554 fi
3555 rm -f conftest*
3556 LIBS="$ac_save_LIBS"
3557
3558 fi
3559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3560   echo "$ac_t""yes" 1>&6
3561   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3562 else
3563   echo "$ac_t""no" 1>&6
3564 fi
3565
3566     fi
3567
3568     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3569     echo $ac_n "checking for remove""... $ac_c" 1>&6
3570 echo "configure:3571: checking for remove" >&5
3571 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3572   echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574   cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 /* System header to define __stub macros and hopefully few prototypes,
3578     which can conflict with char remove(); below.  */
3579 #include <assert.h>
3580 /* Override any gcc2 internal prototype to avoid an error.  */
3581 /* We use char because int might match the return type of a gcc2
3582     builtin and then its argument prototype would still apply.  */
3583 char remove();
3584
3585 int main() {
3586
3587 /* The GNU C library defines this for functions which it implements
3588     to always fail with ENOSYS.  Some functions are actually named
3589     something starting with __ and the normal name is an alias.  */
3590 #if defined (__stub_remove) || defined (__stub___remove)
3591 choke me
3592 #else
3593 remove();
3594 #endif
3595
3596 ; return 0; }
3597 EOF
3598 if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3599   rm -rf conftest*
3600   eval "ac_cv_func_remove=yes"
3601 else
3602   echo "configure: failed program was:" >&5
3603   cat conftest.$ac_ext >&5
3604   rm -rf conftest*
3605   eval "ac_cv_func_remove=no"
3606 fi
3607 rm -f conftest*
3608 fi
3609
3610 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3611   echo "$ac_t""yes" 1>&6
3612   :
3613 else
3614   echo "$ac_t""no" 1>&6
3615 fi
3616
3617     if test $ac_cv_func_remove = no; then
3618       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3619 echo "configure:3620: checking for remove in -lposix" >&5
3620 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3621 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3622   echo $ac_n "(cached) $ac_c" 1>&6
3623 else
3624   ac_save_LIBS="$LIBS"
3625 LIBS="-lposix  $LIBS"
3626 cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629 /* Override any gcc2 internal prototype to avoid an error.  */
3630 /* We use char because int might match the return type of a gcc2
3631     builtin and then its argument prototype would still apply.  */
3632 char remove();
3633
3634 int main() {
3635 remove()
3636 ; return 0; }
3637 EOF
3638 if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3639   rm -rf conftest*
3640   eval "ac_cv_lib_$ac_lib_var=yes"
3641 else
3642   echo "configure: failed program was:" >&5
3643   cat conftest.$ac_ext >&5
3644   rm -rf conftest*
3645   eval "ac_cv_lib_$ac_lib_var=no"
3646 fi
3647 rm -f conftest*
3648 LIBS="$ac_save_LIBS"
3649
3650 fi
3651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3652   echo "$ac_t""yes" 1>&6
3653   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3654 else
3655   echo "$ac_t""no" 1>&6
3656 fi
3657
3658     fi
3659
3660     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3661     echo $ac_n "checking for shmat""... $ac_c" 1>&6
3662 echo "configure:3663: checking for shmat" >&5
3663 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3664   echo $ac_n "(cached) $ac_c" 1>&6
3665 else
3666   cat > conftest.$ac_ext <<EOF
3667 #line 3668 "configure"
3668 #include "confdefs.h"
3669 /* System header to define __stub macros and hopefully few prototypes,
3670     which can conflict with char shmat(); below.  */
3671 #include <assert.h>
3672 /* Override any gcc2 internal prototype to avoid an error.  */
3673 /* We use char because int might match the return type of a gcc2
3674     builtin and then its argument prototype would still apply.  */
3675 char shmat();
3676
3677 int main() {
3678
3679 /* The GNU C library defines this for functions which it implements
3680     to always fail with ENOSYS.  Some functions are actually named
3681     something starting with __ and the normal name is an alias.  */
3682 #if defined (__stub_shmat) || defined (__stub___shmat)
3683 choke me
3684 #else
3685 shmat();
3686 #endif
3687
3688 ; return 0; }
3689 EOF
3690 if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3691   rm -rf conftest*
3692   eval "ac_cv_func_shmat=yes"
3693 else
3694   echo "configure: failed program was:" >&5
3695   cat conftest.$ac_ext >&5
3696   rm -rf conftest*
3697   eval "ac_cv_func_shmat=no"
3698 fi
3699 rm -f conftest*
3700 fi
3701
3702 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3703   echo "$ac_t""yes" 1>&6
3704   :
3705 else
3706   echo "$ac_t""no" 1>&6
3707 fi
3708
3709     if test $ac_cv_func_shmat = no; then
3710       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3711 echo "configure:3712: checking for shmat in -lipc" >&5
3712 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3713 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3714   echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716   ac_save_LIBS="$LIBS"
3717 LIBS="-lipc  $LIBS"
3718 cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 /* Override any gcc2 internal prototype to avoid an error.  */
3722 /* We use char because int might match the return type of a gcc2
3723     builtin and then its argument prototype would still apply.  */
3724 char shmat();
3725
3726 int main() {
3727 shmat()
3728 ; return 0; }
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3731   rm -rf conftest*
3732   eval "ac_cv_lib_$ac_lib_var=yes"
3733 else
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -rf conftest*
3737   eval "ac_cv_lib_$ac_lib_var=no"
3738 fi
3739 rm -f conftest*
3740 LIBS="$ac_save_LIBS"
3741
3742 fi
3743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3744   echo "$ac_t""yes" 1>&6
3745   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3746 else
3747   echo "$ac_t""no" 1>&6
3748 fi
3749
3750     fi
3751   fi
3752
3753   # Check for libraries that X11R6 Xt/Xaw programs need.
3754   ac_save_LDFLAGS="$LDFLAGS"
3755   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3756   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3757   # check for ICE first), but we must link in the order -lSM -lICE or
3758   # we get undefined symbols.  So assume we have SM if we have ICE.
3759   # These have to be linked with before -lX11, unlike the other
3760   # libraries we check for below, so use a different variable.
3761   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3762   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3763 echo "configure:3764: checking for IceConnectionNumber in -lICE" >&5
3764 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3766   echo $ac_n "(cached) $ac_c" 1>&6
3767 else
3768   ac_save_LIBS="$LIBS"
3769 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3770 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773 /* Override any gcc2 internal prototype to avoid an error.  */
3774 /* We use char because int might match the return type of a gcc2
3775     builtin and then its argument prototype would still apply.  */
3776 char IceConnectionNumber();
3777
3778 int main() {
3779 IceConnectionNumber()
3780 ; return 0; }
3781 EOF
3782 if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3783   rm -rf conftest*
3784   eval "ac_cv_lib_$ac_lib_var=yes"
3785 else
3786   echo "configure: failed program was:" >&5
3787   cat conftest.$ac_ext >&5
3788   rm -rf conftest*
3789   eval "ac_cv_lib_$ac_lib_var=no"
3790 fi
3791 rm -f conftest*
3792 LIBS="$ac_save_LIBS"
3793
3794 fi
3795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3796   echo "$ac_t""yes" 1>&6
3797   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3798 else
3799   echo "$ac_t""no" 1>&6
3800 fi
3801
3802   LDFLAGS="$ac_save_LDFLAGS"
3803
3804 fi
3805
3806
3807
3808
3809
3810
3811
3812
3813 X_TOOLKIT_LIBS="-lXt"
3814 X_BASIC_LIBS="-lXext -lX11"
3815
3816 our_saved_LDFLAGS="$LDFLAGS"
3817 LDFLAGS="$X_LIBS $LDFLAGS"
3818 echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6
3819 echo "configure:3820: checking for XtToolkitThreadInitialize in -lXt" >&5
3820 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'`
3821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   ac_save_LIBS="$LIBS"
3825 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
3826 cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 /* Override any gcc2 internal prototype to avoid an error.  */
3830 /* We use char because int might match the return type of a gcc2
3831     builtin and then its argument prototype would still apply.  */
3832 char XtToolkitThreadInitialize();
3833
3834 int main() {
3835 XtToolkitThreadInitialize()
3836 ; return 0; }
3837 EOF
3838 if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3839   rm -rf conftest*
3840   eval "ac_cv_lib_$ac_lib_var=yes"
3841 else
3842   echo "configure: failed program was:" >&5
3843   cat conftest.$ac_ext >&5
3844   rm -rf conftest*
3845   eval "ac_cv_lib_$ac_lib_var=no"
3846 fi
3847 rm -f conftest*
3848 LIBS="$ac_save_LIBS"
3849
3850 fi
3851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3852   echo "$ac_t""yes" 1>&6
3853   cat >> confdefs.h <<\EOF
3854 #define X_THREAD_SUPPORT 1
3855 EOF
3856
3857 else
3858   echo "$ac_t""no" 1>&6
3859 fi
3860
3861 LDFLAGS="$our_saved_LDFLAGS"
3862
3863 our_saved_LDFLAGS="$LDFLAGS"
3864 LDFLAGS="$X_LIBS $LDFLAGS"
3865 echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6
3866 echo "configure:3867: checking for XdbeQueryExtension in -lXext" >&5
3867 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'`
3868 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3869   echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871   ac_save_LIBS="$LIBS"
3872 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
3873 cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 /* Override any gcc2 internal prototype to avoid an error.  */
3877 /* We use char because int might match the return type of a gcc2
3878     builtin and then its argument prototype would still apply.  */
3879 char XdbeQueryExtension();
3880
3881 int main() {
3882 XdbeQueryExtension()
3883 ; return 0; }
3884 EOF
3885 if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3886   rm -rf conftest*
3887   eval "ac_cv_lib_$ac_lib_var=yes"
3888 else
3889   echo "configure: failed program was:" >&5
3890   cat conftest.$ac_ext >&5
3891   rm -rf conftest*
3892   eval "ac_cv_lib_$ac_lib_var=no"
3893 fi
3894 rm -f conftest*
3895 LIBS="$ac_save_LIBS"
3896
3897 fi
3898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3899   echo "$ac_t""yes" 1>&6
3900   cat >> confdefs.h <<\EOF
3901 #define HAVE_DBE_SUPPORT 1
3902 EOF
3903
3904 else
3905   echo "$ac_t""no" 1>&6
3906 fi
3907
3908 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
3909 echo "configure:3910: checking for XmbufQueryExtension in -lXext" >&5
3910 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'`
3911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   ac_save_LIBS="$LIBS"
3915 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
3916 cat > conftest.$ac_ext <<EOF
3917 #line 3918 "configure"
3918 #include "confdefs.h"
3919 /* Override any gcc2 internal prototype to avoid an error.  */
3920 /* We use char because int might match the return type of a gcc2
3921     builtin and then its argument prototype would still apply.  */
3922 char XmbufQueryExtension();
3923
3924 int main() {
3925 XmbufQueryExtension()
3926 ; return 0; }
3927 EOF
3928 if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3929   rm -rf conftest*
3930   eval "ac_cv_lib_$ac_lib_var=yes"
3931 else
3932   echo "configure: failed program was:" >&5
3933   cat conftest.$ac_ext >&5
3934   rm -rf conftest*
3935   eval "ac_cv_lib_$ac_lib_var=no"
3936 fi
3937 rm -f conftest*
3938 LIBS="$ac_save_LIBS"
3939
3940 fi
3941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3942   echo "$ac_t""yes" 1>&6
3943   cat >> confdefs.h <<\EOF
3944 #define HAVE_MBX_SUPPORT 1
3945 EOF
3946
3947 else
3948   echo "$ac_t""no" 1>&6
3949 fi
3950
3951 LDFLAGS="$our_saved_LDFLAGS"
3952 our_saved_CPPFLAGS="$CPPFLAGS"
3953 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
3954 for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h
3955 do
3956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3958 echo "configure:3959: checking for $ac_hdr" >&5
3959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 #include <$ac_hdr>
3966 EOF
3967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3968 { (eval echo configure:3969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3970 if test -z "$ac_err"; then
3971   rm -rf conftest*
3972   eval "ac_cv_header_$ac_safe=yes"
3973 else
3974   echo "$ac_err" >&5
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -rf conftest*
3978   eval "ac_cv_header_$ac_safe=no"
3979 fi
3980 rm -f conftest*
3981 fi
3982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3983   echo "$ac_t""yes" 1>&6
3984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3985   cat >> confdefs.h <<EOF
3986 #define $ac_tr_hdr 1
3987 EOF
3988  
3989 else
3990   echo "$ac_t""no" 1>&6
3991 fi
3992 done
3993
3994 CPPFLAGS="$our_saved_CPPFLAGS"
3995
3996
3997
3998 if test "x$no_x" = "xyes"; then
3999   NO_X_TRUE=
4000   NO_X_FALSE='#'
4001 else
4002   NO_X_TRUE='#'
4003   NO_X_FALSE=
4004 fi
4005
4006 my_includes="$my_includes -I../include -I.."
4007
4008
4009 echo $ac_n "checking interactive graphics""... $ac_c" 1>&6
4010 echo "configure:4011: checking interactive graphics" >&5
4011 if test "$no_x" != "yes" ; then
4012   cat >> confdefs.h <<\EOF
4013 #define HAVE_X11 1
4014 EOF
4015
4016   cat >> confdefs.h <<\EOF
4017 #define HAVE_SGP 1
4018 EOF
4019
4020   
4021
4022 if test 1==1; then
4023   HAVE_SGP_TRUE=
4024   HAVE_SGP_FALSE='#'
4025 else
4026   HAVE_SGP_TRUE='#'
4027   HAVE_SGP_FALSE=
4028 fi
4029   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
4030   ctlibs_graphics="$ctlibs_base -lctgraphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
4031   echo "$ac_t""yes" 1>&6
4032 else
4033   echo "$ac_t""no" 1>&6
4034 fi
4035
4036 if test "$png" = "true" ; then
4037   ctlibs_tools="$ctlibs_tools -lpng"
4038 fi
4039 if test "$zlib" = "true" ; then
4040   ctlibs_tools="$ctlibs_tools -lz"
4041 fi
4042 if test "$g2" = "true" ; then
4043   ctlibs_tools="$ctlibs_tools -lg2"
4044 fi
4045 if test "$wx_gtk" = "true" ; then
4046   ctlibs_tools="$ctlibs_tools -lwx_gtk"
4047 fi
4048
4049 LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
4050 ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
4051
4052
4053 if test -n "$lamdir" ; then
4054   lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
4055   
4056 fi
4057
4058 trap '' 1 2 15
4059 cat > confcache <<\EOF
4060 # This file is a shell script that caches the results of configure
4061 # tests run on this system so they can be shared between configure
4062 # scripts and configure runs.  It is not useful on other systems.
4063 # If it contains results you don't want to keep, you may remove or edit it.
4064 #
4065 # By default, configure uses ./config.cache as the cache file,
4066 # creating it if it does not exist already.  You can give configure
4067 # the --cache-file=FILE option to use a different cache file; that is
4068 # what configure does when it calls configure scripts in
4069 # subdirectories, so they share the cache.
4070 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4071 # config.status only pays attention to the cache file if you give it the
4072 # --recheck option to rerun configure.
4073 #
4074 EOF
4075 # The following way of writing the cache mishandles newlines in values,
4076 # but we know of no workaround that is simple, portable, and efficient.
4077 # So, don't put newlines in cache variables' values.
4078 # Ultrix sh set writes to stderr and can't be redirected directly,
4079 # and sets the high bit in the cache file unless we assign to the vars.
4080 (set) 2>&1 |
4081   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4082   *ac_space=\ *)
4083     # `set' does not quote correctly, so add quotes (double-quote substitution
4084     # turns \\\\ into \\, and sed turns \\ into \).
4085     sed -n \
4086       -e "s/'/'\\\\''/g" \
4087       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4088     ;;
4089   *)
4090     # `set' quotes correctly as required by POSIX, so do not add quotes.
4091     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4092     ;;
4093   esac >> confcache
4094 if cmp -s $cache_file confcache; then
4095   :
4096 else
4097   if test -w $cache_file; then
4098     echo "updating cache $cache_file"
4099     cat confcache > $cache_file
4100   else
4101     echo "not updating unwritable cache $cache_file"
4102   fi
4103 fi
4104 rm -f confcache
4105
4106 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4107
4108 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4109 # Let make expand exec_prefix.
4110 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4111
4112 # Any assignment to VPATH causes Sun make to only execute
4113 # the first set of double-colon rules, so remove it if not needed.
4114 # If there is a colon in the path, we need to keep it.
4115 if test "x$srcdir" = x.; then
4116   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4117 fi
4118
4119 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4120
4121 DEFS=-DHAVE_CONFIG_H
4122
4123 # Without the "./", some shells look in PATH for config.status.
4124 : ${CONFIG_STATUS=./config.status}
4125
4126 echo creating $CONFIG_STATUS
4127 rm -f $CONFIG_STATUS
4128 cat > $CONFIG_STATUS <<EOF
4129 #! /bin/sh
4130 # Generated automatically by configure.
4131 # Run this file to recreate the current configuration.
4132 # This directory was configured as follows,
4133 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4134 #
4135 # $0 $ac_configure_args
4136 #
4137 # Compiler output produced by configure, useful for debugging
4138 # configure, is in ./config.log if it exists.
4139
4140 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4141 for ac_option
4142 do
4143   case "\$ac_option" in
4144   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4145     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4146     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4147   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4148     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4149     exit 0 ;;
4150   -help | --help | --hel | --he | --h)
4151     echo "\$ac_cs_usage"; exit 0 ;;
4152   *) echo "\$ac_cs_usage"; exit 1 ;;
4153   esac
4154 done
4155
4156 ac_given_srcdir=$srcdir
4157 ac_given_INSTALL="$INSTALL"
4158
4159 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-ctsim.sh cgi-bin/ctsim.conf config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4160 EOF
4161 cat >> $CONFIG_STATUS <<EOF
4162
4163 # Protect against being on the right side of a sed subst in config.status.
4164 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4165  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4166 $ac_vpsub
4167 $extrasub
4168 s%@SHELL@%$SHELL%g
4169 s%@CFLAGS@%$CFLAGS%g
4170 s%@CPPFLAGS@%$CPPFLAGS%g
4171 s%@CXXFLAGS@%$CXXFLAGS%g
4172 s%@FFLAGS@%$FFLAGS%g
4173 s%@DEFS@%$DEFS%g
4174 s%@LDFLAGS@%$LDFLAGS%g
4175 s%@LIBS@%$LIBS%g
4176 s%@exec_prefix@%$exec_prefix%g
4177 s%@prefix@%$prefix%g
4178 s%@program_transform_name@%$program_transform_name%g
4179 s%@bindir@%$bindir%g
4180 s%@sbindir@%$sbindir%g
4181 s%@libexecdir@%$libexecdir%g
4182 s%@datadir@%$datadir%g
4183 s%@sysconfdir@%$sysconfdir%g
4184 s%@sharedstatedir@%$sharedstatedir%g
4185 s%@localstatedir@%$localstatedir%g
4186 s%@libdir@%$libdir%g
4187 s%@includedir@%$includedir%g
4188 s%@oldincludedir@%$oldincludedir%g
4189 s%@infodir@%$infodir%g
4190 s%@mandir@%$mandir%g
4191 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4192 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4193 s%@INSTALL_DATA@%$INSTALL_DATA%g
4194 s%@PACKAGE@%$PACKAGE%g
4195 s%@VERSION@%$VERSION%g
4196 s%@ACLOCAL@%$ACLOCAL%g
4197 s%@AUTOCONF@%$AUTOCONF%g
4198 s%@AUTOMAKE@%$AUTOMAKE%g
4199 s%@AUTOHEADER@%$AUTOHEADER%g
4200 s%@MAKEINFO@%$MAKEINFO%g
4201 s%@SET_MAKE@%$SET_MAKE%g
4202 s%@AWK@%$AWK%g
4203 s%@RANLIB@%$RANLIB%g
4204 s%@CC@%$CC%g
4205 s%@CXX@%$CXX%g
4206 s%@host@%$host%g
4207 s%@host_alias@%$host_alias%g
4208 s%@host_cpu@%$host_cpu%g
4209 s%@host_vendor@%$host_vendor%g
4210 s%@host_os@%$host_os%g
4211 s%@CPP@%$CPP%g
4212 s%@INCLUDED_GETOPT_LONG_TRUE@%$INCLUDED_GETOPT_LONG_TRUE%g
4213 s%@INCLUDED_GETOPT_LONG_FALSE@%$INCLUDED_GETOPT_LONG_FALSE%g
4214 s%@DEBUG_TRUE@%$DEBUG_TRUE%g
4215 s%@DEBUG_FALSE@%$DEBUG_FALSE%g
4216 s%@lamdir@%$lamdir%g
4217 s%@mpienable@%$mpienable%g
4218 s%@cgibindir@%$cgibindir%g
4219 s%@cgibinurl@%$cgibinurl%g
4220 s%@webdatadir@%$webdatadir%g
4221 s%@webdataurl@%$webdataurl%g
4222 s%@htmldir@%$htmldir%g
4223 s%@cgiprograms@%$cgiprograms%g
4224 s%@htmldata@%$htmldata%g
4225 s%@USE_HTML_TRUE@%$USE_HTML_TRUE%g
4226 s%@USE_HTML_FALSE@%$USE_HTML_FALSE%g
4227 s%@webenabled@%$webenabled%g
4228 s%@USE_LAM_TRUE@%$USE_LAM_TRUE%g
4229 s%@USE_LAM_FALSE@%$USE_LAM_FALSE%g
4230 s%@X_CFLAGS@%$X_CFLAGS%g
4231 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4232 s%@X_LIBS@%$X_LIBS%g
4233 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4234 s%@X_TOOLKIT_LIBS@%$X_TOOLKIT_LIBS%g
4235 s%@X_BASIC_LIBS@%$X_BASIC_LIBS%g
4236 s%@NO_X_TRUE@%$NO_X_TRUE%g
4237 s%@NO_X_FALSE@%$NO_X_FALSE%g
4238 s%@my_includes@%$my_includes%g
4239 s%@HAVE_SGP_TRUE@%$HAVE_SGP_TRUE%g
4240 s%@HAVE_SGP_FALSE@%$HAVE_SGP_FALSE%g
4241 s%@ctlibs@%$ctlibs%g
4242 s%@lamprograms@%$lamprograms%g
4243
4244 CEOF
4245 EOF
4246
4247 cat >> $CONFIG_STATUS <<\EOF
4248
4249 # Split the substitutions into bite-sized pieces for seds with
4250 # small command number limits, like on Digital OSF/1 and HP-UX.
4251 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4252 ac_file=1 # Number of current file.
4253 ac_beg=1 # First line for current file.
4254 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4255 ac_more_lines=:
4256 ac_sed_cmds=""
4257 while $ac_more_lines; do
4258   if test $ac_beg -gt 1; then
4259     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4260   else
4261     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4262   fi
4263   if test ! -s conftest.s$ac_file; then
4264     ac_more_lines=false
4265     rm -f conftest.s$ac_file
4266   else
4267     if test -z "$ac_sed_cmds"; then
4268       ac_sed_cmds="sed -f conftest.s$ac_file"
4269     else
4270       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4271     fi
4272     ac_file=`expr $ac_file + 1`
4273     ac_beg=$ac_end
4274     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4275   fi
4276 done
4277 if test -z "$ac_sed_cmds"; then
4278   ac_sed_cmds=cat
4279 fi
4280 EOF
4281
4282 cat >> $CONFIG_STATUS <<EOF
4283
4284 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-ctsim.sh cgi-bin/ctsim.conf"}
4285 EOF
4286 cat >> $CONFIG_STATUS <<\EOF
4287 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4288   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4289   case "$ac_file" in
4290   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4291        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4292   *) ac_file_in="${ac_file}.in" ;;
4293   esac
4294
4295   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4296
4297   # Remove last slash and all that follows it.  Not all systems have dirname.
4298   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4299   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4300     # The file is in a subdirectory.
4301     test ! -d "$ac_dir" && mkdir "$ac_dir"
4302     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4303     # A "../" for each directory in $ac_dir_suffix.
4304     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4305   else
4306     ac_dir_suffix= ac_dots=
4307   fi
4308
4309   case "$ac_given_srcdir" in
4310   .)  srcdir=.
4311       if test -z "$ac_dots"; then top_srcdir=.
4312       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4313   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4314   *) # Relative path.
4315     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4316     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4317   esac
4318
4319   case "$ac_given_INSTALL" in
4320   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4321   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4322   esac
4323
4324   echo creating "$ac_file"
4325   rm -f "$ac_file"
4326   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4327   case "$ac_file" in
4328   *Makefile*) ac_comsub="1i\\
4329 # $configure_input" ;;
4330   *) ac_comsub= ;;
4331   esac
4332
4333   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4334   sed -e "$ac_comsub
4335 s%@configure_input@%$configure_input%g
4336 s%@srcdir@%$srcdir%g
4337 s%@top_srcdir@%$top_srcdir%g
4338 s%@INSTALL@%$INSTALL%g
4339 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4340 fi; done
4341 rm -f conftest.s*
4342
4343 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4344 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4345 #
4346 # ac_d sets the value in "#define NAME VALUE" lines.
4347 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4348 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4349 ac_dC='\3'
4350 ac_dD='%g'
4351 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4352 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4353 ac_uB='\([      ]\)%\1#\2define\3'
4354 ac_uC=' '
4355 ac_uD='\4%g'
4356 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4357 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4358 ac_eB='$%\1#\2define\3'
4359 ac_eC=' '
4360 ac_eD='%g'
4361
4362 if test "${CONFIG_HEADERS+set}" != set; then
4363 EOF
4364 cat >> $CONFIG_STATUS <<EOF
4365   CONFIG_HEADERS="config.h"
4366 EOF
4367 cat >> $CONFIG_STATUS <<\EOF
4368 fi
4369 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4370   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4371   case "$ac_file" in
4372   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4373        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4374   *) ac_file_in="${ac_file}.in" ;;
4375   esac
4376
4377   echo creating $ac_file
4378
4379   rm -f conftest.frag conftest.in conftest.out
4380   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4381   cat $ac_file_inputs > conftest.in
4382
4383 EOF
4384
4385 # Transform confdefs.h into a sed script conftest.vals that substitutes
4386 # the proper values into config.h.in to produce config.h.  And first:
4387 # Protect against being on the right side of a sed subst in config.status.
4388 # Protect against being in an unquoted here document in config.status.
4389 rm -f conftest.vals
4390 cat > conftest.hdr <<\EOF
4391 s/[\\&%]/\\&/g
4392 s%[\\$`]%\\&%g
4393 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4394 s%ac_d%ac_u%gp
4395 s%ac_u%ac_e%gp
4396 EOF
4397 sed -n -f conftest.hdr confdefs.h > conftest.vals
4398 rm -f conftest.hdr
4399
4400 # This sed command replaces #undef with comments.  This is necessary, for
4401 # example, in the case of _POSIX_SOURCE, which is predefined and required
4402 # on some systems where configure will not decide to define it.
4403 cat >> conftest.vals <<\EOF
4404 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4405 EOF
4406
4407 # Break up conftest.vals because some shells have a limit on
4408 # the size of here documents, and old seds have small limits too.
4409
4410 rm -f conftest.tail
4411 while :
4412 do
4413   ac_lines=`grep -c . conftest.vals`
4414   # grep -c gives empty output for an empty file on some AIX systems.
4415   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4416   # Write a limited-size here document to conftest.frag.
4417   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4418   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4419   echo 'CEOF
4420   sed -f conftest.frag conftest.in > conftest.out
4421   rm -f conftest.in
4422   mv conftest.out conftest.in
4423 ' >> $CONFIG_STATUS
4424   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4425   rm -f conftest.vals
4426   mv conftest.tail conftest.vals
4427 done
4428 rm -f conftest.vals
4429
4430 cat >> $CONFIG_STATUS <<\EOF
4431   rm -f conftest.frag conftest.h
4432   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4433   cat conftest.in >> conftest.h
4434   rm -f conftest.in
4435   if cmp -s $ac_file conftest.h 2>/dev/null; then
4436     echo "$ac_file is unchanged"
4437     rm -f conftest.h
4438   else
4439     # Remove last slash and all that follows it.  Not all systems have dirname.
4440       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4441       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4442       # The file is in a subdirectory.
4443       test ! -d "$ac_dir" && mkdir "$ac_dir"
4444     fi
4445     rm -f $ac_file
4446     mv conftest.h $ac_file
4447   fi
4448 fi; done
4449
4450 EOF
4451 cat >> $CONFIG_STATUS <<EOF
4452
4453
4454 EOF
4455 cat >> $CONFIG_STATUS <<\EOF
4456 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4457
4458 exit 0
4459 EOF
4460 chmod +x $CONFIG_STATUS
4461 rm -fr confdefs* $ac_clean_files
4462 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4463