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