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