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