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