r172: *** empty log message ***
[ctsim.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-debug          Turn on debugging"
16 ac_help="$ac_help
17   --enable-verbose-warnings
18                           Enable verbose compiler warnings."
19 ac_help="$ac_help
20   --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.0b9
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 mawk gawk 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 echo $ac_n "checking debug""... $ac_c" 1>&6
2841 echo "configure:2842: checking debug" >&5
2842 # Check whether --enable-debug or --disable-debug was given.
2843 if test "${enable_debug+set}" = set; then
2844   enableval="$enable_debug"
2845   case "${enableval}" in
2846   yes) debug=true 
2847        echo "$ac_t""yes" 1>&6
2848        ;;
2849   no)  debug=false 
2850        echo "$ac_t""no" 1>&6
2851        ;;
2852   *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
2853        ;;
2854 esac
2855 else
2856   debug=false; echo "$ac_t""no" 1>&6
2857 fi
2858
2859
2860
2861 if test "$debug" = "true"; then
2862   DEBUG_TRUE=
2863   DEBUG_FALSE='#'
2864 else
2865   DEBUG_TRUE='#'
2866   DEBUG_FALSE=
2867 fi
2868
2869 if test "$debug" = "true" ; then
2870   CFLAGS="-g -DDEBUG"
2871   cat >> confdefs.h <<\EOF
2872 #define DEBUG 1
2873 EOF
2874
2875 else
2876   CFLAGS="-g -O3 -DNDEBUG"
2877   cat >> confdefs.h <<\EOF
2878 #define NDEBUG 1
2879 EOF
2880
2881 fi
2882
2883
2884
2885  if test -n "$GCC"; then
2886     CFLAGS="$CFLAGS -Wall"
2887  fi
2888  
2889 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
2890 echo "configure:2891: checking whether to enable verbose warnings" >&5
2891 # Check whether --enable-verbose-warnings or --disable-verbose-warnings was given.
2892 if test "${enable_verbose_warnings+set}" = set; then
2893   enableval="$enable_verbose_warnings"
2894    case "$enableval" in
2895   yes)
2896     echo "$ac_t""yes" 1>&6
2897     
2898  if test -n "$GCC"; then
2899     CFLAGS="$CFLAGS -W"
2900  fi
2901  
2902     
2903  if test -n "$GCC"; then
2904     CFLAGS="$CFLAGS -Wshadow -Wpointer-arith -Wbad-function-cast"
2905  fi
2906  
2907     
2908  if test -n "$GCC"; then
2909     CFLAGS="$CFLAGS -Wcast-align -Wwrite-strings -Waggregate-return"
2910  fi
2911  
2912     
2913  if test -n "$GCC"; then
2914     CFLAGS="$CFLAGS -Wmissing-prototypes -Wstrict-prototypes"
2915  fi
2916  
2917     
2918  if test -n "$GCC"; then
2919     CFLAGS="$CFLAGS -pedantic"
2920  fi
2921  
2922     
2923  if test -n "$GCC"; then
2924     CFLAGS="$CFLAGS -Wredundant-decls"
2925  fi
2926  
2927
2928     ;;
2929   *)
2930     echo "$ac_t""no" 1>&6
2931     ;;
2932   esac 
2933 else
2934   echo "$ac_t""no" 1>&6
2935
2936 fi
2937
2938
2939 # Check whether --with-lam or --without-lam was given.
2940 if test "${with_lam+set}" = set; then
2941   withval="$with_lam"
2942       if test "$withval" != "no" ; then
2943          trylamdir=$withval
2944      fi 
2945
2946 fi
2947
2948
2949 if test "$withval" != "no" ; then
2950   if test "$prefix" != "NONE" ; then
2951      trylamdir="$trylamdir $prefix"
2952   fi
2953
2954   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
2955 echo "configure:2956: checking for LAM MPI installation" >&5
2956   for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do
2957     if test -x "$testlamdir/bin/hcc" ; then
2958       LDFLAGS="$LDFLAGS -L$testlamdir/lib"
2959       CFLAGS="$CFLAGS -I$testlamdir/include"
2960       lamdir="$testlamdir"
2961       
2962       mpienable="true"
2963       
2964       break
2965     fi
2966   done
2967   echo "$ac_t""$lamdir" 1>&6
2968 else
2969   echo "$ac_t""no" 1>&6
2970 fi
2971
2972 echo $ac_n "checking for web access""... $ac_c" 1>&6
2973 echo "configure:2974: checking for web access" >&5
2974 # Check whether --with-cgibin-dir or --without-cgibin-dir was given.
2975 if test "${with_cgibin_dir+set}" = set; then
2976   withval="$with_cgibin_dir"
2977    cgibindir=$withval ;   
2978 fi
2979
2980
2981 # Check whether --with-cgibin-url or --without-cgibin-url was given.
2982 if test "${with_cgibin_url+set}" = set; then
2983   withval="$with_cgibin_url"
2984    cgibinurl=$withval ;   
2985 fi
2986
2987
2988 # Check whether --with-webdata-dir or --without-webdata-dir was given.
2989 if test "${with_webdata_dir+set}" = set; then
2990   withval="$with_webdata_dir"
2991    webdatadir=$withval ;    
2992 fi
2993
2994
2995 # Check whether --with-webdata-url or --without-webdata-url was given.
2996 if test "${with_webdata_url+set}" = set; then
2997   withval="$with_webdata_url"
2998    webdataurl=$withval ;   
2999 fi
3000
3001
3002 # Check whether --with-html-dir or --without-html-dir was given.
3003 if test "${with_html_dir+set}" = set; then
3004   withval="$with_html_dir"
3005    htmldir=$withval ;   
3006 fi
3007
3008
3009 if test -n "$cgibindir" -o -n "$cgibinurl" ; then
3010   cgiprograms="ctsim.cgi ctsim.conf"
3011   
3012 fi
3013
3014 if test -n "$htmldir" ; then
3015   htmldata=simulate.html
3016   
3017 fi
3018
3019
3020 if test -n "$htmldir"; then
3021   USE_HTML_TRUE=
3022   USE_HTML_FALSE='#'
3023 else
3024   USE_HTML_TRUE='#'
3025   USE_HTML_FALSE=
3026 fi
3027
3028 if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$htmldir" ; then
3029   webenabled=true
3030   
3031   echo "$ac_t""yes" 1>&6
3032   if test -z "$cgibindir" ; then
3033     { echo "configure: error: --with-cgibin-dir not set for web access" 1>&2; exit 1; }
3034   elif test -z "$cgibinurl" ; then
3035     { echo "configure: error: --with-cgibin-url not set for web access" 1>&2; exit 1; }
3036   elif test -z "$webdatadir" ; then
3037     { echo "configure: error: --with-webdata-dir not set for web access" 1>&2; exit 1; }
3038   elif test -z "$webdataurl" ; then
3039     { echo "configure: error: --with-webdata-url not set for web access" 1>&2; exit 1; }
3040   elif test -z "$htmldir" ; then
3041     { echo "configure: error: --with-html-dir not set for web access" 1>&2; exit 1; }
3042   fi
3043 else
3044   echo "$ac_t""no" 1>&6
3045 fi
3046
3047
3048
3049 if test -n "$lamdir"; then
3050   USE_LAM_TRUE=
3051   USE_LAM_FALSE='#'
3052 else
3053   USE_LAM_TRUE='#'
3054   USE_LAM_FALSE=
3055 fi
3056
3057
3058 # If we find X, set shell vars x_includes and x_libraries to the
3059 # paths, otherwise set no_x=yes.
3060 # Uses ac_ vars as temps to allow command line to override cache and checks.
3061 # --without-x overrides everything else, but does not touch the cache.
3062 echo $ac_n "checking for X""... $ac_c" 1>&6
3063 echo "configure:3064: checking for X" >&5
3064
3065 # Check whether --with-x or --without-x was given.
3066 if test "${with_x+set}" = set; then
3067   withval="$with_x"
3068   :
3069 fi
3070
3071 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3072 if test "x$with_x" = xno; then
3073   # The user explicitly disabled X.
3074   have_x=disabled
3075 else
3076   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3077     # Both variables are already set.
3078     have_x=yes
3079   else
3080 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   # One or both of the vars are not set, and there is no cached value.
3084 ac_x_includes=NO ac_x_libraries=NO
3085 rm -fr conftestdir
3086 if mkdir conftestdir; then
3087   cd conftestdir
3088   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3089   cat > Imakefile <<'EOF'
3090 acfindx:
3091         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3092 EOF
3093   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3094     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3095     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3096     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3097     for ac_extension in a so sl; do
3098       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3099         test -f $ac_im_libdir/libX11.$ac_extension; then
3100         ac_im_usrlibdir=$ac_im_libdir; break
3101       fi
3102     done
3103     # Screen out bogus values from the imake configuration.  They are
3104     # bogus both because they are the default anyway, and because
3105     # using them would break gcc on systems where it needs fixed includes.
3106     case "$ac_im_incroot" in
3107         /usr/include) ;;
3108         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3109     esac
3110     case "$ac_im_usrlibdir" in
3111         /usr/lib | /lib) ;;
3112         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3113     esac
3114   fi
3115   cd ..
3116   rm -fr conftestdir
3117 fi
3118
3119 if test "$ac_x_includes" = NO; then
3120   # Guess where to find include files, by looking for this one X11 .h file.
3121   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3122
3123   # First, try using that file with no special directory specified.
3124 cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127 #include <$x_direct_test_include>
3128 EOF
3129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3130 { (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3132 if test -z "$ac_err"; then
3133   rm -rf conftest*
3134   # We can compile using X headers with no special include directory.
3135 ac_x_includes=
3136 else
3137   echo "$ac_err" >&5
3138   echo "configure: failed program was:" >&5
3139   cat conftest.$ac_ext >&5
3140   rm -rf conftest*
3141   # Look for the header file in a standard set of common directories.
3142 # Check X11 before X11Rn because it is often a symlink to the current release.
3143   for ac_dir in               \
3144     /usr/X11/include          \
3145     /usr/X11R6/include        \
3146     /usr/X11R5/include        \
3147     /usr/X11R4/include        \
3148                               \
3149     /usr/include/X11          \
3150     /usr/include/X11R6        \
3151     /usr/include/X11R5        \
3152     /usr/include/X11R4        \
3153                               \
3154     /usr/local/X11/include    \
3155     /usr/local/X11R6/include  \
3156     /usr/local/X11R5/include  \
3157     /usr/local/X11R4/include  \
3158                               \
3159     /usr/local/include/X11    \
3160     /usr/local/include/X11R6  \
3161     /usr/local/include/X11R5  \
3162     /usr/local/include/X11R4  \
3163                               \
3164     /usr/X386/include         \
3165     /usr/x386/include         \
3166     /usr/XFree86/include/X11  \
3167                               \
3168     /usr/include              \
3169     /usr/local/include        \
3170     /usr/unsupported/include  \
3171     /usr/athena/include       \
3172     /usr/local/x11r5/include  \
3173     /usr/lpp/Xamples/include  \
3174                               \
3175     /usr/openwin/include      \
3176     /usr/openwin/share/include \
3177     ; \
3178   do
3179     if test -r "$ac_dir/$x_direct_test_include"; then
3180       ac_x_includes=$ac_dir
3181       break
3182     fi
3183   done
3184 fi
3185 rm -f conftest*
3186 fi # $ac_x_includes = NO
3187
3188 if test "$ac_x_libraries" = NO; then
3189   # Check for the libraries.
3190
3191   test -z "$x_direct_test_library" && x_direct_test_library=Xt
3192   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3193
3194   # See if we find them without any special options.
3195   # Don't add to $LIBS permanently.
3196   ac_save_LIBS="$LIBS"
3197   LIBS="-l$x_direct_test_library $LIBS"
3198 cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201
3202 int main() {
3203 ${x_direct_test_function}()
3204 ; return 0; }
3205 EOF
3206 if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3207   rm -rf conftest*
3208   LIBS="$ac_save_LIBS"
3209 # We can link X programs with no special library path.
3210 ac_x_libraries=
3211 else
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   LIBS="$ac_save_LIBS"
3216 # First see if replacing the include by lib works.
3217 # Check X11 before X11Rn because it is often a symlink to the current release.
3218 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3219     /usr/X11/lib          \
3220     /usr/X11R6/lib        \
3221     /usr/X11R5/lib        \
3222     /usr/X11R4/lib        \
3223                           \
3224     /usr/lib/X11          \
3225     /usr/lib/X11R6        \
3226     /usr/lib/X11R5        \
3227     /usr/lib/X11R4        \
3228                           \
3229     /usr/local/X11/lib    \
3230     /usr/local/X11R6/lib  \
3231     /usr/local/X11R5/lib  \
3232     /usr/local/X11R4/lib  \
3233                           \
3234     /usr/local/lib/X11    \
3235     /usr/local/lib/X11R6  \
3236     /usr/local/lib/X11R5  \
3237     /usr/local/lib/X11R4  \
3238                           \
3239     /usr/X386/lib         \
3240     /usr/x386/lib         \
3241     /usr/XFree86/lib/X11  \
3242                           \
3243     /usr/lib              \
3244     /usr/local/lib        \
3245     /usr/unsupported/lib  \
3246     /usr/athena/lib       \
3247     /usr/local/x11r5/lib  \
3248     /usr/lpp/Xamples/lib  \
3249     /lib/usr/lib/X11      \
3250                           \
3251     /usr/openwin/lib      \
3252     /usr/openwin/share/lib \
3253     ; \
3254 do
3255   for ac_extension in a so sl; do
3256     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3257       ac_x_libraries=$ac_dir
3258       break 2
3259     fi
3260   done
3261 done
3262 fi
3263 rm -f conftest*
3264 fi # $ac_x_libraries = NO
3265
3266 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3267   # Didn't find X anywhere.  Cache the known absence of X.
3268   ac_cv_have_x="have_x=no"
3269 else
3270   # Record where we found X for the cache.
3271   ac_cv_have_x="have_x=yes \
3272                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3273 fi
3274 fi
3275   fi
3276   eval "$ac_cv_have_x"
3277 fi # $with_x != no
3278
3279 if test "$have_x" != yes; then
3280   echo "$ac_t""$have_x" 1>&6
3281   no_x=yes
3282 else
3283   # If each of the values was on the command line, it overrides each guess.
3284   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3285   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3286   # Update the cache value to reflect the command line values.
3287   ac_cv_have_x="have_x=yes \
3288                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3289   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3290 fi
3291
3292 if test "$no_x" = yes; then
3293   # Not all programs may use this symbol, but it does not hurt to define it.
3294   cat >> confdefs.h <<\EOF
3295 #define X_DISPLAY_MISSING 1
3296 EOF
3297
3298   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3299 else
3300   if test -n "$x_includes"; then
3301     X_CFLAGS="$X_CFLAGS -I$x_includes"
3302   fi
3303
3304   # It would also be nice to do this for all -L options, not just this one.
3305   if test -n "$x_libraries"; then
3306     X_LIBS="$X_LIBS -L$x_libraries"
3307     # For Solaris; some versions of Sun CC require a space after -R and
3308     # others require no space.  Words are not sufficient . . . .
3309     case "`(uname -sr) 2>/dev/null`" in
3310     "SunOS 5"*)
3311       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3312 echo "configure:3313: checking whether -R must be followed by a space" >&5
3313       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3314       cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317
3318 int main() {
3319
3320 ; return 0; }
3321 EOF
3322 if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3323   rm -rf conftest*
3324   ac_R_nospace=yes
3325 else
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328   rm -rf conftest*
3329   ac_R_nospace=no
3330 fi
3331 rm -f conftest*
3332       if test $ac_R_nospace = yes; then
3333         echo "$ac_t""no" 1>&6
3334         X_LIBS="$X_LIBS -R$x_libraries"
3335       else
3336         LIBS="$ac_xsave_LIBS -R $x_libraries"
3337         cat > conftest.$ac_ext <<EOF
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3340
3341 int main() {
3342
3343 ; return 0; }
3344 EOF
3345 if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3346   rm -rf conftest*
3347   ac_R_space=yes
3348 else
3349   echo "configure: failed program was:" >&5
3350   cat conftest.$ac_ext >&5
3351   rm -rf conftest*
3352   ac_R_space=no
3353 fi
3354 rm -f conftest*
3355         if test $ac_R_space = yes; then
3356           echo "$ac_t""yes" 1>&6
3357           X_LIBS="$X_LIBS -R $x_libraries"
3358         else
3359           echo "$ac_t""neither works" 1>&6
3360         fi
3361       fi
3362       LIBS="$ac_xsave_LIBS"
3363     esac
3364   fi
3365
3366   # Check for system-dependent libraries X programs must link with.
3367   # Do this before checking for the system-independent R6 libraries
3368   # (-lICE), since we may need -lsocket or whatever for X linking.
3369
3370   if test "$ISC" = yes; then
3371     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3372   else
3373     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3374     # libraries were built with DECnet support.  And karl@cs.umb.edu says
3375     # the Alpha needs dnet_stub (dnet does not exist).
3376     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3377 echo "configure:3378: checking for dnet_ntoa in -ldnet" >&5
3378 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   ac_save_LIBS="$LIBS"
3383 LIBS="-ldnet  $LIBS"
3384 cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 /* Override any gcc2 internal prototype to avoid an error.  */
3388 /* We use char because int might match the return type of a gcc2
3389     builtin and then its argument prototype would still apply.  */
3390 char dnet_ntoa();
3391
3392 int main() {
3393 dnet_ntoa()
3394 ; return 0; }
3395 EOF
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3397   rm -rf conftest*
3398   eval "ac_cv_lib_$ac_lib_var=yes"
3399 else
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   rm -rf conftest*
3403   eval "ac_cv_lib_$ac_lib_var=no"
3404 fi
3405 rm -f conftest*
3406 LIBS="$ac_save_LIBS"
3407
3408 fi
3409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3410   echo "$ac_t""yes" 1>&6
3411   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3412 else
3413   echo "$ac_t""no" 1>&6
3414 fi
3415
3416     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3417       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3418 echo "configure:3419: checking for dnet_ntoa in -ldnet_stub" >&5
3419 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3421   echo $ac_n "(cached) $ac_c" 1>&6
3422 else
3423   ac_save_LIBS="$LIBS"
3424 LIBS="-ldnet_stub  $LIBS"
3425 cat > conftest.$ac_ext <<EOF
3426 #line 3427 "configure"
3427 #include "confdefs.h"
3428 /* Override any gcc2 internal prototype to avoid an error.  */
3429 /* We use char because int might match the return type of a gcc2
3430     builtin and then its argument prototype would still apply.  */
3431 char dnet_ntoa();
3432
3433 int main() {
3434 dnet_ntoa()
3435 ; return 0; }
3436 EOF
3437 if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3438   rm -rf conftest*
3439   eval "ac_cv_lib_$ac_lib_var=yes"
3440 else
3441   echo "configure: failed program was:" >&5
3442   cat conftest.$ac_ext >&5
3443   rm -rf conftest*
3444   eval "ac_cv_lib_$ac_lib_var=no"
3445 fi
3446 rm -f conftest*
3447 LIBS="$ac_save_LIBS"
3448
3449 fi
3450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3451   echo "$ac_t""yes" 1>&6
3452   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3453 else
3454   echo "$ac_t""no" 1>&6
3455 fi
3456
3457     fi
3458
3459     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3460     # to get the SysV transport functions.
3461     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3462     # needs -lnsl.
3463     # The nsl library prevents programs from opening the X display
3464     # on Irix 5.2, according to dickey@clark.net.
3465     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3466 echo "configure:3467: checking for gethostbyname" >&5
3467 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 /* System header to define __stub macros and hopefully few prototypes,
3474     which can conflict with char gethostbyname(); below.  */
3475 #include <assert.h>
3476 /* Override any gcc2 internal prototype to avoid an error.  */
3477 /* We use char because int might match the return type of a gcc2
3478     builtin and then its argument prototype would still apply.  */
3479 char gethostbyname();
3480
3481 int main() {
3482
3483 /* The GNU C library defines this for functions which it implements
3484     to always fail with ENOSYS.  Some functions are actually named
3485     something starting with __ and the normal name is an alias.  */
3486 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3487 choke me
3488 #else
3489 gethostbyname();
3490 #endif
3491
3492 ; return 0; }
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   rm -rf conftest*
3496   eval "ac_cv_func_gethostbyname=yes"
3497 else
3498   echo "configure: failed program was:" >&5
3499   cat conftest.$ac_ext >&5
3500   rm -rf conftest*
3501   eval "ac_cv_func_gethostbyname=no"
3502 fi
3503 rm -f conftest*
3504 fi
3505
3506 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3507   echo "$ac_t""yes" 1>&6
3508   :
3509 else
3510   echo "$ac_t""no" 1>&6
3511 fi
3512
3513     if test $ac_cv_func_gethostbyname = no; then
3514       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3515 echo "configure:3516: checking for gethostbyname in -lnsl" >&5
3516 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3517 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   ac_save_LIBS="$LIBS"
3521 LIBS="-lnsl  $LIBS"
3522 cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525 /* Override any gcc2 internal prototype to avoid an error.  */
3526 /* We use char because int might match the return type of a gcc2
3527     builtin and then its argument prototype would still apply.  */
3528 char gethostbyname();
3529
3530 int main() {
3531 gethostbyname()
3532 ; return 0; }
3533 EOF
3534 if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3535   rm -rf conftest*
3536   eval "ac_cv_lib_$ac_lib_var=yes"
3537 else
3538   echo "configure: failed program was:" >&5
3539   cat conftest.$ac_ext >&5
3540   rm -rf conftest*
3541   eval "ac_cv_lib_$ac_lib_var=no"
3542 fi
3543 rm -f conftest*
3544 LIBS="$ac_save_LIBS"
3545
3546 fi
3547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3548   echo "$ac_t""yes" 1>&6
3549   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3550 else
3551   echo "$ac_t""no" 1>&6
3552 fi
3553
3554     fi
3555
3556     # lieder@skyler.mavd.honeywell.com says without -lsocket,
3557     # socket/setsockopt and other routines are undefined under SCO ODT
3558     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
3559     # on later versions), says simon@lia.di.epfl.ch: it contains
3560     # gethostby* variants that don't use the nameserver (or something).
3561     # -lsocket must be given before -lnsl if both are needed.
3562     # We assume that if connect needs -lnsl, so does gethostbyname.
3563     echo $ac_n "checking for connect""... $ac_c" 1>&6
3564 echo "configure:3565: checking for connect" >&5
3565 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* System header to define __stub macros and hopefully few prototypes,
3572     which can conflict with char connect(); below.  */
3573 #include <assert.h>
3574 /* Override any gcc2 internal prototype to avoid an error.  */
3575 /* We use char because int might match the return type of a gcc2
3576     builtin and then its argument prototype would still apply.  */
3577 char connect();
3578
3579 int main() {
3580
3581 /* The GNU C library defines this for functions which it implements
3582     to always fail with ENOSYS.  Some functions are actually named
3583     something starting with __ and the normal name is an alias.  */
3584 #if defined (__stub_connect) || defined (__stub___connect)
3585 choke me
3586 #else
3587 connect();
3588 #endif
3589
3590 ; return 0; }
3591 EOF
3592 if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3593   rm -rf conftest*
3594   eval "ac_cv_func_connect=yes"
3595 else
3596   echo "configure: failed program was:" >&5
3597   cat conftest.$ac_ext >&5
3598   rm -rf conftest*
3599   eval "ac_cv_func_connect=no"
3600 fi
3601 rm -f conftest*
3602 fi
3603
3604 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3605   echo "$ac_t""yes" 1>&6
3606   :
3607 else
3608   echo "$ac_t""no" 1>&6
3609 fi
3610
3611     if test $ac_cv_func_connect = no; then
3612       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3613 echo "configure:3614: checking for connect in -lsocket" >&5
3614 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3615 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3616   echo $ac_n "(cached) $ac_c" 1>&6
3617 else
3618   ac_save_LIBS="$LIBS"
3619 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3620 cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3623 /* Override any gcc2 internal prototype to avoid an error.  */
3624 /* We use char because int might match the return type of a gcc2
3625     builtin and then its argument prototype would still apply.  */
3626 char connect();
3627
3628 int main() {
3629 connect()
3630 ; return 0; }
3631 EOF
3632 if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3633   rm -rf conftest*
3634   eval "ac_cv_lib_$ac_lib_var=yes"
3635 else
3636   echo "configure: failed program was:" >&5
3637   cat conftest.$ac_ext >&5
3638   rm -rf conftest*
3639   eval "ac_cv_lib_$ac_lib_var=no"
3640 fi
3641 rm -f conftest*
3642 LIBS="$ac_save_LIBS"
3643
3644 fi
3645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3646   echo "$ac_t""yes" 1>&6
3647   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3648 else
3649   echo "$ac_t""no" 1>&6
3650 fi
3651
3652     fi
3653
3654     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3655     echo $ac_n "checking for remove""... $ac_c" 1>&6
3656 echo "configure:3657: checking for remove" >&5
3657 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3658   echo $ac_n "(cached) $ac_c" 1>&6
3659 else
3660   cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 /* System header to define __stub macros and hopefully few prototypes,
3664     which can conflict with char remove(); below.  */
3665 #include <assert.h>
3666 /* Override any gcc2 internal prototype to avoid an error.  */
3667 /* We use char because int might match the return type of a gcc2
3668     builtin and then its argument prototype would still apply.  */
3669 char remove();
3670
3671 int main() {
3672
3673 /* The GNU C library defines this for functions which it implements
3674     to always fail with ENOSYS.  Some functions are actually named
3675     something starting with __ and the normal name is an alias.  */
3676 #if defined (__stub_remove) || defined (__stub___remove)
3677 choke me
3678 #else
3679 remove();
3680 #endif
3681
3682 ; return 0; }
3683 EOF
3684 if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3685   rm -rf conftest*
3686   eval "ac_cv_func_remove=yes"
3687 else
3688   echo "configure: failed program was:" >&5
3689   cat conftest.$ac_ext >&5
3690   rm -rf conftest*
3691   eval "ac_cv_func_remove=no"
3692 fi
3693 rm -f conftest*
3694 fi
3695
3696 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3697   echo "$ac_t""yes" 1>&6
3698   :
3699 else
3700   echo "$ac_t""no" 1>&6
3701 fi
3702
3703     if test $ac_cv_func_remove = no; then
3704       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3705 echo "configure:3706: checking for remove in -lposix" >&5
3706 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3707 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   ac_save_LIBS="$LIBS"
3711 LIBS="-lposix  $LIBS"
3712 cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715 /* Override any gcc2 internal prototype to avoid an error.  */
3716 /* We use char because int might match the return type of a gcc2
3717     builtin and then its argument prototype would still apply.  */
3718 char remove();
3719
3720 int main() {
3721 remove()
3722 ; return 0; }
3723 EOF
3724 if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3725   rm -rf conftest*
3726   eval "ac_cv_lib_$ac_lib_var=yes"
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   eval "ac_cv_lib_$ac_lib_var=no"
3732 fi
3733 rm -f conftest*
3734 LIBS="$ac_save_LIBS"
3735
3736 fi
3737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3738   echo "$ac_t""yes" 1>&6
3739   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3740 else
3741   echo "$ac_t""no" 1>&6
3742 fi
3743
3744     fi
3745
3746     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3747     echo $ac_n "checking for shmat""... $ac_c" 1>&6
3748 echo "configure:3749: checking for shmat" >&5
3749 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 /* System header to define __stub macros and hopefully few prototypes,
3756     which can conflict with char shmat(); below.  */
3757 #include <assert.h>
3758 /* Override any gcc2 internal prototype to avoid an error.  */
3759 /* We use char because int might match the return type of a gcc2
3760     builtin and then its argument prototype would still apply.  */
3761 char shmat();
3762
3763 int main() {
3764
3765 /* The GNU C library defines this for functions which it implements
3766     to always fail with ENOSYS.  Some functions are actually named
3767     something starting with __ and the normal name is an alias.  */
3768 #if defined (__stub_shmat) || defined (__stub___shmat)
3769 choke me
3770 #else
3771 shmat();
3772 #endif
3773
3774 ; return 0; }
3775 EOF
3776 if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3777   rm -rf conftest*
3778   eval "ac_cv_func_shmat=yes"
3779 else
3780   echo "configure: failed program was:" >&5
3781   cat conftest.$ac_ext >&5
3782   rm -rf conftest*
3783   eval "ac_cv_func_shmat=no"
3784 fi
3785 rm -f conftest*
3786 fi
3787
3788 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3789   echo "$ac_t""yes" 1>&6
3790   :
3791 else
3792   echo "$ac_t""no" 1>&6
3793 fi
3794
3795     if test $ac_cv_func_shmat = no; then
3796       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3797 echo "configure:3798: checking for shmat in -lipc" >&5
3798 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3799 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3800   echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802   ac_save_LIBS="$LIBS"
3803 LIBS="-lipc  $LIBS"
3804 cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 /* Override any gcc2 internal prototype to avoid an error.  */
3808 /* We use char because int might match the return type of a gcc2
3809     builtin and then its argument prototype would still apply.  */
3810 char shmat();
3811
3812 int main() {
3813 shmat()
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3817   rm -rf conftest*
3818   eval "ac_cv_lib_$ac_lib_var=yes"
3819 else
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   eval "ac_cv_lib_$ac_lib_var=no"
3824 fi
3825 rm -f conftest*
3826 LIBS="$ac_save_LIBS"
3827
3828 fi
3829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3830   echo "$ac_t""yes" 1>&6
3831   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3832 else
3833   echo "$ac_t""no" 1>&6
3834 fi
3835
3836     fi
3837   fi
3838
3839   # Check for libraries that X11R6 Xt/Xaw programs need.
3840   ac_save_LDFLAGS="$LDFLAGS"
3841   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3842   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3843   # check for ICE first), but we must link in the order -lSM -lICE or
3844   # we get undefined symbols.  So assume we have SM if we have ICE.
3845   # These have to be linked with before -lX11, unlike the other
3846   # libraries we check for below, so use a different variable.
3847   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3848   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3849 echo "configure:3850: checking for IceConnectionNumber in -lICE" >&5
3850 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3852   echo $ac_n "(cached) $ac_c" 1>&6
3853 else
3854   ac_save_LIBS="$LIBS"
3855 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3856 cat > conftest.$ac_ext <<EOF
3857 #line 3858 "configure"
3858 #include "confdefs.h"
3859 /* Override any gcc2 internal prototype to avoid an error.  */
3860 /* We use char because int might match the return type of a gcc2
3861     builtin and then its argument prototype would still apply.  */
3862 char IceConnectionNumber();
3863
3864 int main() {
3865 IceConnectionNumber()
3866 ; return 0; }
3867 EOF
3868 if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3869   rm -rf conftest*
3870   eval "ac_cv_lib_$ac_lib_var=yes"
3871 else
3872   echo "configure: failed program was:" >&5
3873   cat conftest.$ac_ext >&5
3874   rm -rf conftest*
3875   eval "ac_cv_lib_$ac_lib_var=no"
3876 fi
3877 rm -f conftest*
3878 LIBS="$ac_save_LIBS"
3879
3880 fi
3881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3882   echo "$ac_t""yes" 1>&6
3883   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3884 else
3885   echo "$ac_t""no" 1>&6
3886 fi
3887
3888   LDFLAGS="$ac_save_LDFLAGS"
3889
3890 fi
3891
3892
3893
3894
3895
3896
3897
3898
3899 X_TOOLKIT_LIBS="-lXt"
3900 X_BASIC_LIBS="-lXext -lX11"
3901
3902 our_saved_LDFLAGS="$LDFLAGS"
3903 LDFLAGS="$X_LIBS $LDFLAGS"
3904 echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6
3905 echo "configure:3906: checking for XtToolkitThreadInitialize in -lXt" >&5
3906 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'`
3907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   ac_save_LIBS="$LIBS"
3911 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 /* Override any gcc2 internal prototype to avoid an error.  */
3916 /* We use char because int might match the return type of a gcc2
3917     builtin and then its argument prototype would still apply.  */
3918 char XtToolkitThreadInitialize();
3919
3920 int main() {
3921 XtToolkitThreadInitialize()
3922 ; return 0; }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3925   rm -rf conftest*
3926   eval "ac_cv_lib_$ac_lib_var=yes"
3927 else
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   eval "ac_cv_lib_$ac_lib_var=no"
3932 fi
3933 rm -f conftest*
3934 LIBS="$ac_save_LIBS"
3935
3936 fi
3937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3938   echo "$ac_t""yes" 1>&6
3939   cat >> confdefs.h <<\EOF
3940 #define X_THREAD_SUPPORT 1
3941 EOF
3942
3943 else
3944   echo "$ac_t""no" 1>&6
3945 fi
3946
3947 LDFLAGS="$our_saved_LDFLAGS"
3948
3949 our_saved_LDFLAGS="$LDFLAGS"
3950 LDFLAGS="$X_LIBS $LDFLAGS"
3951 echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6
3952 echo "configure:3953: checking for XdbeQueryExtension in -lXext" >&5
3953 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'`
3954 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   ac_save_LIBS="$LIBS"
3958 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 /* Override any gcc2 internal prototype to avoid an error.  */
3963 /* We use char because int might match the return type of a gcc2
3964     builtin and then its argument prototype would still apply.  */
3965 char XdbeQueryExtension();
3966
3967 int main() {
3968 XdbeQueryExtension()
3969 ; return 0; }
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=yes"
3974 else
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -rf conftest*
3978   eval "ac_cv_lib_$ac_lib_var=no"
3979 fi
3980 rm -f conftest*
3981 LIBS="$ac_save_LIBS"
3982
3983 fi
3984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3985   echo "$ac_t""yes" 1>&6
3986   cat >> confdefs.h <<\EOF
3987 #define HAVE_DBE_SUPPORT 1
3988 EOF
3989
3990 else
3991   echo "$ac_t""no" 1>&6
3992 fi
3993
3994 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
3995 echo "configure:3996: checking for XmbufQueryExtension in -lXext" >&5
3996 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'`
3997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3998   echo $ac_n "(cached) $ac_c" 1>&6
3999 else
4000   ac_save_LIBS="$LIBS"
4001 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
4002 cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 /* Override any gcc2 internal prototype to avoid an error.  */
4006 /* We use char because int might match the return type of a gcc2
4007     builtin and then its argument prototype would still apply.  */
4008 char XmbufQueryExtension();
4009
4010 int main() {
4011 XmbufQueryExtension()
4012 ; return 0; }
4013 EOF
4014 if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4015   rm -rf conftest*
4016   eval "ac_cv_lib_$ac_lib_var=yes"
4017 else
4018   echo "configure: failed program was:" >&5
4019   cat conftest.$ac_ext >&5
4020   rm -rf conftest*
4021   eval "ac_cv_lib_$ac_lib_var=no"
4022 fi
4023 rm -f conftest*
4024 LIBS="$ac_save_LIBS"
4025
4026 fi
4027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4028   echo "$ac_t""yes" 1>&6
4029   cat >> confdefs.h <<\EOF
4030 #define HAVE_MBX_SUPPORT 1
4031 EOF
4032
4033 else
4034   echo "$ac_t""no" 1>&6
4035 fi
4036
4037 LDFLAGS="$our_saved_LDFLAGS"
4038 our_saved_CPPFLAGS="$CPPFLAGS"
4039 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
4040 for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h
4041 do
4042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4044 echo "configure:4045: checking for $ac_hdr" >&5
4045 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4046   echo $ac_n "(cached) $ac_c" 1>&6
4047 else
4048   cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 #include <$ac_hdr>
4052 EOF
4053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4054 { (eval echo configure:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4056 if test -z "$ac_err"; then
4057   rm -rf conftest*
4058   eval "ac_cv_header_$ac_safe=yes"
4059 else
4060   echo "$ac_err" >&5
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063   rm -rf conftest*
4064   eval "ac_cv_header_$ac_safe=no"
4065 fi
4066 rm -f conftest*
4067 fi
4068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4069   echo "$ac_t""yes" 1>&6
4070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4071   cat >> confdefs.h <<EOF
4072 #define $ac_tr_hdr 1
4073 EOF
4074  
4075 else
4076   echo "$ac_t""no" 1>&6
4077 fi
4078 done
4079
4080 CPPFLAGS="$our_saved_CPPFLAGS"
4081
4082
4083
4084 if test "x$no_x" = "xyes"; then
4085   NO_X_TRUE=
4086   NO_X_FALSE='#'
4087 else
4088   NO_X_TRUE='#'
4089   NO_X_FALSE=
4090 fi
4091
4092 my_includes="$my_includes -I../include -I.."
4093
4094
4095 echo $ac_n "checking interactive graphics""... $ac_c" 1>&6
4096 echo "configure:4097: checking interactive graphics" >&5
4097 if test "$no_x" != "yes" ; then
4098   cat >> confdefs.h <<\EOF
4099 #define HAVE_X11 1
4100 EOF
4101
4102   cat >> confdefs.h <<\EOF
4103 #define HAVE_SGP 1
4104 EOF
4105
4106   
4107
4108 if test 1==1; then
4109   HAVE_SGP_TRUE=
4110   HAVE_SGP_FALSE='#'
4111 else
4112   HAVE_SGP_TRUE='#'
4113   HAVE_SGP_FALSE=
4114 fi
4115   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
4116   ctlibs_graphics="$ctlibs_base -lctgraphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
4117   echo "$ac_t""yes" 1>&6
4118 else
4119   echo "$ac_t""no" 1>&6
4120 fi
4121
4122 if test "$png" = "true" ; then
4123   ctlibs_tools="$ctlibs_tools -lpng"
4124 fi
4125 if test "$zlib" = "true" ; then
4126   ctlibs_tools="$ctlibs_tools -lz"
4127 fi
4128 if test "$g2" = "true" ; then
4129   ctlibs_tools="$ctlibs_tools -lg2"
4130 fi
4131
4132 if test "$fftw" = "true" ; then
4133   ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
4134 fi
4135
4136 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
4137 echo "configure:4138: checking for main in -ldmallocxx" >&5
4138 ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'`
4139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4140   echo $ac_n "(cached) $ac_c" 1>&6
4141 else
4142   ac_save_LIBS="$LIBS"
4143 LIBS="-ldmallocxx  $LIBS"
4144 cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147
4148 int main() {
4149 main()
4150 ; return 0; }
4151 EOF
4152 if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4153   rm -rf conftest*
4154   eval "ac_cv_lib_$ac_lib_var=yes"
4155 else
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -rf conftest*
4159   eval "ac_cv_lib_$ac_lib_var=no"
4160 fi
4161 rm -f conftest*
4162 LIBS="$ac_save_LIBS"
4163
4164 fi
4165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4166   echo "$ac_t""yes" 1>&6
4167   dmallocxx=true
4168 else
4169   echo "$ac_t""no" 1>&6
4170 dmallocxx=false
4171 fi
4172
4173 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
4174 echo "configure:4175: checking for enable-dmalloc" >&5
4175 # Check whether --enable-dmalloc or --disable-dmalloc was given.
4176 if test "${enable_dmalloc+set}" = set; then
4177   enableval="$enable_dmalloc"
4178   case "${enableval}" in
4179   yes) usedmalloc=true 
4180        echo "$ac_t""yes" 1>&6
4181        ;;
4182   no)  usedmalloc=false 
4183        echo "$ac_t""no" 1>&6
4184        ;;
4185   *) echo "$ac_t""bad value ${enableval} for --enable-dmalloc" 1>&6 
4186        ;;
4187 esac
4188 else
4189   usedmalloc=false; echo "$ac_t""no" 1>&6
4190 fi
4191
4192
4193 if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then
4194   ctlibs_tools="$ctlibs_tools -ldmallocxx"
4195   cat >> confdefs.h <<\EOF
4196 #define HAVE_DMALLOC 1
4197 EOF
4198
4199   echo "$ac_t""Using dmalloc" 1>&6
4200 fi
4201
4202 if test "$wxwin" = "true" ; then
4203   wxcflags=`$wxconfig --cflags`
4204   CFLAGS="$CFLAGS -I../include $wxcflags"
4205   wxlibs=`$wxconfig --libs`
4206   ctlibs_graphics="$ctlibs_graphics $wxlibs"
4207   
4208
4209 if test 1==1 ; then
4210   HAVE_WXWINDOWS_TRUE=
4211   HAVE_WXWINDOWS_FALSE='#'
4212 else
4213   HAVE_WXWINDOWS_TRUE='#'
4214   HAVE_WXWINDOWS_FALSE=
4215 fi
4216 fi
4217
4218
4219
4220 LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
4221 ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
4222
4223
4224 if test -n "$lamdir" ; then
4225   lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
4226   
4227 fi
4228
4229 CXXFLAGS="$CFLAGS"
4230
4231 trap '' 1 2 15
4232 cat > confcache <<\EOF
4233 # This file is a shell script that caches the results of configure
4234 # tests run on this system so they can be shared between configure
4235 # scripts and configure runs.  It is not useful on other systems.
4236 # If it contains results you don't want to keep, you may remove or edit it.
4237 #
4238 # By default, configure uses ./config.cache as the cache file,
4239 # creating it if it does not exist already.  You can give configure
4240 # the --cache-file=FILE option to use a different cache file; that is
4241 # what configure does when it calls configure scripts in
4242 # subdirectories, so they share the cache.
4243 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4244 # config.status only pays attention to the cache file if you give it the
4245 # --recheck option to rerun configure.
4246 #
4247 EOF
4248 # The following way of writing the cache mishandles newlines in values,
4249 # but we know of no workaround that is simple, portable, and efficient.
4250 # So, don't put newlines in cache variables' values.
4251 # Ultrix sh set writes to stderr and can't be redirected directly,
4252 # and sets the high bit in the cache file unless we assign to the vars.
4253 (set) 2>&1 |
4254   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4255   *ac_space=\ *)
4256     # `set' does not quote correctly, so add quotes (double-quote substitution
4257     # turns \\\\ into \\, and sed turns \\ into \).
4258     sed -n \
4259       -e "s/'/'\\\\''/g" \
4260       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4261     ;;
4262   *)
4263     # `set' quotes correctly as required by POSIX, so do not add quotes.
4264     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4265     ;;
4266   esac >> confcache
4267 if cmp -s $cache_file confcache; then
4268   :
4269 else
4270   if test -w $cache_file; then
4271     echo "updating cache $cache_file"
4272     cat confcache > $cache_file
4273   else
4274     echo "not updating unwritable cache $cache_file"
4275   fi
4276 fi
4277 rm -f confcache
4278
4279 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4280
4281 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4282 # Let make expand exec_prefix.
4283 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4284
4285 # Any assignment to VPATH causes Sun make to only execute
4286 # the first set of double-colon rules, so remove it if not needed.
4287 # If there is a colon in the path, we need to keep it.
4288 if test "x$srcdir" = x.; then
4289   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4290 fi
4291
4292 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4293
4294 DEFS=-DHAVE_CONFIG_H
4295
4296 # Without the "./", some shells look in PATH for config.status.
4297 : ${CONFIG_STATUS=./config.status}
4298
4299 echo creating $CONFIG_STATUS
4300 rm -f $CONFIG_STATUS
4301 cat > $CONFIG_STATUS <<EOF
4302 #! /bin/sh
4303 # Generated automatically by configure.
4304 # Run this file to recreate the current configuration.
4305 # This directory was configured as follows,
4306 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4307 #
4308 # $0 $ac_configure_args
4309 #
4310 # Compiler output produced by configure, useful for debugging
4311 # configure, is in ./config.log if it exists.
4312
4313 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4314 for ac_option
4315 do
4316   case "\$ac_option" in
4317   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4318     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4319     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4320   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4321     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4322     exit 0 ;;
4323   -help | --help | --hel | --he | --h)
4324     echo "\$ac_cs_usage"; exit 0 ;;
4325   *) echo "\$ac_cs_usage"; exit 1 ;;
4326   esac
4327 done
4328
4329 ac_given_srcdir=$srcdir
4330 ac_given_INSTALL="$INSTALL"
4331
4332 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
4333 EOF
4334 cat >> $CONFIG_STATUS <<EOF
4335
4336 # Protect against being on the right side of a sed subst in config.status.
4337 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4338  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4339 $ac_vpsub
4340 $extrasub
4341 s%@SHELL@%$SHELL%g
4342 s%@CFLAGS@%$CFLAGS%g
4343 s%@CPPFLAGS@%$CPPFLAGS%g
4344 s%@CXXFLAGS@%$CXXFLAGS%g
4345 s%@FFLAGS@%$FFLAGS%g
4346 s%@DEFS@%$DEFS%g
4347 s%@LDFLAGS@%$LDFLAGS%g
4348 s%@LIBS@%$LIBS%g
4349 s%@exec_prefix@%$exec_prefix%g
4350 s%@prefix@%$prefix%g
4351 s%@program_transform_name@%$program_transform_name%g
4352 s%@bindir@%$bindir%g
4353 s%@sbindir@%$sbindir%g
4354 s%@libexecdir@%$libexecdir%g
4355 s%@datadir@%$datadir%g
4356 s%@sysconfdir@%$sysconfdir%g
4357 s%@sharedstatedir@%$sharedstatedir%g
4358 s%@localstatedir@%$localstatedir%g
4359 s%@libdir@%$libdir%g
4360 s%@includedir@%$includedir%g
4361 s%@oldincludedir@%$oldincludedir%g
4362 s%@infodir@%$infodir%g
4363 s%@mandir@%$mandir%g
4364 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4365 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4366 s%@INSTALL_DATA@%$INSTALL_DATA%g
4367 s%@PACKAGE@%$PACKAGE%g
4368 s%@VERSION@%$VERSION%g
4369 s%@ACLOCAL@%$ACLOCAL%g
4370 s%@AUTOCONF@%$AUTOCONF%g
4371 s%@AUTOMAKE@%$AUTOMAKE%g
4372 s%@AUTOHEADER@%$AUTOHEADER%g
4373 s%@MAKEINFO@%$MAKEINFO%g
4374 s%@SET_MAKE@%$SET_MAKE%g
4375 s%@AWK@%$AWK%g
4376 s%@RANLIB@%$RANLIB%g
4377 s%@CC@%$CC%g
4378 s%@CXX@%$CXX%g
4379 s%@wxconfig@%$wxconfig%g
4380 s%@host@%$host%g
4381 s%@host_alias@%$host_alias%g
4382 s%@host_cpu@%$host_cpu%g
4383 s%@host_vendor@%$host_vendor%g
4384 s%@host_os@%$host_os%g
4385 s%@CPP@%$CPP%g
4386 s%@INCLUDED_GETOPT_LONG_TRUE@%$INCLUDED_GETOPT_LONG_TRUE%g
4387 s%@INCLUDED_GETOPT_LONG_FALSE@%$INCLUDED_GETOPT_LONG_FALSE%g
4388 s%@DEBUG_TRUE@%$DEBUG_TRUE%g
4389 s%@DEBUG_FALSE@%$DEBUG_FALSE%g
4390 s%@lamdir@%$lamdir%g
4391 s%@mpienable@%$mpienable%g
4392 s%@cgibindir@%$cgibindir%g
4393 s%@cgibinurl@%$cgibinurl%g
4394 s%@webdatadir@%$webdatadir%g
4395 s%@webdataurl@%$webdataurl%g
4396 s%@htmldir@%$htmldir%g
4397 s%@cgiprograms@%$cgiprograms%g
4398 s%@htmldata@%$htmldata%g
4399 s%@USE_HTML_TRUE@%$USE_HTML_TRUE%g
4400 s%@USE_HTML_FALSE@%$USE_HTML_FALSE%g
4401 s%@webenabled@%$webenabled%g
4402 s%@USE_LAM_TRUE@%$USE_LAM_TRUE%g
4403 s%@USE_LAM_FALSE@%$USE_LAM_FALSE%g
4404 s%@X_CFLAGS@%$X_CFLAGS%g
4405 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4406 s%@X_LIBS@%$X_LIBS%g
4407 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4408 s%@X_TOOLKIT_LIBS@%$X_TOOLKIT_LIBS%g
4409 s%@X_BASIC_LIBS@%$X_BASIC_LIBS%g
4410 s%@NO_X_TRUE@%$NO_X_TRUE%g
4411 s%@NO_X_FALSE@%$NO_X_FALSE%g
4412 s%@my_includes@%$my_includes%g
4413 s%@HAVE_SGP_TRUE@%$HAVE_SGP_TRUE%g
4414 s%@HAVE_SGP_FALSE@%$HAVE_SGP_FALSE%g
4415 s%@HAVE_WXWINDOWS_TRUE@%$HAVE_WXWINDOWS_TRUE%g
4416 s%@HAVE_WXWINDOWS_FALSE@%$HAVE_WXWINDOWS_FALSE%g
4417 s%@wxcflags@%$wxcflags%g
4418 s%@wxlibs@%$wxlibs%g
4419 s%@ctlibs@%$ctlibs%g
4420 s%@lamprograms@%$lamprograms%g
4421
4422 CEOF
4423 EOF
4424
4425 cat >> $CONFIG_STATUS <<\EOF
4426
4427 # Split the substitutions into bite-sized pieces for seds with
4428 # small command number limits, like on Digital OSF/1 and HP-UX.
4429 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4430 ac_file=1 # Number of current file.
4431 ac_beg=1 # First line for current file.
4432 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4433 ac_more_lines=:
4434 ac_sed_cmds=""
4435 while $ac_more_lines; do
4436   if test $ac_beg -gt 1; then
4437     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4438   else
4439     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4440   fi
4441   if test ! -s conftest.s$ac_file; then
4442     ac_more_lines=false
4443     rm -f conftest.s$ac_file
4444   else
4445     if test -z "$ac_sed_cmds"; then
4446       ac_sed_cmds="sed -f conftest.s$ac_file"
4447     else
4448       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4449     fi
4450     ac_file=`expr $ac_file + 1`
4451     ac_beg=$ac_end
4452     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4453   fi
4454 done
4455 if test -z "$ac_sed_cmds"; then
4456   ac_sed_cmds=cat
4457 fi
4458 EOF
4459
4460 cat >> $CONFIG_STATUS <<EOF
4461
4462 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"}
4463 EOF
4464 cat >> $CONFIG_STATUS <<\EOF
4465 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4466   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4467   case "$ac_file" in
4468   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4469        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4470   *) ac_file_in="${ac_file}.in" ;;
4471   esac
4472
4473   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4474
4475   # Remove last slash and all that follows it.  Not all systems have dirname.
4476   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4477   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4478     # The file is in a subdirectory.
4479     test ! -d "$ac_dir" && mkdir "$ac_dir"
4480     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4481     # A "../" for each directory in $ac_dir_suffix.
4482     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4483   else
4484     ac_dir_suffix= ac_dots=
4485   fi
4486
4487   case "$ac_given_srcdir" in
4488   .)  srcdir=.
4489       if test -z "$ac_dots"; then top_srcdir=.
4490       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4491   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4492   *) # Relative path.
4493     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4494     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4495   esac
4496
4497   case "$ac_given_INSTALL" in
4498   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4499   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4500   esac
4501
4502   echo creating "$ac_file"
4503   rm -f "$ac_file"
4504   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4505   case "$ac_file" in
4506   *Makefile*) ac_comsub="1i\\
4507 # $configure_input" ;;
4508   *) ac_comsub= ;;
4509   esac
4510
4511   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4512   sed -e "$ac_comsub
4513 s%@configure_input@%$configure_input%g
4514 s%@srcdir@%$srcdir%g
4515 s%@top_srcdir@%$top_srcdir%g
4516 s%@INSTALL@%$INSTALL%g
4517 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4518 fi; done
4519 rm -f conftest.s*
4520
4521 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4522 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4523 #
4524 # ac_d sets the value in "#define NAME VALUE" lines.
4525 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4526 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4527 ac_dC='\3'
4528 ac_dD='%g'
4529 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4530 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4531 ac_uB='\([      ]\)%\1#\2define\3'
4532 ac_uC=' '
4533 ac_uD='\4%g'
4534 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4535 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4536 ac_eB='$%\1#\2define\3'
4537 ac_eC=' '
4538 ac_eD='%g'
4539
4540 if test "${CONFIG_HEADERS+set}" != set; then
4541 EOF
4542 cat >> $CONFIG_STATUS <<EOF
4543   CONFIG_HEADERS="config.h"
4544 EOF
4545 cat >> $CONFIG_STATUS <<\EOF
4546 fi
4547 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4548   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4549   case "$ac_file" in
4550   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4551        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4552   *) ac_file_in="${ac_file}.in" ;;
4553   esac
4554
4555   echo creating $ac_file
4556
4557   rm -f conftest.frag conftest.in conftest.out
4558   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4559   cat $ac_file_inputs > conftest.in
4560
4561 EOF
4562
4563 # Transform confdefs.h into a sed script conftest.vals that substitutes
4564 # the proper values into config.h.in to produce config.h.  And first:
4565 # Protect against being on the right side of a sed subst in config.status.
4566 # Protect against being in an unquoted here document in config.status.
4567 rm -f conftest.vals
4568 cat > conftest.hdr <<\EOF
4569 s/[\\&%]/\\&/g
4570 s%[\\$`]%\\&%g
4571 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4572 s%ac_d%ac_u%gp
4573 s%ac_u%ac_e%gp
4574 EOF
4575 sed -n -f conftest.hdr confdefs.h > conftest.vals
4576 rm -f conftest.hdr
4577
4578 # This sed command replaces #undef with comments.  This is necessary, for
4579 # example, in the case of _POSIX_SOURCE, which is predefined and required
4580 # on some systems where configure will not decide to define it.
4581 cat >> conftest.vals <<\EOF
4582 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4583 EOF
4584
4585 # Break up conftest.vals because some shells have a limit on
4586 # the size of here documents, and old seds have small limits too.
4587
4588 rm -f conftest.tail
4589 while :
4590 do
4591   ac_lines=`grep -c . conftest.vals`
4592   # grep -c gives empty output for an empty file on some AIX systems.
4593   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4594   # Write a limited-size here document to conftest.frag.
4595   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4596   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4597   echo 'CEOF
4598   sed -f conftest.frag conftest.in > conftest.out
4599   rm -f conftest.in
4600   mv conftest.out conftest.in
4601 ' >> $CONFIG_STATUS
4602   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4603   rm -f conftest.vals
4604   mv conftest.tail conftest.vals
4605 done
4606 rm -f conftest.vals
4607
4608 cat >> $CONFIG_STATUS <<\EOF
4609   rm -f conftest.frag conftest.h
4610   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4611   cat conftest.in >> conftest.h
4612   rm -f conftest.in
4613   if cmp -s $ac_file conftest.h 2>/dev/null; then
4614     echo "$ac_file is unchanged"
4615     rm -f conftest.h
4616   else
4617     # Remove last slash and all that follows it.  Not all systems have dirname.
4618       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4619       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4620       # The file is in a subdirectory.
4621       test ! -d "$ac_dir" && mkdir "$ac_dir"
4622     fi
4623     rm -f $ac_file
4624     mv conftest.h $ac_file
4625   fi
4626 fi; done
4627
4628 EOF
4629 cat >> $CONFIG_STATUS <<EOF
4630
4631
4632 EOF
4633 cat >> $CONFIG_STATUS <<\EOF
4634 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4635
4636 exit 0
4637 EOF
4638 chmod +x $CONFIG_STATUS
4639 rm -fr confdefs* $ac_clean_files
4640 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4641