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