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