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