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