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