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