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