r612: *** 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
2237 if test "$zlib" = "true" ; then
2238   echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6
2239 echo "configure:2240: checking for main in -lpng" >&5
2240 ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'`
2241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2242   echo $ac_n "(cached) $ac_c" 1>&6
2243 else
2244   ac_save_LIBS="$LIBS"
2245 LIBS="-lpng  $LIBS"
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249
2250 int main() {
2251 main()
2252 ; return 0; }
2253 EOF
2254 if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2255   rm -rf conftest*
2256   eval "ac_cv_lib_$ac_lib_var=yes"
2257 else
2258   echo "configure: failed program was:" >&5
2259   cat conftest.$ac_ext >&5
2260   rm -rf conftest*
2261   eval "ac_cv_lib_$ac_lib_var=no"
2262 fi
2263 rm -f conftest*
2264 LIBS="$ac_save_LIBS"
2265
2266 fi
2267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2268   echo "$ac_t""yes" 1>&6
2269   png=true ; cat >> confdefs.h <<\EOF
2270 #define HAVE_PNG 1
2271 EOF
2272
2273 else
2274   echo "$ac_t""no" 1>&6
2275 png=false
2276 fi
2277
2278 fi
2279
2280 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2281 echo "configure:2282: checking how to run the C preprocessor" >&5
2282 # On Suns, sometimes $CPP names a directory.
2283 if test -n "$CPP" && test -d "$CPP"; then
2284   CPP=
2285 fi
2286 if test -z "$CPP"; then
2287 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2288   echo $ac_n "(cached) $ac_c" 1>&6
2289 else
2290     # This must be in double quotes, not single quotes, because CPP may get
2291   # substituted into the Makefile and "${CC-cc}" will confuse make.
2292   CPP="${CC-cc} -E"
2293   # On the NeXT, cc -E runs the code through the compiler's parser,
2294   # not just through cpp.
2295   cat > conftest.$ac_ext <<EOF
2296 #line 2297 "configure"
2297 #include "confdefs.h"
2298 #include <assert.h>
2299 Syntax Error
2300 EOF
2301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2302 { (eval echo configure:2303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2304 if test -z "$ac_err"; then
2305   :
2306 else
2307   echo "$ac_err" >&5
2308   echo "configure: failed program was:" >&5
2309   cat conftest.$ac_ext >&5
2310   rm -rf conftest*
2311   CPP="${CC-cc} -E -traditional-cpp"
2312   cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 #include <assert.h>
2316 Syntax Error
2317 EOF
2318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2319 { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321 if test -z "$ac_err"; then
2322   :
2323 else
2324   echo "$ac_err" >&5
2325   echo "configure: failed program was:" >&5
2326   cat conftest.$ac_ext >&5
2327   rm -rf conftest*
2328   CPP="${CC-cc} -nologo -E"
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <assert.h>
2333 Syntax Error
2334 EOF
2335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2336 { (eval echo configure:2337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2338 if test -z "$ac_err"; then
2339   :
2340 else
2341   echo "$ac_err" >&5
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   CPP=/lib/cpp
2346 fi
2347 rm -f conftest*
2348 fi
2349 rm -f conftest*
2350 fi
2351 rm -f conftest*
2352   ac_cv_prog_CPP="$CPP"
2353 fi
2354   CPP="$ac_cv_prog_CPP"
2355 else
2356   ac_cv_prog_CPP="$CPP"
2357 fi
2358 echo "$ac_t""$CPP" 1>&6
2359
2360 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2361 echo "configure:2362: checking for ANSI C header files" >&5
2362 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2363   echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365   cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #include <stdlib.h>
2369 #include <stdarg.h>
2370 #include <string.h>
2371 #include <float.h>
2372 EOF
2373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2374 { (eval echo configure:2375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2376 if test -z "$ac_err"; then
2377   rm -rf conftest*
2378   ac_cv_header_stdc=yes
2379 else
2380   echo "$ac_err" >&5
2381   echo "configure: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   rm -rf conftest*
2384   ac_cv_header_stdc=no
2385 fi
2386 rm -f conftest*
2387
2388 if test $ac_cv_header_stdc = yes; then
2389   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393 #include <string.h>
2394 EOF
2395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2396   egrep "memchr" >/dev/null 2>&1; then
2397   :
2398 else
2399   rm -rf conftest*
2400   ac_cv_header_stdc=no
2401 fi
2402 rm -f conftest*
2403
2404 fi
2405
2406 if test $ac_cv_header_stdc = yes; then
2407   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2408 cat > conftest.$ac_ext <<EOF
2409 #line 2410 "configure"
2410 #include "confdefs.h"
2411 #include <stdlib.h>
2412 EOF
2413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2414   egrep "free" >/dev/null 2>&1; then
2415   :
2416 else
2417   rm -rf conftest*
2418   ac_cv_header_stdc=no
2419 fi
2420 rm -f conftest*
2421
2422 fi
2423
2424 if test $ac_cv_header_stdc = yes; then
2425   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2426 if test "$cross_compiling" = yes; then
2427   :
2428 else
2429   cat > conftest.$ac_ext <<EOF
2430 #line 2431 "configure"
2431 #include "confdefs.h"
2432 #include <ctype.h>
2433 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2434 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2435 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2436 int main () { int i; for (i = 0; i < 256; i++)
2437 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2438 exit (0); }
2439
2440 EOF
2441 if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2442 then
2443   :
2444 else
2445   echo "configure: failed program was:" >&5
2446   cat conftest.$ac_ext >&5
2447   rm -fr conftest*
2448   ac_cv_header_stdc=no
2449 fi
2450 rm -fr conftest*
2451 fi
2452
2453 fi
2454 fi
2455
2456 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2457 if test $ac_cv_header_stdc = yes; then
2458   cat >> confdefs.h <<\EOF
2459 #define STDC_HEADERS 1
2460 EOF
2461
2462 fi
2463
2464 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
2465 do
2466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2468 echo "configure:2469: checking for $ac_hdr" >&5
2469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 #include <$ac_hdr>
2476 EOF
2477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2478 { (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2480 if test -z "$ac_err"; then
2481   rm -rf conftest*
2482   eval "ac_cv_header_$ac_safe=yes"
2483 else
2484   echo "$ac_err" >&5
2485   echo "configure: failed program was:" >&5
2486   cat conftest.$ac_ext >&5
2487   rm -rf conftest*
2488   eval "ac_cv_header_$ac_safe=no"
2489 fi
2490 rm -f conftest*
2491 fi
2492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2493   echo "$ac_t""yes" 1>&6
2494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2495   cat >> confdefs.h <<EOF
2496 #define $ac_tr_hdr 1
2497 EOF
2498  
2499 else
2500   echo "$ac_t""no" 1>&6
2501 fi
2502 done
2503
2504
2505 echo $ac_n "checking for working const""... $ac_c" 1>&6
2506 echo "configure:2507: checking for working const" >&5
2507 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2508   echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510   cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513
2514 int main() {
2515
2516 /* Ultrix mips cc rejects this.  */
2517 typedef int charset[2]; const charset x;
2518 /* SunOS 4.1.1 cc rejects this.  */
2519 char const *const *ccp;
2520 char **p;
2521 /* NEC SVR4.0.2 mips cc rejects this.  */
2522 struct point {int x, y;};
2523 static struct point const zero = {0,0};
2524 /* AIX XL C 1.02.0.0 rejects this.
2525    It does not let you subtract one const X* pointer from another in an arm
2526    of an if-expression whose if-part is not a constant expression */
2527 const char *g = "string";
2528 ccp = &g + (g ? g-g : 0);
2529 /* HPUX 7.0 cc rejects these. */
2530 ++ccp;
2531 p = (char**) ccp;
2532 ccp = (char const *const *) p;
2533 { /* SCO 3.2v4 cc rejects this.  */
2534   char *t;
2535   char const *s = 0 ? (char *) 0 : (char const *) 0;
2536
2537   *t++ = 0;
2538 }
2539 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2540   int x[] = {25, 17};
2541   const int *foo = &x[0];
2542   ++foo;
2543 }
2544 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2545   typedef const int *iptr;
2546   iptr p = 0;
2547   ++p;
2548 }
2549 { /* AIX XL C 1.02.0.0 rejects this saying
2550      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2551   struct s { int j; const int *ap[3]; };
2552   struct s *b; b->j = 5;
2553 }
2554 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2555   const int foo = 10;
2556 }
2557
2558 ; return 0; }
2559 EOF
2560 if { (eval echo configure:2561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2561   rm -rf conftest*
2562   ac_cv_c_const=yes
2563 else
2564   echo "configure: failed program was:" >&5
2565   cat conftest.$ac_ext >&5
2566   rm -rf conftest*
2567   ac_cv_c_const=no
2568 fi
2569 rm -f conftest*
2570 fi
2571
2572 echo "$ac_t""$ac_cv_c_const" 1>&6
2573 if test $ac_cv_c_const = no; then
2574   cat >> confdefs.h <<\EOF
2575 #define const 
2576 EOF
2577
2578 fi
2579
2580 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2581 echo "configure:2582: checking for off_t" >&5
2582 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 #include <sys/types.h>
2589 #if STDC_HEADERS
2590 #include <stdlib.h>
2591 #include <stddef.h>
2592 #endif
2593 EOF
2594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2595   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2596   rm -rf conftest*
2597   ac_cv_type_off_t=yes
2598 else
2599   rm -rf conftest*
2600   ac_cv_type_off_t=no
2601 fi
2602 rm -f conftest*
2603
2604 fi
2605 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2606 if test $ac_cv_type_off_t = no; then
2607   cat >> confdefs.h <<\EOF
2608 #define off_t long
2609 EOF
2610
2611 fi
2612
2613 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2614 echo "configure:2615: checking for size_t" >&5
2615 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   cat > conftest.$ac_ext <<EOF
2619 #line 2620 "configure"
2620 #include "confdefs.h"
2621 #include <sys/types.h>
2622 #if STDC_HEADERS
2623 #include <stdlib.h>
2624 #include <stddef.h>
2625 #endif
2626 EOF
2627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2628   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2629   rm -rf conftest*
2630   ac_cv_type_size_t=yes
2631 else
2632   rm -rf conftest*
2633   ac_cv_type_size_t=no
2634 fi
2635 rm -f conftest*
2636
2637 fi
2638 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2639 if test $ac_cv_type_size_t = no; then
2640   cat >> confdefs.h <<\EOF
2641 #define size_t unsigned
2642 EOF
2643
2644 fi
2645
2646 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2647 echo "configure:2648: checking whether struct tm is in sys/time.h or time.h" >&5
2648 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2649   echo $ac_n "(cached) $ac_c" 1>&6
2650 else
2651   cat > conftest.$ac_ext <<EOF
2652 #line 2653 "configure"
2653 #include "confdefs.h"
2654 #include <sys/types.h>
2655 #include <time.h>
2656 int main() {
2657 struct tm *tp; tp->tm_sec;
2658 ; return 0; }
2659 EOF
2660 if { (eval echo configure:2661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2661   rm -rf conftest*
2662   ac_cv_struct_tm=time.h
2663 else
2664   echo "configure: failed program was:" >&5
2665   cat conftest.$ac_ext >&5
2666   rm -rf conftest*
2667   ac_cv_struct_tm=sys/time.h
2668 fi
2669 rm -f conftest*
2670 fi
2671
2672 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2673 if test $ac_cv_struct_tm = sys/time.h; then
2674   cat >> confdefs.h <<\EOF
2675 #define TM_IN_SYS_TIME 1
2676 EOF
2677
2678 fi
2679
2680
2681 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2682 echo "configure:2683: checking for vprintf" >&5
2683 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 /* System header to define __stub macros and hopefully few prototypes,
2690     which can conflict with char vprintf(); below.  */
2691 #include <assert.h>
2692 /* Override any gcc2 internal prototype to avoid an error.  */
2693 /* We use char because int might match the return type of a gcc2
2694     builtin and then its argument prototype would still apply.  */
2695 char vprintf();
2696
2697 int main() {
2698
2699 /* The GNU C library defines this for functions which it implements
2700     to always fail with ENOSYS.  Some functions are actually named
2701     something starting with __ and the normal name is an alias.  */
2702 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2703 choke me
2704 #else
2705 vprintf();
2706 #endif
2707
2708 ; return 0; }
2709 EOF
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2711   rm -rf conftest*
2712   eval "ac_cv_func_vprintf=yes"
2713 else
2714   echo "configure: failed program was:" >&5
2715   cat conftest.$ac_ext >&5
2716   rm -rf conftest*
2717   eval "ac_cv_func_vprintf=no"
2718 fi
2719 rm -f conftest*
2720 fi
2721
2722 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2723   echo "$ac_t""yes" 1>&6
2724   cat >> confdefs.h <<\EOF
2725 #define HAVE_VPRINTF 1
2726 EOF
2727
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732 if test "$ac_cv_func_vprintf" != yes; then
2733 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2734 echo "configure:2735: checking for _doprnt" >&5
2735 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2736   echo $ac_n "(cached) $ac_c" 1>&6
2737 else
2738   cat > conftest.$ac_ext <<EOF
2739 #line 2740 "configure"
2740 #include "confdefs.h"
2741 /* System header to define __stub macros and hopefully few prototypes,
2742     which can conflict with char _doprnt(); below.  */
2743 #include <assert.h>
2744 /* Override any gcc2 internal prototype to avoid an error.  */
2745 /* We use char because int might match the return type of a gcc2
2746     builtin and then its argument prototype would still apply.  */
2747 char _doprnt();
2748
2749 int main() {
2750
2751 /* The GNU C library defines this for functions which it implements
2752     to always fail with ENOSYS.  Some functions are actually named
2753     something starting with __ and the normal name is an alias.  */
2754 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2755 choke me
2756 #else
2757 _doprnt();
2758 #endif
2759
2760 ; return 0; }
2761 EOF
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763   rm -rf conftest*
2764   eval "ac_cv_func__doprnt=yes"
2765 else
2766   echo "configure: failed program was:" >&5
2767   cat conftest.$ac_ext >&5
2768   rm -rf conftest*
2769   eval "ac_cv_func__doprnt=no"
2770 fi
2771 rm -f conftest*
2772 fi
2773
2774 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2775   echo "$ac_t""yes" 1>&6
2776   cat >> confdefs.h <<\EOF
2777 #define HAVE_DOPRNT 1
2778 EOF
2779
2780 else
2781   echo "$ac_t""no" 1>&6
2782 fi
2783
2784 fi
2785
2786 for ac_func in strtod strtol snprintf htonl usleep vsprintf vsnprintf
2787 do
2788 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2789 echo "configure:2790: checking for $ac_func" >&5
2790 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793   cat > conftest.$ac_ext <<EOF
2794 #line 2795 "configure"
2795 #include "confdefs.h"
2796 /* System header to define __stub macros and hopefully few prototypes,
2797     which can conflict with char $ac_func(); below.  */
2798 #include <assert.h>
2799 /* Override any gcc2 internal prototype to avoid an error.  */
2800 /* We use char because int might match the return type of a gcc2
2801     builtin and then its argument prototype would still apply.  */
2802 char $ac_func();
2803
2804 int main() {
2805
2806 /* The GNU C library defines this for functions which it implements
2807     to always fail with ENOSYS.  Some functions are actually named
2808     something starting with __ and the normal name is an alias.  */
2809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2810 choke me
2811 #else
2812 $ac_func();
2813 #endif
2814
2815 ; return 0; }
2816 EOF
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818   rm -rf conftest*
2819   eval "ac_cv_func_$ac_func=yes"
2820 else
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823   rm -rf conftest*
2824   eval "ac_cv_func_$ac_func=no"
2825 fi
2826 rm -f conftest*
2827 fi
2828
2829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2830   echo "$ac_t""yes" 1>&6
2831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2832   cat >> confdefs.h <<EOF
2833 #define $ac_tr_func 1
2834 EOF
2835  
2836 else
2837   echo "$ac_t""no" 1>&6
2838 fi
2839 done
2840
2841 echo $ac_n "checking for basename""... $ac_c" 1>&6
2842 echo "configure:2843: checking for basename" >&5
2843 if eval "test \"`echo '$''{'ac_cv_func_basename'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   cat > conftest.$ac_ext <<EOF
2847 #line 2848 "configure"
2848 #include "confdefs.h"
2849 /* System header to define __stub macros and hopefully few prototypes,
2850     which can conflict with char basename(); below.  */
2851 #include <assert.h>
2852 /* Override any gcc2 internal prototype to avoid an error.  */
2853 /* We use char because int might match the return type of a gcc2
2854     builtin and then its argument prototype would still apply.  */
2855 char basename();
2856
2857 int main() {
2858
2859 /* The GNU C library defines this for functions which it implements
2860     to always fail with ENOSYS.  Some functions are actually named
2861     something starting with __ and the normal name is an alias.  */
2862 #if defined (__stub_basename) || defined (__stub___basename)
2863 choke me
2864 #else
2865 basename();
2866 #endif
2867
2868 ; return 0; }
2869 EOF
2870 if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2871   rm -rf conftest*
2872   eval "ac_cv_func_basename=yes"
2873 else
2874   echo "configure: failed program was:" >&5
2875   cat conftest.$ac_ext >&5
2876   rm -rf conftest*
2877   eval "ac_cv_func_basename=no"
2878 fi
2879 rm -f conftest*
2880 fi
2881
2882 if eval "test \"`echo '$ac_cv_func_'basename`\" = yes"; then
2883   echo "$ac_t""yes" 1>&6
2884   :
2885 else
2886   echo "$ac_t""no" 1>&6
2887 fi
2888
2889 echo $ac_n "checking for setjmp""... $ac_c" 1>&6
2890 echo "configure:2891: checking for setjmp" >&5
2891 if eval "test \"`echo '$''{'ac_cv_func_setjmp'+set}'`\" = set"; then
2892   echo $ac_n "(cached) $ac_c" 1>&6
2893 else
2894   cat > conftest.$ac_ext <<EOF
2895 #line 2896 "configure"
2896 #include "confdefs.h"
2897 /* System header to define __stub macros and hopefully few prototypes,
2898     which can conflict with char setjmp(); below.  */
2899 #include <assert.h>
2900 /* Override any gcc2 internal prototype to avoid an error.  */
2901 /* We use char because int might match the return type of a gcc2
2902     builtin and then its argument prototype would still apply.  */
2903 char setjmp();
2904
2905 int main() {
2906
2907 /* The GNU C library defines this for functions which it implements
2908     to always fail with ENOSYS.  Some functions are actually named
2909     something starting with __ and the normal name is an alias.  */
2910 #if defined (__stub_setjmp) || defined (__stub___setjmp)
2911 choke me
2912 #else
2913 setjmp();
2914 #endif
2915
2916 ; return 0; }
2917 EOF
2918 if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2919   rm -rf conftest*
2920   eval "ac_cv_func_setjmp=yes"
2921 else
2922   echo "configure: failed program was:" >&5
2923   cat conftest.$ac_ext >&5
2924   rm -rf conftest*
2925   eval "ac_cv_func_setjmp=no"
2926 fi
2927 rm -f conftest*
2928 fi
2929
2930 if eval "test \"`echo '$ac_cv_func_'setjmp`\" = yes"; then
2931   echo "$ac_t""yes" 1>&6
2932   :
2933 else
2934   echo "$ac_t""no" 1>&6
2935 fi
2936
2937 echo $ac_n "checking for setpriority""... $ac_c" 1>&6
2938 echo "configure:2939: checking for setpriority" >&5
2939 if eval "test \"`echo '$''{'ac_cv_func_setpriority'+set}'`\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945 /* System header to define __stub macros and hopefully few prototypes,
2946     which can conflict with char setpriority(); below.  */
2947 #include <assert.h>
2948 /* Override any gcc2 internal prototype to avoid an error.  */
2949 /* We use char because int might match the return type of a gcc2
2950     builtin and then its argument prototype would still apply.  */
2951 char setpriority();
2952
2953 int main() {
2954
2955 /* The GNU C library defines this for functions which it implements
2956     to always fail with ENOSYS.  Some functions are actually named
2957     something starting with __ and the normal name is an alias.  */
2958 #if defined (__stub_setpriority) || defined (__stub___setpriority)
2959 choke me
2960 #else
2961 setpriority();
2962 #endif
2963
2964 ; return 0; }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2967   rm -rf conftest*
2968   eval "ac_cv_func_setpriority=yes"
2969 else
2970   echo "configure: failed program was:" >&5
2971   cat conftest.$ac_ext >&5
2972   rm -rf conftest*
2973   eval "ac_cv_func_setpriority=no"
2974 fi
2975 rm -f conftest*
2976 fi
2977
2978 if eval "test \"`echo '$ac_cv_func_'setpriority`\" = yes"; then
2979   echo "$ac_t""yes" 1>&6
2980   :
2981 else
2982   echo "$ac_t""no" 1>&6
2983 fi
2984
2985 echo $ac_n "checking for time""... $ac_c" 1>&6
2986 echo "configure:2987: checking for time" >&5
2987 if eval "test \"`echo '$''{'ac_cv_func_time'+set}'`\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 /* System header to define __stub macros and hopefully few prototypes,
2994     which can conflict with char time(); below.  */
2995 #include <assert.h>
2996 /* Override any gcc2 internal prototype to avoid an error.  */
2997 /* We use char because int might match the return type of a gcc2
2998     builtin and then its argument prototype would still apply.  */
2999 char time();
3000
3001 int main() {
3002
3003 /* The GNU C library defines this for functions which it implements
3004     to always fail with ENOSYS.  Some functions are actually named
3005     something starting with __ and the normal name is an alias.  */
3006 #if defined (__stub_time) || defined (__stub___time)
3007 choke me
3008 #else
3009 time();
3010 #endif
3011
3012 ; return 0; }
3013 EOF
3014 if { (eval echo configure:3015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3015   rm -rf conftest*
3016   eval "ac_cv_func_time=yes"
3017 else
3018   echo "configure: failed program was:" >&5
3019   cat conftest.$ac_ext >&5
3020   rm -rf conftest*
3021   eval "ac_cv_func_time=no"
3022 fi
3023 rm -f conftest*
3024 fi
3025
3026 if eval "test \"`echo '$ac_cv_func_'time`\" = yes"; then
3027   echo "$ac_t""yes" 1>&6
3028   :
3029 else
3030   echo "$ac_t""no" 1>&6
3031 fi
3032
3033 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
3034 echo "configure:3035: checking for gettimeofday" >&5
3035 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3036   echo $ac_n "(cached) $ac_c" 1>&6
3037 else
3038   cat > conftest.$ac_ext <<EOF
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3041 /* System header to define __stub macros and hopefully few prototypes,
3042     which can conflict with char gettimeofday(); below.  */
3043 #include <assert.h>
3044 /* Override any gcc2 internal prototype to avoid an error.  */
3045 /* We use char because int might match the return type of a gcc2
3046     builtin and then its argument prototype would still apply.  */
3047 char gettimeofday();
3048
3049 int main() {
3050
3051 /* The GNU C library defines this for functions which it implements
3052     to always fail with ENOSYS.  Some functions are actually named
3053     something starting with __ and the normal name is an alias.  */
3054 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3055 choke me
3056 #else
3057 gettimeofday();
3058 #endif
3059
3060 ; return 0; }
3061 EOF
3062 if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3063   rm -rf conftest*
3064   eval "ac_cv_func_gettimeofday=yes"
3065 else
3066   echo "configure: failed program was:" >&5
3067   cat conftest.$ac_ext >&5
3068   rm -rf conftest*
3069   eval "ac_cv_func_gettimeofday=no"
3070 fi
3071 rm -f conftest*
3072 fi
3073
3074 if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
3075   echo "$ac_t""yes" 1>&6
3076   :
3077 else
3078   echo "$ac_t""no" 1>&6
3079 fi
3080
3081
3082 if test "${OSTYPE}" = "cygwin" ; then
3083   getopt_long=false
3084 else
3085   echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
3086 echo "configure:3087: checking for getopt_long" >&5
3087 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3093 /* System header to define __stub macros and hopefully few prototypes,
3094     which can conflict with char getopt_long(); below.  */
3095 #include <assert.h>
3096 /* Override any gcc2 internal prototype to avoid an error.  */
3097 /* We use char because int might match the return type of a gcc2
3098     builtin and then its argument prototype would still apply.  */
3099 char getopt_long();
3100
3101 int main() {
3102
3103 /* The GNU C library defines this for functions which it implements
3104     to always fail with ENOSYS.  Some functions are actually named
3105     something starting with __ and the normal name is an alias.  */
3106 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
3107 choke me
3108 #else
3109 getopt_long();
3110 #endif
3111
3112 ; return 0; }
3113 EOF
3114 if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3115   rm -rf conftest*
3116   eval "ac_cv_func_getopt_long=yes"
3117 else
3118   echo "configure: failed program was:" >&5
3119   cat conftest.$ac_ext >&5
3120   rm -rf conftest*
3121   eval "ac_cv_func_getopt_long=no"
3122 fi
3123 rm -f conftest*
3124 fi
3125
3126 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
3127   echo "$ac_t""yes" 1>&6
3128    getopt_long=true 
3129 else
3130   echo "$ac_t""no" 1>&6
3131  getopt_long=false 
3132 fi
3133
3134 fi
3135
3136 if test "${getopt_long}" = "false" ; then
3137   my_includes="$my_includes -I../getopt"
3138   cat >> confdefs.h <<\EOF
3139 #define HAVE_GETOPT_LONG 1
3140 EOF
3141
3142   ctlibs_base="$ctlibs_base -lgetopt"
3143   LDFLAGS="$LDFLAGS -L../getopt"
3144   
3145
3146 if test 1==1; then
3147   INCLUDED_GETOPT_LONG_TRUE=
3148   INCLUDED_GETOPT_LONG_FALSE='#'
3149 else
3150   INCLUDED_GETOPT_LONG_TRUE='#'
3151   INCLUDED_GETOPT_LONG_FALSE=
3152 fi
3153 fi
3154
3155 if test "${readline}" = "true" ; then
3156   ctlibs_base="$ctlibs_base -lreadline"
3157   if test "${ncurses}" = "true"; then
3158     ctlibs_base="$ctlibs_base -lncurses"
3159   elif test "${curses}" = "true"; then
3160     ctlibs_base="$ctlibs_base -lcurses"
3161   fi
3162 fi
3163
3164 echo $ac_n "checking debug""... $ac_c" 1>&6
3165 echo "configure:3166: checking debug" >&5
3166 # Check whether --enable-debug or --disable-debug was given.
3167 if test "${enable_debug+set}" = set; then
3168   enableval="$enable_debug"
3169   case "${enableval}" in
3170   yes) debug=true 
3171        echo "$ac_t""yes" 1>&6
3172        ;;
3173   no)  debug=false 
3174        echo "$ac_t""no" 1>&6
3175        ;;
3176   *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
3177        ;;
3178 esac
3179 else
3180   debug=false; echo "$ac_t""no" 1>&6
3181 fi
3182
3183
3184
3185 if test "$debug" = "true"; then
3186   DEBUG_TRUE=
3187   DEBUG_FALSE='#'
3188 else
3189   DEBUG_TRUE='#'
3190   DEBUG_FALSE=
3191 fi
3192
3193 if test "$debug" = "true" ; then
3194   CFLAGS="-g -DDEBUG"
3195   cat >> confdefs.h <<\EOF
3196 #define DEBUG 1
3197 EOF
3198
3199 else
3200   CFLAGS="-O3 -DNDEBUG -fomit-frame-pointer"
3201   cat >> confdefs.h <<\EOF
3202 #define NDEBUG 1
3203 EOF
3204
3205 fi
3206
3207 echo $ac_n "checking sstream""... $ac_c" 1>&6
3208 echo "configure:3209: checking sstream" >&5
3209  if  test -f /usr/include/sstream || test -f /usr/include/g++/sstream ||
3210      test -f /usr/include/g++-2/sstream || test -f /usr/include/g++-3/sstream ; then
3211   cat >> confdefs.h <<\EOF
3212 #define HAVE_SSTREAM 1
3213 EOF
3214
3215   echo "$ac_t""yes" 1>&6
3216 fi
3217 echo "$ac_t""no" 1>&6
3218
3219
3220
3221  if test -n "$GCC"; then
3222     CFLAGS="$CFLAGS -Wall"
3223  fi
3224  
3225 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
3226 echo "configure:3227: checking whether to enable verbose warnings" >&5
3227 # Check whether --enable-verbose-warnings or --disable-verbose-warnings was given.
3228 if test "${enable_verbose_warnings+set}" = set; then
3229   enableval="$enable_verbose_warnings"
3230    case "$enableval" in
3231   yes)
3232     echo "$ac_t""yes" 1>&6
3233     
3234  if test -n "$GCC"; then
3235     CFLAGS="$CFLAGS -W"
3236  fi
3237  
3238     
3239  if test -n "$GCC"; then
3240     CFLAGS="$CFLAGS -Wshadow -Wpointer-arith -Wbad-function-cast"
3241  fi
3242  
3243     
3244  if test -n "$GCC"; then
3245     CFLAGS="$CFLAGS -Wcast-align -Wwrite-strings -Waggregate-return"
3246  fi
3247  
3248     
3249  if test -n "$GCC"; then
3250     CFLAGS="$CFLAGS -Wmissing-prototypes -Wstrict-prototypes"
3251  fi
3252  
3253     
3254  if test -n "$GCC"; then
3255     CFLAGS="$CFLAGS -pedantic"
3256  fi
3257  
3258     
3259  if test -n "$GCC"; then
3260     CFLAGS="$CFLAGS -Wredundant-decls"
3261  fi
3262  
3263
3264     ;;
3265   *)
3266     echo "$ac_t""no" 1>&6
3267     ;;
3268   esac 
3269 else
3270   echo "$ac_t""no" 1>&6
3271
3272 fi
3273
3274
3275 echo $ac_n "checking static executables""... $ac_c" 1>&6
3276 echo "configure:3277: checking static executables" >&5
3277 # Check whether --enable-static or --disable-static was given.
3278 if test "${enable_static+set}" = set; then
3279   enableval="$enable_static"
3280    case "$enableval" in
3281   yes)
3282     echo "$ac_t""yes" 1>&6
3283     
3284  if test -n "$GCC"; then
3285     CFLAGS="$CFLAGS --static"
3286  fi
3287  
3288     ;;
3289   *)
3290     echo "$ac_t""no" 1>&6
3291     ;;
3292   esac 
3293 else
3294   echo "$ac_t""no" 1>&6
3295
3296 fi
3297
3298
3299 # Check whether --with-lam or --without-lam was given.
3300 if test "${with_lam+set}" = set; then
3301   withval="$with_lam"
3302       if test "$withval" != "no" ; then
3303          trylamdir=$withval
3304      fi 
3305
3306 fi
3307
3308
3309 if test "$withval" != "no" ; then
3310   if test "$prefix" != "NONE" ; then
3311      trylamdir="$trylamdir $prefix"
3312   fi
3313
3314   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
3315 echo "configure:3316: checking for LAM MPI installation" >&5
3316   for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do
3317     if test -x "$testlamdir/bin/hcp" ; then
3318       if test "$testlamdir" != "/usr"; then     
3319         LDFLAGS="$LDFLAGS -L$testlamdir/lib"
3320         CFLAGS="$CFLAGS -I$testlamdir/include"
3321       fi
3322       CFLAGS="$CFLAGS -I$testlamdir/include/mpi2c++"
3323       lamdir="$testlamdir"
3324       
3325       mpienable="true"
3326       
3327       break
3328     fi
3329   done
3330   echo "$ac_t""$lamdir" 1>&6
3331 else
3332   echo "$ac_t""no" 1>&6
3333 fi
3334
3335
3336 # Check whether --with-ctn or --without-ctn was given.
3337 if test "${with_ctn+set}" = set; then
3338   withval="$with_ctn"
3339       if test "$withval" != "no" ; then
3340          tryctndir=$withval
3341      fi 
3342
3343 fi
3344
3345
3346 if test "$withval" != "no" ; then
3347   if test "$prefix" != "NONE" ; then
3348      tryctndir="$tryctndir $prefix"
3349   fi
3350
3351   echo $ac_n "checking for CTN DICOM installation""... $ac_c" 1>&6
3352 echo "configure:3353: checking for CTN DICOM installation" >&5
3353   for testctndir in "." $tryctndir /usr/local /usr/local/ctn /usr /usr/ctn /opt /opt/ctn ; do
3354     if test -f "$testctndir/lib/libctn.a" ; then
3355       if test "$testctndir" != "/usr"; then     
3356         LDFLAGS="$LDFLAGS -L$testctndir/lib"
3357         CFLAGS="$CFLAGS -I$testctndir/include"
3358       fi
3359       ctndir="$testctndir"
3360       ctn="true"
3361       cat >> confdefs.h <<\EOF
3362 #define HAVE_CTN_DICOM 1
3363 EOF
3364
3365       break
3366     fi
3367   done
3368   echo "$ac_t""$ctndir" 1>&6
3369 else
3370   echo "$ac_t""no" 1>&6
3371 fi
3372
3373
3374
3375 echo $ac_n "checking for web access""... $ac_c" 1>&6
3376 echo "configure:3377: checking for web access" >&5
3377 # Check whether --with-cgibin-dir or --without-cgibin-dir was given.
3378 if test "${with_cgibin_dir+set}" = set; then
3379   withval="$with_cgibin_dir"
3380    cgibindir=$withval ;   
3381 fi
3382
3383
3384 # Check whether --with-cgibin-url or --without-cgibin-url was given.
3385 if test "${with_cgibin_url+set}" = set; then
3386   withval="$with_cgibin_url"
3387    cgibinurl=$withval ;   
3388 fi
3389
3390
3391 # Check whether --with-webdata-dir or --without-webdata-dir was given.
3392 if test "${with_webdata_dir+set}" = set; then
3393   withval="$with_webdata_dir"
3394    webdatadir=$withval ;    
3395 fi
3396
3397
3398 # Check whether --with-webdata-url or --without-webdata-url was given.
3399 if test "${with_webdata_url+set}" = set; then
3400   withval="$with_webdata_url"
3401    webdataurl=$withval ;   
3402 fi
3403
3404
3405 # Check whether --with-html-dir or --without-html-dir was given.
3406 if test "${with_html_dir+set}" = set; then
3407   withval="$with_html_dir"
3408    htmldir=$withval ;   
3409 fi
3410
3411
3412 if test -n "$cgibindir" -o -n "$cgibinurl" ; then
3413   cgiprograms="ctsim.cgi ctsim.conf"
3414   
3415 fi
3416
3417 if test -n "$htmldir" ; then
3418   htmldata=simulate.html
3419   
3420 fi
3421
3422
3423 if test -n "$htmldir"; then
3424   USE_HTML_TRUE=
3425   USE_HTML_FALSE='#'
3426 else
3427   USE_HTML_TRUE='#'
3428   USE_HTML_FALSE=
3429 fi
3430
3431 if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$htmldir" ; then
3432   webenabled=true
3433   
3434   echo "$ac_t""yes" 1>&6
3435   if test -z "$cgibindir" ; then
3436     { echo "configure: error: --with-cgibin-dir not set for web access" 1>&2; exit 1; }
3437   elif test -z "$cgibinurl" ; then
3438     { echo "configure: error: --with-cgibin-url not set for web access" 1>&2; exit 1; }
3439   elif test -z "$webdatadir" ; then
3440     { echo "configure: error: --with-webdata-dir not set for web access" 1>&2; exit 1; }
3441   elif test -z "$webdataurl" ; then
3442     { echo "configure: error: --with-webdata-url not set for web access" 1>&2; exit 1; }
3443   elif test -z "$htmldir" ; then
3444     { echo "configure: error: --with-html-dir not set for web access" 1>&2; exit 1; }
3445   fi
3446 else
3447   echo "$ac_t""no" 1>&6
3448 fi
3449
3450
3451
3452 if test -n "$lamdir"; then
3453   USE_LAM_TRUE=
3454   USE_LAM_FALSE='#'
3455 else
3456   USE_LAM_TRUE='#'
3457   USE_LAM_FALSE=
3458 fi
3459
3460
3461 # If we find X, set shell vars x_includes and x_libraries to the
3462 # paths, otherwise set no_x=yes.
3463 # Uses ac_ vars as temps to allow command line to override cache and checks.
3464 # --without-x overrides everything else, but does not touch the cache.
3465 echo $ac_n "checking for X""... $ac_c" 1>&6
3466 echo "configure:3467: checking for X" >&5
3467
3468 # Check whether --with-x or --without-x was given.
3469 if test "${with_x+set}" = set; then
3470   withval="$with_x"
3471   :
3472 fi
3473
3474 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3475 if test "x$with_x" = xno; then
3476   # The user explicitly disabled X.
3477   have_x=disabled
3478 else
3479   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3480     # Both variables are already set.
3481     have_x=yes
3482   else
3483 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   # One or both of the vars are not set, and there is no cached value.
3487 ac_x_includes=NO ac_x_libraries=NO
3488 rm -fr conftestdir
3489 if mkdir conftestdir; then
3490   cd conftestdir
3491   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3492   cat > Imakefile <<'EOF'
3493 acfindx:
3494         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3495 EOF
3496   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3497     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3498     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3499     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3500     for ac_extension in a so sl; do
3501       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3502         test -f $ac_im_libdir/libX11.$ac_extension; then
3503         ac_im_usrlibdir=$ac_im_libdir; break
3504       fi
3505     done
3506     # Screen out bogus values from the imake configuration.  They are
3507     # bogus both because they are the default anyway, and because
3508     # using them would break gcc on systems where it needs fixed includes.
3509     case "$ac_im_incroot" in
3510         /usr/include) ;;
3511         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3512     esac
3513     case "$ac_im_usrlibdir" in
3514         /usr/lib | /lib) ;;
3515         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3516     esac
3517   fi
3518   cd ..
3519   rm -fr conftestdir
3520 fi
3521
3522 if test "$ac_x_includes" = NO; then
3523   # Guess where to find include files, by looking for this one X11 .h file.
3524   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3525
3526   # First, try using that file with no special directory specified.
3527 cat > conftest.$ac_ext <<EOF
3528 #line 3529 "configure"
3529 #include "confdefs.h"
3530 #include <$x_direct_test_include>
3531 EOF
3532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3533 { (eval echo configure:3534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3535 if test -z "$ac_err"; then
3536   rm -rf conftest*
3537   # We can compile using X headers with no special include directory.
3538 ac_x_includes=
3539 else
3540   echo "$ac_err" >&5
3541   echo "configure: failed program was:" >&5
3542   cat conftest.$ac_ext >&5
3543   rm -rf conftest*
3544   # Look for the header file in a standard set of common directories.
3545 # Check X11 before X11Rn because it is often a symlink to the current release.
3546   for ac_dir in               \
3547     /usr/X11/include          \
3548     /usr/X11R6/include        \
3549     /usr/X11R5/include        \
3550     /usr/X11R4/include        \
3551                               \
3552     /usr/include/X11          \
3553     /usr/include/X11R6        \
3554     /usr/include/X11R5        \
3555     /usr/include/X11R4        \
3556                               \
3557     /usr/local/X11/include    \
3558     /usr/local/X11R6/include  \
3559     /usr/local/X11R5/include  \
3560     /usr/local/X11R4/include  \
3561                               \
3562     /usr/local/include/X11    \
3563     /usr/local/include/X11R6  \
3564     /usr/local/include/X11R5  \
3565     /usr/local/include/X11R4  \
3566                               \
3567     /usr/X386/include         \
3568     /usr/x386/include         \
3569     /usr/XFree86/include/X11  \
3570                               \
3571     /usr/include              \
3572     /usr/local/include        \
3573     /usr/unsupported/include  \
3574     /usr/athena/include       \
3575     /usr/local/x11r5/include  \
3576     /usr/lpp/Xamples/include  \
3577                               \
3578     /usr/openwin/include      \
3579     /usr/openwin/share/include \
3580     ; \
3581   do
3582     if test -r "$ac_dir/$x_direct_test_include"; then
3583       ac_x_includes=$ac_dir
3584       break
3585     fi
3586   done
3587 fi
3588 rm -f conftest*
3589 fi # $ac_x_includes = NO
3590
3591 if test "$ac_x_libraries" = NO; then
3592   # Check for the libraries.
3593
3594   test -z "$x_direct_test_library" && x_direct_test_library=Xt
3595   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3596
3597   # See if we find them without any special options.
3598   # Don't add to $LIBS permanently.
3599   ac_save_LIBS="$LIBS"
3600   LIBS="-l$x_direct_test_library $LIBS"
3601 cat > conftest.$ac_ext <<EOF
3602 #line 3603 "configure"
3603 #include "confdefs.h"
3604
3605 int main() {
3606 ${x_direct_test_function}()
3607 ; return 0; }
3608 EOF
3609 if { (eval echo configure:3610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3610   rm -rf conftest*
3611   LIBS="$ac_save_LIBS"
3612 # We can link X programs with no special library path.
3613 ac_x_libraries=
3614 else
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -rf conftest*
3618   LIBS="$ac_save_LIBS"
3619 # First see if replacing the include by lib works.
3620 # Check X11 before X11Rn because it is often a symlink to the current release.
3621 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3622     /usr/X11/lib          \
3623     /usr/X11R6/lib        \
3624     /usr/X11R5/lib        \
3625     /usr/X11R4/lib        \
3626                           \
3627     /usr/lib/X11          \
3628     /usr/lib/X11R6        \
3629     /usr/lib/X11R5        \
3630     /usr/lib/X11R4        \
3631                           \
3632     /usr/local/X11/lib    \
3633     /usr/local/X11R6/lib  \
3634     /usr/local/X11R5/lib  \
3635     /usr/local/X11R4/lib  \
3636                           \
3637     /usr/local/lib/X11    \
3638     /usr/local/lib/X11R6  \
3639     /usr/local/lib/X11R5  \
3640     /usr/local/lib/X11R4  \
3641                           \
3642     /usr/X386/lib         \
3643     /usr/x386/lib         \
3644     /usr/XFree86/lib/X11  \
3645                           \
3646     /usr/lib              \
3647     /usr/local/lib        \
3648     /usr/unsupported/lib  \
3649     /usr/athena/lib       \
3650     /usr/local/x11r5/lib  \
3651     /usr/lpp/Xamples/lib  \
3652     /lib/usr/lib/X11      \
3653                           \
3654     /usr/openwin/lib      \
3655     /usr/openwin/share/lib \
3656     ; \
3657 do
3658   for ac_extension in a so sl; do
3659     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3660       ac_x_libraries=$ac_dir
3661       break 2
3662     fi
3663   done
3664 done
3665 fi
3666 rm -f conftest*
3667 fi # $ac_x_libraries = NO
3668
3669 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3670   # Didn't find X anywhere.  Cache the known absence of X.
3671   ac_cv_have_x="have_x=no"
3672 else
3673   # Record where we found X for the cache.
3674   ac_cv_have_x="have_x=yes \
3675                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3676 fi
3677 fi
3678   fi
3679   eval "$ac_cv_have_x"
3680 fi # $with_x != no
3681
3682 if test "$have_x" != yes; then
3683   echo "$ac_t""$have_x" 1>&6
3684   no_x=yes
3685 else
3686   # If each of the values was on the command line, it overrides each guess.
3687   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3688   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3689   # Update the cache value to reflect the command line values.
3690   ac_cv_have_x="have_x=yes \
3691                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3692   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3693 fi
3694
3695 if test "$no_x" = yes; then
3696   # Not all programs may use this symbol, but it does not hurt to define it.
3697   cat >> confdefs.h <<\EOF
3698 #define X_DISPLAY_MISSING 1
3699 EOF
3700
3701   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3702 else
3703   if test -n "$x_includes"; then
3704     X_CFLAGS="$X_CFLAGS -I$x_includes"
3705   fi
3706
3707   # It would also be nice to do this for all -L options, not just this one.
3708   if test -n "$x_libraries"; then
3709     X_LIBS="$X_LIBS -L$x_libraries"
3710     # For Solaris; some versions of Sun CC require a space after -R and
3711     # others require no space.  Words are not sufficient . . . .
3712     case "`(uname -sr) 2>/dev/null`" in
3713     "SunOS 5"*)
3714       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3715 echo "configure:3716: checking whether -R must be followed by a space" >&5
3716       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3717       cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720
3721 int main() {
3722
3723 ; return 0; }
3724 EOF
3725 if { (eval echo configure:3726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3726   rm -rf conftest*
3727   ac_R_nospace=yes
3728 else
3729   echo "configure: failed program was:" >&5
3730   cat conftest.$ac_ext >&5
3731   rm -rf conftest*
3732   ac_R_nospace=no
3733 fi
3734 rm -f conftest*
3735       if test $ac_R_nospace = yes; then
3736         echo "$ac_t""no" 1>&6
3737         X_LIBS="$X_LIBS -R$x_libraries"
3738       else
3739         LIBS="$ac_xsave_LIBS -R $x_libraries"
3740         cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743
3744 int main() {
3745
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749   rm -rf conftest*
3750   ac_R_space=yes
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -rf conftest*
3755   ac_R_space=no
3756 fi
3757 rm -f conftest*
3758         if test $ac_R_space = yes; then
3759           echo "$ac_t""yes" 1>&6
3760           X_LIBS="$X_LIBS -R $x_libraries"
3761         else
3762           echo "$ac_t""neither works" 1>&6
3763         fi
3764       fi
3765       LIBS="$ac_xsave_LIBS"
3766     esac
3767   fi
3768
3769   # Check for system-dependent libraries X programs must link with.
3770   # Do this before checking for the system-independent R6 libraries
3771   # (-lICE), since we may need -lsocket or whatever for X linking.
3772
3773   if test "$ISC" = yes; then
3774     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3775   else
3776     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3777     # libraries were built with DECnet support.  And karl@cs.umb.edu says
3778     # the Alpha needs dnet_stub (dnet does not exist).
3779     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3780 echo "configure:3781: checking for dnet_ntoa in -ldnet" >&5
3781 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   ac_save_LIBS="$LIBS"
3786 LIBS="-ldnet  $LIBS"
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3790 /* Override any gcc2 internal prototype to avoid an error.  */
3791 /* We use char because int might match the return type of a gcc2
3792     builtin and then its argument prototype would still apply.  */
3793 char dnet_ntoa();
3794
3795 int main() {
3796 dnet_ntoa()
3797 ; return 0; }
3798 EOF
3799 if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3800   rm -rf conftest*
3801   eval "ac_cv_lib_$ac_lib_var=yes"
3802 else
3803   echo "configure: failed program was:" >&5
3804   cat conftest.$ac_ext >&5
3805   rm -rf conftest*
3806   eval "ac_cv_lib_$ac_lib_var=no"
3807 fi
3808 rm -f conftest*
3809 LIBS="$ac_save_LIBS"
3810
3811 fi
3812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3813   echo "$ac_t""yes" 1>&6
3814   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3815 else
3816   echo "$ac_t""no" 1>&6
3817 fi
3818
3819     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3820       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3821 echo "configure:3822: checking for dnet_ntoa in -ldnet_stub" >&5
3822 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   ac_save_LIBS="$LIBS"
3827 LIBS="-ldnet_stub  $LIBS"
3828 cat > conftest.$ac_ext <<EOF
3829 #line 3830 "configure"
3830 #include "confdefs.h"
3831 /* Override any gcc2 internal prototype to avoid an error.  */
3832 /* We use char because int might match the return type of a gcc2
3833     builtin and then its argument prototype would still apply.  */
3834 char dnet_ntoa();
3835
3836 int main() {
3837 dnet_ntoa()
3838 ; return 0; }
3839 EOF
3840 if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3841   rm -rf conftest*
3842   eval "ac_cv_lib_$ac_lib_var=yes"
3843 else
3844   echo "configure: failed program was:" >&5
3845   cat conftest.$ac_ext >&5
3846   rm -rf conftest*
3847   eval "ac_cv_lib_$ac_lib_var=no"
3848 fi
3849 rm -f conftest*
3850 LIBS="$ac_save_LIBS"
3851
3852 fi
3853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3854   echo "$ac_t""yes" 1>&6
3855   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3856 else
3857   echo "$ac_t""no" 1>&6
3858 fi
3859
3860     fi
3861
3862     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3863     # to get the SysV transport functions.
3864     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3865     # needs -lnsl.
3866     # The nsl library prevents programs from opening the X display
3867     # on Irix 5.2, according to dickey@clark.net.
3868     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3869 echo "configure:3870: checking for gethostbyname" >&5
3870 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 /* System header to define __stub macros and hopefully few prototypes,
3877     which can conflict with char gethostbyname(); below.  */
3878 #include <assert.h>
3879 /* Override any gcc2 internal prototype to avoid an error.  */
3880 /* We use char because int might match the return type of a gcc2
3881     builtin and then its argument prototype would still apply.  */
3882 char gethostbyname();
3883
3884 int main() {
3885
3886 /* The GNU C library defines this for functions which it implements
3887     to always fail with ENOSYS.  Some functions are actually named
3888     something starting with __ and the normal name is an alias.  */
3889 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3890 choke me
3891 #else
3892 gethostbyname();
3893 #endif
3894
3895 ; return 0; }
3896 EOF
3897 if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3898   rm -rf conftest*
3899   eval "ac_cv_func_gethostbyname=yes"
3900 else
3901   echo "configure: failed program was:" >&5
3902   cat conftest.$ac_ext >&5
3903   rm -rf conftest*
3904   eval "ac_cv_func_gethostbyname=no"
3905 fi
3906 rm -f conftest*
3907 fi
3908
3909 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3910   echo "$ac_t""yes" 1>&6
3911   :
3912 else
3913   echo "$ac_t""no" 1>&6
3914 fi
3915
3916     if test $ac_cv_func_gethostbyname = no; then
3917       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3918 echo "configure:3919: checking for gethostbyname in -lnsl" >&5
3919 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3920 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3921   echo $ac_n "(cached) $ac_c" 1>&6
3922 else
3923   ac_save_LIBS="$LIBS"
3924 LIBS="-lnsl  $LIBS"
3925 cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 /* Override any gcc2 internal prototype to avoid an error.  */
3929 /* We use char because int might match the return type of a gcc2
3930     builtin and then its argument prototype would still apply.  */
3931 char gethostbyname();
3932
3933 int main() {
3934 gethostbyname()
3935 ; return 0; }
3936 EOF
3937 if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3938   rm -rf conftest*
3939   eval "ac_cv_lib_$ac_lib_var=yes"
3940 else
3941   echo "configure: failed program was:" >&5
3942   cat conftest.$ac_ext >&5
3943   rm -rf conftest*
3944   eval "ac_cv_lib_$ac_lib_var=no"
3945 fi
3946 rm -f conftest*
3947 LIBS="$ac_save_LIBS"
3948
3949 fi
3950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3951   echo "$ac_t""yes" 1>&6
3952   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3953 else
3954   echo "$ac_t""no" 1>&6
3955 fi
3956
3957     fi
3958
3959     # lieder@skyler.mavd.honeywell.com says without -lsocket,
3960     # socket/setsockopt and other routines are undefined under SCO ODT
3961     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
3962     # on later versions), says simon@lia.di.epfl.ch: it contains
3963     # gethostby* variants that don't use the nameserver (or something).
3964     # -lsocket must be given before -lnsl if both are needed.
3965     # We assume that if connect needs -lnsl, so does gethostbyname.
3966     echo $ac_n "checking for connect""... $ac_c" 1>&6
3967 echo "configure:3968: checking for connect" >&5
3968 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3969   echo $ac_n "(cached) $ac_c" 1>&6
3970 else
3971   cat > conftest.$ac_ext <<EOF
3972 #line 3973 "configure"
3973 #include "confdefs.h"
3974 /* System header to define __stub macros and hopefully few prototypes,
3975     which can conflict with char connect(); below.  */
3976 #include <assert.h>
3977 /* Override any gcc2 internal prototype to avoid an error.  */
3978 /* We use char because int might match the return type of a gcc2
3979     builtin and then its argument prototype would still apply.  */
3980 char connect();
3981
3982 int main() {
3983
3984 /* The GNU C library defines this for functions which it implements
3985     to always fail with ENOSYS.  Some functions are actually named
3986     something starting with __ and the normal name is an alias.  */
3987 #if defined (__stub_connect) || defined (__stub___connect)
3988 choke me
3989 #else
3990 connect();
3991 #endif
3992
3993 ; return 0; }
3994 EOF
3995 if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3996   rm -rf conftest*
3997   eval "ac_cv_func_connect=yes"
3998 else
3999   echo "configure: failed program was:" >&5
4000   cat conftest.$ac_ext >&5
4001   rm -rf conftest*
4002   eval "ac_cv_func_connect=no"
4003 fi
4004 rm -f conftest*
4005 fi
4006
4007 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4008   echo "$ac_t""yes" 1>&6
4009   :
4010 else
4011   echo "$ac_t""no" 1>&6
4012 fi
4013
4014     if test $ac_cv_func_connect = no; then
4015       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4016 echo "configure:4017: checking for connect in -lsocket" >&5
4017 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4018 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4019   echo $ac_n "(cached) $ac_c" 1>&6
4020 else
4021   ac_save_LIBS="$LIBS"
4022 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 /* Override any gcc2 internal prototype to avoid an error.  */
4027 /* We use char because int might match the return type of a gcc2
4028     builtin and then its argument prototype would still apply.  */
4029 char connect();
4030
4031 int main() {
4032 connect()
4033 ; return 0; }
4034 EOF
4035 if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4036   rm -rf conftest*
4037   eval "ac_cv_lib_$ac_lib_var=yes"
4038 else
4039   echo "configure: failed program was:" >&5
4040   cat conftest.$ac_ext >&5
4041   rm -rf conftest*
4042   eval "ac_cv_lib_$ac_lib_var=no"
4043 fi
4044 rm -f conftest*
4045 LIBS="$ac_save_LIBS"
4046
4047 fi
4048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4049   echo "$ac_t""yes" 1>&6
4050   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4051 else
4052   echo "$ac_t""no" 1>&6
4053 fi
4054
4055     fi
4056
4057     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4058     echo $ac_n "checking for remove""... $ac_c" 1>&6
4059 echo "configure:4060: checking for remove" >&5
4060 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4061   echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063   cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4066 /* System header to define __stub macros and hopefully few prototypes,
4067     which can conflict with char remove(); below.  */
4068 #include <assert.h>
4069 /* Override any gcc2 internal prototype to avoid an error.  */
4070 /* We use char because int might match the return type of a gcc2
4071     builtin and then its argument prototype would still apply.  */
4072 char remove();
4073
4074 int main() {
4075
4076 /* The GNU C library defines this for functions which it implements
4077     to always fail with ENOSYS.  Some functions are actually named
4078     something starting with __ and the normal name is an alias.  */
4079 #if defined (__stub_remove) || defined (__stub___remove)
4080 choke me
4081 #else
4082 remove();
4083 #endif
4084
4085 ; return 0; }
4086 EOF
4087 if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4088   rm -rf conftest*
4089   eval "ac_cv_func_remove=yes"
4090 else
4091   echo "configure: failed program was:" >&5
4092   cat conftest.$ac_ext >&5
4093   rm -rf conftest*
4094   eval "ac_cv_func_remove=no"
4095 fi
4096 rm -f conftest*
4097 fi
4098
4099 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
4100   echo "$ac_t""yes" 1>&6
4101   :
4102 else
4103   echo "$ac_t""no" 1>&6
4104 fi
4105
4106     if test $ac_cv_func_remove = no; then
4107       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
4108 echo "configure:4109: checking for remove in -lposix" >&5
4109 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
4110 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4111   echo $ac_n "(cached) $ac_c" 1>&6
4112 else
4113   ac_save_LIBS="$LIBS"
4114 LIBS="-lposix  $LIBS"
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 /* Override any gcc2 internal prototype to avoid an error.  */
4119 /* We use char because int might match the return type of a gcc2
4120     builtin and then its argument prototype would still apply.  */
4121 char remove();
4122
4123 int main() {
4124 remove()
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4128   rm -rf conftest*
4129   eval "ac_cv_lib_$ac_lib_var=yes"
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   eval "ac_cv_lib_$ac_lib_var=no"
4135 fi
4136 rm -f conftest*
4137 LIBS="$ac_save_LIBS"
4138
4139 fi
4140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4141   echo "$ac_t""yes" 1>&6
4142   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
4143 else
4144   echo "$ac_t""no" 1>&6
4145 fi
4146
4147     fi
4148
4149     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
4150     echo $ac_n "checking for shmat""... $ac_c" 1>&6
4151 echo "configure:4152: checking for shmat" >&5
4152 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 /* System header to define __stub macros and hopefully few prototypes,
4159     which can conflict with char shmat(); below.  */
4160 #include <assert.h>
4161 /* Override any gcc2 internal prototype to avoid an error.  */
4162 /* We use char because int might match the return type of a gcc2
4163     builtin and then its argument prototype would still apply.  */
4164 char shmat();
4165
4166 int main() {
4167
4168 /* The GNU C library defines this for functions which it implements
4169     to always fail with ENOSYS.  Some functions are actually named
4170     something starting with __ and the normal name is an alias.  */
4171 #if defined (__stub_shmat) || defined (__stub___shmat)
4172 choke me
4173 #else
4174 shmat();
4175 #endif
4176
4177 ; return 0; }
4178 EOF
4179 if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4180   rm -rf conftest*
4181   eval "ac_cv_func_shmat=yes"
4182 else
4183   echo "configure: failed program was:" >&5
4184   cat conftest.$ac_ext >&5
4185   rm -rf conftest*
4186   eval "ac_cv_func_shmat=no"
4187 fi
4188 rm -f conftest*
4189 fi
4190
4191 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
4192   echo "$ac_t""yes" 1>&6
4193   :
4194 else
4195   echo "$ac_t""no" 1>&6
4196 fi
4197
4198     if test $ac_cv_func_shmat = no; then
4199       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
4200 echo "configure:4201: checking for shmat in -lipc" >&5
4201 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
4202 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   ac_save_LIBS="$LIBS"
4206 LIBS="-lipc  $LIBS"
4207 cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210 /* Override any gcc2 internal prototype to avoid an error.  */
4211 /* We use char because int might match the return type of a gcc2
4212     builtin and then its argument prototype would still apply.  */
4213 char shmat();
4214
4215 int main() {
4216 shmat()
4217 ; return 0; }
4218 EOF
4219 if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4220   rm -rf conftest*
4221   eval "ac_cv_lib_$ac_lib_var=yes"
4222 else
4223   echo "configure: failed program was:" >&5
4224   cat conftest.$ac_ext >&5
4225   rm -rf conftest*
4226   eval "ac_cv_lib_$ac_lib_var=no"
4227 fi
4228 rm -f conftest*
4229 LIBS="$ac_save_LIBS"
4230
4231 fi
4232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4233   echo "$ac_t""yes" 1>&6
4234   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
4235 else
4236   echo "$ac_t""no" 1>&6
4237 fi
4238
4239     fi
4240   fi
4241
4242   # Check for libraries that X11R6 Xt/Xaw programs need.
4243   ac_save_LDFLAGS="$LDFLAGS"
4244   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
4245   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
4246   # check for ICE first), but we must link in the order -lSM -lICE or
4247   # we get undefined symbols.  So assume we have SM if we have ICE.
4248   # These have to be linked with before -lX11, unlike the other
4249   # libraries we check for below, so use a different variable.
4250   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
4251   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
4252 echo "configure:4253: checking for IceConnectionNumber in -lICE" >&5
4253 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
4254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4255   echo $ac_n "(cached) $ac_c" 1>&6
4256 else
4257   ac_save_LIBS="$LIBS"
4258 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
4259 cat > conftest.$ac_ext <<EOF
4260 #line 4261 "configure"
4261 #include "confdefs.h"
4262 /* Override any gcc2 internal prototype to avoid an error.  */
4263 /* We use char because int might match the return type of a gcc2
4264     builtin and then its argument prototype would still apply.  */
4265 char IceConnectionNumber();
4266
4267 int main() {
4268 IceConnectionNumber()
4269 ; return 0; }
4270 EOF
4271 if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4272   rm -rf conftest*
4273   eval "ac_cv_lib_$ac_lib_var=yes"
4274 else
4275   echo "configure: failed program was:" >&5
4276   cat conftest.$ac_ext >&5
4277   rm -rf conftest*
4278   eval "ac_cv_lib_$ac_lib_var=no"
4279 fi
4280 rm -f conftest*
4281 LIBS="$ac_save_LIBS"
4282
4283 fi
4284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4285   echo "$ac_t""yes" 1>&6
4286   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4287 else
4288   echo "$ac_t""no" 1>&6
4289 fi
4290
4291   LDFLAGS="$ac_save_LDFLAGS"
4292
4293 fi
4294
4295
4296
4297
4298
4299
4300
4301
4302 X_TOOLKIT_LIBS="-lXt"
4303 X_BASIC_LIBS="-lXext -lX11"
4304
4305 our_saved_LDFLAGS="$LDFLAGS"
4306 LDFLAGS="$X_LIBS $LDFLAGS"
4307 echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6
4308 echo "configure:4309: checking for XtToolkitThreadInitialize in -lXt" >&5
4309 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'`
4310 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4311   echo $ac_n "(cached) $ac_c" 1>&6
4312 else
4313   ac_save_LIBS="$LIBS"
4314 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
4315 cat > conftest.$ac_ext <<EOF
4316 #line 4317 "configure"
4317 #include "confdefs.h"
4318 /* Override any gcc2 internal prototype to avoid an error.  */
4319 /* We use char because int might match the return type of a gcc2
4320     builtin and then its argument prototype would still apply.  */
4321 char XtToolkitThreadInitialize();
4322
4323 int main() {
4324 XtToolkitThreadInitialize()
4325 ; return 0; }
4326 EOF
4327 if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4328   rm -rf conftest*
4329   eval "ac_cv_lib_$ac_lib_var=yes"
4330 else
4331   echo "configure: failed program was:" >&5
4332   cat conftest.$ac_ext >&5
4333   rm -rf conftest*
4334   eval "ac_cv_lib_$ac_lib_var=no"
4335 fi
4336 rm -f conftest*
4337 LIBS="$ac_save_LIBS"
4338
4339 fi
4340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4341   echo "$ac_t""yes" 1>&6
4342   cat >> confdefs.h <<\EOF
4343 #define X_THREAD_SUPPORT 1
4344 EOF
4345
4346 else
4347   echo "$ac_t""no" 1>&6
4348 fi
4349
4350 LDFLAGS="$our_saved_LDFLAGS"
4351
4352 our_saved_LDFLAGS="$LDFLAGS"
4353 LDFLAGS="$X_LIBS $LDFLAGS"
4354 echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6
4355 echo "configure:4356: checking for XdbeQueryExtension in -lXext" >&5
4356 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'`
4357 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   ac_save_LIBS="$LIBS"
4361 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
4362 cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 /* Override any gcc2 internal prototype to avoid an error.  */
4366 /* We use char because int might match the return type of a gcc2
4367     builtin and then its argument prototype would still apply.  */
4368 char XdbeQueryExtension();
4369
4370 int main() {
4371 XdbeQueryExtension()
4372 ; return 0; }
4373 EOF
4374 if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4375   rm -rf conftest*
4376   eval "ac_cv_lib_$ac_lib_var=yes"
4377 else
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -rf conftest*
4381   eval "ac_cv_lib_$ac_lib_var=no"
4382 fi
4383 rm -f conftest*
4384 LIBS="$ac_save_LIBS"
4385
4386 fi
4387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4388   echo "$ac_t""yes" 1>&6
4389   cat >> confdefs.h <<\EOF
4390 #define HAVE_DBE_SUPPORT 1
4391 EOF
4392
4393 else
4394   echo "$ac_t""no" 1>&6
4395 fi
4396
4397 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
4398 echo "configure:4399: checking for XmbufQueryExtension in -lXext" >&5
4399 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'`
4400 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   ac_save_LIBS="$LIBS"
4404 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
4405 cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408 /* Override any gcc2 internal prototype to avoid an error.  */
4409 /* We use char because int might match the return type of a gcc2
4410     builtin and then its argument prototype would still apply.  */
4411 char XmbufQueryExtension();
4412
4413 int main() {
4414 XmbufQueryExtension()
4415 ; return 0; }
4416 EOF
4417 if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4418   rm -rf conftest*
4419   eval "ac_cv_lib_$ac_lib_var=yes"
4420 else
4421   echo "configure: failed program was:" >&5
4422   cat conftest.$ac_ext >&5
4423   rm -rf conftest*
4424   eval "ac_cv_lib_$ac_lib_var=no"
4425 fi
4426 rm -f conftest*
4427 LIBS="$ac_save_LIBS"
4428
4429 fi
4430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4431   echo "$ac_t""yes" 1>&6
4432   cat >> confdefs.h <<\EOF
4433 #define HAVE_MBX_SUPPORT 1
4434 EOF
4435
4436 else
4437   echo "$ac_t""no" 1>&6
4438 fi
4439
4440 LDFLAGS="$our_saved_LDFLAGS"
4441 our_saved_CPPFLAGS="$CPPFLAGS"
4442 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
4443 for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h
4444 do
4445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4447 echo "configure:4448: checking for $ac_hdr" >&5
4448 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4449   echo $ac_n "(cached) $ac_c" 1>&6
4450 else
4451   cat > conftest.$ac_ext <<EOF
4452 #line 4453 "configure"
4453 #include "confdefs.h"
4454 #include <$ac_hdr>
4455 EOF
4456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4457 { (eval echo configure:4458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4459 if test -z "$ac_err"; then
4460   rm -rf conftest*
4461   eval "ac_cv_header_$ac_safe=yes"
4462 else
4463   echo "$ac_err" >&5
4464   echo "configure: failed program was:" >&5
4465   cat conftest.$ac_ext >&5
4466   rm -rf conftest*
4467   eval "ac_cv_header_$ac_safe=no"
4468 fi
4469 rm -f conftest*
4470 fi
4471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4472   echo "$ac_t""yes" 1>&6
4473     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4474   cat >> confdefs.h <<EOF
4475 #define $ac_tr_hdr 1
4476 EOF
4477  
4478 else
4479   echo "$ac_t""no" 1>&6
4480 fi
4481 done
4482
4483 CPPFLAGS="$our_saved_CPPFLAGS"
4484
4485
4486
4487 if test "x$no_x" = "xyes"; then
4488   NO_X_TRUE=
4489   NO_X_FALSE='#'
4490 else
4491   NO_X_TRUE='#'
4492   NO_X_FALSE=
4493 fi
4494
4495 my_includes="$my_includes -I../include -I.. -I/usr/local/include"
4496
4497
4498 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4499
4500 echo $ac_n "checking for X""... $ac_c" 1>&6
4501 echo "configure:4502: checking for X" >&5
4502 if test "$no_x" != "yes" ; then
4503   cat >> confdefs.h <<\EOF
4504 #define HAVE_SGP 1
4505 EOF
4506
4507   
4508
4509 if test 1==1; then
4510   HAVE_SGP_TRUE=
4511   HAVE_SGP_FALSE='#'
4512 else
4513   HAVE_SGP_TRUE='#'
4514   HAVE_SGP_FALSE=
4515 fi
4516   cat >> confdefs.h <<\EOF
4517 #define HAVE_X11 1
4518 EOF
4519
4520   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
4521   ctlib_graphics="$ctlibs_base -lctgraphics"
4522   echo "$ac_t""yes" 1>&6
4523   if test "$g2" = "true" ; then
4524     ctlib_graphics="$ctlib_graphics -lg2"
4525     cat >> confdefs.h <<\EOF
4526 #define HAVE_G2 1
4527 EOF
4528
4529   fi    
4530   ctlib_graphics="$ctlib_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
4531   if test "$libgl" = "true" ; then
4532     ctlib_graphics="$ctlib_graphics -lwx_gtk_gl -lglut -lGL -lGLU"
4533   fi
4534 else
4535   if test "$wxwin" = "true" ; then
4536     cat >> confdefs.h <<\EOF
4537 #define HAVE_SGP 1
4538 EOF
4539
4540     
4541
4542 if test 1==1; then
4543   HAVE_SGP_TRUE=
4544   HAVE_SGP_FALSE='#'
4545 else
4546   HAVE_SGP_TRUE='#'
4547   HAVE_SGP_FALSE=
4548 fi
4549   fi
4550   echo "$ac_t""no" 1>&6
4551 fi
4552
4553 if test "$png" = "true" ; then
4554   ctlibs_tools="$ctlibs_tools -lpng"
4555 fi
4556 if test "$zlib" = "true" ; then
4557   ctlibs_tools="$ctlibs_tools -lz"
4558 fi
4559 if test "$fftw" = "true" ; then
4560   ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
4561 fi
4562 if test "$ctn" = "true"; then
4563   ctlibs_tools="$ctlibs_tools -lctn"
4564 fi
4565
4566 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
4567 echo "configure:4568: checking for main in -ldmallocxx" >&5
4568 ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'`
4569 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   ac_save_LIBS="$LIBS"
4573 LIBS="-ldmallocxx  $LIBS"
4574 cat > conftest.$ac_ext <<EOF
4575 #line 4576 "configure"
4576 #include "confdefs.h"
4577
4578 int main() {
4579 main()
4580 ; return 0; }
4581 EOF
4582 if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4583   rm -rf conftest*
4584   eval "ac_cv_lib_$ac_lib_var=yes"
4585 else
4586   echo "configure: failed program was:" >&5
4587   cat conftest.$ac_ext >&5
4588   rm -rf conftest*
4589   eval "ac_cv_lib_$ac_lib_var=no"
4590 fi
4591 rm -f conftest*
4592 LIBS="$ac_save_LIBS"
4593
4594 fi
4595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4596   echo "$ac_t""yes" 1>&6
4597   dmallocxx=true
4598 else
4599   echo "$ac_t""no" 1>&6
4600 dmallocxx=false
4601 fi
4602
4603 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
4604 echo "configure:4605: checking for enable-dmalloc" >&5
4605 # Check whether --enable-dmalloc or --disable-dmalloc was given.
4606 if test "${enable_dmalloc+set}" = set; then
4607   enableval="$enable_dmalloc"
4608   case "${enableval}" in
4609   yes) usedmalloc=true 
4610        echo "$ac_t""yes" 1>&6
4611        ;;
4612   no)  usedmalloc=false 
4613        echo "$ac_t""no" 1>&6
4614        ;;
4615   *) echo "$ac_t""bad value ${enableval} for --enable-dmalloc" 1>&6 
4616        ;;
4617 esac
4618 else
4619   usedmalloc=false; echo "$ac_t""no" 1>&6
4620 fi
4621
4622
4623 if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then
4624   ctlibs_tools="$ctlibs_tools -ldmallocxx"
4625   cat >> confdefs.h <<\EOF
4626 #define HAVE_DMALLOC 1
4627 EOF
4628
4629   echo "$ac_t""Using dmalloc" 1>&6
4630 fi
4631
4632 if test "$wxwin" = "true" ; then
4633   if test "$wx_gtk" = "true" ; then     
4634     wxcflags=`$wxconfig --cflags`
4635     wxlibs=`$wxconfig --libs`
4636   else
4637         wxcflags="-D__WXMSW__ -D__WIN32__ -D__GNUWIN32__"
4638    wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff"
4639   fi
4640   CFLAGS="$CFLAGS -I../include $wxcflags"
4641   ctlib_graphics="$ctlib_graphics $wxlibs"
4642   
4643
4644 if test 1==1 ; then
4645   HAVE_WXWINDOWS_TRUE=
4646   HAVE_WXWINDOWS_FALSE='#'
4647 else
4648   HAVE_WXWINDOWS_TRUE='#'
4649   HAVE_WXWINDOWS_FALSE=
4650 fi
4651 fi
4652
4653
4654
4655 LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
4656 ctlibs="$ctlibs_base -lctsim $ctlib_graphics -lctsupport $ctlibs_tools"
4657
4658
4659 if test -n "$lamdir" ; then
4660   lamprograms="ctsimtext-lam"
4661   
4662   lamdefs="$CFLAGS"
4663   
4664 fi
4665
4666 CXXFLAGS="$CFLAGS"
4667
4668 trap '' 1 2 15
4669 cat > confcache <<\EOF
4670 # This file is a shell script that caches the results of configure
4671 # tests run on this system so they can be shared between configure
4672 # scripts and configure runs.  It is not useful on other systems.
4673 # If it contains results you don't want to keep, you may remove or edit it.
4674 #
4675 # By default, configure uses ./config.cache as the cache file,
4676 # creating it if it does not exist already.  You can give configure
4677 # the --cache-file=FILE option to use a different cache file; that is
4678 # what configure does when it calls configure scripts in
4679 # subdirectories, so they share the cache.
4680 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4681 # config.status only pays attention to the cache file if you give it the
4682 # --recheck option to rerun configure.
4683 #
4684 EOF
4685 # The following way of writing the cache mishandles newlines in values,
4686 # but we know of no workaround that is simple, portable, and efficient.
4687 # So, don't put newlines in cache variables' values.
4688 # Ultrix sh set writes to stderr and can't be redirected directly,
4689 # and sets the high bit in the cache file unless we assign to the vars.
4690 (set) 2>&1 |
4691   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4692   *ac_space=\ *)
4693     # `set' does not quote correctly, so add quotes (double-quote substitution
4694     # turns \\\\ into \\, and sed turns \\ into \).
4695     sed -n \
4696       -e "s/'/'\\\\''/g" \
4697       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4698     ;;
4699   *)
4700     # `set' quotes correctly as required by POSIX, so do not add quotes.
4701     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4702     ;;
4703   esac >> confcache
4704 if cmp -s $cache_file confcache; then
4705   :
4706 else
4707   if test -w $cache_file; then
4708     echo "updating cache $cache_file"
4709     cat confcache > $cache_file
4710   else
4711     echo "not updating unwritable cache $cache_file"
4712   fi
4713 fi
4714 rm -f confcache
4715
4716 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4717
4718 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4719 # Let make expand exec_prefix.
4720 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4721
4722 # Any assignment to VPATH causes Sun make to only execute
4723 # the first set of double-colon rules, so remove it if not needed.
4724 # If there is a colon in the path, we need to keep it.
4725 if test "x$srcdir" = x.; then
4726   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4727 fi
4728
4729 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4730
4731 DEFS=-DHAVE_CONFIG_H
4732
4733 # Without the "./", some shells look in PATH for config.status.
4734 : ${CONFIG_STATUS=./config.status}
4735
4736 echo creating $CONFIG_STATUS
4737 rm -f $CONFIG_STATUS
4738 cat > $CONFIG_STATUS <<EOF
4739 #! /bin/sh
4740 # Generated automatically by configure.
4741 # Run this file to recreate the current configuration.
4742 # This directory was configured as follows,
4743 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4744 #
4745 # $0 $ac_configure_args
4746 #
4747 # Compiler output produced by configure, useful for debugging
4748 # configure, is in ./config.log if it exists.
4749
4750 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4751 for ac_option
4752 do
4753   case "\$ac_option" in
4754   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4755     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4756     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4757   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4758     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4759     exit 0 ;;
4760   -help | --help | --hel | --he | --h)
4761     echo "\$ac_cs_usage"; exit 0 ;;
4762   *) echo "\$ac_cs_usage"; exit 1 ;;
4763   esac
4764 done
4765
4766 ac_given_srcdir=$srcdir
4767 ac_given_INSTALL="$INSTALL"
4768
4769 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
4770 EOF
4771 cat >> $CONFIG_STATUS <<EOF
4772
4773 # Protect against being on the right side of a sed subst in config.status.
4774 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4775  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4776 $ac_vpsub
4777 $extrasub
4778 s%@SHELL@%$SHELL%g
4779 s%@CFLAGS@%$CFLAGS%g
4780 s%@CPPFLAGS@%$CPPFLAGS%g
4781 s%@CXXFLAGS@%$CXXFLAGS%g
4782 s%@FFLAGS@%$FFLAGS%g
4783 s%@DEFS@%$DEFS%g
4784 s%@LDFLAGS@%$LDFLAGS%g
4785 s%@LIBS@%$LIBS%g
4786 s%@exec_prefix@%$exec_prefix%g
4787 s%@prefix@%$prefix%g
4788 s%@program_transform_name@%$program_transform_name%g
4789 s%@bindir@%$bindir%g
4790 s%@sbindir@%$sbindir%g
4791 s%@libexecdir@%$libexecdir%g
4792 s%@datadir@%$datadir%g
4793 s%@sysconfdir@%$sysconfdir%g
4794 s%@sharedstatedir@%$sharedstatedir%g
4795 s%@localstatedir@%$localstatedir%g
4796 s%@libdir@%$libdir%g
4797 s%@includedir@%$includedir%g
4798 s%@oldincludedir@%$oldincludedir%g
4799 s%@infodir@%$infodir%g
4800 s%@mandir@%$mandir%g
4801 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4802 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4803 s%@INSTALL_DATA@%$INSTALL_DATA%g
4804 s%@PACKAGE@%$PACKAGE%g
4805 s%@VERSION@%$VERSION%g
4806 s%@ACLOCAL@%$ACLOCAL%g
4807 s%@AUTOCONF@%$AUTOCONF%g
4808 s%@AUTOMAKE@%$AUTOMAKE%g
4809 s%@AUTOHEADER@%$AUTOHEADER%g
4810 s%@MAKEINFO@%$MAKEINFO%g
4811 s%@SET_MAKE@%$SET_MAKE%g
4812 s%@AWK@%$AWK%g
4813 s%@RANLIB@%$RANLIB%g
4814 s%@CC@%$CC%g
4815 s%@CXX@%$CXX%g
4816 s%@wxconfig@%$wxconfig%g
4817 s%@host@%$host%g
4818 s%@host_alias@%$host_alias%g
4819 s%@host_cpu@%$host_cpu%g
4820 s%@host_vendor@%$host_vendor%g
4821 s%@host_os@%$host_os%g
4822 s%@CPP@%$CPP%g
4823 s%@INCLUDED_GETOPT_LONG_TRUE@%$INCLUDED_GETOPT_LONG_TRUE%g
4824 s%@INCLUDED_GETOPT_LONG_FALSE@%$INCLUDED_GETOPT_LONG_FALSE%g
4825 s%@DEBUG_TRUE@%$DEBUG_TRUE%g
4826 s%@DEBUG_FALSE@%$DEBUG_FALSE%g
4827 s%@lamdir@%$lamdir%g
4828 s%@mpienable@%$mpienable%g
4829 s%@cgibindir@%$cgibindir%g
4830 s%@cgibinurl@%$cgibinurl%g
4831 s%@webdatadir@%$webdatadir%g
4832 s%@webdataurl@%$webdataurl%g
4833 s%@htmldir@%$htmldir%g
4834 s%@cgiprograms@%$cgiprograms%g
4835 s%@htmldata@%$htmldata%g
4836 s%@USE_HTML_TRUE@%$USE_HTML_TRUE%g
4837 s%@USE_HTML_FALSE@%$USE_HTML_FALSE%g
4838 s%@webenabled@%$webenabled%g
4839 s%@USE_LAM_TRUE@%$USE_LAM_TRUE%g
4840 s%@USE_LAM_FALSE@%$USE_LAM_FALSE%g
4841 s%@X_CFLAGS@%$X_CFLAGS%g
4842 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4843 s%@X_LIBS@%$X_LIBS%g
4844 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4845 s%@X_TOOLKIT_LIBS@%$X_TOOLKIT_LIBS%g
4846 s%@X_BASIC_LIBS@%$X_BASIC_LIBS%g
4847 s%@NO_X_TRUE@%$NO_X_TRUE%g
4848 s%@NO_X_FALSE@%$NO_X_FALSE%g
4849 s%@my_includes@%$my_includes%g
4850 s%@HAVE_SGP_TRUE@%$HAVE_SGP_TRUE%g
4851 s%@HAVE_SGP_FALSE@%$HAVE_SGP_FALSE%g
4852 s%@HAVE_WXWINDOWS_TRUE@%$HAVE_WXWINDOWS_TRUE%g
4853 s%@HAVE_WXWINDOWS_FALSE@%$HAVE_WXWINDOWS_FALSE%g
4854 s%@wxcflags@%$wxcflags%g
4855 s%@wxlibs@%$wxlibs%g
4856 s%@ctlibs@%$ctlibs%g
4857 s%@lamprograms@%$lamprograms%g
4858 s%@lamdefs@%$lamdefs%g
4859
4860 CEOF
4861 EOF
4862
4863 cat >> $CONFIG_STATUS <<\EOF
4864
4865 # Split the substitutions into bite-sized pieces for seds with
4866 # small command number limits, like on Digital OSF/1 and HP-UX.
4867 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4868 ac_file=1 # Number of current file.
4869 ac_beg=1 # First line for current file.
4870 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4871 ac_more_lines=:
4872 ac_sed_cmds=""
4873 while $ac_more_lines; do
4874   if test $ac_beg -gt 1; then
4875     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4876   else
4877     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4878   fi
4879   if test ! -s conftest.s$ac_file; then
4880     ac_more_lines=false
4881     rm -f conftest.s$ac_file
4882   else
4883     if test -z "$ac_sed_cmds"; then
4884       ac_sed_cmds="sed -f conftest.s$ac_file"
4885     else
4886       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4887     fi
4888     ac_file=`expr $ac_file + 1`
4889     ac_beg=$ac_end
4890     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4891   fi
4892 done
4893 if test -z "$ac_sed_cmds"; then
4894   ac_sed_cmds=cat
4895 fi
4896 EOF
4897
4898 cat >> $CONFIG_STATUS <<EOF
4899
4900 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"}
4901 EOF
4902 cat >> $CONFIG_STATUS <<\EOF
4903 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4904   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4905   case "$ac_file" in
4906   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4907        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4908   *) ac_file_in="${ac_file}.in" ;;
4909   esac
4910
4911   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4912
4913   # Remove last slash and all that follows it.  Not all systems have dirname.
4914   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4915   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4916     # The file is in a subdirectory.
4917     test ! -d "$ac_dir" && mkdir "$ac_dir"
4918     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4919     # A "../" for each directory in $ac_dir_suffix.
4920     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4921   else
4922     ac_dir_suffix= ac_dots=
4923   fi
4924
4925   case "$ac_given_srcdir" in
4926   .)  srcdir=.
4927       if test -z "$ac_dots"; then top_srcdir=.
4928       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4929   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4930   *) # Relative path.
4931     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4932     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4933   esac
4934
4935   case "$ac_given_INSTALL" in
4936   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4937   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4938   esac
4939
4940   echo creating "$ac_file"
4941   rm -f "$ac_file"
4942   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4943   case "$ac_file" in
4944   *Makefile*) ac_comsub="1i\\
4945 # $configure_input" ;;
4946   *) ac_comsub= ;;
4947   esac
4948
4949   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4950   sed -e "$ac_comsub
4951 s%@configure_input@%$configure_input%g
4952 s%@srcdir@%$srcdir%g
4953 s%@top_srcdir@%$top_srcdir%g
4954 s%@INSTALL@%$INSTALL%g
4955 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4956 fi; done
4957 rm -f conftest.s*
4958
4959 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4960 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4961 #
4962 # ac_d sets the value in "#define NAME VALUE" lines.
4963 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4964 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4965 ac_dC='\3'
4966 ac_dD='%g'
4967 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4968 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4969 ac_uB='\([      ]\)%\1#\2define\3'
4970 ac_uC=' '
4971 ac_uD='\4%g'
4972 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4973 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4974 ac_eB='$%\1#\2define\3'
4975 ac_eC=' '
4976 ac_eD='%g'
4977
4978 if test "${CONFIG_HEADERS+set}" != set; then
4979 EOF
4980 cat >> $CONFIG_STATUS <<EOF
4981   CONFIG_HEADERS="config.h"
4982 EOF
4983 cat >> $CONFIG_STATUS <<\EOF
4984 fi
4985 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4986   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4987   case "$ac_file" in
4988   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4989        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4990   *) ac_file_in="${ac_file}.in" ;;
4991   esac
4992
4993   echo creating $ac_file
4994
4995   rm -f conftest.frag conftest.in conftest.out
4996   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4997   cat $ac_file_inputs > conftest.in
4998
4999 EOF
5000
5001 # Transform confdefs.h into a sed script conftest.vals that substitutes
5002 # the proper values into config.h.in to produce config.h.  And first:
5003 # Protect against being on the right side of a sed subst in config.status.
5004 # Protect against being in an unquoted here document in config.status.
5005 rm -f conftest.vals
5006 cat > conftest.hdr <<\EOF
5007 s/[\\&%]/\\&/g
5008 s%[\\$`]%\\&%g
5009 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5010 s%ac_d%ac_u%gp
5011 s%ac_u%ac_e%gp
5012 EOF
5013 sed -n -f conftest.hdr confdefs.h > conftest.vals
5014 rm -f conftest.hdr
5015
5016 # This sed command replaces #undef with comments.  This is necessary, for
5017 # example, in the case of _POSIX_SOURCE, which is predefined and required
5018 # on some systems where configure will not decide to define it.
5019 cat >> conftest.vals <<\EOF
5020 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5021 EOF
5022
5023 # Break up conftest.vals because some shells have a limit on
5024 # the size of here documents, and old seds have small limits too.
5025
5026 rm -f conftest.tail
5027 while :
5028 do
5029   ac_lines=`grep -c . conftest.vals`
5030   # grep -c gives empty output for an empty file on some AIX systems.
5031   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5032   # Write a limited-size here document to conftest.frag.
5033   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5034   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5035   echo 'CEOF
5036   sed -f conftest.frag conftest.in > conftest.out
5037   rm -f conftest.in
5038   mv conftest.out conftest.in
5039 ' >> $CONFIG_STATUS
5040   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5041   rm -f conftest.vals
5042   mv conftest.tail conftest.vals
5043 done
5044 rm -f conftest.vals
5045
5046 cat >> $CONFIG_STATUS <<\EOF
5047   rm -f conftest.frag conftest.h
5048   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5049   cat conftest.in >> conftest.h
5050   rm -f conftest.in
5051   if cmp -s $ac_file conftest.h 2>/dev/null; then
5052     echo "$ac_file is unchanged"
5053     rm -f conftest.h
5054   else
5055     # Remove last slash and all that follows it.  Not all systems have dirname.
5056       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5057       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5058       # The file is in a subdirectory.
5059       test ! -d "$ac_dir" && mkdir "$ac_dir"
5060     fi
5061     rm -f $ac_file
5062     mv conftest.h $ac_file
5063   fi
5064 fi; done
5065
5066 EOF
5067 cat >> $CONFIG_STATUS <<EOF
5068
5069
5070 EOF
5071 cat >> $CONFIG_STATUS <<\EOF
5072 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5073
5074 exit 0
5075 EOF
5076 chmod +x $CONFIG_STATUS
5077 rm -fr confdefs* $ac_clean_files
5078 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5079