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