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