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