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