]> www.ginac.de Git - cln.git/blob - configure
- Fixed a logic error in the checks of gmp3.
[cln.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-shared         build shared libraries [default=no]
16   --enable-shared=PKGS    only build shared libraries if the current package
17                           appears as an element in the PKGS list"
18 ac_help="$ac_help
19   --enable-static         build static libraries [default=yes]
20   --enable-static=PKGS    only build shared libraries if the current package
21                           appears as an element in the PKGS list"
22 ac_help="$ac_help
23   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
24 ac_help="$ac_help
25   --with-gmp              use external fast GNU gmp low-level functions"
26
27 # Initialize some variables set by options.
28 # The variables have the same names as the options, with
29 # dashes changed to underlines.
30 build=NONE
31 cache_file=./config.cache
32 exec_prefix=NONE
33 host=NONE
34 no_create=
35 nonopt=NONE
36 no_recursion=
37 prefix=NONE
38 program_prefix=NONE
39 program_suffix=NONE
40 program_transform_name=s,x,x,
41 silent=
42 site=
43 srcdir=
44 target=NONE
45 verbose=
46 x_includes=NONE
47 x_libraries=NONE
48 bindir='${exec_prefix}/bin'
49 sbindir='${exec_prefix}/sbin'
50 libexecdir='${exec_prefix}/libexec'
51 datadir='${prefix}/share'
52 sysconfdir='${prefix}/etc'
53 sharedstatedir='${prefix}/com'
54 localstatedir='${prefix}/var'
55 libdir='${exec_prefix}/lib'
56 includedir='${prefix}/include'
57 oldincludedir='/usr/include'
58 infodir='${prefix}/info'
59 mandir='${prefix}/man'
60
61 # Initialize some other variables.
62 subdirs=
63 MFLAGS= MAKEFLAGS=
64 SHELL=${CONFIG_SHELL-/bin/sh}
65 # Maximum number of lines to put in a shell here document.
66 ac_max_here_lines=12
67
68 ac_prev=
69 for ac_option
70 do
71
72   # If the previous option needs an argument, assign it.
73   if test -n "$ac_prev"; then
74     eval "$ac_prev=\$ac_option"
75     ac_prev=
76     continue
77   fi
78
79   case "$ac_option" in
80   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81   *) ac_optarg= ;;
82   esac
83
84   # Accept the important Cygnus configure options, so we can diagnose typos.
85
86   case "$ac_option" in
87
88   -bindir | --bindir | --bindi | --bind | --bin | --bi)
89     ac_prev=bindir ;;
90   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91     bindir="$ac_optarg" ;;
92
93   -build | --build | --buil | --bui | --bu)
94     ac_prev=build ;;
95   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96     build="$ac_optarg" ;;
97
98   -cache-file | --cache-file | --cache-fil | --cache-fi \
99   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100     ac_prev=cache_file ;;
101   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103     cache_file="$ac_optarg" ;;
104
105   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106     ac_prev=datadir ;;
107   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108   | --da=*)
109     datadir="$ac_optarg" ;;
110
111   -disable-* | --disable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     eval "enable_${ac_feature}=no" ;;
119
120   -enable-* | --enable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     case "$ac_option" in
128       *=*) ;;
129       *) ac_optarg=yes ;;
130     esac
131     eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135   | --exec | --exe | --ex)
136     ac_prev=exec_prefix ;;
137   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139   | --exec=* | --exe=* | --ex=*)
140     exec_prefix="$ac_optarg" ;;
141
142   -gas | --gas | --ga | --g)
143     # Obsolete; use --with-gas.
144     with_gas=yes ;;
145
146   -help | --help | --hel | --he)
147     # Omit some internal or obsolete options to make the list less imposing.
148     # This message is too long to be a string in the A/UX 3.1 sh.
149     cat << EOF
150 Usage: configure [options] [host]
151 Options: [defaults in brackets after descriptions]
152 Configuration:
153   --cache-file=FILE       cache test results in FILE
154   --help                  print this message
155   --no-create             do not create output files
156   --quiet, --silent       do not print \`checking...' messages
157   --version               print the version of autoconf that created configure
158 Directory and file names:
159   --prefix=PREFIX         install architecture-independent files in PREFIX
160                           [$ac_default_prefix]
161   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
162                           [same as prefix]
163   --bindir=DIR            user executables in DIR [EPREFIX/bin]
164   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
165   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
166   --datadir=DIR           read-only architecture-independent data in DIR
167                           [PREFIX/share]
168   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
169   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
170                           [PREFIX/com]
171   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
172   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
173   --includedir=DIR        C header files in DIR [PREFIX/include]
174   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
175   --infodir=DIR           info documentation in DIR [PREFIX/info]
176   --mandir=DIR            man documentation in DIR [PREFIX/man]
177   --srcdir=DIR            find the sources in DIR [configure dir or ..]
178   --program-prefix=PREFIX prepend PREFIX to installed program names
179   --program-suffix=SUFFIX append SUFFIX to installed program names
180   --program-transform-name=PROGRAM
181                           run sed PROGRAM on installed program names
182 EOF
183     cat << EOF
184 Host type:
185   --build=BUILD           configure for building on BUILD [BUILD=HOST]
186   --host=HOST             configure for HOST [guessed]
187   --target=TARGET         configure for TARGET [TARGET=HOST]
188 Features and packages:
189   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
190   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
191   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
192   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
193   --x-includes=DIR        X include files are in DIR
194   --x-libraries=DIR       X library files are in DIR
195 EOF
196     if test -n "$ac_help"; then
197       echo "--enable and --with options recognized:$ac_help"
198     fi
199     exit 0 ;;
200
201   -host | --host | --hos | --ho)
202     ac_prev=host ;;
203   -host=* | --host=* | --hos=* | --ho=*)
204     host="$ac_optarg" ;;
205
206   -includedir | --includedir | --includedi | --included | --include \
207   | --includ | --inclu | --incl | --inc)
208     ac_prev=includedir ;;
209   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210   | --includ=* | --inclu=* | --incl=* | --inc=*)
211     includedir="$ac_optarg" ;;
212
213   -infodir | --infodir | --infodi | --infod | --info | --inf)
214     ac_prev=infodir ;;
215   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216     infodir="$ac_optarg" ;;
217
218   -libdir | --libdir | --libdi | --libd)
219     ac_prev=libdir ;;
220   -libdir=* | --libdir=* | --libdi=* | --libd=*)
221     libdir="$ac_optarg" ;;
222
223   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224   | --libexe | --libex | --libe)
225     ac_prev=libexecdir ;;
226   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227   | --libexe=* | --libex=* | --libe=*)
228     libexecdir="$ac_optarg" ;;
229
230   -localstatedir | --localstatedir | --localstatedi | --localstated \
231   | --localstate | --localstat | --localsta | --localst \
232   | --locals | --local | --loca | --loc | --lo)
233     ac_prev=localstatedir ;;
234   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237     localstatedir="$ac_optarg" ;;
238
239   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240     ac_prev=mandir ;;
241   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242     mandir="$ac_optarg" ;;
243
244   -nfp | --nfp | --nf)
245     # Obsolete; use --without-fp.
246     with_fp=no ;;
247
248   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249   | --no-cr | --no-c)
250     no_create=yes ;;
251
252   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254     no_recursion=yes ;;
255
256   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258   | --oldin | --oldi | --old | --ol | --o)
259     ac_prev=oldincludedir ;;
260   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263     oldincludedir="$ac_optarg" ;;
264
265   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266     ac_prev=prefix ;;
267   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268     prefix="$ac_optarg" ;;
269
270   -program-prefix | --program-prefix | --program-prefi | --program-pref \
271   | --program-pre | --program-pr | --program-p)
272     ac_prev=program_prefix ;;
273   -program-prefix=* | --program-prefix=* | --program-prefi=* \
274   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275     program_prefix="$ac_optarg" ;;
276
277   -program-suffix | --program-suffix | --program-suffi | --program-suff \
278   | --program-suf | --program-su | --program-s)
279     ac_prev=program_suffix ;;
280   -program-suffix=* | --program-suffix=* | --program-suffi=* \
281   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282     program_suffix="$ac_optarg" ;;
283
284   -program-transform-name | --program-transform-name \
285   | --program-transform-nam | --program-transform-na \
286   | --program-transform-n | --program-transform- \
287   | --program-transform | --program-transfor \
288   | --program-transfo | --program-transf \
289   | --program-trans | --program-tran \
290   | --progr-tra | --program-tr | --program-t)
291     ac_prev=program_transform_name ;;
292   -program-transform-name=* | --program-transform-name=* \
293   | --program-transform-nam=* | --program-transform-na=* \
294   | --program-transform-n=* | --program-transform-=* \
295   | --program-transform=* | --program-transfor=* \
296   | --program-transfo=* | --program-transf=* \
297   | --program-trans=* | --program-tran=* \
298   | --progr-tra=* | --program-tr=* | --program-t=*)
299     program_transform_name="$ac_optarg" ;;
300
301   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302   | -silent | --silent | --silen | --sile | --sil)
303     silent=yes ;;
304
305   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306     ac_prev=sbindir ;;
307   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308   | --sbi=* | --sb=*)
309     sbindir="$ac_optarg" ;;
310
311   -sharedstatedir | --sharedstatedir | --sharedstatedi \
312   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313   | --sharedst | --shareds | --shared | --share | --shar \
314   | --sha | --sh)
315     ac_prev=sharedstatedir ;;
316   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319   | --sha=* | --sh=*)
320     sharedstatedir="$ac_optarg" ;;
321
322   -site | --site | --sit)
323     ac_prev=site ;;
324   -site=* | --site=* | --sit=*)
325     site="$ac_optarg" ;;
326
327   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328     ac_prev=srcdir ;;
329   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330     srcdir="$ac_optarg" ;;
331
332   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333   | --syscon | --sysco | --sysc | --sys | --sy)
334     ac_prev=sysconfdir ;;
335   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337     sysconfdir="$ac_optarg" ;;
338
339   -target | --target | --targe | --targ | --tar | --ta | --t)
340     ac_prev=target ;;
341   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342     target="$ac_optarg" ;;
343
344   -v | -verbose | --verbose | --verbos | --verbo | --verb)
345     verbose=yes ;;
346
347   -version | --version | --versio | --versi | --vers)
348     echo "configure generated by autoconf version 2.13"
349     exit 0 ;;
350
351   -with-* | --with-*)
352     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353     # Reject names that are not valid shell variable names.
354     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356     fi
357     ac_package=`echo $ac_package| sed 's/-/_/g'`
358     case "$ac_option" in
359       *=*) ;;
360       *) ac_optarg=yes ;;
361     esac
362     eval "with_${ac_package}='$ac_optarg'" ;;
363
364   -without-* | --without-*)
365     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366     # Reject names that are not valid shell variable names.
367     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369     fi
370     ac_package=`echo $ac_package| sed 's/-/_/g'`
371     eval "with_${ac_package}=no" ;;
372
373   --x)
374     # Obsolete; use --with-x.
375     with_x=yes ;;
376
377   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378   | --x-incl | --x-inc | --x-in | --x-i)
379     ac_prev=x_includes ;;
380   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382     x_includes="$ac_optarg" ;;
383
384   -x-libraries | --x-libraries | --x-librarie | --x-librari \
385   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386     ac_prev=x_libraries ;;
387   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389     x_libraries="$ac_optarg" ;;
390
391   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392     ;;
393
394   *)
395     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396       echo "configure: warning: $ac_option: invalid host type" 1>&2
397     fi
398     if test "x$nonopt" != xNONE; then
399       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400     fi
401     nonopt="$ac_option"
402     ;;
403
404   esac
405 done
406
407 if test -n "$ac_prev"; then
408   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 fi
410
411 trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
412
413 # File descriptor usage:
414 # 0 standard input
415 # 1 file creation
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
422   exec 6>/dev/null
423 else
424   exec 6>&1
425 fi
426 exec 5>./config.log
427
428 echo "\
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
431 " 1>&5
432
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
435 ac_configure_args=
436 for ac_arg
437 do
438   case "$ac_arg" in
439   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440   | --no-cr | --no-c) ;;
441   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446   esac
447 done
448
449 # NLS nuisances.
450 # Only set these to C if already set.  These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
458
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 echo > confdefs.h
463
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=src/integer/gcd/cl_I_gcd.cc
467
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470   ac_srcdir_defaulted=yes
471   # Try the directory containing this script, then its parent.
472   ac_prog=$0
473   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475   srcdir=$ac_confdir
476   if test ! -r $srcdir/$ac_unique_file; then
477     srcdir=..
478   fi
479 else
480   ac_srcdir_defaulted=no
481 fi
482 if test ! -r $srcdir/$ac_unique_file; then
483   if test "$ac_srcdir_defaulted" = yes; then
484     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485   else
486     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487   fi
488 fi
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493   if test "x$prefix" != xNONE; then
494     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495   else
496     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497   fi
498 fi
499 for ac_site_file in $CONFIG_SITE; do
500   if test -r "$ac_site_file"; then
501     echo "loading site script $ac_site_file"
502     . "$ac_site_file"
503   fi
504 done
505
506 if test -r "$cache_file"; then
507   echo "loading cache $cache_file"
508   . $cache_file
509 else
510   echo "creating cache $cache_file"
511   > $cache_file
512 fi
513
514 ac_ext=c
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
520
521 ac_exeext=
522 ac_objext=o
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526     ac_n= ac_c='
527 ' ac_t='        ' ac_tt=
528   else
529     ac_n=-n ac_c= ac_t= ac_tt='
530          '
531   fi
532 else
533   ac_n= ac_c='\c' ac_t= ac_tt='
534          '
535 fi
536
537
538
539 echo $ac_n "checking whether ${MAKE-make} sets \$(MAKE)""... $ac_c" 1>&6
540 echo "configure:541: checking whether ${MAKE-make} sets \$(MAKE)" >&5
541 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
542 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
543   echo $ac_n "(cached) $ac_c" 1>&6
544 else
545   cat > conftestmake <<\EOF
546 all:
547         @echo 'ac_maketemp="${MAKE}"'
548 EOF
549 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
550 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
551 if test -n "$ac_maketemp"; then
552   eval ac_cv_prog_make_${ac_make}_set=yes
553 else
554   eval ac_cv_prog_make_${ac_make}_set=no
555 fi
556 rm -f conftestmake
557 fi
558 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
559   echo "$ac_t""yes" 1>&6
560   SET_MAKE=
561 else
562   echo "$ac_t""no" 1>&6
563   SET_MAKE="MAKE=${MAKE-make}"
564 fi
565
566 extrasub="$extrasub"'
567 /@subdir@/{
568 h
569 g
570 s/@subdir@/src/
571 p
572 g
573 s/@subdir@/tests/
574 p
575 g
576 s/@subdir@/benchmarks/
577 p
578 g
579 s/@subdir@/examples/
580 p
581 g
582 s/@subdir@/doc/
583 p
584 d
585 }
586 '
587 # Extract the first word of "gcc", so it can be a program name with args.
588 set dummy gcc; ac_word=$2
589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
590 echo "configure:591: checking for $ac_word" >&5
591 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
592   echo $ac_n "(cached) $ac_c" 1>&6
593 else
594   if test -n "$CC"; then
595   ac_cv_prog_CC="$CC" # Let the user override the test.
596 else
597   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
598   ac_dummy="$PATH"
599   for ac_dir in $ac_dummy; do
600     test -z "$ac_dir" && ac_dir=.
601     if test -f $ac_dir/$ac_word; then
602       ac_cv_prog_CC="gcc"
603       break
604     fi
605   done
606   IFS="$ac_save_ifs"
607 fi
608 fi
609 CC="$ac_cv_prog_CC"
610 if test -n "$CC"; then
611   echo "$ac_t""$CC" 1>&6
612 else
613   echo "$ac_t""no" 1>&6
614 fi
615
616 if test -z "$CC"; then
617   # Extract the first word of "cc", so it can be a program name with args.
618 set dummy cc; ac_word=$2
619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
620 echo "configure:621: checking for $ac_word" >&5
621 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
622   echo $ac_n "(cached) $ac_c" 1>&6
623 else
624   if test -n "$CC"; then
625   ac_cv_prog_CC="$CC" # Let the user override the test.
626 else
627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
628   ac_prog_rejected=no
629   ac_dummy="$PATH"
630   for ac_dir in $ac_dummy; do
631     test -z "$ac_dir" && ac_dir=.
632     if test -f $ac_dir/$ac_word; then
633       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
634         ac_prog_rejected=yes
635         continue
636       fi
637       ac_cv_prog_CC="cc"
638       break
639     fi
640   done
641   IFS="$ac_save_ifs"
642 if test $ac_prog_rejected = yes; then
643   # We found a bogon in the path, so make sure we never use it.
644   set dummy $ac_cv_prog_CC
645   shift
646   if test $# -gt 0; then
647     # We chose a different compiler from the bogus one.
648     # However, it has the same basename, so the bogon will be chosen
649     # first if we set CC to just the basename; use the full file name.
650     shift
651     set dummy "$ac_dir/$ac_word" "$@"
652     shift
653     ac_cv_prog_CC="$@"
654   fi
655 fi
656 fi
657 fi
658 CC="$ac_cv_prog_CC"
659 if test -n "$CC"; then
660   echo "$ac_t""$CC" 1>&6
661 else
662   echo "$ac_t""no" 1>&6
663 fi
664
665   if test -z "$CC"; then
666     case "`uname -s`" in
667     *win32* | *WIN32*)
668       # Extract the first word of "cl", so it can be a program name with args.
669 set dummy cl; ac_word=$2
670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
671 echo "configure:672: checking for $ac_word" >&5
672 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
673   echo $ac_n "(cached) $ac_c" 1>&6
674 else
675   if test -n "$CC"; then
676   ac_cv_prog_CC="$CC" # Let the user override the test.
677 else
678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
679   ac_dummy="$PATH"
680   for ac_dir in $ac_dummy; do
681     test -z "$ac_dir" && ac_dir=.
682     if test -f $ac_dir/$ac_word; then
683       ac_cv_prog_CC="cl"
684       break
685     fi
686   done
687   IFS="$ac_save_ifs"
688 fi
689 fi
690 CC="$ac_cv_prog_CC"
691 if test -n "$CC"; then
692   echo "$ac_t""$CC" 1>&6
693 else
694   echo "$ac_t""no" 1>&6
695 fi
696  ;;
697     esac
698   fi
699   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
700 fi
701
702 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
703 echo "configure:704: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
704
705 ac_ext=c
706 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
707 ac_cpp='$CPP $CPPFLAGS'
708 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
709 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
710 cross_compiling=$ac_cv_prog_cc_cross
711
712 cat > conftest.$ac_ext << EOF
713
714 #line 715 "configure"
715 #include "confdefs.h"
716
717 int main(){return(0);}
718 EOF
719 if { (eval echo configure:720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
720   ac_cv_prog_cc_works=yes
721   # If we can't run a trivial program, we are probably using a cross compiler.
722   if (./conftest; exit) 2>/dev/null; then
723     ac_cv_prog_cc_cross=no
724   else
725     ac_cv_prog_cc_cross=yes
726   fi
727 else
728   echo "configure: failed program was:" >&5
729   cat conftest.$ac_ext >&5
730   ac_cv_prog_cc_works=no
731 fi
732 rm -fr conftest*
733 ac_ext=c
734 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
735 ac_cpp='$CPP $CPPFLAGS'
736 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
737 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
738 cross_compiling=$ac_cv_prog_cc_cross
739
740 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
741 if test $ac_cv_prog_cc_works = no; then
742   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
743 fi
744 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
745 echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
746 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
747 cross_compiling=$ac_cv_prog_cc_cross
748
749 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
750 echo "configure:751: checking whether we are using GNU C" >&5
751 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
752   echo $ac_n "(cached) $ac_c" 1>&6
753 else
754   cat > conftest.c <<EOF
755 #ifdef __GNUC__
756   yes;
757 #endif
758 EOF
759 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
760   ac_cv_prog_gcc=yes
761 else
762   ac_cv_prog_gcc=no
763 fi
764 fi
765 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
766
767 if test $ac_cv_prog_gcc = yes; then
768   GCC=yes
769 else
770   GCC=
771 fi
772
773 ac_test_CFLAGS="${CFLAGS+set}"
774 ac_save_CFLAGS="$CFLAGS"
775 CFLAGS=
776 if test "$ac_test_CFLAGS" = set; then
777   CFLAGS="$ac_save_CFLAGS"
778 else
779   if test "$GCC" = yes; then
780     # Add "-O" to both the CC and CPP commands, to eliminate possible confusion
781     # that results from __OPTIMIZE__ being defined for CC but not CPP.
782     if echo "$CC " | grep ' -O[1-9 ]' > /dev/null 2>&1; then
783       : # already optimizing
784     else
785       CC="$CC -O"
786       ac_cv_prog_CC="$CC"
787     fi
788   else
789     CFLAGS=
790   fi
791 fi
792
793                       echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
794 echo "configure:795: checking how to run the C preprocessor" >&5
795 # On Suns, sometimes $CPP names a directory.
796 if test -n "$CPP" && test -d "$CPP"; then
797   CPP=
798 fi
799 if test -z "$CPP"; then
800 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
801   echo $ac_n "(cached) $ac_c" 1>&6
802 else
803     # This must be in double quotes, not single quotes, because CPP may get
804   # substituted into the Makefile and "${CC-cc}" will confuse make.
805   CPP="${CC-cc} -E"
806   if test -n "$GCC"; then
807     # Suppress warning messages.
808     CPP="$CPP -w"
809   fi
810   # On the NeXT, cc -E runs the code through the compiler's parser,
811   # not just through cpp. On NeXTstep 3.1 the same holds for /lib/cpp; use
812   # "cc -E -traditional-cpp" instead.
813   cat > conftest.$ac_ext <<EOF
814 #line 815 "configure"
815 #include "confdefs.h"
816 #include <assert.h>
817 Syntax Error
818 EOF
819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
820 { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
822 if test -z "$ac_err"; then
823   rm -rf conftest*
824   ac_have_cpp=1
825 else
826   echo "$ac_err" >&5
827   echo "configure: failed program was:" >&5
828   cat conftest.$ac_ext >&5
829 fi
830 rm -f conftest*
831   if test -z "$ac_have_cpp"; then
832     CPP="${CC-cc} -E -traditional-cpp"
833     cat > conftest.$ac_ext <<EOF
834 #line 835 "configure"
835 #include "confdefs.h"
836 #include <assert.h>
837 Syntax Error
838 EOF
839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
840 { (eval echo configure:841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
842 if test -z "$ac_err"; then
843   rm -rf conftest*
844   ac_have_cpp=1
845 else
846   echo "$ac_err" >&5
847   echo "configure: failed program was:" >&5
848   cat conftest.$ac_ext >&5
849 fi
850 rm -f conftest*
851     if test -n "$ac_have_cpp"; then
852       CC="${CC-cc} -traditional-cpp"
853     else
854       CPP="${CC-cc} -nologo -E"
855       cat > conftest.$ac_ext <<EOF
856 #line 857 "configure"
857 #include "confdefs.h"
858 #include <assert.h>
859 Syntax Error
860 EOF
861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
862 { (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
864 if test -z "$ac_err"; then
865   rm -rf conftest*
866   ac_have_cpp=1
867 else
868   echo "$ac_err" >&5
869   echo "configure: failed program was:" >&5
870   cat conftest.$ac_ext >&5
871 fi
872 rm -f conftest*
873       if test -n "$ac_have_cpp"; then
874         CC="${CC-cc} -nologo"
875       else
876         CPP=/lib/cpp
877       fi
878     fi
879   fi
880   ac_cv_prog_CC="$CC"
881   ac_cv_prog_CPP="$CPP"
882 fi
883   CPP="$ac_cv_prog_CPP"
884 else
885   ac_cv_prog_CPP="$CPP"
886 fi
887 echo "$ac_t""$CPP" 1>&6
888
889                       for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
890 do
891 # Extract the first word of "$ac_prog", so it can be a program name with args.
892 set dummy $ac_prog; ac_word=$2
893 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
894 echo "configure:895: checking for $ac_word" >&5
895 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
896   echo $ac_n "(cached) $ac_c" 1>&6
897 else
898   if test -n "$CXX"; then
899   ac_cv_prog_CXX="$CXX" # Let the user override the test.
900 else
901   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
902   ac_dummy="$PATH"
903   for ac_dir in $ac_dummy; do
904     test -z "$ac_dir" && ac_dir=.
905     if test -f $ac_dir/$ac_word; then
906       ac_cv_prog_CXX="$ac_prog"
907       break
908     fi
909   done
910   IFS="$ac_save_ifs"
911 fi
912 fi
913 CXX="$ac_cv_prog_CXX"
914 if test -n "$CXX"; then
915   echo "$ac_t""$CXX" 1>&6
916 else
917   echo "$ac_t""no" 1>&6
918 fi
919
920 test -n "$CXX" && break
921 done
922 test -n "$CXX" || CXX="gcc"
923
924
925 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
926 echo "configure:927: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
927
928 ac_ext=C
929 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
930 ac_cpp='$CXXCPP $CPPFLAGS'
931 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
932 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
933 cross_compiling=$ac_cv_prog_cxx_cross
934
935 cat > conftest.$ac_ext << EOF
936
937 #line 938 "configure"
938 #include "confdefs.h"
939
940 int main(){return(0);}
941 EOF
942 if { (eval echo configure:943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
943   ac_cv_prog_cxx_works=yes
944   # If we can't run a trivial program, we are probably using a cross compiler.
945   if (./conftest; exit) 2>/dev/null; then
946     ac_cv_prog_cxx_cross=no
947   else
948     ac_cv_prog_cxx_cross=yes
949   fi
950 else
951   echo "configure: failed program was:" >&5
952   cat conftest.$ac_ext >&5
953   ac_cv_prog_cxx_works=no
954 fi
955 rm -fr conftest*
956 ac_ext=c
957 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
958 ac_cpp='$CPP $CPPFLAGS'
959 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
960 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
961 cross_compiling=$ac_cv_prog_cc_cross
962
963 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
964 if test $ac_cv_prog_cxx_works = no; then
965   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
966 fi
967 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
968 echo "configure:969: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
969 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
970 cross_compiling=$ac_cv_prog_cxx_cross
971
972 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
973 echo "configure:974: checking whether we are using GNU C++" >&5
974 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977   cat > conftest.C <<EOF
978 #ifdef __GNUC__
979   yes;
980 #endif
981 EOF
982 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
983   ac_cv_prog_gxx=yes
984 else
985   ac_cv_prog_gxx=no
986 fi
987 fi
988 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
989
990 if test $ac_cv_prog_gxx = yes; then
991   GXX=yes
992 else
993   GXX=
994 fi
995
996 ac_test_CXXFLAGS="${CXXFLAGS+set}"
997 ac_save_CXXFLAGS="$CXXFLAGS"
998 CXXFLAGS=
999 if test "$ac_test_CXXFLAGS" = set; then
1000   CXXFLAGS="$ac_save_CXXFLAGS"
1001 else
1002   if test "$GXX" = yes; then
1003     # Add "-O" to both the CXX and CXXCPP commands, to eliminate possible confu-
1004     # sion that results from __OPTIMIZE__ being defined for CXX but not CXXCPP.
1005     if echo "$CXX " | grep ' -O[1-9 ]' > /dev/null; then
1006       : # already optimizing
1007     else
1008       CXX="$CXX -O"
1009       ac_cv_prog_CXX="$CXX"
1010     fi
1011   else
1012     CXXFLAGS=
1013   fi
1014 fi
1015
1016                       echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1017 echo "configure:1018: checking how to run the C++ preprocessor" >&5
1018 if test -z "$CXXCPP"; then
1019 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1020   echo $ac_n "(cached) $ac_c" 1>&6
1021 else
1022   ac_ext=C
1023 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1024 ac_cpp='$CXXCPP $CPPFLAGS'
1025 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1026 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1027 cross_compiling=$ac_cv_prog_cxx_cross
1028   CXXCPP="${CXX-g++} -E"
1029   cat > conftest.$ac_ext <<EOF
1030 #line 1031 "configure"
1031 #include "confdefs.h"
1032 #include <stdlib.h>
1033 EOF
1034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1035 { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1037 if test -z "$ac_err"; then
1038   :
1039 else
1040   echo "$ac_err" >&5
1041   echo "configure: failed program was:" >&5
1042   cat conftest.$ac_ext >&5
1043   rm -rf conftest*
1044   CXXCPP=/lib/cpp
1045 fi
1046 rm -f conftest*
1047   ac_cv_prog_CXXCPP="$CXXCPP"
1048 ac_ext=c
1049 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1050 ac_cpp='$CPP $CPPFLAGS'
1051 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1052 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1053 cross_compiling=$ac_cv_prog_cc_cross
1054 fi
1055 fi
1056 CXXCPP="$ac_cv_prog_CXXCPP"
1057 echo "$ac_t""$CXXCPP" 1>&6
1058
1059                       
1060 echo $ac_n "checking for underscore in external names""... $ac_c" 1>&6
1061 echo "configure:1062: checking for underscore in external names" >&5
1062 if eval "test \"`echo '$''{'cl_cv_prog_as_underscore'+set}'`\" = set"; then
1063   echo $ac_n "(cached) $ac_c" 1>&6
1064 else
1065   
1066 cat > conftest.c <<EOF
1067 int foo() { return 0; }
1068 EOF
1069 # look for the assembly language name in the .s file
1070 { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1
1071 if grep _foo conftest.s >/dev/null ; then
1072   cl_cv_prog_as_underscore=yes
1073 else
1074   cl_cv_prog_as_underscore=no
1075 fi
1076 rm -f conftest*
1077
1078 fi
1079 echo "$ac_t""$cl_cv_prog_as_underscore" 1>&6
1080 if test $cl_cv_prog_as_underscore = yes; then
1081   AS_UNDERSCORE=true
1082   cat >> confdefs.h <<\EOF
1083 #define ASM_UNDERSCORE 1
1084 EOF
1085
1086 else
1087   AS_UNDERSCORE=false
1088 fi
1089
1090                       # Extract the first word of "ranlib", so it can be a program name with args.
1091 set dummy ranlib; ac_word=$2
1092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1093 echo "configure:1094: checking for $ac_word" >&5
1094 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097   if test -n "$RANLIB"; then
1098   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1099 else
1100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1101   ac_dummy="$PATH"
1102   for ac_dir in $ac_dummy; do
1103     test -z "$ac_dir" && ac_dir=.
1104     if test -f $ac_dir/$ac_word; then
1105       ac_cv_prog_RANLIB="ranlib"
1106       break
1107     fi
1108   done
1109   IFS="$ac_save_ifs"
1110   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="true"
1111 fi
1112 fi
1113 RANLIB="$ac_cv_prog_RANLIB"
1114 if test -n "$RANLIB"; then
1115   echo "$ac_t""$RANLIB" 1>&6
1116 else
1117   echo "$ac_t""no" 1>&6
1118 fi
1119
1120                       # Find a good install program.  We prefer a C program (faster),
1121 # so one script is as good as another.  But avoid the broken or
1122 # incompatible versions:
1123 # SysV /etc/install, /usr/sbin/install
1124 # SunOS /usr/etc/install
1125 # IRIX /sbin/install
1126 # AIX /bin/install
1127 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1128 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1129 # ./install, which can be erroneously created by make from ./install.sh.
1130 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1131 echo "configure:1132: checking for a BSD compatible install" >&5
1132 if test -z "$INSTALL"; then
1133 if eval "test \"`echo '$''{'cl_cv_path_install'+set}'`\" = set"; then
1134   echo $ac_n "(cached) $ac_c" 1>&6
1135 else
1136     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1137   for ac_dir in $PATH; do
1138     # Account for people who put trailing slashes in PATH elements.
1139     case "$ac_dir/" in
1140     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1141     *)
1142       # OSF1 and SCO ODT 3.0 have their own names for install.
1143       for ac_prog in ginstall installbsd scoinst install; do
1144         if test -f $ac_dir/$ac_prog; then
1145           if test $ac_prog = install &&
1146             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1147             # AIX install.  It has an incompatible calling convention.
1148             # OSF/1 installbsd also uses dspmsg, but is usable.
1149             :
1150           else
1151             if test $ac_prog = installbsd &&
1152               grep src/bos $ac_dir/$ac_prog >/dev/null 2>&1; then
1153               # AIX installbsd doesn't work without option "-g".
1154               :
1155             else
1156               ac_cv_path_install="$ac_dir/$ac_prog -c"
1157               break 2
1158             fi
1159           fi
1160         fi
1161       done
1162       ;;
1163     esac
1164   done
1165   IFS="$ac_save_ifs"
1166   # As a last resort, use cp.
1167   test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
1168
1169 fi
1170   INSTALL="$cl_cv_path_install"
1171 fi
1172 echo "$ac_t""$INSTALL" 1>&6
1173 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1174 # It thinks the first close brace ends the variable substitution.
1175 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
1176 if test -z "$INSTALL_DATA"; then
1177   case "$INSTALL" in
1178     cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
1179     * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
1180   esac
1181 fi
1182
1183                        ac_aux_dir=${srcdir}/autoconf
1184 echo $ac_n "checking host system type""... $ac_c" 1>&6
1185 echo "configure:1186: checking host system type" >&5
1186 if eval "test \"`echo '$''{'cl_cv_host'+set}'`\" = set"; then
1187   echo $ac_n "(cached) $ac_c" 1>&6
1188 else
1189   
1190 ac_config_guess=$ac_aux_dir/config.guess
1191 ac_config_sub=$ac_aux_dir/config.sub
1192 # Make sure we can run config.sub.
1193 if $ac_config_sub sun4 >/dev/null 2>&1; then :
1194 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1195 fi
1196 host_alias=$host
1197 case "$host_alias" in
1198 NONE)
1199   case $nonopt in
1200   NONE)         host_alias=`export CC; $ac_config_guess` ;;
1201   *)    host_alias=$nonopt ;;
1202   esac ;;
1203 esac
1204 # Don't fail just because the system is not listed in GNU's database.
1205 if test -n "$host_alias"; then
1206   host=`$ac_config_sub $host_alias`
1207 else
1208   host=unknown-unknown-unknown
1209 fi
1210 cl_cv_host="$host"
1211
1212 fi
1213 echo "$ac_t""$cl_cv_host" 1>&6
1214 host="$cl_cv_host"
1215 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1216 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1217 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1218
1219                       
1220 case "$host_cpu" in
1221   i[4567]86 )
1222     host_cpu=i386
1223     ;;
1224   alphaev[4-7] | alphaev56 | alphapca5[67] )
1225     host_cpu=alpha
1226     ;;
1227   hppa1.0 | hppa1.1 | hppa2.0 )
1228     host_cpu=hppa
1229     ;;
1230   powerpc )
1231     host_cpu=rs6000
1232     ;;
1233   c1 | c2 | c32 | c34 | c38 | c4 )
1234     host_cpu=convex
1235     ;;
1236   mips )
1237     echo $ac_n "checking for 64-bit MIPS""... $ac_c" 1>&6
1238 echo "configure:1239: checking for 64-bit MIPS" >&5
1239 if eval "test \"`echo '$''{'cl_cv_host_mips64'+set}'`\" = set"; then
1240   echo $ac_n "(cached) $ac_c" 1>&6
1241 else
1242   
1243 cat > conftest.$ac_ext <<EOF
1244 #line 1245 "configure"
1245 #include "confdefs.h"
1246 #if defined(_MIPS_SZLONG)
1247 #if (_MIPS_SZLONG == 64)
1248 /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
1249   yes
1250 #endif
1251 #endif
1252
1253 EOF
1254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1255   egrep "yes" >/dev/null 2>&1; then
1256   rm -rf conftest*
1257   cl_cv_host_mips64=yes
1258 else
1259   rm -rf conftest*
1260   cl_cv_host_mips64=no
1261 fi
1262 rm -f conftest*
1263
1264
1265 fi
1266 echo "$ac_t""$cl_cv_host_mips64" 1>&6
1267 if test $cl_cv_host_mips64 = yes; then
1268   host_cpu=mips64
1269 fi
1270     ;;
1271   sparc | sparc64 )
1272     echo $ac_n "checking for 64-bit SPARC""... $ac_c" 1>&6
1273 echo "configure:1274: checking for 64-bit SPARC" >&5
1274 if eval "test \"`echo '$''{'cl_cv_host_sparc64'+set}'`\" = set"; then
1275   echo $ac_n "(cached) $ac_c" 1>&6
1276 else
1277   
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281 #if defined(__sparcv9) || defined(__arch64__)
1282   yes
1283 #endif
1284
1285 EOF
1286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1287   egrep "yes" >/dev/null 2>&1; then
1288   rm -rf conftest*
1289   cl_cv_host_sparc64=yes
1290 else
1291   rm -rf conftest*
1292   cl_cv_host_sparc64=no
1293 fi
1294 rm -f conftest*
1295
1296
1297 fi
1298 echo "$ac_t""$cl_cv_host_sparc64" 1>&6
1299 if test $cl_cv_host_sparc64 = yes; then
1300   host_cpu=sparc64
1301 else
1302   host_cpu=sparc
1303 fi
1304     ;;
1305 esac
1306 cat >> confdefs.h <<EOF
1307 #ifndef __${host_cpu}__
1308 #define __${host_cpu}__ 1
1309 #endif
1310 EOF
1311
1312                       PACKAGE=cln
1313 # Check whether --enable-shared or --disable-shared was given.
1314 if test "${enable_shared+set}" = set; then
1315   enableval="$enable_shared"
1316   p=${PACKAGE-default}
1317 case "$enableval" in
1318 yes) enable_shared=yes ;;
1319 no) enable_shared=no ;;
1320 *)
1321   enable_shared=no
1322   # Look at the argument we got.  We use all the common list separators.
1323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1324   for pkg in $enableval; do
1325     if test "X$pkg" = "X$p"; then
1326       enable_shared=yes
1327     fi
1328   done
1329   IFS="$ac_save_ifs"
1330   ;;
1331 esac
1332 else
1333   enable_shared=no
1334 fi
1335
1336 # Check whether --enable-static or --disable-static was given.
1337 if test "${enable_static+set}" = set; then
1338   enableval="$enable_static"
1339   p=${PACKAGE-default}
1340 case "$enableval" in
1341 yes) enable_static=yes ;;
1342 no) enable_static=no ;;
1343 *)
1344   enable_static=no
1345   # Look at the argument we got.  We use all the common list separators.
1346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1347   for pkg in $enableval; do
1348     if test "X$pkg" = "X$p"; then
1349       enable_static=yes
1350     fi
1351   done
1352   IFS="$ac_save_ifs"
1353   ;;
1354 esac
1355 else
1356   enable_static=yes
1357 fi
1358
1359 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1360 if test "${with_gnu_ld+set}" = set; then
1361   withval="$with_gnu_ld"
1362   test "$withval" = no || with_gnu_ld=yes
1363 else
1364   with_gnu_ld=no
1365 fi
1366
1367
1368 ac_prog=ld
1369 if test "$ac_cv_prog_gcc" = yes; then
1370   # Check if gcc -print-prog-name=ld gives a path.
1371   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1372 echo "configure:1373: checking for ld used by GCC" >&5
1373   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1374   case "$ac_prog" in
1375   # Accept absolute paths.
1376   /* | A-Za-z:\\*)
1377     test -z "$LD" && LD="$ac_prog"
1378     ;;
1379   "")
1380     # If it fails, then pretend we aren't using GCC.
1381     ac_prog=ld
1382     ;;
1383   *)
1384     # If it is relative, then search for the first ld in PATH.
1385     with_gnu_ld=unknown
1386     ;;
1387   esac
1388 elif test "$with_gnu_ld" = yes; then
1389   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1390 echo "configure:1391: checking for GNU ld" >&5
1391 else
1392   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1393 echo "configure:1394: checking for non-GNU ld" >&5
1394 fi
1395 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1396   echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398   if test -z "$LD"; then
1399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1400   for ac_dir in $PATH; do
1401     test -z "$ac_dir" && ac_dir=.
1402     if test -f "$ac_dir/$ac_prog"; then
1403       ac_cv_path_LD="$ac_dir/$ac_prog"
1404       # Check to see if the program is GNU ld.  I'd rather use --version,
1405       # but apparently some GNU ld's only accept -v.
1406       # Break only if it was the GNU/non-GNU ld that we prefer.
1407       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1408         test "$with_gnu_ld" != no && break
1409       else
1410         test "$with_gnu_ld" != yes && break
1411       fi
1412     fi
1413   done
1414   IFS="$ac_save_ifs"
1415 else
1416   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1417 fi
1418 fi
1419
1420 LD="$ac_cv_path_LD"
1421 if test -n "$LD"; then
1422   echo "$ac_t""$LD" 1>&6
1423 else
1424   echo "$ac_t""no" 1>&6
1425 fi
1426 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1427
1428 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1429 echo "configure:1430: checking if the linker ($LD) is GNU ld" >&5
1430 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1431   echo $ac_n "(cached) $ac_c" 1>&6
1432 else
1433   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1434 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1435   ac_cv_prog_gnu_ld=yes
1436 else
1437   ac_cv_prog_gnu_ld=no
1438 fi
1439 fi
1440 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1441
1442
1443 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1444 echo "configure:1445: checking for BSD-compatible nm" >&5
1445 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1446   echo $ac_n "(cached) $ac_c" 1>&6
1447 else
1448   case "$NM" in
1449 /* | A-Za-z:\\*)
1450   ac_cv_path_NM="$NM" # Let the user override the test with a path.
1451   ;;
1452 *)
1453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1454   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1455     test -z "$ac_dir" && ac_dir=.
1456     if test -f $ac_dir/nm; then
1457       # Check to see if the nm accepts a BSD-compat flag.
1458       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1459       #   nm: unknown option "B" ignored
1460       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1461         ac_cv_path_NM="$ac_dir/nm -B"
1462       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1463         ac_cv_path_NM="$ac_dir/nm -p"
1464       else
1465         ac_cv_path_NM="$ac_dir/nm"
1466       fi
1467       break
1468     fi
1469   done
1470   IFS="$ac_save_ifs"
1471   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1472   ;;
1473 esac
1474 fi
1475
1476 NM="$ac_cv_path_NM"
1477 echo "$ac_t""$NM" 1>&6
1478
1479
1480 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1481 echo "configure:1482: checking whether ln -s works" >&5
1482 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1483   echo $ac_n "(cached) $ac_c" 1>&6
1484 else
1485   rm -f conftestdata
1486 if ln -s X conftestdata 2>/dev/null
1487 then
1488   rm -f conftestdata
1489   ac_cv_prog_LN_S="ln -s"
1490 else
1491   ac_cv_prog_LN_S=ln
1492 fi
1493 fi
1494 LN_S="$ac_cv_prog_LN_S"
1495 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1496   echo "$ac_t""yes" 1>&6
1497 else
1498   echo "$ac_t""no" 1>&6
1499 fi
1500
1501 # Always use our own libtool.
1502 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1503
1504 # Check for any special flags to pass to ltconfig.
1505 libtool_flags=
1506 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1507 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1508 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1509 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1510 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1511
1512 # Some flags need to be propagated to the compiler or linker for good
1513 # libtool support.
1514 case "$host" in
1515 *-*-irix6*)
1516   # Find out which ABI we are using.
1517   echo '#line 1518 "configure"' > conftest.$ac_ext
1518   if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1519     case "`/usr/bin/file conftest.o`" in
1520     *32-bit*)
1521       LD="${LD-ld} -32"
1522       ;;
1523     *N32*)
1524       LD="${LD-ld} -n32"
1525       ;;
1526     *64-bit*)
1527       LD="${LD-ld} -64"
1528       ;;
1529     esac
1530   fi
1531   rm -rf conftest*
1532   ;;
1533
1534 *-*-sco3.2v5*)
1535   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1536   CFLAGS="$CFLAGS -belf"
1537   ;;
1538 esac
1539
1540 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1541 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1542 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1543 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1544 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1545 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1546
1547 CLN_CURRENT=1
1548 CLN_REVISION=0
1549 CLN_AGE=1
1550
1551
1552
1553                       ac_ext=C
1554 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1555 ac_cpp='$CXXCPP $CPPFLAGS'
1556 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1557 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1558 cross_compiling=$ac_cv_prog_cxx_cross
1559
1560
1561 ac_ext=C
1562 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1563 ac_cpp='$CXXCPP $CPPFLAGS'
1564 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1565 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1566 cross_compiling=$ac_cv_prog_cxx_cross
1567
1568 echo $ac_n "checking for bool type""... $ac_c" 1>&6
1569 echo "configure:1570: checking for bool type" >&5
1570 if eval "test \"`echo '$''{'cl_cv_cplusplus_bool'+set}'`\" = set"; then
1571   echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573   
1574 cat > conftest.$ac_ext <<EOF
1575 #line 1576 "configure"
1576 #include "confdefs.h"
1577
1578 int main() {
1579 bool x;
1580 ; return 0; }
1581 EOF
1582 if { (eval echo configure:1583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1583   rm -rf conftest*
1584   cl_cv_cplusplus_bool=yes
1585 else
1586   echo "configure: failed program was:" >&5
1587   cat conftest.$ac_ext >&5
1588   rm -rf conftest*
1589   cl_cv_cplusplus_bool=no
1590 fi
1591 rm -f conftest*
1592
1593 fi
1594
1595 echo "$ac_t""$cl_cv_cplusplus_bool" 1>&6
1596 if test $cl_cv_cplusplus_bool = yes; then
1597   cat >> confdefs.h <<\EOF
1598 #define HAVE_BOOL 1
1599 EOF
1600
1601 else
1602   cat >> confdefs.h <<\EOF
1603 #define bool int
1604 EOF
1605
1606 fi
1607 ac_ext=C
1608 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1609 ac_cpp='$CXXCPP $CPPFLAGS'
1610 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1611 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1612 cross_compiling=$ac_cv_prog_cxx_cross
1613
1614
1615                       echo $ac_n "checking for long long type""... $ac_c" 1>&6
1616 echo "configure:1617: checking for long long type" >&5
1617 if eval "test \"`echo '$''{'cl_cv_c_longlong'+set}'`\" = set"; then
1618   echo $ac_n "(cached) $ac_c" 1>&6
1619 else
1620   
1621 if test "$cross_compiling" = yes; then
1622   cl_cv_c_longlong="guessing no"
1623 else
1624   cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 #ifdef __cplusplus
1628 extern "C" void exit(int);
1629 #endif
1630 int main()
1631 {
1632 /* long longs don't work right with gcc-2.7.2 on m68k */
1633 /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
1634    miscompiled. */
1635 #ifdef __GNUC__
1636 #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
1637 #if (__GNUC__ == 2)
1638 #if (__GNUC_MINOR__ <= 7)
1639   exit(1);
1640 #endif
1641 #endif
1642 #endif
1643 #endif
1644   { long x = 944938507; long y = 737962842; long z = 162359677;
1645     exit(!(((long long) x)*((long long) y)>>32 == z));
1646   }
1647 }
1648 EOF
1649 if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1650 then
1651   cl_cv_c_longlong=yes
1652 else
1653   echo "configure: failed program was:" >&5
1654   cat conftest.$ac_ext >&5
1655   rm -fr conftest*
1656   cl_cv_c_longlong=no
1657 fi
1658 if test -f core; then
1659   coredir=core`/bin/sh -c 'echo $$'`
1660   mkdir $coredir
1661   cp confdefs.h $coredir/confdefs.h
1662   mv conftest.c $coredir/conftest.c
1663   mv conftest $coredir/conftest
1664   mv core $coredir/core
1665   echo "warning: test program dumped core -- see subdirectory $coredir"
1666 fi
1667 rm -fr conftest*
1668 fi
1669
1670
1671 fi
1672 echo "$ac_t""$cl_cv_c_longlong" 1>&6
1673 case "$cl_cv_c_longlong" in
1674   *yes) cat >> confdefs.h <<\EOF
1675 #define HAVE_LONGLONG 1
1676 EOF
1677  ;;
1678   *no) ;;
1679 esac
1680
1681                       echo $ac_n "checking for long double type""... $ac_c" 1>&6
1682 echo "configure:1683: checking for long double type" >&5
1683 if eval "test \"`echo '$''{'cl_cv_c_longdouble'+set}'`\" = set"; then
1684   echo $ac_n "(cached) $ac_c" 1>&6
1685 else
1686   
1687 if test "$cross_compiling" = yes; then
1688   cl_cv_c_longdouble="guessing no"
1689 else
1690   cat > conftest.$ac_ext <<EOF
1691 #line 1692 "configure"
1692 #include "confdefs.h"
1693 #ifdef __cplusplus
1694 extern "C" void exit(int);
1695 #endif
1696 int main()
1697 { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }
1698 EOF
1699 if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1700 then
1701   cl_cv_c_longdouble=yes
1702 else
1703   echo "configure: failed program was:" >&5
1704   cat conftest.$ac_ext >&5
1705   rm -fr conftest*
1706   cl_cv_c_longdouble=no
1707 fi
1708 if test -f core; then
1709   coredir=core`/bin/sh -c 'echo $$'`
1710   mkdir $coredir
1711   cp confdefs.h $coredir/confdefs.h
1712   mv conftest.c $coredir/conftest.c
1713   mv conftest $coredir/conftest
1714   mv core $coredir/core
1715   echo "warning: test program dumped core -- see subdirectory $coredir"
1716 fi
1717 rm -fr conftest*
1718 fi
1719
1720
1721 fi
1722 echo "$ac_t""$cl_cv_c_longdouble" 1>&6
1723 case "$cl_cv_c_longdouble" in
1724   *yes) cat >> confdefs.h <<\EOF
1725 #define HAVE_LONGDOUBLE 1
1726 EOF
1727  ;;
1728   *no) ;;
1729 esac
1730
1731                       echo $ac_n "checking for working template<>""... $ac_c" 1>&6
1732 echo "configure:1733: checking for working template<>" >&5
1733 if eval "test \"`echo '$''{'cl_cv_c_templatenull'+set}'`\" = set"; then
1734   echo $ac_n "(cached) $ac_c" 1>&6
1735 else
1736   
1737 cat > conftest.$ac_ext <<EOF
1738 #line 1739 "configure"
1739 #include "confdefs.h"
1740 template <class T> class c {}; template <> class c<int> { int x; };
1741 int main() {
1742
1743 ; return 0; }
1744 EOF
1745 if { (eval echo configure:1746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1746   rm -rf conftest*
1747   cl_cv_c_templatenull=yes
1748 else
1749   echo "configure: failed program was:" >&5
1750   cat conftest.$ac_ext >&5
1751   rm -rf conftest*
1752   cl_cv_c_templatenull=no
1753 fi
1754 rm -f conftest*
1755
1756 fi
1757
1758 echo "$ac_t""$cl_cv_c_templatenull" 1>&6
1759 if test $cl_cv_c_templatenull = yes; then
1760   cat >> confdefs.h <<\EOF
1761 #define HAVE_TEMPLATE_NULL 1
1762 EOF
1763
1764 fi
1765
1766
1767                       if test -n "$GCC"; then
1768 echo $ac_n "checking for the global constructors function prefix""... $ac_c" 1>&6
1769 echo "configure:1770: checking for the global constructors function prefix" >&5
1770 if eval "test \"`echo '$''{'cl_cv_cplusplus_ctorprefix'+set}'`\" = set"; then
1771   echo $ac_n "(cached) $ac_c" 1>&6
1772 else
1773   
1774 cat > conftest.cc << EOF
1775 struct foo { foo (); };
1776 foo foobar;
1777 EOF
1778 # look for the assembly language name in the .s file
1779 { ac_try='${CXX-g++} $CXXFLAGS -S conftest.cc'; { (eval echo configure:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1
1780 if grep '_GLOBAL_\$I\$foobar' conftest.s >/dev/null ; then
1781   cl_cv_cplusplus_ctorprefix='_GLOBAL_$I$'
1782 else
1783   if grep '_GLOBAL_\.I\.foobar' conftest.s >/dev/null ; then
1784     cl_cv_cplusplus_ctorprefix='_GLOBAL_.I.'
1785   else
1786     if grep '_GLOBAL__I_foobar' conftest.s >/dev/null ; then
1787       cl_cv_cplusplus_ctorprefix='_GLOBAL__I_'
1788     else
1789       cl_cv_cplusplus_ctorprefix=unknown
1790     fi
1791   fi
1792 fi
1793 rm -f conftest*
1794
1795 fi
1796 echo "$ac_t""$cl_cv_cplusplus_ctorprefix" 1>&6
1797 if test "$cl_cv_cplusplus_ctorprefix" '!=' unknown; then
1798   ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
1799   cat >> confdefs.h <<EOF
1800 #define CL_GLOBAL_CONSTRUCTOR_PREFIX $ac_value
1801 EOF
1802
1803   ac_value=`echo "$ac_value" | sed -e 's,I,D,'`
1804   cat >> confdefs.h <<EOF
1805 #define CL_GLOBAL_DESTRUCTOR_PREFIX $ac_value
1806 EOF
1807
1808 echo $ac_n "checking whether the global constructors function need to be exported""... $ac_c" 1>&6
1809 echo "configure:1810: checking whether the global constructors function need to be exported" >&5
1810 if eval "test \"`echo '$''{'cl_cv_cplusplus_ctorexport'+set}'`\" = set"; then
1811   echo $ac_n "(cached) $ac_c" 1>&6
1812 else
1813   
1814 cat > conftest1.cc << EOF
1815 struct foo { foo (); };
1816 foo foobar;
1817 EOF
1818 cat > conftest2.cc << EOF
1819 #include "confdefs.h"
1820 #ifdef ASM_UNDERSCORE
1821 #define ASM_UNDERSCORE_PREFIX "_"
1822 #else
1823 #define ASM_UNDERSCORE_PREFIX ""
1824 #endif
1825 struct foo { foo (); };
1826 foo::foo () {}
1827 extern "C" void ctor (void) __asm__ (ASM_UNDERSCORE_PREFIX CL_GLOBAL_CONSTRUCTOR_PREFIX "foobar");
1828 int main() { ctor(); return 0; }
1829 EOF
1830 if { ac_try='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5'; { (eval echo configure:1831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
1831   cl_cv_cplusplus_ctorexport=no
1832 else
1833   cl_cv_cplusplus_ctorexport=yes
1834 fi
1835 rm -f conftest*
1836
1837 fi
1838 echo "$ac_t""$cl_cv_cplusplus_ctorexport" 1>&6
1839 if test "$cl_cv_cplusplus_ctorexport" = yes; then
1840   cat >> confdefs.h <<\EOF
1841 #define CL_NEED_GLOBALIZE_CTORDTOR 1
1842 EOF
1843
1844 fi
1845 fi
1846 fi
1847
1848                       for ac_hdr in unistd.h
1849 do
1850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1852 echo "configure:1853: checking for $ac_hdr" >&5
1853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1854   echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856   cat > conftest.$ac_ext <<EOF
1857 #line 1858 "configure"
1858 #include "confdefs.h"
1859 #include <$ac_hdr>
1860 EOF
1861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1862 { (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1864 if test -z "$ac_err"; then
1865   rm -rf conftest*
1866   eval "ac_cv_header_$ac_safe=yes"
1867 else
1868   echo "$ac_err" >&5
1869   echo "configure: failed program was:" >&5
1870   cat conftest.$ac_ext >&5
1871   rm -rf conftest*
1872   eval "ac_cv_header_$ac_safe=no"
1873 fi
1874 rm -f conftest*
1875 fi
1876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1877   echo "$ac_t""yes" 1>&6
1878     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1879   cat >> confdefs.h <<EOF
1880 #define $ac_tr_hdr 1
1881 EOF
1882  
1883 else
1884   echo "$ac_t""no" 1>&6
1885 fi
1886 done
1887
1888
1889                       # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1890 # for constant arguments.  Useless!
1891 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1892 echo "configure:1893: checking for working alloca.h" >&5
1893 if eval "test \"`echo '$''{'cl_cv_header_alloca_h'+set}'`\" = set"; then
1894   echo $ac_n "(cached) $ac_c" 1>&6
1895 else
1896   
1897 cat > conftest.$ac_ext <<EOF
1898 #line 1899 "configure"
1899 #include "confdefs.h"
1900 #include <alloca.h>
1901 int main() {
1902 char *p = (char *) alloca(2 * sizeof(int));
1903 ; return 0; }
1904 EOF
1905 if { (eval echo configure:1906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1906   rm -rf conftest*
1907   cl_cv_header_alloca_h=yes
1908 else
1909   echo "configure: failed program was:" >&5
1910   cat conftest.$ac_ext >&5
1911   rm -rf conftest*
1912   cl_cv_header_alloca_h=no
1913 fi
1914 rm -f conftest*
1915
1916 fi
1917
1918 echo "$ac_t""$cl_cv_header_alloca_h" 1>&6
1919 if test $cl_cv_header_alloca_h = yes; then
1920   cat >> confdefs.h <<\EOF
1921 #define HAVE_ALLOCA_H 1
1922 EOF
1923
1924 fi
1925 decl="#ifdef __GNUC__
1926 #define alloca __builtin_alloca
1927 #else
1928 #ifdef _MSC_VER
1929 #include <malloc.h>
1930 #define alloca _alloca
1931 #else
1932 #ifdef HAVE_ALLOCA_H
1933 #include <alloca.h>
1934 #else
1935 #ifdef _AIX
1936  #pragma alloca
1937 #else
1938 #ifndef alloca
1939 char *alloca ();
1940 #endif
1941 #endif
1942 #endif
1943 #endif
1944 #endif
1945 "
1946 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1947 echo "configure:1948: checking for alloca" >&5
1948 if eval "test \"`echo '$''{'cl_cv_func_alloca'+set}'`\" = set"; then
1949   echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951   
1952 cat > conftest.$ac_ext <<EOF
1953 #line 1954 "configure"
1954 #include "confdefs.h"
1955 $decl
1956 int main() {
1957 char *p = (char *) alloca(1);
1958 ; return 0; }
1959 EOF
1960 if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1961   rm -rf conftest*
1962   cl_cv_func_alloca=yes
1963 else
1964   echo "configure: failed program was:" >&5
1965   cat conftest.$ac_ext >&5
1966   rm -rf conftest*
1967   cl_cv_func_alloca=no
1968 fi
1969 rm -f conftest*
1970
1971 fi
1972
1973 echo "$ac_t""$cl_cv_func_alloca" 1>&6
1974 if test $cl_cv_func_alloca = yes; then
1975   :
1976 else
1977   alloca_missing=1
1978 fi
1979 if test -n "$alloca_missing"; then
1980   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1981   # that cause trouble.  Some versions do not even contain alloca or
1982   # contain a buggy version.  If you still want to use their alloca,
1983   # use ar to extract alloca.o from them instead of compiling alloca.c.
1984   ALLOCA=alloca.${ac_objext}
1985   cat >> confdefs.h <<\EOF
1986 #define NO_ALLOCA 1
1987 EOF
1988
1989 fi
1990
1991                       echo $ac_n "checking for fpu_control_t""... $ac_c" 1>&6
1992 echo "configure:1993: checking for fpu_control_t" >&5
1993 if eval "test \"`echo '$''{'cl_cv_type_fpu_control_t'+set}'`\" = set"; then
1994   echo $ac_n "(cached) $ac_c" 1>&6
1995 else
1996   
1997 cat > conftest.$ac_ext <<EOF
1998 #line 1999 "configure"
1999 #include "confdefs.h"
2000 #include <fpu_control.h>
2001 int main() {
2002 fpu_control_t x;
2003 ; return 0; }
2004 EOF
2005 if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2006   rm -rf conftest*
2007   cl_cv_type_fpu_control_t=yes
2008 else
2009   echo "configure: failed program was:" >&5
2010   cat conftest.$ac_ext >&5
2011   rm -rf conftest*
2012   cl_cv_type_fpu_control_t=no
2013 fi
2014 rm -f conftest*
2015
2016 fi
2017
2018 echo "$ac_t""$cl_cv_type_fpu_control_t" 1>&6
2019 if test $cl_cv_type_fpu_control_t = yes; then
2020   cat >> confdefs.h <<\EOF
2021 #define HAVE_FPU_CONTROL_T 1
2022 EOF
2023
2024 fi
2025
2026 echo $ac_n "checking for __setfpucw""... $ac_c" 1>&6
2027 echo "configure:2028: checking for __setfpucw" >&5
2028 if eval "test \"`echo '$''{'cl_cv_func_setfpucw'+set}'`\" = set"; then
2029   echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031   
2032 cat > conftest.$ac_ext <<EOF
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035 #include <fpu_control.h>
2036 int main() {
2037 __setfpucw(_FPU_IEEE);
2038 ; return 0; }
2039 EOF
2040 if { (eval echo configure:2041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2041   rm -rf conftest*
2042   cl_cv_func_setfpucw=yes
2043 else
2044   echo "configure: failed program was:" >&5
2045   cat conftest.$ac_ext >&5
2046   rm -rf conftest*
2047   cl_cv_func_setfpucw=no
2048 fi
2049 rm -f conftest*
2050
2051 fi
2052
2053 echo "$ac_t""$cl_cv_func_setfpucw" 1>&6
2054 if test $cl_cv_func_setfpucw = yes; then
2055   cat >> confdefs.h <<\EOF
2056 #define HAVE_SETFPUCW 1
2057 EOF
2058
2059 fi
2060
2061
2062                       
2063 for ac_func in gettimeofday
2064 do
2065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2066 echo "configure:2067: checking for $ac_func" >&5
2067 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2068   echo $ac_n "(cached) $ac_c" 1>&6
2069 else
2070   cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 /* System header to define __stub macros and hopefully few prototypes,
2074     which can conflict with char $ac_func(); below.  */
2075 #include <assert.h>
2076 /* Override any gcc2 internal prototype to avoid an error.  */
2077 #ifdef __cplusplus
2078 extern "C"
2079 #endif
2080 /* We use char because int might match the return type of a gcc2
2081    builtin and then its argument prototype would still apply.  */
2082 char $ac_func();
2083
2084 int main() {
2085
2086 /* The GNU C library defines this for functions which it implements
2087     to always fail with ENOSYS.  Some functions are actually named
2088     something starting with __ and the normal name is an alias.  */
2089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2090 choke me
2091 #else
2092 $ac_func();
2093 #endif
2094
2095 ; return 0; }
2096 EOF
2097 if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2098   rm -rf conftest*
2099   eval "ac_cv_func_$ac_func=yes"
2100 else
2101   echo "configure: failed program was:" >&5
2102   cat conftest.$ac_ext >&5
2103   rm -rf conftest*
2104   eval "ac_cv_func_$ac_func=no"
2105 fi
2106 rm -f conftest*
2107 fi
2108
2109 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2110   echo "$ac_t""yes" 1>&6
2111     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2112   cat >> confdefs.h <<EOF
2113 #define $ac_tr_func 1
2114 EOF
2115  
2116 else
2117   echo "$ac_t""no" 1>&6
2118 fi
2119 done
2120 if test $ac_cv_func_gettimeofday = yes; then
2121 echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
2122 echo "configure:2123: checking for gettimeofday declaration" >&5
2123 if eval "test \"`echo '$''{'cl_cv_proto_gettimeofday'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   
2127 cat > conftest.$ac_ext <<EOF
2128 #line 2129 "configure"
2129 #include "confdefs.h"
2130
2131 #include <sys/types.h>
2132 #include <sys/time.h>
2133
2134 extern
2135 #ifdef __cplusplus
2136 "C"
2137 #endif
2138
2139 #if defined(__STDC__) || defined(__cplusplus)
2140 int gettimeofday (struct timeval * tp, struct timezone * tzp);
2141 #else
2142 int gettimeofday();
2143 #endif
2144
2145 int main() {
2146
2147 ; return 0; }
2148 EOF
2149 if { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2150   rm -rf conftest*
2151   cl_cv_proto_gettimeofday_dots=no
2152 cl_cv_proto_gettimeofday_arg2="struct timezone *"
2153 else
2154   echo "configure: failed program was:" >&5
2155   cat conftest.$ac_ext >&5
2156   rm -rf conftest*
2157   cat > conftest.$ac_ext <<EOF
2158 #line 2159 "configure"
2159 #include "confdefs.h"
2160
2161 #include <sys/types.h>
2162 #include <sys/time.h>
2163
2164 extern
2165 #ifdef __cplusplus
2166 "C"
2167 #endif
2168
2169 #if defined(__STDC__) || defined(__cplusplus)
2170 int gettimeofday (struct timeval * tp, void * tzp);
2171 #else
2172 int gettimeofday();
2173 #endif
2174
2175 int main() {
2176
2177 ; return 0; }
2178 EOF
2179 if { (eval echo configure:2180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2180   rm -rf conftest*
2181   cl_cv_proto_gettimeofday_dots=no
2182 cl_cv_proto_gettimeofday_arg2="void *"
2183 else
2184   echo "configure: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   rm -rf conftest*
2187   cl_cv_proto_gettimeofday_dots=yes
2188 cl_cv_proto_gettimeofday_arg2="..."
2189 fi
2190 rm -f conftest*
2191
2192 fi
2193 rm -f conftest*
2194
2195
2196 cl_cv_proto_gettimeofday="extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);"
2197 fi
2198
2199 cl_cv_proto_gettimeofday=`echo "$cl_cv_proto_gettimeofday" | tr -s ' ' | sed -e 's/( /(/'`
2200 echo "$ac_t""${ac_tt}$cl_cv_proto_gettimeofday" 1>&6
2201
2202
2203 if test $cl_cv_proto_gettimeofday_dots = yes; then
2204 cat >> confdefs.h <<\EOF
2205 #define GETTIMEOFDAY_DOTS 1
2206 EOF
2207
2208 else
2209 cat >> confdefs.h <<EOF
2210 #define GETTIMEOFDAY_TZP_T $cl_cv_proto_gettimeofday_arg2
2211 EOF
2212
2213 fi
2214 fi
2215
2216                       
2217 for ac_func in ftime
2218 do
2219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2220 echo "configure:2221: checking for $ac_func" >&5
2221 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2222   echo $ac_n "(cached) $ac_c" 1>&6
2223 else
2224   cat > conftest.$ac_ext <<EOF
2225 #line 2226 "configure"
2226 #include "confdefs.h"
2227 /* System header to define __stub macros and hopefully few prototypes,
2228     which can conflict with char $ac_func(); below.  */
2229 #include <assert.h>
2230 /* Override any gcc2 internal prototype to avoid an error.  */
2231 #ifdef __cplusplus
2232 extern "C"
2233 #endif
2234 /* We use char because int might match the return type of a gcc2
2235    builtin and then its argument prototype would still apply.  */
2236 char $ac_func();
2237
2238 int main() {
2239
2240 /* The GNU C library defines this for functions which it implements
2241     to always fail with ENOSYS.  Some functions are actually named
2242     something starting with __ and the normal name is an alias.  */
2243 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2244 choke me
2245 #else
2246 $ac_func();
2247 #endif
2248
2249 ; return 0; }
2250 EOF
2251 if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2252   rm -rf conftest*
2253   eval "ac_cv_func_$ac_func=yes"
2254 else
2255   echo "configure: failed program was:" >&5
2256   cat conftest.$ac_ext >&5
2257   rm -rf conftest*
2258   eval "ac_cv_func_$ac_func=no"
2259 fi
2260 rm -f conftest*
2261 fi
2262
2263 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2264   echo "$ac_t""yes" 1>&6
2265     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2266   cat >> confdefs.h <<EOF
2267 #define $ac_tr_func 1
2268 EOF
2269  
2270 else
2271   echo "$ac_t""no" 1>&6
2272 fi
2273 done
2274
2275                       if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then
2276 echo $ac_n "checking for times""... $ac_c" 1>&6
2277 echo "configure:2278: checking for times" >&5
2278 if eval "test \"`echo '$''{'ac_cv_func_times'+set}'`\" = set"; then
2279   echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281   cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 /* System header to define __stub macros and hopefully few prototypes,
2285     which can conflict with char times(); below.  */
2286 #include <assert.h>
2287 /* Override any gcc2 internal prototype to avoid an error.  */
2288 #ifdef __cplusplus
2289 extern "C"
2290 #endif
2291 /* We use char because int might match the return type of a gcc2
2292    builtin and then its argument prototype would still apply.  */
2293 char times();
2294
2295 int main() {
2296
2297 /* The GNU C library defines this for functions which it implements
2298     to always fail with ENOSYS.  Some functions are actually named
2299     something starting with __ and the normal name is an alias.  */
2300 #if defined (__stub_times) || defined (__stub___times)
2301 choke me
2302 #else
2303 times();
2304 #endif
2305
2306 ; return 0; }
2307 EOF
2308 if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2309   rm -rf conftest*
2310   eval "ac_cv_func_times=yes"
2311 else
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -rf conftest*
2315   eval "ac_cv_func_times=no"
2316 fi
2317 rm -f conftest*
2318 fi
2319
2320 if eval "test \"`echo '$ac_cv_func_'times`\" = yes"; then
2321   echo "$ac_t""yes" 1>&6
2322   :
2323 else
2324   echo "$ac_t""no" 1>&6
2325 no_times=1
2326 fi
2327 if test -z "$no_times"; then
2328 echo $ac_n "checking for times return value""... $ac_c" 1>&6
2329 echo "configure:2330: checking for times return value" >&5
2330 if eval "test \"`echo '$''{'cl_cv_func_times_return'+set}'`\" = set"; then
2331   echo $ac_n "(cached) $ac_c" 1>&6
2332 else
2333   
2334 if test "$cross_compiling" = yes; then
2335   cl_cv_func_times_return="guessing no"
2336 else
2337   cat > conftest.$ac_ext <<EOF
2338 #line 2339 "configure"
2339 #include "confdefs.h"
2340 #ifdef __cplusplus
2341 extern "C" void exit(int);
2342 #endif
2343
2344 #include <sys/types.h>
2345 #include <time.h> /* needed for CLK_TCK */
2346 #ifndef CLK_TCK
2347 #include <sys/time.h> /* needed for CLK_TCK on SYSV PTX */
2348 #endif
2349 #include <sys/times.h>
2350 int main ()
2351 { struct tms buffer;
2352   clock_t result1;
2353   clock_t result2;
2354   int ticks;
2355   result1 = times(&buffer);
2356   if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1);
2357   sleep(1);
2358   result2 = times(&buffer);
2359   if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1);
2360   ticks = result2 - result1;
2361   exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2)));
2362 }
2363 EOF
2364 if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2365 then
2366   cl_cv_func_times_return=yes
2367 else
2368   echo "configure: failed program was:" >&5
2369   cat conftest.$ac_ext >&5
2370   rm -fr conftest*
2371   cl_cv_func_times_return=no
2372 fi
2373 if test -f core; then
2374   coredir=core`/bin/sh -c 'echo $$'`
2375   mkdir $coredir
2376   cp confdefs.h $coredir/confdefs.h
2377   mv conftest.c $coredir/conftest.c
2378   mv conftest $coredir/conftest
2379   mv core $coredir/core
2380   echo "warning: test program dumped core -- see subdirectory $coredir"
2381 fi
2382 rm -fr conftest*
2383 fi
2384
2385
2386 fi
2387 echo "$ac_t""$cl_cv_func_times_return" 1>&6
2388 case "$cl_cv_func_times_return" in
2389   *yes) cat >> confdefs.h <<\EOF
2390 #define HAVE_TIMES_CLOCK 1
2391 EOF
2392  ;;
2393   *no)  ;;
2394 esac
2395 fi
2396 fi
2397
2398                       for ac_hdr in sys/resource.h sys/times.h
2399 do
2400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2402 echo "configure:2403: checking for $ac_hdr" >&5
2403 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2404   echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406   cat > conftest.$ac_ext <<EOF
2407 #line 2408 "configure"
2408 #include "confdefs.h"
2409 #include <$ac_hdr>
2410 EOF
2411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2412 { (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2414 if test -z "$ac_err"; then
2415   rm -rf conftest*
2416   eval "ac_cv_header_$ac_safe=yes"
2417 else
2418   echo "$ac_err" >&5
2419   echo "configure: failed program was:" >&5
2420   cat conftest.$ac_ext >&5
2421   rm -rf conftest*
2422   eval "ac_cv_header_$ac_safe=no"
2423 fi
2424 rm -f conftest*
2425 fi
2426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2427   echo "$ac_t""yes" 1>&6
2428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2429   cat >> confdefs.h <<EOF
2430 #define $ac_tr_hdr 1
2431 EOF
2432  
2433 else
2434   echo "$ac_t""no" 1>&6
2435 fi
2436 done
2437 if test $ac_cv_header_sys_resource_h = yes; then
2438     echo $ac_n "checking for getrusage""... $ac_c" 1>&6
2439 echo "configure:2440: checking for getrusage" >&5
2440 if eval "test \"`echo '$''{'cl_cv_func_getrusage'+set}'`\" = set"; then
2441   echo $ac_n "(cached) $ac_c" 1>&6
2442 else
2443   
2444 cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 #include <sys/types.h> /* NetBSD 1.0 needs this */
2448 #include <sys/time.h>
2449 #include <sys/resource.h>
2450 int main() {
2451 struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;
2452 ; return 0; }
2453 EOF
2454 if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2455   rm -rf conftest*
2456   cl_cv_func_getrusage=yes
2457 else
2458   echo "configure: failed program was:" >&5
2459   cat conftest.$ac_ext >&5
2460   rm -rf conftest*
2461   cl_cv_func_getrusage=no
2462 fi
2463 rm -f conftest*
2464
2465 fi
2466
2467 echo "$ac_t""$cl_cv_func_getrusage" 1>&6
2468 if test $cl_cv_func_getrusage = yes; then
2469   cat >> confdefs.h <<\EOF
2470 #define HAVE_GETRUSAGE 1
2471 EOF
2472
2473 fi
2474   if test $cl_cv_func_getrusage = yes; then
2475     echo $ac_n "checking for getrusage declaration""... $ac_c" 1>&6
2476 echo "configure:2477: checking for getrusage declaration" >&5
2477 if eval "test \"`echo '$''{'cl_cv_proto_getrusage'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   
2481     cat > conftest.$ac_ext <<EOF
2482 #line 2483 "configure"
2483 #include "confdefs.h"
2484
2485 #include <stdlib.h>
2486 #ifdef HAVE_UNISTD_H
2487 #include <unistd.h>
2488 #endif
2489 #include <sys/types.h> /* NetBSD 1.0 needs this */
2490 #include <sys/time.h>
2491 #include <sys/resource.h>
2492
2493 extern
2494 #ifdef __cplusplus
2495 "C"
2496 #endif
2497
2498 #if defined(__STDC__) || defined(__cplusplus)
2499 int getrusage (int who, struct rusage * rusage);
2500 #else
2501 int getrusage();
2502 #endif
2503
2504 int main() {
2505
2506 ; return 0; }
2507 EOF
2508 if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2509   rm -rf conftest*
2510   cl_cv_proto_getrusage_arg1="int"
2511 else
2512   echo "configure: failed program was:" >&5
2513   cat conftest.$ac_ext >&5
2514   rm -rf conftest*
2515   cl_cv_proto_getrusage_arg1="enum __rusage_who"
2516 fi
2517 rm -f conftest*
2518
2519
2520 cl_cv_proto_getrusage="extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);"
2521 fi
2522
2523 cl_cv_proto_getrusage=`echo "$cl_cv_proto_getrusage" | tr -s ' ' | sed -e 's/( /(/'`
2524 echo "$ac_t""${ac_tt}$cl_cv_proto_getrusage" 1>&6
2525
2526
2527     cat >> confdefs.h <<EOF
2528 #define RUSAGE_WHO_T $cl_cv_proto_getrusage_arg1
2529 EOF
2530
2531   fi
2532 fi
2533
2534                       echo $ac_n "checking for perror declaration""... $ac_c" 1>&6
2535 echo "configure:2536: checking for perror declaration" >&5
2536 if eval "test \"`echo '$''{'cl_cv_proto_perror'+set}'`\" = set"; then
2537   echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539   
2540 cat > conftest.$ac_ext <<EOF
2541 #line 2542 "configure"
2542 #include "confdefs.h"
2543
2544 /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
2545    declare it at all. */
2546 #include <stdio.h>
2547 #include <errno.h>
2548 extern
2549 #ifdef __cplusplus
2550 "C"
2551 #endif
2552 double perror ();
2553 int main() {
2554
2555 ; return 0; }
2556 EOF
2557 if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2558   rm -rf conftest*
2559   cl_cv_proto_perror=no
2560 else
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -rf conftest*
2564   cl_cv_proto_perror=yes
2565 fi
2566 rm -f conftest*
2567
2568 fi
2569
2570 echo "$ac_t""$cl_cv_proto_perror" 1>&6
2571 if test $cl_cv_proto_perror = yes; then
2572 cat >> confdefs.h <<\EOF
2573 #define HAVE_PERROR_DECL 1
2574 EOF
2575
2576 fi
2577
2578                       echo $ac_n "checking whether characters are unsigned""... $ac_c" 1>&6
2579 echo "configure:2580: checking whether characters are unsigned" >&5
2580 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   
2584 if test $ac_cv_prog_gcc = yes; then
2585   # GCC predefines this symbol on systems where it applies.
2586 cat > conftest.$ac_ext <<EOF
2587 #line 2588 "configure"
2588 #include "confdefs.h"
2589 #ifdef __CHAR_UNSIGNED__
2590   yes
2591 #endif
2592
2593 EOF
2594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2595   egrep "yes" >/dev/null 2>&1; then
2596   rm -rf conftest*
2597   ac_cv_c_char_unsigned=yes
2598 else
2599   rm -rf conftest*
2600   ac_cv_c_char_unsigned=no
2601 fi
2602 rm -f conftest*
2603
2604 else
2605 if test "$cross_compiling" = yes; then
2606   ac_cv_c_char_unsigned="guessing no"
2607 else
2608   cat > conftest.$ac_ext <<EOF
2609 #line 2610 "configure"
2610 #include "confdefs.h"
2611 #ifdef __cplusplus
2612 extern "C" void exit(int);
2613 #endif
2614 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2615 #if !defined(__STDC__) || __STDC__ != 1
2616 #define volatile
2617 #endif
2618 int main() {
2619   volatile char c = 255; exit(c < 0);
2620 }
2621 EOF
2622 if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2623 then
2624   ac_cv_c_char_unsigned=yes
2625 else
2626   echo "configure: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   rm -fr conftest*
2629   ac_cv_c_char_unsigned=no
2630 fi
2631 if test -f core; then
2632   coredir=core`/bin/sh -c 'echo $$'`
2633   mkdir $coredir
2634   cp confdefs.h $coredir/confdefs.h
2635   mv conftest.c $coredir/conftest.c
2636   mv conftest $coredir/conftest
2637   mv core $coredir/core
2638   echo "warning: test program dumped core -- see subdirectory $coredir"
2639 fi
2640 rm -fr conftest*
2641 fi
2642
2643 fi
2644 fi
2645 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2646 if test $ac_cv_prog_gcc = no; then
2647   # GCC defines __CHAR_UNSIGNED__ by itself, no need to fix up.
2648   case "$ac_cv_c_char_unsigned" in
2649     *yes) cat >> confdefs.h <<\EOF
2650 #define __CHAR_UNSIGNED__ 1
2651 EOF
2652  ;;
2653     *no) ;;
2654   esac
2655 fi
2656
2657                       test -d 'include' || mkdir 'include'
2658 cl_machine_file_c=${srcdir}/autoconf/intparam.c
2659 cl_machine_file_h=include/cl_intparam.h
2660 if test $cross_compiling = no; then
2661 if test -z "$cl_cv_file_intparam_h"; then
2662 echo "checking for integer types and behaviour" 1>&6
2663 echo "configure:2664: checking for integer types and behaviour" >&5
2664 cat > conftest.$ac_ext <<EOF
2665 #include "confdefs.h"
2666 EOF
2667 cat "$cl_machine_file_c" >> conftest.$ac_ext
2668 ORIGCC="$CC"
2669 if test $ac_cv_prog_gcc = yes; then
2670 # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
2671 # target 80386. Strip "-O".
2672 CC=`echo "$CC " | sed -e 's/-O //g'`
2673 fi
2674 { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2675 CC="$ORIGCC"
2676 if test -s conftest; then
2677   echo "creating $cl_machine_file_h"
2678   ./conftest > conftest.h
2679   if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
2680     # The file exists and we would not be changing it
2681     rm -f conftest.h
2682   else
2683     rm -f "$cl_machine_file_h"
2684     mv conftest.h "$cl_machine_file_h"
2685   fi
2686   cl_cv_file_intparam_h=1
2687 else
2688   echo "creation of $cl_machine_file_h failed"
2689 fi
2690 rm -f conftest*
2691 fi
2692 else
2693 echo "cross-compiling - cannot create $cl_machine_file_h"
2694 fi
2695
2696                       cl_machine_file_c=${srcdir}/autoconf/floatparam.c
2697 cl_machine_file_h=include/cl_floatparam.h
2698 if test $cross_compiling = no; then
2699 if test -z "$cl_cv_file_floatparam_h"; then
2700 echo "checking for floating-point types and behaviour" 1>&6
2701 echo "configure:2702: checking for floating-point types and behaviour" >&5
2702 cat > conftest.$ac_ext <<EOF
2703 #include "confdefs.h"
2704 EOF
2705 cat "$cl_machine_file_c" >> conftest.$ac_ext
2706 ORIGCC="$CC"
2707 if test $ac_cv_prog_gcc = yes; then
2708 # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
2709 # target 80386. Strip "-O".
2710 CC=`echo "$CC " | sed -e 's/-O //g'`
2711 fi
2712 { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2713 CC="$ORIGCC"
2714 if test -s conftest; then
2715   echo "creating $cl_machine_file_h"
2716   ./conftest > conftest.h
2717   if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
2718     # The file exists and we would not be changing it
2719     rm -f conftest.h
2720   else
2721     rm -f "$cl_machine_file_h"
2722     mv conftest.h "$cl_machine_file_h"
2723   fi
2724   cl_cv_file_floatparam_h=1
2725 else
2726   echo "creation of $cl_machine_file_h failed"
2727 fi
2728 rm -f conftest*
2729 fi
2730 else
2731 echo "cross-compiling - cannot create $cl_machine_file_h"
2732 fi
2733
2734                       # Check whether --with-gmp or --without-gmp was given.
2735 if test "${with_gmp+set}" = set; then
2736   withval="$with_gmp"
2737   :
2738 fi
2739
2740 if test "$with_gmp" = yes; then
2741   echo $ac_n "checking for recent enough gmp.h""... $ac_c" 1>&6
2742 echo "configure:2743: checking for recent enough gmp.h" >&5
2743 if eval "test \"`echo '$''{'cl_cv_new_gmp_h'+set}'`\" = set"; then
2744   echo $ac_n "(cached) $ac_c" 1>&6
2745 else
2746   
2747     cat > conftest.$ac_ext <<EOF
2748 #line 2749 "configure"
2749 #include "confdefs.h"
2750 #include <gmp.h>
2751 #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
2752  #error "ancient gmp.h"
2753 #endif
2754 EOF
2755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2756 { (eval echo configure:2757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2758 if test -z "$ac_err"; then
2759   rm -rf conftest*
2760   cl_cv_new_gmp_h="yes"
2761 else
2762   echo "$ac_err" >&5
2763   echo "configure: failed program was:" >&5
2764   cat conftest.$ac_ext >&5
2765   rm -rf conftest*
2766   cl_cv_new_gmp_h="no"
2767 fi
2768 rm -f conftest*
2769
2770 fi
2771 echo "$ac_t""$cl_cv_new_gmp_h" 1>&6
2772 if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi
2773 if test "$with_gmp" = yes; then
2774   echo $ac_n "checking for working libgmp""... $ac_c" 1>&6
2775 echo "configure:2776: checking for working libgmp" >&5
2776 if eval "test \"`echo '$''{'cl_cv_new_libgmp'+set}'`\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   
2780     SAVELIBS=$LIBS
2781     LIBS="$LIBS -lgmp"
2782     cat > conftest.$ac_ext <<EOF
2783 #line 2784 "configure"
2784 #include "confdefs.h"
2785 #include <gmp.h>
2786 int main() {
2787 mpn_divexact_by3(0,0,0)
2788 ; return 0; }
2789 EOF
2790 if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2791   rm -rf conftest*
2792   cl_cv_new_libgmp="yes"
2793 else
2794   echo "configure: failed program was:" >&5
2795   cat conftest.$ac_ext >&5
2796   rm -rf conftest*
2797   cl_cv_new_libgmp="no"; LIBS=$SAVELIBS
2798 fi
2799 rm -f conftest*
2800
2801 fi
2802 echo "$ac_t""$cl_cv_new_libgmp" 1>&6
2803 if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi
2804 fi
2805 fi
2806 if test "$with_gmp" = yes; then
2807   cat >> confdefs.h <<\EOF
2808 #define CL_USE_GMP 1
2809 EOF
2810
2811 else
2812   echo "configure: warning: disabling external GNU MP library" 1>&2
2813 fi
2814 for f in 'tests/.gdbinit'; do
2815   if test '!' -f "$f"; then
2816     echo "creating $f"
2817     g=`echo "$f" | sed -e 's,/[^/]*$,,'`
2818     test "$g" = "$f" || test -d "$g" || mkdir "$g"
2819     cp "$srcdir/$f" "$f"
2820   fi
2821 done
2822 trap '' 1 2 15
2823 cat > confcache <<\EOF
2824 # This file is a shell script that caches the results of configure
2825 # tests run on this system so they can be shared between configure
2826 # scripts and configure runs.  It is not useful on other systems.
2827 # If it contains results you don't want to keep, you may remove or edit it.
2828 #
2829 # By default, configure uses ./config.cache as the cache file,
2830 # creating it if it does not exist already.  You can give configure
2831 # the --cache-file=FILE option to use a different cache file; that is
2832 # what configure does when it calls configure scripts in
2833 # subdirectories, so they share the cache.
2834 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2835 # config.status only pays attention to the cache file if you give it the
2836 # --recheck option to rerun configure.
2837 #
2838 EOF
2839 # The following way of writing the cache mishandles newlines in values,
2840 # but we know of no workaround that is simple, portable, and efficient.
2841 # So, don't put newlines in cache variables' values.
2842 # Ultrix sh set writes to stderr and can't be redirected directly,
2843 # and sets the high bit in the cache file unless we assign to the vars.
2844 (set) 2>&1 |
2845   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2846   *ac_space=\ *)
2847     # `set' does not quote correctly, so add quotes (double-quote substitution
2848     # turns \\\\ into \\, and sed turns \\ into \).
2849     sed -n \
2850       -e "s/'/'\\\\''/g" \
2851       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2852     ;;
2853   *)
2854     # `set' quotes correctly as required by POSIX, so do not add quotes.
2855     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2856     ;;
2857   esac >> confcache
2858 if cmp -s $cache_file confcache; then
2859   :
2860 else
2861   if test -w $cache_file; then
2862     echo "updating cache $cache_file"
2863     cat confcache > $cache_file
2864   else
2865     echo "not updating unwritable cache $cache_file"
2866   fi
2867 fi
2868 rm -f confcache
2869
2870 trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
2871
2872 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2873 # Let make expand exec_prefix.
2874 test "x$exec_prefix" = xNONE && exec_prefix='$(prefix)'
2875
2876 # Any assignment to VPATH causes Sun make to only execute
2877 # the first set of double-colon rules, so remove it if not needed.
2878 # If there is a colon in the path, we need to keep it.
2879 if test "x$srcdir" = x.; then
2880   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2881 fi
2882
2883 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2884
2885 DEFS=-DHAVE_CONFIG_H
2886
2887 # Without the "./", some shells look in PATH for config.status.
2888 : ${CONFIG_STATUS=./config.status}
2889
2890 echo creating $CONFIG_STATUS
2891 rm -f $CONFIG_STATUS
2892 cat > $CONFIG_STATUS <<EOF
2893 #! /bin/sh
2894 # Generated automatically by configure.
2895 # Run this file to recreate the current configuration.
2896 # This directory was configured as follows,
2897 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2898 #
2899 # $0 $ac_configure_args
2900 #
2901 # Compiler output produced by configure, useful for debugging
2902 # configure, is in ./config.log if it exists.
2903
2904 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2905 for ac_option
2906 do
2907   case "\$ac_option" in
2908   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2909     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2910     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2911   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2912     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2913     exit 0 ;;
2914   -help | --help | --hel | --he | --h)
2915     echo "\$ac_cs_usage"; exit 0 ;;
2916   *) echo "\$ac_cs_usage"; exit 1 ;;
2917   esac
2918 done
2919
2920 ac_given_srcdir=$srcdir
2921
2922 trap 'rm -fr `echo "Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2923 EOF
2924 cat >> $CONFIG_STATUS <<EOF
2925
2926 # Protect against being on the right side of a sed subst in config.status.
2927 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2928  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2929 $ac_vpsub
2930 $extrasub
2931 s%@SHELL@%$SHELL%g
2932 s%@CFLAGS@%$CFLAGS%g
2933 s%@CPPFLAGS@%$CPPFLAGS%g
2934 s%@CXXFLAGS@%$CXXFLAGS%g
2935 s%@FFLAGS@%$FFLAGS%g
2936 s%@DEFS@%$DEFS%g
2937 s%@LDFLAGS@%$LDFLAGS%g
2938 s%@LIBS@%$LIBS%g
2939 s%@exec_prefix@%$exec_prefix%g
2940 s%@prefix@%$prefix%g
2941 s%@program_transform_name@%$program_transform_name%g
2942 s%@bindir@%$bindir%g
2943 s%@sbindir@%$sbindir%g
2944 s%@libexecdir@%$libexecdir%g
2945 s%@datadir@%$datadir%g
2946 s%@sysconfdir@%$sysconfdir%g
2947 s%@sharedstatedir@%$sharedstatedir%g
2948 s%@localstatedir@%$localstatedir%g
2949 s%@libdir@%$libdir%g
2950 s%@includedir@%$includedir%g
2951 s%@oldincludedir@%$oldincludedir%g
2952 s%@infodir@%$infodir%g
2953 s%@mandir@%$mandir%g
2954 s%@SET_MAKE@%$SET_MAKE%g
2955 s%@CC@%$CC%g
2956 s%@CPP@%$CPP%g
2957 s%@CXX@%$CXX%g
2958 s%@CXXCPP@%$CXXCPP%g
2959 s%@AS_UNDERSCORE@%$AS_UNDERSCORE%g
2960 s%@RANLIB@%$RANLIB%g
2961 s%@INSTALL@%$INSTALL%g
2962 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2963 s%@INSTALL_DATA@%$INSTALL_DATA%g
2964 s%@host@%$host%g
2965 s%@host_cpu@%$host_cpu%g
2966 s%@host_vendor@%$host_vendor%g
2967 s%@host_os@%$host_os%g
2968 s%@LD@%$LD%g
2969 s%@NM@%$NM%g
2970 s%@LN_S@%$LN_S%g
2971 s%@LIBTOOL@%$LIBTOOL%g
2972 s%@CLN_CURRENT@%$CLN_CURRENT%g
2973 s%@CLN_REVISION@%$CLN_REVISION%g
2974 s%@CLN_AGE@%$CLN_AGE%g
2975 s%@ALLOCA@%$ALLOCA%g
2976
2977 CEOF
2978 EOF
2979
2980 cat >> $CONFIG_STATUS <<\EOF
2981
2982 # Split the substitutions into bite-sized pieces for seds with
2983 # small command number limits, like on Digital OSF/1 and HP-UX.
2984 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2985 ac_file=1 # Number of current file.
2986 ac_beg=1 # First line for current file.
2987 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2988 ac_more_lines=:
2989 ac_sed_cmds=""
2990 while $ac_more_lines; do
2991   if test $ac_beg -gt 1; then
2992     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2993   else
2994     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2995   fi
2996   if test ! -s conftest.s$ac_file; then
2997     ac_more_lines=false
2998     rm -f conftest.s$ac_file
2999   else
3000     if test -z "$ac_sed_cmds"; then
3001       ac_sed_cmds="sed -f conftest.s$ac_file"
3002     else
3003       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3004     fi
3005     ac_file=`expr $ac_file + 1`
3006     ac_beg=$ac_end
3007     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3008   fi
3009 done
3010 if test -z "$ac_sed_cmds"; then
3011   ac_sed_cmds=cat
3012 fi
3013 EOF
3014
3015 cat >> $CONFIG_STATUS <<EOF
3016
3017 CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile"}
3018 EOF
3019 cat >> $CONFIG_STATUS <<\EOF
3020 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3021   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3022   case "$ac_file" in
3023   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3024        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3025   *) ac_file_in="${ac_file}.in" ;;
3026   esac
3027
3028   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3029
3030   # Remove last slash and all that follows it.  Not all systems have dirname.
3031   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3032   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3033     # The file is in a subdirectory.
3034     test ! -d "$ac_dir" && mkdir "$ac_dir"
3035     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3036     # A "../" for each directory in $ac_dir_suffix.
3037     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3038   else
3039     ac_dir_suffix= ac_dots=
3040   fi
3041
3042   case "$ac_given_srcdir" in
3043   .)  srcdir=.
3044       if test -z "$ac_dots"; then top_srcdir=.
3045       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3046   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3047   *) # Relative path.
3048     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3049     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3050   esac
3051
3052
3053   echo creating "$ac_file"
3054   rm -f "$ac_file"
3055   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3056   case "$ac_file" in
3057   *Makefile*) ac_comsub="1i\\
3058 # $configure_input" ;;
3059   *) ac_comsub= ;;
3060   esac
3061
3062   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3063   sed -e "$ac_comsub
3064 s%@configure_input@%$configure_input%g
3065 s%@srcdir@%$srcdir%g
3066 s%@top_srcdir@%$top_srcdir%g
3067 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3068 fi; done
3069 rm -f conftest.s*
3070
3071 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3072 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3073 #
3074 # ac_d sets the value in "#define NAME VALUE" lines.
3075 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3076 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3077 ac_dC='\3'
3078 ac_dD='%g'
3079 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3080 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3081 ac_uB='\([      ]\)%\1#\2define\3'
3082 ac_uC=' '
3083 ac_uD='\4%g'
3084 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3085 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3086 ac_eB='$%\1#\2define\3'
3087 ac_eC=' '
3088 ac_eD='%g'
3089 # ac_f turns "#define NAME" without trailing blanks into "#define NAME VALUE".
3090 ac_fA='s%^\([   ]*\)#\([        ]*\)define\([   ][      ]*\)'
3091 ac_fB='$%\1#\2define\3'
3092 ac_fC=' '
3093 ac_fD='%g'
3094
3095 if test "${CONFIG_HEADERS+set}" != set; then
3096 EOF
3097 cat >> $CONFIG_STATUS <<EOF
3098   CONFIG_HEADERS="include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h"
3099 EOF
3100 cat >> $CONFIG_STATUS <<\EOF
3101 fi
3102 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3103   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3104   case "$ac_file" in
3105   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3106        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3107   *) ac_file_in="${ac_file}.in" ;;
3108   esac
3109
3110   echo creating $ac_file
3111
3112   rm -f conftest.frag conftest.in conftest.out
3113   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3114   cat $ac_file_inputs > conftest.in
3115
3116 EOF
3117
3118 # Transform confdefs.h into a sed script conftest.vals that substitutes
3119 # the proper values into config.h.in to produce config.h.  And first:
3120 # Protect against being on the right side of a sed subst in config.status.
3121 # Protect against being in an unquoted here document in config.status.
3122 rm -f conftest.vals
3123 cat > conftest.hdr <<\EOF
3124 s/[\\&%]/\\&/g
3125 s%[\\$`]%\\&%g
3126 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3127 s%ac_d%ac_u%gp
3128 s%ac_u%ac_e%gp
3129 s%ac_e%ac_f%gp
3130 EOF
3131 sed -n -f conftest.hdr confdefs.h > conftest.vals
3132 rm -f conftest.hdr
3133
3134
3135 # Break up conftest.vals because some shells have a limit on
3136 # the size of here documents, and old seds have small limits too.
3137
3138 rm -f conftest.tail
3139 while :
3140 do
3141   ac_lines=`grep -c . conftest.vals`
3142   # grep -c gives empty output for an empty file on some AIX systems.
3143   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3144   # Write a limited-size here document to conftest.frag.
3145   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3146   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3147   echo 'CEOF
3148   sed -f conftest.frag conftest.in > conftest.out
3149   rm -f conftest.in
3150   mv conftest.out conftest.in
3151 ' >> $CONFIG_STATUS
3152   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3153   rm -f conftest.vals
3154   mv conftest.tail conftest.vals
3155 done
3156 rm -f conftest.vals
3157
3158 cat >> $CONFIG_STATUS <<\EOF
3159   rm -f conftest.frag conftest.h
3160   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3161   cat conftest.in >> conftest.h
3162   rm -f conftest.in
3163   if cmp -s $ac_file conftest.h 2>/dev/null; then
3164     echo "$ac_file is unchanged"
3165     rm -f conftest.h
3166   else
3167     # Remove last slash and all that follows it.  Not all systems have dirname.
3168     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3169     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3170       # The file is in a subdirectory.
3171       test ! -d "$ac_dir" && mkdir "$ac_dir"
3172     fi
3173     rm -f $ac_file
3174     mv conftest.h $ac_file
3175   fi
3176 fi; done
3177
3178 EOF
3179 cat >> $CONFIG_STATUS <<EOF
3180
3181 EOF
3182 cat >> $CONFIG_STATUS <<\EOF
3183
3184 exit 0
3185 EOF
3186 chmod +x $CONFIG_STATUS
3187 rm -fr confdefs* $ac_clean_files
3188 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3189