[project @ 2001-07-04 11:46:37 by sewardj]
[ghc-hetmet.git] / ghc / rts / gmp / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.129.2.2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using Autoconf version 2.14a.
5 # Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
6 # Free Software Foundation, Inc.
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Defaults:
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14
15 # Initialize some variables set by options.
16 ac_init_help=false
17 ac_init_version=false
18 # The variables have the same names as the options, with
19 # dashes changed to underlines.
20 build=NONE
21 cache_file=./config.cache
22 exec_prefix=NONE
23 host=NONE
24 no_create=
25 nonopt=NONE
26 no_recursion=
27 prefix=NONE
28 program_prefix=NONE
29 program_suffix=NONE
30 program_transform_name=s,x,x,
31 silent=
32 site=
33 srcdir=
34 target=NONE
35 verbose=
36 x_includes=NONE
37 x_libraries=NONE
38 bindir='${exec_prefix}/bin'
39 sbindir='${exec_prefix}/sbin'
40 libexecdir='${exec_prefix}/libexec'
41 datadir='${prefix}/share'
42 sysconfdir='${prefix}/etc'
43 sharedstatedir='${prefix}/com'
44 localstatedir='${prefix}/var'
45 libdir='${exec_prefix}/lib'
46 includedir='${prefix}/include'
47 oldincludedir='/usr/include'
48 infodir='${prefix}/info'
49 mandir='${prefix}/man'
50
51 # Initialize some other variables.
52 subdirs=
53 MFLAGS= MAKEFLAGS=
54 SHELL=${CONFIG_SHELL-/bin/sh}
55 # Maximum number of lines to put in a shell here document.
56 : ${ac_max_here_lines=48}
57 # Sed expression to map a string onto a valid sh and CPP variable names.
58 ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g'
59 ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^A-Z0-9_]%_%g'
60
61 ac_prev=
62 for ac_option
63 do
64   # If the previous option needs an argument, assign it.
65   if test -n "$ac_prev"; then
66     eval "$ac_prev=\$ac_option"
67     ac_prev=
68     continue
69   fi
70
71   ac_optarg=`echo "$ac_option" | sed -n 's/^[^=]*=//p'`
72
73   # Accept the important Cygnus configure options, so we can diagnose typos.
74
75   case "$ac_option" in
76
77   -bindir | --bindir | --bindi | --bind | --bin | --bi)
78     ac_prev=bindir ;;
79   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80     bindir="$ac_optarg" ;;
81
82   -build | --build | --buil | --bui | --bu)
83     ac_prev=build ;;
84   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
85     build="$ac_optarg" ;;
86
87   -cache-file | --cache-file | --cache-fil | --cache-fi \
88   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89     ac_prev=cache_file ;;
90   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92     cache_file="$ac_optarg" ;;
93
94   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95     ac_prev=datadir ;;
96   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97   | --da=*)
98     datadir="$ac_optarg" ;;
99
100   -disable-* | --disable-*)
101     ac_feature=`echo "$ac_option"|sed -e 's/-*disable-//'`
102     # Reject names that are not valid shell variable names.
103     if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
104       { echo "configure: error: invalid feature: $ac_feature" 1>&2; exit 1; }
105     fi
106     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107     eval "enable_${ac_feature}=no" ;;
108
109   -enable-* | --enable-*)
110     ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'`
111     # Reject names that are not valid shell variable names.
112     if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
113       { echo "configure: error: invalid feature: $ac_feature" 1>&2; exit 1; }
114     fi
115     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116     case "$ac_option" in
117       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
118       *) ac_optarg=yes ;;
119     esac
120     eval "enable_${ac_feature}='$ac_optarg'" ;;
121
122   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
123   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
124   | --exec | --exe | --ex)
125     ac_prev=exec_prefix ;;
126   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
127   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
128   | --exec=* | --exe=* | --ex=*)
129     exec_prefix="$ac_optarg" ;;
130
131   -gas | --gas | --ga | --g)
132     # Obsolete; use --with-gas.
133     with_gas=yes ;;
134
135   -help | --help | --hel | --he | -h)
136     ac_init_help=: ;;
137   -host | --host | --hos | --ho)
138     ac_prev=host ;;
139   -host=* | --host=* | --hos=* | --ho=*)
140     host="$ac_optarg" ;;
141
142   -includedir | --includedir | --includedi | --included | --include \
143   | --includ | --inclu | --incl | --inc)
144     ac_prev=includedir ;;
145   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
146   | --includ=* | --inclu=* | --incl=* | --inc=*)
147     includedir="$ac_optarg" ;;
148
149   -infodir | --infodir | --infodi | --infod | --info | --inf)
150     ac_prev=infodir ;;
151   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
152     infodir="$ac_optarg" ;;
153
154   -libdir | --libdir | --libdi | --libd)
155     ac_prev=libdir ;;
156   -libdir=* | --libdir=* | --libdi=* | --libd=*)
157     libdir="$ac_optarg" ;;
158
159   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
160   | --libexe | --libex | --libe)
161     ac_prev=libexecdir ;;
162   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
163   | --libexe=* | --libex=* | --libe=*)
164     libexecdir="$ac_optarg" ;;
165
166   -localstatedir | --localstatedir | --localstatedi | --localstated \
167   | --localstate | --localstat | --localsta | --localst \
168   | --locals | --local | --loca | --loc | --lo)
169     ac_prev=localstatedir ;;
170   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
171   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
172   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
173     localstatedir="$ac_optarg" ;;
174
175   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
176     ac_prev=mandir ;;
177   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
178     mandir="$ac_optarg" ;;
179
180   -nfp | --nfp | --nf)
181     # Obsolete; use --without-fp.
182     with_fp=no ;;
183
184   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
185   | --no-cr | --no-c)
186     no_create=yes ;;
187
188   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
189   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
190     no_recursion=yes ;;
191
192   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
193   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
194   | --oldin | --oldi | --old | --ol | --o)
195     ac_prev=oldincludedir ;;
196   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
197   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
198   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
199     oldincludedir="$ac_optarg" ;;
200
201   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
202     ac_prev=prefix ;;
203   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
204     prefix="$ac_optarg" ;;
205
206   -program-prefix | --program-prefix | --program-prefi | --program-pref \
207   | --program-pre | --program-pr | --program-p)
208     ac_prev=program_prefix ;;
209   -program-prefix=* | --program-prefix=* | --program-prefi=* \
210   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
211     program_prefix="$ac_optarg" ;;
212
213   -program-suffix | --program-suffix | --program-suffi | --program-suff \
214   | --program-suf | --program-su | --program-s)
215     ac_prev=program_suffix ;;
216   -program-suffix=* | --program-suffix=* | --program-suffi=* \
217   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
218     program_suffix="$ac_optarg" ;;
219
220   -program-transform-name | --program-transform-name \
221   | --program-transform-nam | --program-transform-na \
222   | --program-transform-n | --program-transform- \
223   | --program-transform | --program-transfor \
224   | --program-transfo | --program-transf \
225   | --program-trans | --program-tran \
226   | --progr-tra | --program-tr | --program-t)
227     ac_prev=program_transform_name ;;
228   -program-transform-name=* | --program-transform-name=* \
229   | --program-transform-nam=* | --program-transform-na=* \
230   | --program-transform-n=* | --program-transform-=* \
231   | --program-transform=* | --program-transfor=* \
232   | --program-transfo=* | --program-transf=* \
233   | --program-trans=* | --program-tran=* \
234   | --progr-tra=* | --program-tr=* | --program-t=*)
235     program_transform_name="$ac_optarg" ;;
236
237   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
238   | -silent | --silent | --silen | --sile | --sil)
239     silent=yes ;;
240
241   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
242     ac_prev=sbindir ;;
243   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
244   | --sbi=* | --sb=*)
245     sbindir="$ac_optarg" ;;
246
247   -sharedstatedir | --sharedstatedir | --sharedstatedi \
248   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
249   | --sharedst | --shareds | --shared | --share | --shar \
250   | --sha | --sh)
251     ac_prev=sharedstatedir ;;
252   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
253   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
254   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
255   | --sha=* | --sh=*)
256     sharedstatedir="$ac_optarg" ;;
257
258   -site | --site | --sit)
259     ac_prev=site ;;
260   -site=* | --site=* | --sit=*)
261     site="$ac_optarg" ;;
262
263   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
264     ac_prev=srcdir ;;
265   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
266     srcdir="$ac_optarg" ;;
267
268   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
269   | --syscon | --sysco | --sysc | --sys | --sy)
270     ac_prev=sysconfdir ;;
271   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
272   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
273     sysconfdir="$ac_optarg" ;;
274
275   -target | --target | --targe | --targ | --tar | --ta | --t)
276     ac_prev=target ;;
277   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
278     target="$ac_optarg" ;;
279
280   -v | -verbose | --verbose | --verbos | --verbo | --verb)
281     verbose=yes ;;
282
283   -version | --version | --versio | --versi | --vers | -V)
284     ac_init_version=: ;;
285
286   -with-* | --with-*)
287     ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'`
288     # Reject names that are not valid shell variable names.
289     if echo "$ac_package" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
290       { echo "configure: error: invalid package: $ac_package" 1>&2; exit 1; }
291     fi
292     ac_package=`echo $ac_package| sed 's/-/_/g'`
293     case "$ac_option" in
294       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
295       *) ac_optarg=yes ;;
296     esac
297     eval "with_${ac_package}='$ac_optarg'" ;;
298
299   -without-* | --without-*)
300     ac_package=`echo "$ac_option"|sed -e 's/-*without-//'`
301     # Reject names that are not valid shell variable names.
302     if echo "$ac_package" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
303       { echo "configure: error: invalid package: $ac_package" 1>&2; exit 1; }
304     fi
305     ac_package=`echo $ac_package| sed 's/-/_/g'`
306     eval "with_${ac_package}=no" ;;
307
308   --x)
309     # Obsolete; use --with-x.
310     with_x=yes ;;
311
312   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
313   | --x-incl | --x-inc | --x-in | --x-i)
314     ac_prev=x_includes ;;
315   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
316   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
317     x_includes="$ac_optarg" ;;
318
319   -x-libraries | --x-libraries | --x-librarie | --x-librari \
320   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
321     ac_prev=x_libraries ;;
322   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
323   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
324     x_libraries="$ac_optarg" ;;
325
326   -*) { echo "configure: error: unrecognized option: $ac_option
327 Try \`configure --help' for more information." 1>&2; exit 1; }
328     ;;
329
330   *=*)
331     ac_envvar=`echo "$ac_option" | sed -e 's/=.*//'`
332     # Reject names that are not valid shell variable names.
333     if echo "$ac_envvar" | grep '[^a-zA-Z0-9_]' >/dev/null 2>&1; then
334       { echo "configure: error: invalid variable name: $ac_envvar" 1>&2; exit 1; }
335     fi
336     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
337     eval "$ac_envvar='$ac_optarg'"
338     export $ac_envvar ;;
339
340   *)
341     if echo "$ac_option" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then
342       echo "configure: warning: invalid host type: $ac_option" 1>&2
343     fi
344     if test "x$nonopt" != xNONE; then
345       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
346     fi
347     nonopt="$ac_option"
348     ;;
349
350   esac
351 done
352
353 if test -n "$ac_prev"; then
354   { echo "configure: error: missing argument to --\`echo $ac_prev | sed 's/_/-/g'\`" 1>&2; exit 1; }
355 fi
356 if $ac_init_help; then
357   # Omit some internal or obsolete options to make the list less imposing.
358   # This message is too long to be a string in the A/UX 3.1 sh.
359   cat <<\EOF
360 `configure' configures software source code packages to adapt to many kinds
361 of systems.
362
363 Usage: configure [OPTION]... [VAR=VALUE]... [HOST]
364
365 To safely assign special values to environment variables (e.g., CC,
366 CFLAGS...), give to `configure' the definition as VAR=VALUE.
367
368 Defaults for the options are specified in brackets.
369
370 Configuration:
371   -h, --help              print this message
372   -V, --version           print the version of autoconf that created configure
373   -q, --quiet, --silent   do not print `checking...' messages
374       --cache-file=FILE   cache test results in FILE
375   -n, --no-create         do not create output files
376
377 EOF
378
379   cat <<EOF
380 Directories:
381   --prefix=PREFIX         install architecture-independent files in PREFIX
382                           [$ac_default_prefix]
383   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
384                           [same as prefix]
385   --bindir=DIR            user executables in DIR [EPREFIX/bin]
386   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
387   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
388   --datadir=DIR           read-only architecture-independent data in DIR
389                           [PREFIX/share]
390   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
391   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
392                           [PREFIX/com]
393   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
394   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
395   --includedir=DIR        C header files in DIR [PREFIX/include]
396   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
397   --infodir=DIR           info documentation in DIR [PREFIX/info]
398   --mandir=DIR            man documentation in DIR [PREFIX/man]
399   --srcdir=DIR            find the sources in DIR [configure dir or ..]
400 EOF
401
402   cat <<\EOF
403
404 Host type:
405   --build=BUILD      configure for building on BUILD [BUILD=HOST]
406   --host=HOST        configure for HOST [guessed]
407   --target=TARGET    configure for TARGET [TARGET=HOST]
408 EOF
409
410   cat <<\EOF
411
412 Program names:
413   --program-prefix=PREFIX            prepend PREFIX to installed program names
414   --program-suffix=SUFFIX            append SUFFIX to installed program names
415   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
416
417 Optional Features:
418   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
419   --enable-FEATURE=ARG  include FEATURE ARG=yes
420   --disable-dependency-tracking Speeds up one-time builds
421   --enable-dependency-tracking  Do not reject slow dependency extractors
422   --enable-maintainer-mode enable make rules and dependencies not useful
423                           (and sometimes confusing) to the casual installer
424   --enable-assert         enable ASSERT checking default=no
425   --enable-alloca         use alloca for temp space default=yes
426   --enable-fft            enable FFTs for multiplication default=no
427   --enable-mpbsd          build Berkley MP compatibility library default=no
428   --enable-mpfr           build MPFR default=no
429   --enable-shared=PKGS  build shared libraries default=yes
430   --enable-static=PKGS  build static libraries default=yes
431   --enable-fast-install=PKGS  optimize for fast installation default=yes
432   --disable-libtool-lock  avoid locking (might break parallel builds)
433
434 Optional Packages:
435   --with-PACKAGE=ARG    use PACKAGE ARG=yes
436   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
437   --with-gnu-ld           assume the C compiler uses GNU ld default=no
438   --with-pic              try to use only PIC/non-PIC objects default=use both
439 EOF
440   exit 0
441 fi
442 if $ac_init_version; then
443   cat <<\EOF
444 Generated automatically using Autoconf version 2.14a.
445 Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
446 Free Software Foundation, Inc.
447
448 This configure script is free software; the Free Software Foundation
449 gives unlimited permission to copy, distribute and modify it.
450 EOF
451   exit 0
452 fi
453 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454
455 # Keep a trace of the command line.
456 # Strip out --no-create and --no-recursion so they do not pile up.
457 # Also quote any args containing shell meta-characters.
458 ac_configure_args=
459 for ac_arg
460 do
461   case "$ac_arg" in
462   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
463   | --no-cr | --no-c) ;;
464   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
465   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
466   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
467   ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
468   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
469   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
470   esac
471 done
472
473 # File descriptor usage:
474 # 0 standard input
475 # 1 file creation
476 # 2 errors and warnings
477 # 3 some systems may open it to /dev/tty
478 # 4 used on the Kubota Titan
479 # 6 checking for... messages and results
480 # 5 compiler messages saved in config.log
481 if test "$silent" = yes; then
482   exec 6>/dev/null
483 else
484   exec 6>&1
485 fi
486 exec 5>./config.log
487
488 echo "\
489 This file contains any messages produced by compilers while
490 running configure, to aid debugging if configure makes a mistake.
491
492 It was created by configure version 2.14a, executed with
493  > $0 $ac_configure_args
494 " 1>&5
495
496 # NLS nuisances.
497 # Only set these to C if already set.  These must not be set unconditionally
498 # because not all systems understand e.g. LANG=C (notably SCO).
499 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
500 # Non-C LC_CTYPE values break the ctype check.
501 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
502 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
503 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
504 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
505
506 # confdefs.h avoids OS command line length limits that DEFS can exceed.
507 rm -rf conftest* confdefs.h
508 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
509 echo >confdefs.h
510
511 # A filename unique to this package, relative to the directory that
512 # configure is in, which we can look for to find out if srcdir is correct.
513 ac_unique_file=
514
515 # Find the source files, if location was not specified.
516 if test -z "$srcdir"; then
517   ac_srcdir_defaulted=yes
518   # Try the directory containing this script, then its parent.
519   ac_prog=$0
520   ac_confdir=`echo "$ac_prog" | sed 's%/[^/][^/]*$%%'`
521   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
522   srcdir=$ac_confdir
523   if test ! -r $srcdir/$ac_unique_file; then
524     srcdir=..
525   fi
526 else
527   ac_srcdir_defaulted=no
528 fi
529 if test ! -r $srcdir/$ac_unique_file; then
530   if test "$ac_srcdir_defaulted" = yes; then
531     { echo "configure: error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; }
532   else
533     { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; }
534   fi
535 fi
536 srcdir=`echo "$srcdir" | sed 's%\([^/]\)/*$%\1%'`
537
538 # Prefer explicitly selected file to automatically selected ones.
539 if test -z "$CONFIG_SITE"; then
540   if test "x$prefix" != xNONE; then
541     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542   else
543     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544   fi
545 fi
546 for ac_site_file in $CONFIG_SITE; do
547   if test -r "$ac_site_file"; then
548     echo "loading site script $ac_site_file"
549     . "$ac_site_file"
550   fi
551 done
552
553 if test -r "$cache_file"; then
554   echo "loading cache $cache_file"
555       test -f "$cache_file" && . $cache_file
556 else
557   echo "creating cache $cache_file"
558   >$cache_file
559 fi
560
561 ac_ext=c
562 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
563 ac_cpp='$CPP $CPPFLAGS'
564 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
565 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
566 cross_compiling=$ac_cv_prog_cc_cross
567
568 ac_exeext=
569 ac_objext=o
570 # Factoring default headers for most tests.
571 ac_includes_default="\
572 #include <stdio.h>
573 #include <sys/types.h>
574 #if STDC_HEADERS
575 # include <stdlib.h>
576 # include <stddef.h>
577 #else
578 # if HAVE_STDLIB_H
579 #  include <stdlib.h>
580 # endif
581 #endif
582 #if HAVE_STRING_H
583 # if !STDC_HEADERS && HAVE_MEMORY_H
584 #  include <memory.h>
585 # endif
586 # include <string.h>
587 #else
588 # if HAVE_STRINGS_H
589 #  include <strings.h>
590 # endif
591 #endif
592 #if HAVE_INTTYPES_H
593 # include <inttypes.h>
594 #endif
595 #if HAVE_UNISTD_H
596 # include <unistd.h>
597 #endif"
598
599 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
600   # Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
601   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
602     ECHO_N= ECHO_C='
603 ' ECHO_T='      '
604   else
605     ECHO_N=-n ECHO_C= ECHO_T=
606   fi
607 else
608   ECHO_N= ECHO_C='\c' ECHO_T=
609 fi
610
611 ac_aux_dir=
612 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
613   if test -f $ac_dir/install-sh; then
614     ac_aux_dir=$ac_dir
615     ac_install_sh="$ac_aux_dir/install-sh -c"
616     break
617   elif test -f $ac_dir/install.sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install.sh -c"
620     break
621   elif test -f $ac_dir/shtool; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/shtool install -c"
624     break
625   fi
626 done
627 if test -z "$ac_aux_dir"; then
628   { echo "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
629 fi
630 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
631 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
632 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
633
634 echo $ECHO_N "checking host system type... $ECHO_C" 1>&6
635 echo "configure:636: checking host system type" 1>&5
636 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
637
638   # Make sure we can run config.sub.
639   if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
640     { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; }
641   fi
642
643   ac_cv_host_alias=$host
644   case "$ac_cv_host_alias" in
645   NONE)
646     case $nonopt in
647     NONE)
648       if ac_cv_host_alias=`$ac_config_guess`; then :
649       else { echo "configure: error: cannot guess host type; you must specify one" 1>&2; exit 1; }
650       fi ;;    *) ac_cv_host_alias=$nonopt ;;
651     esac ;;
652   esac
653
654   ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || exit 1
655   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
656   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
657   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
658 else
659   echo $ECHO_N "(cached) $ECHO_C" 1>&6
660 fi
661
662 echo "$ECHO_T""$ac_cv_host" 1>&6
663
664 host=$ac_cv_host
665 host_alias=$ac_cv_host_alias
666 host_cpu=$ac_cv_host_cpu
667 host_vendor=$ac_cv_host_vendor
668 host_os=$ac_cv_host_os
669
670 echo $ECHO_N "checking target system type... $ECHO_C" 1>&6
671 echo "configure:672: checking target system type" 1>&5
672 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
673
674   # Make sure we can run config.sub.
675   if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
676     { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; }
677   fi
678
679   ac_cv_target_alias=$target
680   case "$ac_cv_target_alias" in
681   NONE)
682     case $nonopt in
683     NONE)
684       ac_cv_target_alias=$host_alias ;;
685     *) ac_cv_target_alias=$nonopt ;;
686     esac ;;
687   esac
688
689   ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || exit 1
690   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 else
694   echo $ECHO_N "(cached) $ECHO_C" 1>&6
695 fi
696
697 echo "$ECHO_T""$ac_cv_target" 1>&6
698
699 target=$ac_cv_target
700 target_alias=$ac_cv_target_alias
701 target_cpu=$ac_cv_target_cpu
702 target_vendor=$ac_cv_target_vendor
703 target_os=$ac_cv_target_os
704
705 echo $ECHO_N "checking build system type... $ECHO_C" 1>&6
706 echo "configure:707: checking build system type" 1>&5
707 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
708
709   # Make sure we can run config.sub.
710   if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
711     { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; }
712   fi
713
714   ac_cv_build_alias=$build
715   case "$ac_cv_build_alias" in
716   NONE)
717     case $nonopt in
718     NONE)
719       ac_cv_build_alias=$host_alias ;;
720     *) ac_cv_build_alias=$nonopt ;;
721     esac ;;
722   esac
723
724   ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || exit 1
725   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
726   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
727   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
728 else
729   echo $ECHO_N "(cached) $ECHO_C" 1>&6
730 fi
731
732 echo "$ECHO_T""$ac_cv_build" 1>&6
733
734 build=$ac_cv_build
735 build_alias=$ac_cv_build_alias
736 build_cpu=$ac_cv_build_cpu
737 build_vendor=$ac_cv_build_vendor
738 build_os=$ac_cv_build_os
739
740 # Do some error checking and defaulting for the host and target type.
741 # The inputs are:
742 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
743 #
744 # The rules are:
745 # 1. You are not allowed to specify --host, --target, and nonopt at the
746 #    same time.
747 # 2. Host defaults to nonopt.
748 # 3. If nonopt is not specified, then host defaults to the current host,
749 #    as determined by config.guess.
750 # 4. Target and build default to nonopt.
751 # 5. If nonopt is not specified, then target and build default to host.
752
753 # The aliases save the names the user supplied, while $host etc.
754 # will get canonicalized.
755 case $host---$target---$nonopt in
756 NONE---*---* | *---NONE---* | *---*---NONE) ;;
757 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
758 esac
759
760 test "$host_alias" != "$target_alias" &&
761   test "$program_prefix$program_suffix$program_transform_name" = \
762     NONENONEs,x,x, &&
763   program_prefix=${target_alias}-
764
765 # Find a good install program.  We prefer a C program (faster),
766 # so one script is as good as another.  But avoid the broken or
767 # incompatible versions:
768 # SysV /etc/install, /usr/sbin/install
769 # SunOS /usr/etc/install
770 # IRIX /sbin/install
771 # AIX /bin/install
772 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
773 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
774 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
775 # ./install, which can be erroneously created by make from ./install.sh.
776 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" 1>&6
777 echo "configure:778: checking for a BSD compatible install" 1>&5
778 if test -z "$INSTALL"; then
779 if test "${ac_cv_path_install+set}" = set; then
780   echo $ECHO_N "(cached) $ECHO_C" 1>&6
781 else
782     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
783   for ac_dir in $PATH; do
784     # Account for people who put trailing slashes in PATH elements.
785     case "$ac_dir/" in
786     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
787     *)
788       # OSF1 and SCO ODT 3.0 have their own names for install.
789       # Don't use installbsd from OSF since it installs stuff as root
790       # by default.
791       for ac_prog in ginstall scoinst install; do
792         if test -f $ac_dir/$ac_prog; then
793           if test $ac_prog = install &&
794             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
795             # AIX install.  It has an incompatible calling convention.
796             :
797           elif test $ac_prog = install &&
798             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
799             # program-specific install script used by HP pwplus--don't use.
800             :
801           else
802             ac_cv_path_install="$ac_dir/$ac_prog -c"
803             break 2
804           fi
805         fi
806       done
807       ;;
808     esac
809   done
810   IFS="$ac_save_IFS"
811
812 fi
813   if test "${ac_cv_path_install+set}" = set; then
814     INSTALL="$ac_cv_path_install"
815   else
816     # As a last resort, use the slow shell script.  We don't cache a
817     # path for INSTALL within a source directory, because that will
818     # break other packages using the cache if that directory is
819     # removed, or if the path is relative.
820     INSTALL="$ac_install_sh"
821   fi
822 fi
823 echo "$ECHO_T""$INSTALL" 1>&6
824
825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
826 # It thinks the first close brace ends the variable substitution.
827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
828
829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
830
831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
832
833 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" 1>&6
834 echo "configure:835: checking whether build environment is sane" 1>&5
835 # Just in case
836 sleep 1
837 echo timestamp > conftestfile
838 # Do `set' in a subshell so we don't clobber the current shell's
839 # arguments.  Must try -L first in case configure is actually a
840 # symlink; some systems play weird games with the mod time of symlinks
841 # (eg FreeBSD returns the mod time of the symlink's containing
842 # directory).
843 if (
844    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
845    if test "$*" = "X"; then
846       # -L didn't work.
847       set X `ls -t $srcdir/configure conftestfile`
848    fi
849    if test "$*" != "X $srcdir/configure conftestfile" \
850       && test "$*" != "X conftestfile $srcdir/configure"; then
851
852       # If neither matched, then we have a broken ls.  This can happen
853       # if, for instance, CONFIG_SHELL is bash and it inherits a
854       # broken ls alias from the environment.  This has actually
855       # happened.  Such a system could not be considered "sane".
856       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
857 alias in your environment" 1>&2; exit 1; }
858    fi
859
860    test "$2" = conftestfile
861    )
862 then
863    # Ok.
864    :
865 else
866    { echo "configure: error: newly created file is older than distributed files!
867 Check your system clock" 1>&2; exit 1; }
868 fi
869 rm -f conftest*
870 echo "$ECHO_T""yes" 1>&6
871 if test "$program_transform_name" = s,x,x,; then
872   program_transform_name=
873 else
874   # Double any \ or $.  echo might interpret backslashes.
875   cat <<\EOF >conftestsed
876 s,\\,\\\\,g; s,\$,$$,g
877 EOF
878   program_transform_name=`echo $program_transform_name | sed -f conftestsed`
879   rm -f conftestsed
880 fi
881 test "$program_prefix" != NONE &&
882   program_transform_name="s,^,${program_prefix},;$program_transform_name"
883 # Use a double $ so make ignores it.
884 test "$program_suffix" != NONE &&
885   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
886
887 # sed with no file args requires a program.
888 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
889
890 test x"${MISSING+set}" = xset || \
891   MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing"
892 if eval "$MISSING --run :"; then
893   am_missing_run="$MISSING --run "
894 else
895   am_missing_run=
896   am_backtick='`'
897   echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
898 fi
899
900 for ac_prog in mawk gawk nawk awk
901 do
902 # Extract the first word of "$ac_prog", so it can be a program name with args.
903 set dummy $ac_prog; ac_word=$2
904 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
905 echo "configure:906: checking for $ac_word" 1>&5
906 if test "${ac_cv_prog_AWK+set}" = set; then
907   echo $ECHO_N "(cached) $ECHO_C" 1>&6
908 else
909   if test -n "$AWK"; then
910   ac_cv_prog_AWK="$AWK" # Let the user override the test.
911 else
912   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
913 ac_dummy="$PATH"
914 for ac_dir in $ac_dummy; do
915   test -z "$ac_dir" && ac_dir=.
916   if test -f $ac_dir/$ac_word; then
917     echo "$ac_dir/$ac_word"
918   fi
919 done
920 IFS="$ac_save_ifs"
921 `; do
922     ac_cv_prog_AWK="$ac_prog"
923     break
924   done
925 fi
926 fi
927 AWK="$ac_cv_prog_AWK"
928 if test -n "$AWK"; then
929   echo "$ECHO_T""$AWK" 1>&6
930 else
931   echo "$ECHO_T""no" 1>&6
932 fi
933
934 test -n "$AWK" && break
935 done
936
937 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" 1>&6
938 echo "configure:939: checking whether ${MAKE-make} sets \${MAKE}" 1>&5
939 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
940 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
941   echo $ECHO_N "(cached) $ECHO_C" 1>&6
942 else
943   cat >conftestmake <<\EOF
944 all:
945         @echo 'ac_maketemp="${MAKE}"'
946 EOF
947 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
948 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
949 if test -n "$ac_maketemp"; then
950   eval ac_cv_prog_make_${ac_make}_set=yes
951 else
952   eval ac_cv_prog_make_${ac_make}_set=no
953 fi
954 rm -f conftestmake
955 fi
956 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
957   echo "$ECHO_T""yes" 1>&6
958   SET_MAKE=
959 else
960   echo "$ECHO_T""no" 1>&6
961   SET_MAKE="MAKE=${MAKE-make}"
962 fi
963
964 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
965 if test "${enable_dependency_tracking+set}" = set; then
966   enableval="$enable_dependency_tracking"
967
968 fi
969 if test "x$enable_dependency_tracking" = xno; then
970   AMDEP="#"
971 else
972   am_depcomp="$ac_aux_dir/depcomp"
973   if test ! -f "$am_depcomp"; then
974     AMDEP="#"
975   else
976     AMDEP=
977   fi
978 fi
979
980 if test -z "$AMDEP"; then
981   AMDEPBACKSLASH='\'
982 else
983   AMDEPBACKSLASH=
984 fi
985
986 if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
987   DEPDIR=.deps
988 else
989   DEPDIR=_deps
990 fi
991
992 PACKAGE=gmp
993
994 VERSION=3.1.1
995
996 if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" &&
997    test -f $srcdir/config.status; then
998   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
999 fi
1000 cat >>confdefs.h <<EOF
1001 #define PACKAGE "$PACKAGE"
1002 EOF
1003
1004 cat >>confdefs.h <<EOF
1005 #define VERSION "$VERSION"
1006 EOF
1007
1008 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
1009
1010 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1011
1012 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
1013
1014 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1015
1016 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1017
1018 AMTAR=${AMTAR-"${am_missing_run}tar"}
1019
1020 if test -z "$install_sh"; then
1021    install_sh="$ac_aux_dir/install-sh"
1022    test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh"
1023    test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh"
1024          install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`"
1025 fi
1026
1027 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" 1>&6
1028 echo "configure:1029: checking whether to enable maintainer-specific portions of Makefiles" 1>&5
1029     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1030 if test "${enable_maintainer_mode+set}" = set; then
1031   enableval="$enable_maintainer_mode"
1032   USE_MAINTAINER_MODE=$enableval
1033 else
1034   USE_MAINTAINER_MODE=no
1035 fi
1036   echo "$ECHO_T""$USE_MAINTAINER_MODE" 1>&6
1037
1038 if test $USE_MAINTAINER_MODE = yes; then
1039   MAINTAINER_MODE_TRUE=
1040   MAINTAINER_MODE_FALSE='#'
1041 else
1042   MAINTAINER_MODE_TRUE='#'
1043   MAINTAINER_MODE_FALSE=
1044 fi
1045   MAINT=$MAINTAINER_MODE_TRUE
1046
1047 gmp_configm4="config.m4"
1048 gmp_tmpconfigm4=cnfm4.tmp
1049 gmp_tmpconfigm4i=cnfm4i.tmp
1050 gmp_tmpconfigm4p=cnfm4p.tmp
1051 test -f $gmp_tmpconfigm4 && rm $gmp_tmpconfigm4
1052 test -f $gmp_tmpconfigm4i && rm $gmp_tmpconfigm4i
1053 test -f $gmp_tmpconfigm4p && rm $gmp_tmpconfigm4p
1054
1055 # Check whether --enable-assert or --disable-assert was given.
1056 if test "${enable_assert+set}" = set; then
1057   enableval="$enable_assert"
1058   case "${enableval}" in
1059 yes|no) ;;
1060 *) { echo "configure: error: bad value ${enableval} for --enable-assert, need yes or no" 1>&2; exit 1; } ;;
1061 esac
1062 else
1063   enable_assert=no
1064 fi
1065
1066 if test "$enable_assert" = "yes"; then
1067   cat >>confdefs.h <<\EOF
1068 #define WANT_ASSERT 1
1069 EOF
1070
1071 fi
1072
1073 # Check whether --enable-alloca or --disable-alloca was given.
1074 if test "${enable_alloca+set}" = set; then
1075   enableval="$enable_alloca"
1076   case "${enableval}" in
1077 yes|no) ;;
1078 *) { echo "configure: error: bad value ${enableval} for --enable-alloca, need yes or no" 1>&2; exit 1; } ;;
1079 esac
1080 else
1081   enable_alloca=yes
1082 fi
1083
1084 if test "$enable_alloca" = "no"; then
1085   cat >>confdefs.h <<\EOF
1086 #define USE_STACK_ALLOC 1
1087 EOF
1088
1089 fi
1090
1091 # Check whether --enable-fft or --disable-fft was given.
1092 if test "${enable_fft+set}" = set; then
1093   enableval="$enable_fft"
1094   case "${enableval}" in
1095 yes|no) ;;
1096 *) { echo "configure: error: bad value ${enableval} for --enable-fft, need yes or no" 1>&2; exit 1; } ;;
1097 esac
1098 else
1099   enable_fft=no
1100 fi
1101
1102 if test "$enable_fft" = "yes"; then
1103   cat >>confdefs.h <<\EOF
1104 #define WANT_FFT 1
1105 EOF
1106
1107 fi
1108
1109 # Check whether --enable-mpbsd or --disable-mpbsd was given.
1110 if test "${enable_mpbsd+set}" = set; then
1111   enableval="$enable_mpbsd"
1112   case "${enableval}" in
1113 yes|no) ;;
1114 *) { echo "configure: error: bad value ${enableval} for --enable-mpbsd, need yes or no" 1>&2; exit 1; } ;;
1115 esac
1116 else
1117   enable_mpbsd=no
1118 fi
1119
1120 if test "$enable_mpbsd" = "yes"; then
1121   WANT_MPBSD_TRUE=
1122   WANT_MPBSD_FALSE='#'
1123 else
1124   WANT_MPBSD_TRUE='#'
1125   WANT_MPBSD_FALSE=
1126 fi
1127
1128 # Check whether --enable-mpfr or --disable-mpfr was given.
1129 if test "${enable_mpfr+set}" = set; then
1130   enableval="$enable_mpfr"
1131   case "${enableval}" in
1132 yes|no) ;;
1133 *) { echo "configure: error: bad value ${enableval} for --enable-mpfr, need yes or no" 1>&2; exit 1; } ;;
1134 esac
1135 else
1136   enable_mpfr=no
1137 fi
1138
1139 if test "$enable_mpfr" = "yes"; then
1140   WANT_MPFR_TRUE=
1141   WANT_MPFR_FALSE='#'
1142 else
1143   WANT_MPFR_TRUE='#'
1144   WANT_MPFR_FALSE=
1145 fi
1146
1147 os_64bit="no"
1148 cclist="gcc cc"         # FIXME: Prefer c89 to cc.
1149 gmp_cflags_gcc="-g -O2"
1150 gmp_cflags64_gcc="-g -O2"
1151 gmp_cflags_cc="-g"
1152 gmp_cflags64_cc="-g"
1153
1154 case "$target" in
1155   # Alpha
1156   alpha*-cray-unicos*)
1157     # Don't perform any assembly syntax tests on this beast.
1158     gmp_no_asm_syntax_testing=yes
1159     cclist=cc
1160     gmp_cflags_cc="$gmp_cflags_cc -O"
1161     ;;
1162   alpha*-*-osf*)
1163     flavour=`echo $target_cpu | sed 's/^alpha//g'`
1164     if test -n "$flavour"; then
1165       case $flavour in     # compilers don't seem to understand `ev67' and such.
1166         ev6? | ev7*) flavour=ev6;;
1167       esac
1168       gmp_optcflags_gcc="-mcpu=$flavour"
1169       # FIXME: We shouldn't fail fatally if none of these work, but that's
1170       # how xoptcflags work and we don't have any other mechanism right now.
1171       # Why do we need this here and not for alpha*-*-* below?
1172       gmp_xoptcflags_gcc="-Wa,-arch,${flavour} -Wa,-m${flavour}"
1173       gmp_optcflags_cc="-arch $flavour -tune $flavour"
1174     fi
1175     ;;
1176   alpha*-*-*)
1177     cclist="gcc"
1178     flavour=`echo $target_cpu | sed 's/^alpha//g'`
1179     if test -n "$flavour"; then
1180       case $flavour in
1181         ev6? | ev7*) flavour=ev6;;
1182       esac
1183       gmp_optcflags_gcc="-mcpu=$flavour"
1184     fi
1185     ;;
1186   # Cray vector machines.  This must come after alpha* so that we can
1187   # recognize present and future vector processors with a wildcard.
1188   *-cray-unicos*)
1189     # Don't perform any assembly syntax tests on this beast.
1190     gmp_no_asm_syntax_testing=yes
1191     cclist=cc
1192     # Don't inherit default gmp_cflags_cc value; it comes with -g which
1193     # disables all optimization on Cray vector systems
1194     gmp_cflags_cc="-O"
1195     ;;
1196
1197   # AMD and Intel x86 configurations
1198   i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*)
1199     # Rumour has it -O2 used to give worse register allocation than just -O.
1200     gmp_cflags_gcc="-g -O -fomit-frame-pointer"
1201
1202     case "${target}" in
1203       i386*-*-*)    gmp_optcflags_gcc="-mcpu=i386 -march=i386";;
1204       i486*-*-*)    gmp_optcflags_gcc="-mcpu=i486 -march=i486";;
1205       i586*-*-* | pentium-*-* | pentiummmx-*-*)
1206                     gmp_optcflags_gcc="-mcpu=pentium -march=pentium";;
1207
1208       # -march=pentiumpro not used because mpz/powm.c (swox cvs rev 1.4)
1209       # tickles a bug in gcc 2.95.2 (believed fixed in 2.96).
1210       i686*-*-* | pentiumpro-*-* | pentium[23]-*-*)
1211                     gmp_optcflags_gcc="-mcpu=pentiumpro";;
1212
1213       k6*-*-*)      gmp_optcflags_gcc="-mcpu=k6 -march=k6";;
1214
1215       # Athlon instruction costs are close to p6: 3 cycle load latency, 4-6
1216       # cycle mul, 40 cycle div, pairable adc, ...
1217       # FIXME: Change this when gcc gets something specific for Athlon.
1218       # -march=pentiumpro not used, per i686 above.
1219       athlon-*-*)   gmp_optcflags_gcc="-mcpu=pentiumpro";;
1220     esac
1221     ;;
1222
1223   # Sparc
1224   ultrasparc*-*-solaris2.[7-9] | sparcv9-*-solaris2.[7-9])
1225     os_64bit=yes
1226     gmp_cflags_gcc="$gmp_cflags_gcc -Wa,-xarch=v8plus"
1227     gmp_xoptcflags_gcc="-mcpu=v9 -mcpu=v8 -mv8"
1228     gmp_cflags64_gcc="$gmp_cflags64_gcc -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9"
1229     gmp_cflags_cc="-xtarget=native -xarch=v8 -xO4"
1230     gmp_cflags64_cc="-xtarget=native -xarch=v9 -xO4"
1231     ;;
1232   sparc64-*-linux*)
1233     # Need to think more about the options passed here.  This isn't good for
1234     # some sparc64 linux distros, since we end up not optimizing when all the
1235     # options below fail.
1236     os_64bit=yes
1237     gmp_cflags64_gcc="$gmp_cflags64_gcc -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9"
1238     gmp_cflags_gcc="$gmp_cflags_gcc -m32"
1239     gmp_xoptflags_gcc="-mcpu=ultrasparc -mvis"
1240     ;;
1241   ultrasparc*-*-* | sparcv9-*-*)
1242     gmp_cflags_gcc="$gmp_cflags_gcc -Wa,-xarch=v8plus"
1243     gmp_xoptcflags_gcc="-mcpu=v9 -mcpu=v8 -mv8"
1244     gmp_cflags_cc="-xtarget=native -xarch=v8 -xO4"
1245     ;;
1246   sparcv8*-*-solaris2.* | microsparc*-*-solaris2.*)
1247     gmp_cflags_gcc="$gmp_cflags_gcc"
1248     gmp_xoptcflags_gcc="-mcpu=v8 -mv8"
1249     gmp_cflags_cc="-xtarget=native -xarch=v8 -xO4"
1250     ;;
1251   sparcv8*-*-* | microsparc*-*-*)               # SunOS, Linux, *BSD
1252     cclist="gcc acc cc"
1253     gmp_cflags_gcc="$gmp_cflags_gcc"
1254     gmp_xoptcflags_gcc="-mcpu=v8 -mv8"
1255     gmp_cflags_acc="-g -O2 -cg92"
1256     gmp_cflags_cc="-O2"         # FIXME: Flag for v8?
1257     ;;
1258   supersparc*-*-solaris2.*)
1259     gmp_cflags_gcc="$gmp_cflags_gcc -DSUPERSPARC"
1260     gmp_xoptcflags_gcc="-mcpu=v8 -mv8"
1261     gmp_cflags_cc="-xtarget=native -xarch=v8 -xO4 -DSUPERSPARC"
1262     ;;
1263   supersparc*-*-*)              # SunOS, Linux, *BSD
1264     cclist="gcc acc cc"
1265     gmp_cflags_gcc="$gmp_cflags_gcc -DSUPERSPARC"
1266     gmp_xoptcflags_gcc="-mcpu=v8 -mv8"
1267     gmp_cflags_acc="-g -O2 -cg92 -DSUPERSPARC"
1268     gmp_cflags_cc="-O2 -DSUPERSPARC"    # FIXME: Flag for v8?
1269     ;;
1270   *sparc*-*-*)
1271     cclist="gcc acc cc"
1272     gmp_cflags_acc="-g -O2"
1273     gmp_cflags_cc="-g -O2"
1274     ;;
1275
1276   # POWER/PowerPC
1277   powerpc64-*-aix*)
1278     cclist="gcc xlc"
1279     gmp_cflags_gcc="$gmp_cflags_gcc -maix64 -mpowerpc64"
1280     gmp_cflags_xlc="-g -O2 -q64 -qtune=pwr3"
1281     ;;
1282   powerpc*-*-aix*)
1283     cclist="gcc xlc"
1284     gmp_cflags_gcc="$gmp_cflags_gcc -mpowerpc"
1285     gmp_cflags_xlc="$gmp_cflags_cc -qarch=ppc -O2"
1286     ;;
1287   power-*-aix*)
1288     cclist="gcc xlc"
1289     gmp_cflags_gcc="$gmp_cflags_gcc -mpower"
1290     gmp_cflags_xlc="$gmp_cflags_cc -qarch=pwr -O2"
1291     ;;
1292   powerpc64*-*-*)
1293     gmp_cflags_gcc="$gmp_cflags_gcc -mpowerpc64"
1294     cat >>confdefs.h <<\EOF
1295 #define _LONG_LONG_LIMB 1
1296 EOF
1297             ;;
1298   powerpc-apple-darwin* | powerpc-apple-macosx*)
1299     gmp_cflags_gcc="$gmp_cflags_gcc -mpowerpc -traditional-cpp"
1300     ;;
1301   powerpc*-*-*)
1302     gmp_cflags_gcc="$gmp_cflags_gcc -mpowerpc"
1303     ;;
1304
1305   # MIPS
1306   mips-sgi-irix6.*)
1307     os_64bit=yes
1308     gmp_cflags64_gcc="-g -O2 -mabi=n32"
1309     gmp_cflags64_cc="$gmp_cflags64_cc -O2 -n32"
1310     ;;
1311
1312   # Motorola 68k family
1313   m88110*-*-*)
1314     gmp_cflags_gcc="-g -O -m88110"          ;;
1315   m68*-*-*)
1316     gmp_cflags_gcc="$gmp_cflags_gcc -fomit-frame-pointer"
1317     ;;
1318
1319   # HP
1320   hppa1.0*-*-*)
1321     cclist="gcc c89 cc"
1322     gmp_cflags_c89="$gmp_cflags_cc +O2"
1323     gmp_cflags_cc="$gmp_cflags_cc +O2"
1324     ;;
1325   hppa2.0w*-*-*)
1326     cclist="c89 cc"
1327     gmp_cflags_c89="+DD64 +O3"
1328     gmp_cflags_cc="+DD64 +O3"
1329     ;;
1330   hppa2.0*-*-*)
1331     os_64bit=yes
1332     cclist="gcc c89 cc"
1333     gmp_cflags64_gcc="$gmp_cflags64_gcc -mWHAT -D_LONG_LONG_LIMB"
1334     # +O2 to cc triggers bug in mpz/powm.c (1.4)
1335     gmp_cflags64_c89="+DA2.0 +e +O3 -D_LONG_LONG_LIMB"
1336     gmp_cflags64_cc="+DA2.0 +e +O3 -D_LONG_LONG_LIMB"
1337     gmp_cflags_c89="$gmp_cflags_cc +O2"
1338     gmp_cflags_cc="$gmp_cflags_cc +O2"
1339     ;;
1340
1341   # VAX
1342   vax*-*-*)
1343     gmp_cflags_gcc="$gmp_cflags_gcc -fomit-frame-pointer"
1344     ;;
1345
1346   # Fujitsu
1347   f30[01]-fujitsu-sysv*)
1348     cclist="gcc vcc"
1349     gmp_cflags_vcc="-g"         # FIXME: flags for vcc?
1350     ;;
1351 esac
1352
1353 case "${target}" in
1354   *-*-mingw32) gmp_cflags_gcc="$gmp_cflags_gcc -mno-cygwin";;
1355 esac
1356
1357 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" 1>&6
1358 echo "configure:1352: checking for BSD-compatible nm" 1>&5
1359 if test "${ac_cv_path_NM+set}" = set; then
1360   echo $ECHO_N "(cached) $ECHO_C" 1>&6
1361 else
1362   if test -n "$NM"; then
1363   # Let the user override the test.
1364   ac_cv_path_NM="$NM"
1365 else
1366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1367   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1368     test -z "$ac_dir" && ac_dir=.
1369     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1370       # Check to see if the nm accepts a BSD-compat flag.
1371       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1372       #   nm: unknown option "B" ignored
1373       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1374         ac_cv_path_NM="$ac_dir/nm -B"
1375         break
1376       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1377         ac_cv_path_NM="$ac_dir/nm -p"
1378         break
1379       else
1380         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1381         continue # so that we can try to find one that supports BSD flags
1382       fi
1383     fi
1384   done
1385   IFS="$ac_save_ifs"
1386   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1387 fi
1388 fi
1389
1390 NM="$ac_cv_path_NM"
1391 echo "$ECHO_T""$NM" 1>&6
1392         # nm on 64-bit AIX needs to know the object file format
1393 case "$target" in
1394   powerpc64*-*-aix*)
1395     NM="$NM -X 64"
1396     ;;
1397 esac
1398
1399 # Save CFLAGS given on command line.
1400 gmp_user_CFLAGS="$CFLAGS"
1401
1402 if test -z "$CC"; then
1403   # Find compiler.
1404
1405 if test $host != $build; then
1406   ac_tool_prefix=${host_alias}-
1407 else
1408   ac_tool_prefix=
1409 fi
1410
1411 gmp_cc_list="$cclist"
1412 gmp_req_64bit_cc="$os_64bit"
1413
1414 CC32=
1415 CC64=
1416 for c in $gmp_cc_list; do
1417   # Avoid cache hits.
1418   unset CC
1419   unset ac_cv_prog_CC
1420
1421 # Extract the first word of "${ac_tool_prefix}$c", so it can be a program name with args.
1422 set dummy ${ac_tool_prefix}$c; ac_word=$2
1423 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
1424 echo "configure:1418: checking for $ac_word" 1>&5
1425 if test "${ac_cv_prog_CC+set}" = set; then
1426   echo $ECHO_N "(cached) $ECHO_C" 1>&6
1427 else
1428   if test -n "$CC"; then
1429   ac_cv_prog_CC="$CC" # Let the user override the test.
1430 else
1431   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1432 ac_dummy="$PATH"
1433 for ac_dir in $ac_dummy; do
1434   test -z "$ac_dir" && ac_dir=.
1435   if test -f $ac_dir/$ac_word; then
1436     echo "$ac_dir/$ac_word"
1437   fi
1438 done
1439 IFS="$ac_save_ifs"
1440 `; do
1441     ac_cv_prog_CC="${ac_tool_prefix}$c"
1442     break
1443   done
1444 fi
1445 fi
1446 CC="$ac_cv_prog_CC"
1447 if test -n "$CC"; then
1448   echo "$ECHO_T""$CC" 1>&6
1449 else
1450   echo "$ECHO_T""no" 1>&6
1451 fi
1452
1453 if test -z "$ac_cv_prog_CC"; then
1454   if test -n "$ac_tool_prefix"; then
1455     # Extract the first word of "$c", so it can be a program name with args.
1456 set dummy $c; ac_word=$2
1457 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
1458 echo "configure:1452: checking for $ac_word" 1>&5
1459 if test "${ac_cv_prog_CC+set}" = set; then
1460   echo $ECHO_N "(cached) $ECHO_C" 1>&6
1461 else
1462   if test -n "$CC"; then
1463   ac_cv_prog_CC="$CC" # Let the user override the test.
1464 else
1465   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1466 ac_dummy="$PATH"
1467 for ac_dir in $ac_dummy; do
1468   test -z "$ac_dir" && ac_dir=.
1469   if test -f $ac_dir/$ac_word; then
1470     echo "$ac_dir/$ac_word"
1471   fi
1472 done
1473 IFS="$ac_save_ifs"
1474 `; do
1475     ac_cv_prog_CC="$c"
1476     break
1477   done
1478   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="$c"
1479 fi
1480 fi
1481 CC="$ac_cv_prog_CC"
1482 if test -n "$CC"; then
1483   echo "$ECHO_T""$CC" 1>&6
1484 else
1485   echo "$ECHO_T""no" 1>&6
1486 fi
1487
1488   else
1489     CC="$c"
1490   fi
1491 fi
1492
1493   if test -n "$CC"; then
1494     eval c_flags=\$gmp_cflags_$c
1495     ac_ext=c
1496 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1497 ac_cpp='$CPP $CPPFLAGS'
1498 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1499 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1500 cross_compiling=$ac_cv_prog_cc_cross
1501         CC="$CC"
1502 CFLAGS="$c_flags"
1503 echo $ECHO_N "checking if the C compiler ($CC) works with flags $CFLAGS... $ECHO_C" 1>&6
1504 echo "configure:1498: checking if the C compiler ($CC) works with flags $CFLAGS" 1>&5
1505
1506 # Simple test for all targets.
1507 cat >conftest.$ac_ext <<EOF
1508
1509 #line 1503 "configure"
1510 #include "confdefs.h"
1511
1512 int main(){return(0);}
1513 EOF
1514 if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1515   tmp_works=yes
1516   # If we can't run a trivial program, we are probably using a cross compiler.
1517   if (./conftest; exit) 2>/dev/null; then
1518     tmp_cross=no
1519   else
1520     tmp_cross=yes
1521   fi
1522 else
1523   echo "configure: failed program was:" >&5
1524   cat conftest.$ac_ext >&5
1525   tmp_works=no
1526 fi
1527 rm -fr conftest*
1528
1529 # Target specific tests.
1530 if test "$tmp_works" = "yes"; then
1531   case "$target" in
1532     *-*-aix*)   # Returning a funcptr.
1533       cat >conftest.$ac_ext <<EOF
1534 #line 1528 "configure"
1535 #include "confdefs.h"
1536
1537 int
1538 main ()
1539 {
1540 } void *g(); void *f() { return g(); } int bar(){
1541   ;
1542   return 0;
1543 }
1544 EOF
1545 if { (eval echo configure:1539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1546   rm -rf conftest*
1547   tmp_works=yes
1548 else
1549   echo "configure: failed program was:" >&5
1550   cat conftest.$ac_ext >&5
1551   rm -rf conftest*
1552   tmp_works=no
1553 fi
1554 rm -f conftest*
1555       ;;
1556   esac
1557 fi
1558
1559 if test "$tmp_works" = "yes"; then
1560   gmp_prog_cc_works=yes
1561 else
1562   gmp_prog_cc_works=no
1563 fi
1564
1565 echo "$ECHO_T""$tmp_works" 1>&6
1566
1567     if test "$gmp_prog_cc_works" != "yes"; then
1568       continue
1569     fi
1570
1571     # Save first working compiler, whether 32- or 64-bit capable.
1572     if test -z "$CC32"; then
1573       CC32="$CC"
1574     fi
1575     if test "$gmp_req_64bit_cc" = "yes"; then
1576       eval c_flags=\$gmp_cflags64_$c
1577
1578       # Verify that the compiler works in 64-bit mode as well.
1579       # /usr/ucb/cc on Solaris 7 can *compile* in 64-bit mode, but not link.
1580       ac_ext=c
1581 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1582 ac_cpp='$CPP $CPPFLAGS'
1583 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1584 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1585 cross_compiling=$ac_cv_prog_cc_cross
1586         CC="$c"
1587 CFLAGS="$c_flags"
1588 echo $ECHO_N "checking if the C compiler ($CC) works with flags $CFLAGS... $ECHO_C" 1>&6
1589 echo "configure:1583: checking if the C compiler ($CC) works with flags $CFLAGS" 1>&5
1590
1591 # Simple test for all targets.
1592 cat >conftest.$ac_ext <<EOF
1593
1594 #line 1588 "configure"
1595 #include "confdefs.h"
1596
1597 int main(){return(0);}
1598 EOF
1599 if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1600   tmp_works=yes
1601   # If we can't run a trivial program, we are probably using a cross compiler.
1602   if (./conftest; exit) 2>/dev/null; then
1603     tmp_cross=no
1604   else
1605     tmp_cross=yes
1606   fi
1607 else
1608   echo "configure: failed program was:" >&5
1609   cat conftest.$ac_ext >&5
1610   tmp_works=no
1611 fi
1612 rm -fr conftest*
1613
1614 # Target specific tests.
1615 if test "$tmp_works" = "yes"; then
1616   case "$target" in
1617     *-*-aix*)   # Returning a funcptr.
1618       cat >conftest.$ac_ext <<EOF
1619 #line 1613 "configure"
1620 #include "confdefs.h"
1621
1622 int
1623 main ()
1624 {
1625 } void *g(); void *f() { return g(); } int bar(){
1626   ;
1627   return 0;
1628 }
1629 EOF
1630 if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1631   rm -rf conftest*
1632   tmp_works=yes
1633 else
1634   echo "configure: failed program was:" >&5
1635   cat conftest.$ac_ext >&5
1636   rm -rf conftest*
1637   tmp_works=no
1638 fi
1639 rm -f conftest*
1640       ;;
1641   esac
1642 fi
1643
1644 if test "$tmp_works" = "yes"; then
1645   gmp_prog_cc_works=yes
1646 else
1647   gmp_prog_cc_works=no
1648 fi
1649
1650 echo "$ECHO_T""$tmp_works" 1>&6
1651
1652       if test "$gmp_prog_cc_works" = "yes"; then
1653
1654   gmp_tmp_CC_save="$CC"
1655   CC="$c"
1656   echo $ECHO_N "checking whether the C compiler ($CC) is 64-bit capable... $ECHO_C" 1>&6
1657 echo "configure:1651: checking whether the C compiler ($CC) is 64-bit capable" 1>&5
1658   if test -z "$NM"; then
1659     echo; echo "configure: GMP_CHECK_CC_64BIT: fatal: need nm"
1660     exit 1
1661   fi
1662   gmp_tmp_CFLAGS_save="$CFLAGS"
1663   CFLAGS="$c_flags"
1664
1665   case "$target" in
1666     hppa2.0*-*-*)
1667       # FIXME: If gcc is installed under another name than "gcc", we will
1668       # test the wrong thing.
1669       if test "$CC" != "gcc"; then
1670                                                 echo >conftest.c
1671         gmp_tmp_vs=`$CC $CFLAGS -V -c -o conftest.o conftest.c 2>&1 | grep "^ccom:"`
1672         rm conftest*
1673         gmp_tmp_v1=`echo $gmp_tmp_vs | sed 's/.* .\.\(.*\)\..*\..* HP C.*/\1/'`
1674         gmp_tmp_v2=`echo $gmp_tmp_vs | sed 's/.* .\..*\.\(.*\)\..* HP C.*/\1/'`
1675         gmp_tmp_v3=`echo $gmp_tmp_vs | sed 's/.* .\..*\..*\.\(.*\) HP C.*/\1/'`
1676         gmp_cv_cc_64bit=no
1677         test -n "$gmp_tmp_v1" && test "$gmp_tmp_v1" -ge "10" \
1678           && test -n "$gmp_tmp_v2" && test "$gmp_tmp_v2" -ge "32" \
1679           && test -n "$gmp_tmp_v3" && test "$gmp_tmp_v3" -ge "30" \
1680           && gmp_cv_cc_64bit=yes
1681       else      # gcc
1682         # FIXME: Compile a minimal file and determine if the resulting object
1683         # file is an ELF file.  If so, gcc can produce 64-bit code.
1684         # Do we have file(1) for target?
1685         gmp_cv_cc_64bit=no
1686       fi
1687       ;;
1688     mips-sgi-irix6.*)
1689       # We use `-n32' to cc and `-mabi=n32' to gcc, resulting in 64-bit
1690       # arithmetic but not 64-bit pointers, so the general test for sizeof
1691       # (void *) is not valid.
1692       # Simply try to compile an empty main.  If that succeeds return
1693       # true.
1694       cat >conftest.$ac_ext <<EOF
1695 #line 1689 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 EOF
1706 if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1707   rm -rf conftest*
1708   gmp_cv_cc_64bit=yes
1709 else
1710   echo "configure: failed program was:" >&5
1711   cat conftest.$ac_ext >&5
1712   rm -rf conftest*
1713   gmp_cv_cc_64bit=no
1714 fi
1715 rm -f conftest*
1716       ;;
1717     *-*-*)
1718       # Allocate an array of size sizeof (void *) and use nm to determine its
1719       # size.  We depend on the first declared variable being put at address 0.
1720       cat >conftest.c <<EOF
1721 char arr[sizeof (void *)]={0};
1722 char post=0;
1723 EOF
1724       gmp_compile="$CC $CFLAGS -c conftest.c 1>&5"
1725       if { (eval echo configure:1719: \"$gmp_compile\") 1>&5; (eval $gmp_compile) 2>&5; }; then
1726                 gmp_tmp_val=`$NM conftest.o | grep post | sed -e 's;[[][0-9][]]\(.*\);\1;' \
1727           -e 's;[^1-9]*\([0-9]*\).*;\1;'`
1728                 if test "$gmp_tmp_val" = "8"; then
1729           gmp_cv_cc_64bit=yes
1730         else
1731           gmp_cv_cc_64bit=no
1732         fi
1733       else
1734         echo "configure: failed program was:" >&5
1735         cat conftest.$ac_ext >&5
1736         gmp_cv_cc_64bit=no
1737       fi
1738       rm -f conftest*
1739       ;;
1740   esac
1741
1742   CC="$gmp_tmp_CC_save"
1743   CFLAGS="$gmp_tmp_CFLAGS_save"
1744   echo "$ECHO_T""$gmp_cv_cc_64bit" 1>&6
1745
1746         if test "$gmp_cv_cc_64bit" = "yes"; then
1747           test -z "$CC64" && CC64="$c"
1748           test -z "$CFLAGS64" && CFLAGS64="$c_flags"
1749           # We have CC64 so we're done.
1750           break
1751         fi
1752       fi
1753     else
1754       # We have CC32, and we don't need a 64-bit compiler so we're done.
1755       break
1756     fi
1757   fi
1758 done
1759 CC="$CC32"
1760
1761   # If 64-bit OS and we have a 64-bit compiler, use it.
1762   if test -n "$os_64bit" && test -n "$CC64"; then
1763     CC=$CC64
1764     CFLAGS=$CFLAGS64
1765   else
1766     eval CFLAGS=\$gmp_cflags_$CC
1767   fi
1768
1769   # Try compiler flags that may work with only some compiler versions.
1770   # gmp_optcflags: All or nothing.
1771   eval optcflags=\$gmp_optcflags_$CC
1772   if test -n "$optcflags"; then
1773     CFLAGS_save="$CFLAGS"
1774     CFLAGS="$CFLAGS $optcflags"
1775     echo $ECHO_N "checking whether $CC accepts $optcflags... $ECHO_C" 1>&6
1776 echo "configure:1770: checking whether $CC accepts $optcflags" 1>&5
1777     ac_ext=c
1778 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1779 ac_cpp='$CPP $CPPFLAGS'
1780 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1781 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1782 cross_compiling=$ac_cv_prog_cc_cross
1783
1784     cat >conftest.$ac_ext <<EOF
1785
1786 #line 1780 "configure"
1787 #include "confdefs.h"
1788
1789 int main(){return(0);}
1790 EOF
1791 if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1792   optok=yes
1793   # If we can't run a trivial program, we are probably using a cross compiler.
1794   if (./conftest; exit) 2>/dev/null; then
1795     cross=no
1796   else
1797     cross=yes
1798   fi
1799 else
1800   echo "configure: failed program was:" >&5
1801   cat conftest.$ac_ext >&5
1802   optok=no
1803 fi
1804 rm -fr conftest*
1805     if test "$optok" = "yes"; then
1806       echo "$ECHO_T""yes" 1>&6
1807     else
1808       echo "$ECHO_T""no" 1>&6
1809       CFLAGS="$CFLAGS_save"
1810     fi
1811   fi
1812   # gmp_xoptcflags: First is best, one has to work.
1813   eval xoptcflags=\$gmp_xoptcflags_$CC
1814   if test -n "$xoptcflags"; then
1815     gmp_found="no"
1816     for xopt in $xoptcflags; do
1817       CFLAGS_save="$CFLAGS"
1818       CFLAGS="$CFLAGS $xopt"
1819       echo $ECHO_N "checking whether $CC accepts $xopt... $ECHO_C" 1>&6
1820 echo "configure:1814: checking whether $CC accepts $xopt" 1>&5
1821       ac_ext=c
1822 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1823 ac_cpp='$CPP $CPPFLAGS'
1824 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1825 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1826 cross_compiling=$ac_cv_prog_cc_cross
1827
1828       cat >conftest.$ac_ext <<EOF
1829
1830 #line 1824 "configure"
1831 #include "confdefs.h"
1832
1833 int main(){return(0);}
1834 EOF
1835 if { (eval echo configure:1829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1836   optok=yes
1837   # If we can't run a trivial program, we are probably using a cross compiler.
1838   if (./conftest; exit) 2>/dev/null; then
1839     cross=no
1840   else
1841     cross=yes
1842   fi
1843 else
1844   echo "configure: failed program was:" >&5
1845   cat conftest.$ac_ext >&5
1846   optok=no
1847 fi
1848 rm -fr conftest*
1849       if test "$optok" = "yes"; then
1850         echo "$ECHO_T""yes" 1>&6
1851         gmp_found="yes"
1852         break
1853       else
1854         echo "$ECHO_T""no" 1>&6
1855         CFLAGS="$CFLAGS_save"
1856       fi
1857     done
1858     if test "$gmp_found" = "no"; then
1859       echo "$0: fatal: need a compiler that understands one of $xoptcflags"
1860       exit 1
1861     fi
1862   fi
1863 fi
1864
1865 # Restore CFLAGS given on command line.
1866 # FIXME: We've run through quite some unnecessary code looking for a
1867 # nice compiler and working flags for it, just to spoil that with user
1868 # supplied flags.
1869 test -n "$gmp_user_CFLAGS" && CFLAGS="$gmp_user_CFLAGS"
1870
1871 # Select chosen compiler.
1872
1873 echo $ECHO_N "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ECHO_C" 1>&6
1874 echo "configure:1868: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" 1>&5
1875
1876 ac_ext=c
1877 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1878 ac_cpp='$CPP $CPPFLAGS'
1879 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1880 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1881 cross_compiling=$ac_cv_prog_cc_cross
1882
1883 cat >conftest.$ac_ext <<EOF
1884
1885 #line 1879 "configure"
1886 #include "confdefs.h"
1887
1888 int main(){return(0);}
1889 EOF
1890 if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1891   ac_cv_prog_cc_works=yes
1892   # If we can't run a trivial program, we are probably using a cross compiler.
1893   if (./conftest; exit) 2>/dev/null; then
1894     ac_cv_prog_cc_cross=no
1895   else
1896     ac_cv_prog_cc_cross=yes
1897   fi
1898 else
1899   echo "configure: failed program was:" >&5
1900   cat conftest.$ac_ext >&5
1901   ac_cv_prog_cc_works=no
1902 fi
1903 rm -fr conftest*
1904 ac_ext=c
1905 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1906 ac_cpp='$CPP $CPPFLAGS'
1907 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1908 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1909 cross_compiling=$ac_cv_prog_cc_cross
1910
1911 echo "$ECHO_T""$ac_cv_prog_cc_works" 1>&6
1912 if test $ac_cv_prog_cc_works = no; then
1913   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 77; }
1914 fi
1915 echo $ECHO_N "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ECHO_C" 1>&6
1916 echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" 1>&5
1917 echo "$ECHO_T""$ac_cv_prog_cc_cross" 1>&6
1918 cross_compiling=$ac_cv_prog_cc_cross
1919
1920 echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" 1>&6
1921 echo "configure:1915: checking whether we are using GNU C" 1>&5
1922 if test "${ac_cv_prog_gcc+set}" = set; then
1923   echo $ECHO_N "(cached) $ECHO_C" 1>&6
1924 else
1925   cat >conftest.c <<EOF
1926 #ifdef __GNUC__
1927   yes;
1928 #endif
1929 EOF
1930 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1931   ac_cv_prog_gcc=yes
1932 else
1933   ac_cv_prog_gcc=no
1934 fi
1935 fi
1936 echo "$ECHO_T""$ac_cv_prog_gcc" 1>&6
1937
1938 if test "$ac_cv_prog_gcc" = "yes"; then
1939   GCC=yes
1940 else
1941   GCC=
1942 fi
1943
1944 # Set CFLAGS if not already set.
1945 if test -z "$CFLAGS"; then
1946   CFLAGS="-g"
1947   if test "$GCC" = "yes"; then
1948     CFLAGS="$CFLAGS -O2"
1949   fi
1950 fi
1951
1952 if test "${ac_cv_prog_CC+set}" = set; then
1953   echo $ECHO_N "(cached) $ECHO_C" 1>&6
1954 else
1955   ac_cv_prog_CC="$CC"
1956 fi
1957
1958 # How to assemble.
1959 CCAS="$CC -c"
1960
1961 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" 1>&6
1962 echo "configure:1956: checking how to run the C preprocessor" 1>&5
1963 # On Suns, sometimes $CPP names a directory.
1964 if test -n "$CPP" && test -d "$CPP"; then
1965   CPP=
1966 fi
1967 if test -z "$CPP"; then
1968 if test "${ac_cv_prog_CPP+set}" = set; then
1969   echo $ECHO_N "(cached) $ECHO_C" 1>&6
1970 else
1971     # This must be in double quotes, not single quotes, because CPP may get
1972   # substituted into the Makefile and "${CC-cc}" will confuse make.
1973   CPP="${CC-cc} -E"
1974   # On the NeXT, cc -E runs the code through the compiler's parser,
1975   # not just through cpp.
1976
1977 cat >conftest.$ac_ext <<EOF
1978 #line 1972 "configure"
1979 #include "confdefs.h"
1980 #include <assert.h>
1981 Syntax Error
1982 EOF
1983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1984 { (eval echo configure:1978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1986 if test -z "$ac_err"; then
1987   :
1988 else
1989   echo "$ac_err" >&5
1990   echo "configure: failed program was:" >&5
1991   cat conftest.$ac_ext >&5
1992   rm -rf conftest*
1993   CPP="${CC-cc} -E -traditional-cpp"
1994
1995 cat >conftest.$ac_ext <<EOF
1996 #line 1990 "configure"
1997 #include "confdefs.h"
1998 #include <assert.h>
1999 Syntax Error
2000 EOF
2001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2002 { (eval echo configure:1996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2004 if test -z "$ac_err"; then
2005   :
2006 else
2007   echo "$ac_err" >&5
2008   echo "configure: failed program was:" >&5
2009   cat conftest.$ac_ext >&5
2010   rm -rf conftest*
2011   CPP="${CC-cc} -nologo -E"
2012
2013 cat >conftest.$ac_ext <<EOF
2014 #line 2008 "configure"
2015 #include "confdefs.h"
2016 #include <assert.h>
2017 Syntax Error
2018 EOF
2019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2020 { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2022 if test -z "$ac_err"; then
2023   :
2024 else
2025   echo "$ac_err" >&5
2026   echo "configure: failed program was:" >&5
2027   cat conftest.$ac_ext >&5
2028   rm -rf conftest*
2029   CPP=/lib/cpp
2030 fi
2031 rm -f conftest*
2032 fi
2033 rm -f conftest*
2034 fi
2035 rm -f conftest*
2036   ac_cv_prog_CPP="$CPP"
2037 fi
2038   CPP="$ac_cv_prog_CPP"
2039 else
2040   ac_cv_prog_CPP="$CPP"
2041 fi
2042 echo "$ECHO_T""$CPP" 1>&6
2043
2044 # Find a good install program.  We prefer a C program (faster),
2045 # so one script is as good as another.  But avoid the broken or
2046 # incompatible versions:
2047 # SysV /etc/install, /usr/sbin/install
2048 # SunOS /usr/etc/install
2049 # IRIX /sbin/install
2050 # AIX /bin/install
2051 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2052 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2053 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2054 # ./install, which can be erroneously created by make from ./install.sh.
2055 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" 1>&6
2056 echo "configure:2050: checking for a BSD compatible install" 1>&5
2057 if test -z "$INSTALL"; then
2058 if test "${ac_cv_path_install+set}" = set; then
2059   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2060 else
2061     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2062   for ac_dir in $PATH; do
2063     # Account for people who put trailing slashes in PATH elements.
2064     case "$ac_dir/" in
2065     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2066     *)
2067       # OSF1 and SCO ODT 3.0 have their own names for install.
2068       # Don't use installbsd from OSF since it installs stuff as root
2069       # by default.
2070       for ac_prog in ginstall scoinst install; do
2071         if test -f $ac_dir/$ac_prog; then
2072           if test $ac_prog = install &&
2073             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2074             # AIX install.  It has an incompatible calling convention.
2075             :
2076           elif test $ac_prog = install &&
2077             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2078             # program-specific install script used by HP pwplus--don't use.
2079             :
2080           else
2081             ac_cv_path_install="$ac_dir/$ac_prog -c"
2082             break 2
2083           fi
2084         fi
2085       done
2086       ;;
2087     esac
2088   done
2089   IFS="$ac_save_IFS"
2090
2091 fi
2092   if test "${ac_cv_path_install+set}" = set; then
2093     INSTALL="$ac_cv_path_install"
2094   else
2095     # As a last resort, use the slow shell script.  We don't cache a
2096     # path for INSTALL within a source directory, because that will
2097     # break other packages using the cache if that directory is
2098     # removed, or if the path is relative.
2099     INSTALL="$ac_install_sh"
2100   fi
2101 fi
2102 echo "$ECHO_T""$INSTALL" 1>&6
2103
2104 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2105 # It thinks the first close brace ends the variable substitution.
2106 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2107
2108 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2109
2110 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2111
2112 echo $ECHO_N "checking whether ln -s works... $ECHO_C" 1>&6
2113 echo "configure:2107: checking whether ln -s works" 1>&5
2114 if test "${ac_cv_prog_LN_S+set}" = set; then
2115   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2116 else
2117   rm -f conftestdata
2118 if ln -s X conftestdata 2>/dev/null
2119 then
2120   rm -f conftestdata
2121   ac_cv_prog_LN_S="ln -s"
2122 else
2123   ac_cv_prog_LN_S=ln
2124 fi
2125 fi
2126 LN_S="$ac_cv_prog_LN_S"
2127 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2128   echo "$ECHO_T""yes" 1>&6
2129 else
2130   echo "$ECHO_T""no" 1>&6
2131 fi
2132
2133 echo $ECHO_N "checking for suitable m4... $ECHO_C" 1>&6
2134 echo "configure:2128: checking for suitable m4" 1>&5
2135 if test "${gmp_cv_prog_m4+set}" = set; then
2136   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2137 else
2138   if test -n "$M4"; then
2139   gmp_cv_prog_m4="$M4"
2140 else
2141   cat >conftest.m4 <<\EOF
2142 define(dollarhash,``$#'')dnl
2143 ifelse(dollarhash(x),1,`define(t1,Y)',
2144 ``bad: $# not supported (SunOS /usr/bin/m4)
2145 '')dnl
2146 ifelse(eval(89),89,`define(t2,Y)',
2147 `bad: eval() doesnt support 8 or 9 in a constant (OpenBSD 2.6 m4)
2148 ')dnl
2149 ifelse(t1`'t2,YY,`good
2150 ')dnl
2151 EOF
2152   echo "trying m4" 1>&5
2153   gmp_tmp_val="`(m4 conftest.m4) 2>&5`"
2154   echo "$gmp_tmp_val" 1>&5
2155   if test "$gmp_tmp_val" = good; then
2156     gmp_cv_prog_m4="m4"
2157   else
2158     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
2159     ac_dummy="$PATH:/usr/5bin"
2160     for ac_dir in $ac_dummy; do
2161       test -z "$ac_dir" && ac_dir=.
2162       echo "trying $ac_dir/m4" 1>&5
2163       gmp_tmp_val="`($ac_dir/m4 conftest.m4) 2>&5`"
2164       echo "$gmp_tmp_val" 1>&5
2165       if test "$gmp_tmp_val" = good; then
2166         gmp_cv_prog_m4="$ac_dir/m4"
2167         break
2168       fi
2169     done
2170     IFS="$ac_save_ifs"
2171     if test -z "$gmp_cv_prog_m4"; then
2172       { echo "configure: error: No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." 1>&2; exit 1; }
2173     fi
2174   fi
2175   rm -f conftest.m4
2176 fi
2177 fi
2178 echo "$ECHO_T""$gmp_cv_prog_m4" 1>&6
2179 M4="$gmp_cv_prog_m4"
2180
2181 # Extract the first word of "ar", so it can be a program name with args.
2182 set dummy ar; ac_word=$2
2183 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
2184 echo "configure:2178: checking for $ac_word" 1>&5
2185 if test "${ac_cv_prog_AR+set}" = set; then
2186   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2187 else
2188   if test -n "$AR"; then
2189   ac_cv_prog_AR="$AR" # Let the user override the test.
2190 else
2191   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2192 ac_dummy="$PATH"
2193 for ac_dir in $ac_dummy; do
2194   test -z "$ac_dir" && ac_dir=.
2195   if test -f $ac_dir/$ac_word; then
2196     echo "$ac_dir/$ac_word"
2197   fi
2198 done
2199 IFS="$ac_save_ifs"
2200 `; do
2201     ac_cv_prog_AR="ar"
2202     break
2203   done
2204 fi
2205 fi
2206 AR="$ac_cv_prog_AR"
2207 if test -n "$AR"; then
2208   echo "$ECHO_T""$AR" 1>&6
2209 else
2210   echo "$ECHO_T""no" 1>&6
2211 fi
2212
2213 # ar on AIX needs to know the object file format
2214 case "$target" in
2215   powerpc64*-*-aix*)
2216     AR="$AR -X 64"
2217     ;;
2218 esac
2219
2220 if test "$gmp_no_asm_syntax_testing" != "yes"; then
2221   echo $ECHO_N "checking how to switch to text section... $ECHO_C" 1>&6
2222 echo "configure:2216: checking how to switch to text section" 1>&5
2223 if test "${gmp_cv_check_asm_text+set}" = set; then
2224   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2225 else
2226   case "$target" in
2227   *-*-aix*)
2228
2229     gmp_cv_check_asm_text=".csect .text[PR]"
2230
2231     ;;
2232   *-*-hpux*) gmp_cv_check_asm_text=".code" ;;
2233   *) gmp_cv_check_asm_text=".text" ;;
2234 esac
2235
2236 fi
2237 echo "$ECHO_T""$gmp_cv_check_asm_text" 1>&6
2238 echo "define(<TEXT>, <$gmp_cv_check_asm_text>)" >> $gmp_tmpconfigm4
2239
2240   echo $ECHO_N "checking how to switch to data section... $ECHO_C" 1>&6
2241 echo "configure:2235: checking how to switch to data section" 1>&5
2242 if test "${gmp_cv_check_asm_data+set}" = set; then
2243   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2244 else
2245   case "$target" in
2246   *-*-aix*)
2247
2248     gmp_cv_check_asm_data=".csect .data[RW]"
2249
2250     ;;
2251   *) gmp_cv_check_asm_data=".data" ;;
2252 esac
2253
2254 fi
2255 echo "$ECHO_T""$gmp_cv_check_asm_data" 1>&6
2256 echo "define(<DATA>, <$gmp_cv_check_asm_data>)" >> $gmp_tmpconfigm4
2257
2258   echo $ECHO_N "checking how to export a symbol... $ECHO_C" 1>&6
2259 echo "configure:2253: checking how to export a symbol" 1>&5
2260 if test "${gmp_cv_check_asm_globl+set}" = set; then
2261   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2262 else
2263   case "$target" in
2264   *-*-hpux*) gmp_cv_check_asm_globl=".export" ;;
2265   *) gmp_cv_check_asm_globl=".globl" ;;
2266 esac
2267
2268 fi
2269 echo "$ECHO_T""$gmp_cv_check_asm_globl" 1>&6
2270 echo "define(<GLOBL>, <$gmp_cv_check_asm_globl>)" >> $gmp_tmpconfigm4
2271
2272   echo $ECHO_N "checking what assembly label suffix to use... $ECHO_C" 1>&6
2273 echo "configure:2267: checking what assembly label suffix to use" 1>&5
2274 if test "${gmp_cv_check_asm_label_suffix+set}" = set; then
2275   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2276 else
2277   case "$target" in
2278   *-*-hpux*) gmp_cv_check_asm_label_suffix="" ;;
2279   *) gmp_cv_check_asm_label_suffix=":" ;;
2280 esac
2281
2282 fi
2283 echo "$ECHO_T""$gmp_cv_check_asm_label_suffix" 1>&6
2284 echo "define(<LABEL_SUFFIX>, <\$1$gmp_cv_check_asm_label_suffix>)" >> $gmp_tmpconfigm4
2285
2286   echo $ECHO_N "checking how the .type assembly directive should be used... $ECHO_C" 1>&6
2287 echo "configure:2281: checking how the .type assembly directive should be used" 1>&5
2288 if test "${gmp_cv_check_asm_type+set}" = set; then
2289   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2290 else
2291   ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2292 for gmp_tmp_prefix in @ \# %; do
2293   echo "        .type   sym,${gmp_tmp_prefix}function" > conftest.s
2294   if { (eval echo configure:2288: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2295     gmp_cv_check_asm_type=".type        \$1,${gmp_tmp_prefix}\$2"
2296     break
2297   fi
2298 done
2299 if test -z "$gmp_cv_check_asm_type"; then
2300   gmp_cv_check_asm_type="dnl"
2301 fi
2302
2303 fi
2304 echo "$ECHO_T""$gmp_cv_check_asm_type" 1>&6
2305 echo "define(<TYPE>, <$gmp_cv_check_asm_type>)" >> $gmp_tmpconfigm4
2306
2307   echo $ECHO_N "checking if the .size assembly directive works... $ECHO_C" 1>&6
2308 echo "configure:2302: checking if the .size assembly directive works" 1>&5
2309 if test "${gmp_cv_check_asm_size+set}" = set; then
2310   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2311 else
2312   ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2313 echo '  .size   sym,1' > conftest.s
2314 if { (eval echo configure:2308: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2315   gmp_cv_check_asm_size=".size  \$1,\$2"
2316 else
2317   gmp_cv_check_asm_size="dnl"
2318 fi
2319
2320 fi
2321 echo "$ECHO_T""$gmp_cv_check_asm_size" 1>&6
2322 echo "define(<SIZE>, <$gmp_cv_check_asm_size>)" >> $gmp_tmpconfigm4
2323
2324 echo $ECHO_N "checking what prefix to use for a local label... $ECHO_C" 1>&6
2325 echo "configure:2319: checking what prefix to use for a local label" 1>&5
2326 if test "${gmp_cv_check_asm_lsym_prefix+set}" = set; then
2327   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2328 else
2329   if test -z "$NM"; then
2330   echo; echo "GMP_CHECK_ASM_LSYM_PREFIX: fatal: need nm"
2331   exit 1
2332 fi
2333 ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2334 gmp_cv_check_asm_lsym_prefix="L"
2335 for gmp_tmp_pre in L .L $ L$; do
2336   cat > conftest.s <<EOF
2337 dummy${gmp_cv_check_asm_label_suffix}
2338 ${gmp_tmp_pre}gurkmacka${gmp_cv_check_asm_label_suffix}
2339         .byte 0
2340 EOF
2341   if { (eval echo configure:2335: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2342     $NM conftest.o >/dev/null 2>&1
2343     gmp_rc=$?
2344     if test "$gmp_rc" != "0"; then
2345       echo "configure: $NM failure, using default"
2346       break
2347     fi
2348     if $NM conftest.o | grep gurkmacka >/dev/null; then true; else
2349       gmp_cv_check_asm_lsym_prefix="$gmp_tmp_pre"
2350       break
2351     fi
2352   else
2353     echo "configure: failed program was:" >&5
2354     cat conftest.s >&5
2355     # Use default.
2356   fi
2357 done
2358 rm -f conftest*
2359
2360 fi
2361 echo "$ECHO_T""$gmp_cv_check_asm_lsym_prefix" 1>&6
2362 echo "define(<LSYM_PREFIX>, <${gmp_cv_check_asm_lsym_prefix}>)" >> $gmp_tmpconfigm4
2363
2364 echo $ECHO_N "checking how to define a 32-bit word... $ECHO_C" 1>&6
2365 echo "configure:2359: checking how to [define] a 32-bit word" 1>&5
2366 if test "${gmp_cv_check_asm_w32+set}" = set; then
2367   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2368 else
2369   if test -z "$NM"; then
2370   echo; echo "configure: GMP_CHECK_ASM_W32: fatal: need nm"
2371   exit 1
2372 fi
2373
2374 # FIXME: HPUX puts first symbol at 0x40000000, breaking our assumption
2375 # that it's at 0x0.  We'll have to declare another symbol before the
2376 # .long/.word and look at the distance between the two symbols.  The
2377 # only problem is that the sed expression(s) barfs (on Solaris, for
2378 # example) for the symbol with value 0.  For now, HPUX uses .word.
2379
2380 case "$target" in
2381   *-*-hpux*)
2382     gmp_cv_check_asm_w32=".word"
2383     ;;
2384   *-*-*)
2385     ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2386     for gmp_tmp_op in .long .word; do
2387       cat > conftest.s <<EOF
2388         $gmp_cv_check_asm_data
2389         $gmp_cv_check_asm_globl foo
2390         $gmp_tmp_op     0
2391 foo${gmp_cv_check_asm_label_suffix}
2392         .byte   0
2393 EOF
2394       if { (eval echo configure:2388: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2395
2396         gmp_tmp_val=`$NM conftest.o | grep foo | sed -e 's;[[][0-9][]]\(.*\);\1;' \
2397              -e 's;[^1-9]*\([0-9]*\).*;\1;'`
2398                 if test "$gmp_tmp_val" = "4"; then
2399           gmp_cv_check_asm_w32="$gmp_tmp_op"
2400           break
2401         fi
2402       fi
2403     done
2404     ;;
2405 esac
2406
2407 if test -z "$gmp_cv_check_asm_w32"; then
2408   echo; echo "configure: GMP_CHECK_ASM_W32: fatal: do not know how to define a 32-bit word"
2409   exit 1
2410 fi
2411 rm -f conftest*
2412
2413 fi
2414 echo "$ECHO_T""$gmp_cv_check_asm_w32" 1>&6
2415 echo "define(<W32>, <$gmp_cv_check_asm_w32>)" >> $gmp_tmpconfigm4
2416
2417   echo $ECHO_N "checking if symbols are prefixed by underscore... $ECHO_C" 1>&6
2418 echo "configure:2412: checking if symbols are prefixed by underscore" 1>&5
2419 if test "${gmp_cv_check_asm_underscore+set}" = set; then
2420   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2421 else
2422   cat > conftest.$ac_ext <<EOF
2423 #line 2417 "configure"
2424 #include "confdefs.h"
2425 int underscore_test() {
2426 return; }
2427 EOF
2428 if { (eval echo configure:2422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2429   if grep _underscore_test conftest* >/dev/null; then
2430     gmp_cv_check_asm_underscore=yes
2431   else
2432     gmp_cv_check_asm_underscore=no
2433   fi
2434 else
2435   echo "configure: failed program was:" >&5
2436   cat conftest.$ac_ext >&5
2437 fi
2438 rm -f conftest*
2439
2440 fi
2441 echo "$ECHO_T""$gmp_cv_check_asm_underscore" 1>&6
2442 if test "$gmp_cv_check_asm_underscore" = "yes"; then
2443
2444 echo 'define(<GSYM_PREFIX>, <_>)' >> $gmp_tmpconfigm4
2445
2446   underscore=yes
2447 else
2448
2449 echo 'define(<GSYM_PREFIX>, <>)' >> $gmp_tmpconfigm4
2450
2451   underscore=no
2452 fi
2453
2454 echo $ECHO_N "checking if .align assembly directive is logarithmic... $ECHO_C" 1>&6
2455 echo "configure:2449: checking if .align assembly directive is logarithmic" 1>&5
2456 if test "${gmp_cv_check_asm_align_log+set}" = set; then
2457   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2458 else
2459   if test -z "$NM"; then
2460   echo; echo "configure: GMP_CHECK_ASM_ALIGN_LOG: fatal: need nm"
2461   exit 1
2462 fi
2463 cat > conftest.s <<EOF
2464         $gmp_cv_check_asm_data
2465         .align  4
2466         $gmp_cv_check_asm_globl foo
2467         .byte   1
2468         .align  4
2469 foo$gmp_cv_check_asm_label_suffix
2470         .byte   2
2471 EOF
2472 ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2473 if { (eval echo configure:2467: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2474
2475   gmp_tmp_val=`$NM conftest.o | grep foo | sed -e 's;[[][0-9][]]\(.*\);\1;' \
2476        -e 's;[^1-9]*\([0-9]*\).*;\1;'`
2477     if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then
2478     gmp_cv_check_asm_align_log=yes
2479   else
2480     gmp_cv_check_asm_align_log=no
2481   fi
2482 else
2483   echo "configure: failed program was:" >&5
2484   cat conftest.s >&5
2485 fi
2486 rm -f conftest*
2487
2488 fi
2489 echo "$ECHO_T""$gmp_cv_check_asm_align_log" 1>&6
2490
2491 echo "define(<ALIGN_LOGARITHMIC>,<$gmp_cv_check_asm_align_log>)" >> $gmp_tmpconfigm4
2492
2493 if test "$gmp_cv_check_asm_align_log" = "yes"; then
2494   asm_align=log
2495 else
2496   asm_align=nolog
2497 fi
2498
2499 fi
2500
2501 family=generic
2502
2503 case ${target} in
2504   arm*-*-*)
2505     path="arm"
2506     ;;
2507   sparcv9*-*-solaris2.[789]* | sparc64*-*-solaris2.[789]* | ultrasparc*-*-solaris2.[789]*)
2508     if test -n "$CC64"
2509       then path="sparc64"
2510       else path="sparc32/v9 sparc32/v8 sparc32"
2511     fi
2512     ;;
2513   sparc64-*-linux*)
2514     if test -n "$CC64"
2515       then path="sparc64"
2516       else path="sparc32/v9 sparc32/v8 sparc32"
2517     fi
2518     ;;
2519   sparcv8*-*-* | microsparc*-*-*)
2520         path="sparc32/v8 sparc32"
2521         if test x${floating_point} = xno
2522           then extra_functions="udiv_nfp"
2523           else extra_functions="udiv_fp"
2524         fi
2525         ;;
2526   sparcv9*-*-* | ultrasparc*-*-*)
2527         path="sparc32/v9 sparc32/v8 sparc32"
2528         extra_functions="udiv_fp"
2529         ;;
2530   supersparc*-*-*)
2531         path="sparc32/v8/supersparc sparc32/v8 sparc32"
2532         extra_functions="udiv"
2533         ;;
2534   sparc*-*-*) path="sparc32"
2535         if test x${floating_point} = xno
2536           then extra_functions="udiv_nfp"
2537           else extra_functions="udiv_fp"
2538         fi
2539         ;;
2540   hppa7000*-*-*)
2541     path="hppa/hppa1_1 hppa"
2542     extra_functions="udiv_qrnnd"
2543     ;;
2544   hppa1.0*-*-*)
2545     path="hppa"
2546     extra_functions="udiv_qrnnd"
2547     ;;
2548   hppa2.0w-*-*)
2549     path="pa64w"
2550     extra_functions="umul_ppmm udiv_qrnnd"
2551     ;;
2552   hppa2.0*-*-*)
2553     if test -n "$CC64"; then
2554       path="pa64"
2555       extra_functions="umul_ppmm udiv_qrnnd"
2556       # We need to use the system compiler, or actually the system assembler,
2557       # since GAS has not been ported to understand the 2.0 instructions.
2558       CCAS="$CC64 -c"
2559     else
2560       # FIXME: path should be "hppa/hppa2_0 hppa/hppa1_1 hppa"
2561       path="hppa/hppa1_1 hppa"
2562       extra_functions="udiv_qrnnd"
2563     fi
2564     ;;
2565   hppa*-*-*)                                    #assume pa7100
2566     path="hppa/hppa1_1/pa7100 hppa/hppa1_1 hppa"
2567     extra_functions="udiv_qrnnd";;
2568   f30[01]-fujitsu-sysv*)
2569     path=fujitsu;;
2570   alphaev6*-*-*) path="alpha/ev6 alpha"; extra_functions="invert_limb cntlz";;
2571   alphaev5*-*-*) path="alpha/ev5 alpha"; extra_functions="invert_limb cntlz";;
2572   alpha*-*-*) path="alpha"; extra_functions="invert_limb cntlz";;
2573   # Cray vector machines.  This must come after alpha* so that we can
2574   # recognize present and future vector processors with a wildcard.
2575   *-cray-unicos*)
2576     path="cray"
2577     extra_functions="mulww";;
2578   am29000*-*-*) path="a29k";;
2579   a29k*-*-*) path="a29k";;
2580
2581   # AMD and Intel x86 configurations
2582
2583   i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*)
2584     gmp_m4postinc="x86/x86-defs.m4"
2585     extra_functions="udiv umul"
2586     CALLING_CONVENTIONS_OBJS="x86call.o x86check.o"
2587
2588 echo $ECHO_N "checking if the assembler takes cl with shldl... $ECHO_C" 1>&6
2589 echo "configure:2583: checking if the assembler takes cl with shldl" 1>&5
2590 if test "${gmp_cv_check_asm_shldl_cl+set}" = set; then
2591   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2592 else
2593   cat > conftest.s <<EOF
2594         $gmp_cv_check_asm_text
2595         shldl   %cl, %eax, %ebx
2596 EOF
2597 ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2598 if { (eval echo configure:2592: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2599   gmp_cv_check_asm_shldl_cl=yes
2600 else
2601   gmp_cv_check_asm_shldl_cl=no
2602 fi
2603 rm -f conftest*
2604
2605 fi
2606 echo "$ECHO_T""$gmp_cv_check_asm_shldl_cl" 1>&6
2607 if test "$gmp_cv_check_asm_shldl_cl" = "yes"; then
2608
2609 echo 'define(<WANT_SHLDL_CL>, <1>)' >> $gmp_tmpconfigm4
2610
2611 else
2612
2613 echo 'define(<WANT_SHLDL_CL>, <0>)' >> $gmp_tmpconfigm4
2614
2615 fi
2616
2617     echo $ECHO_N "checking if the .align directive accepts an 0x90 fill in .text... $ECHO_C" 1>&6
2618 echo "configure:2612: checking if the .align directive accepts an 0x90 fill in .text" 1>&5
2619 if test "${gmp_cv_check_asm_align_fill_0x90+set}" = set; then
2620   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2621 else
2622
2623 cat > conftest.s <<EOF
2624         $gmp_cv_check_asm_text
2625         .align  4, 0x90
2626         .byte   0
2627         .align  4, 0x90
2628 EOF
2629 gmp_tmp_val="`$CCAS $CFLAGS conftest.s 2>&1`"
2630 if test $? = 0; then
2631   echo "$gmp_tmp_val" 1>&5
2632   if echo "$gmp_tmp_val" | grep "Warning: Fill parameter ignored for executable section"; then
2633     echo "Supressing this warning by omitting 0x90" 1>&5
2634     gmp_cv_check_asm_align_fill_0x90=no
2635   else
2636     gmp_cv_check_asm_align_fill_0x90=yes
2637   fi
2638 else
2639   echo "Non-zero exit code" 1>&5
2640   echo "$gmp_tmp_val" 1>&5
2641   gmp_cv_check_asm_align_fill_0x90=no
2642 fi
2643 rm -f conftest*
2644
2645 fi
2646 echo "$ECHO_T""$gmp_cv_check_asm_align_fill_0x90" 1>&6
2647
2648 echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_check_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4
2649
2650     # the CPUs below wanting to know about mmx
2651     case ${target} in
2652       pentiummmx-*-* | pentium[23]-*-* | k6*-*-* | athlon-*-*)
2653
2654 echo $ECHO_N "checking if the assembler knows about MMX instructions... $ECHO_C" 1>&6
2655 echo "configure:2649: checking if the assembler knows about MMX instructions" 1>&5
2656 if test "${gmp_cv_check_asm_mmx+set}" = set; then
2657   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2658 else
2659   cat > conftest.s <<EOF
2660         $gmp_cv_check_asm_text
2661         por     %mm0, %mm0
2662 EOF
2663 ac_assemble="$CCAS $CFLAGS conftest.s 1>&5"
2664 if { (eval echo configure:2658: \"$ac_assemble\") 1>&5; (eval $ac_assemble) 2>&5; }; then
2665   gmp_cv_check_asm_mmx=yes
2666 else
2667   gmp_cv_check_asm_mmx=no
2668 fi
2669 rm -f conftest*
2670
2671 fi
2672 echo "$ECHO_T""$gmp_cv_check_asm_mmx" 1>&6
2673 if test "$gmp_cv_check_asm_mmx" = "yes"; then
2674   tmp_mmx=yes
2675 else
2676   echo "configure: warning: +----------------------------------------------------------" 1>&2
2677   echo "configure: warning: | WARNING WARNING WARNING" 1>&2
2678   echo "configure: warning: | Target CPU has MMX code, but it can't be assembled by" 1>&2
2679   echo "configure: warning: |     $CCAS $CFLAGS" 1>&2
2680   echo "configure: warning: | Non-MMX replacements will be used." 1>&2
2681   echo "configure: warning: | This will be an inferior build." 1>&2
2682   echo "configure: warning: +----------------------------------------------------------" 1>&2
2683   tmp_mmx=no
2684 fi
2685
2686         ;;
2687     esac
2688
2689     # default for anything not otherwise mentioned
2690     path="x86"
2691
2692     case ${target} in
2693       i[34]86*-*-*)
2694         path="x86"
2695         ;;
2696       k5*-*-*)
2697         # don't know what best suits k5
2698         path="x86"
2699         ;;
2700       i586*-*-* | pentium-*-*)
2701         path="x86/pentium x86"
2702         ;;
2703       pentiummmx-*-*)
2704         path="x86/pentium x86"
2705         if test "$tmp_mmx" = yes; then
2706           path="x86/pentium/mmx $path"
2707         fi
2708         ;;
2709       i686*-*-* | pentiumpro-*-*)
2710         path="x86/p6 x86"
2711         ;;
2712       pentium2-*-*)
2713         path="x86/p6 x86"
2714         # The pentium/mmx lshift and rshift are good on p6 and can be used
2715         # until there's something specific for p6.
2716         if test "$tmp_mmx" = yes; then
2717           path="x86/p6/mmx x86/pentium/mmx $path"
2718         fi
2719         ;;
2720       pentium3-*-*)
2721         path="x86/p6 x86"
2722         # The pentium/mmx lshift and rshift are good on p6 and can be used
2723         # until there's something specific for p6.
2724         if test "$tmp_mmx" = yes; then
2725           path="x86/p6/p3mmx x86/p6/mmx x86/pentium/mmx $path"
2726         fi
2727         ;;
2728       k6[23]*-*-*)
2729         path="x86/k6 x86"
2730         if test "$tmp_mmx" = yes; then
2731           path="x86/k6/k62mmx x86/k6/mmx $path"
2732         fi
2733         ;;
2734       k6*-*-*)
2735         path="x86/k6 x86"
2736         if test "$tmp_mmx" = yes; then
2737           path="x86/k6/mmx $path"
2738         fi
2739         ;;
2740       athlon-*-*)
2741         path="x86/k7 x86"
2742         if test "$tmp_mmx" = yes; then
2743           path="x86/k7/mmx $path"
2744         fi
2745         ;;
2746     esac
2747     ;;
2748
2749   i960*-*-*) path="i960";;
2750
2751   ia64*-*-*) path="ia64";;
2752
2753 # Motorola 68k configurations.  Let m68k mean 68020-68040.
2754   m680[234]0*-*-* | m68k*-*-* | \
2755   m68*-next-nextstep*)          # Nexts are at least '020
2756     path="m68k/mc68020 m68k"
2757     family=m68k
2758     ;;
2759   m68000*-*-*)
2760     path="m68k"
2761     family=m68k
2762     ;;
2763
2764   m88k*-*-* | m88k*-*-*) path="m88k";;
2765   m88110*-*-*) path="m88k/mc88110 m88k";;
2766   ns32k*-*-*) path="ns32k";;
2767
2768   pyramid-*-*) path="pyr";;
2769
2770   ppc601-*-*) path="power powerpc32";;
2771   powerpc64*-*-*) path="powerpc64";;
2772   powerpc*-*-*) path="powerpc32";;
2773   rs6000-*-* | power-*-* | power2-*-*)
2774     path="power"
2775     extra_functions="udiv_w_sdiv"
2776     ;;
2777
2778   sh-*-*) path="sh";;
2779   sh2-*-*) path="sh/sh2 sh";;
2780
2781   mips[34]*-*-*) path="mips3";;
2782   mips*-*-irix6*) path="mips3";;
2783   mips*-*-*) path="mips2";;
2784
2785   vax*-*-*) path="vax"; extra_functions="udiv_w_sdiv";;
2786
2787   z8000x*-*-*) path="z8000x"; extra_functions="udiv_w_sdiv";;
2788   z8000*-*-*) path="z8000"; extra_functions="udiv_w_sdiv";;
2789
2790   clipper*-*-*) path="clipper";;
2791 esac
2792
2793 if test -n "$CALLING_CONVENTIONS_OBJS"; then
2794   cat >>confdefs.h <<\EOF
2795 #define HAVE_CALLING_CONVENTIONS 1
2796 EOF
2797
2798 fi
2799
2800 case ${target} in
2801   i[5-8]86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*)
2802     # rdtsc is in pentium and up, not in i386 and i486
2803     SPEED_CYCLECOUNTER_OBJS=pentium.lo
2804     ;;
2805   alpha*-*-*)
2806     SPEED_CYCLECOUNTER_OBJS=alpha.lo
2807     ;;
2808   sparcv9*-*-* | ultrasparc*-*-* | sparc64*-*-*)
2809     SPEED_CYCLECOUNTER_OBJS=sparcv9.lo
2810     ;;
2811   hppa2*-*-*)
2812     SPEED_CYCLECOUNTER_OBJS=hppa2.lo
2813     ;;
2814   hppa*-*-*)
2815     SPEED_CYCLECOUNTER_OBJS=hppa.lo
2816     ;;
2817 esac
2818
2819 if test -n "$SPEED_CYCLECOUNTER_OBJS"
2820 then
2821   cat >>confdefs.h <<\EOF
2822 #define HAVE_SPEED_CYCLECOUNTER 1
2823 EOF
2824
2825 fi
2826
2827 echo $ECHO_N "checking for Cygwin environment... $ECHO_C" 1>&6
2828 echo "configure:2822: checking for Cygwin environment" 1>&5
2829 if test "${ac_cv_cygwin+set}" = set; then
2830   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2831 else
2832   cat >conftest.$ac_ext <<EOF
2833 #line 2827 "configure"
2834 #include "confdefs.h"
2835
2836 int
2837 main ()
2838 {
2839 #ifndef __CYGWIN__
2840 # define __CYGWIN__ __CYGWIN32__
2841 #endif
2842 return __CYGWIN__;
2843   ;
2844   return 0;
2845 }
2846 EOF
2847 if { (eval echo configure:2841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2848   rm -rf conftest*
2849   ac_cv_cygwin=yes
2850 else
2851   echo "configure: failed program was:" >&5
2852   cat conftest.$ac_ext >&5
2853   rm -rf conftest*
2854   ac_cv_cygwin=no
2855 fi
2856 rm -f conftest*
2857 fi
2858 echo "$ECHO_T""$ac_cv_cygwin" 1>&6
2859 CYGWIN=
2860 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2861 echo $ECHO_N "checking for mingw32 environment... $ECHO_C" 1>&6
2862 echo "configure:2856: checking for mingw32 environment" 1>&5
2863 if test "${ac_cv_mingw32+set}" = set; then
2864   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2865 else
2866   cat >conftest.$ac_ext <<EOF
2867 #line 2861 "configure"
2868 #include "confdefs.h"
2869
2870 int
2871 main ()
2872 {
2873 return __MINGW32__;
2874   ;
2875   return 0;
2876 }
2877 EOF
2878 if { (eval echo configure:2872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2879   rm -rf conftest*
2880   ac_cv_mingw32=yes
2881 else
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -rf conftest*
2885   ac_cv_mingw32=no
2886 fi
2887 rm -f conftest*
2888 fi
2889 echo "$ECHO_T""$ac_cv_mingw32" 1>&6
2890 MINGW32=
2891 test "$ac_cv_mingw32" = yes && MINGW32=yes
2892 echo $ECHO_N "checking for EMX OS/2 environment... $ECHO_C" 1>&6
2893 echo "configure:2887: checking for EMX OS/2 environment" 1>&5
2894 if test "${ac_cv_emxos2+set}" = set; then
2895   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2896 else
2897   cat >conftest.$ac_ext <<EOF
2898 #line 2892 "configure"
2899 #include "confdefs.h"
2900
2901 int
2902 main ()
2903 {
2904 return __EMX__;
2905   ;
2906   return 0;
2907 }
2908 EOF
2909 if { (eval echo configure:2903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2910   rm -rf conftest*
2911   ac_cv_emxos2=yes
2912 else
2913   echo "configure: failed program was:" >&5
2914   cat conftest.$ac_ext >&5
2915   rm -rf conftest*
2916   ac_cv_emxos2=no
2917 fi
2918 rm -f conftest*
2919 fi
2920 echo "$ECHO_T""$ac_cv_emxos2" 1>&6
2921 EMXOS2=
2922 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2923
2924 echo $ECHO_N "checking for executable suffix... $ECHO_C" 1>&6
2925 echo "configure:2919: checking for executable suffix" 1>&5
2926 if test "${ac_cv_exeext+set}" = set; then
2927   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2928 else
2929   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
2930   ac_cv_exeext=.exe
2931 else
2932   rm -f conftest*
2933   echo 'int main () { return 0; }' >conftest.$ac_ext
2934   ac_cv_exeext=
2935   if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2936     for ac_file in conftest.*; do
2937       case $ac_file in
2938       *.c | *.C | *.o | *.obj | *.xcoff) ;;
2939       *) ac_cv_exeext=`echo $ac_file | sed -e s/conftest//` ;;
2940       esac
2941     done
2942   else
2943     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2944   fi
2945   rm -f conftest*
2946   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2947 fi
2948 fi
2949
2950 EXEEXT=""
2951 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2952 echo "$ECHO_T""${ac_cv_exeext}" 1>&6
2953 ac_exeext=$EXEEXT
2954
2955 echo $ECHO_N "checking for object suffix... $ECHO_C" 1>&6
2956 echo "configure:2950: checking for object suffix" 1>&5
2957 if test "${ac_cv_objext+set}" = set; then
2958   echo $ECHO_N "(cached) $ECHO_C" 1>&6
2959 else
2960   rm -f conftest*
2961 echo 'int i = 1;' >conftest.$ac_ext
2962 if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2963   for ac_file in conftest.*; do
2964     case $ac_file in
2965     *.c) ;;
2966     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2967     esac
2968   done
2969 else
2970   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2971 fi
2972 rm -f conftest*
2973 fi
2974
2975 echo "$ECHO_T""$ac_cv_objext" 1>&6
2976 OBJEXT=$ac_cv_objext
2977 ac_objext=$ac_cv_objext
2978
2979 case "$target" in
2980   *-*-aix4.[3-9]*) enable_shared=no ;;
2981 esac
2982 # Check whether --enable-shared or --disable-shared was given.
2983 if test "${enable_shared+set}" = set; then
2984   enableval="$enable_shared"
2985   p=${PACKAGE-default}
2986 case "$enableval" in
2987 yes) enable_shared=yes ;;
2988 no) enable_shared=no ;;
2989 *)
2990   enable_shared=no
2991   # Look at the argument we got.  We use all the common list separators.
2992   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2993   for pkg in $enableval; do
2994     if test "X$pkg" = "X$p"; then
2995       enable_shared=yes
2996     fi
2997   done
2998   IFS="$ac_save_ifs"
2999   ;;
3000 esac
3001 else
3002   enable_shared=yes
3003 fi
3004 # Check whether --enable-static or --disable-static was given.
3005 if test "${enable_static+set}" = set; then
3006   enableval="$enable_static"
3007   p=${PACKAGE-default}
3008 case "$enableval" in
3009 yes) enable_static=yes ;;
3010 no) enable_static=no ;;
3011 *)
3012   enable_static=no
3013   # Look at the argument we got.  We use all the common list separators.
3014   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3015   for pkg in $enableval; do
3016     if test "X$pkg" = "X$p"; then
3017       enable_static=yes
3018     fi
3019   done
3020   IFS="$ac_save_ifs"
3021   ;;
3022 esac
3023 else
3024   enable_static=yes
3025 fi
3026 # Check whether --enable-fast-install or --disable-fast-install was given.
3027 if test "${enable_fast_install+set}" = set; then
3028   enableval="$enable_fast_install"
3029   p=${PACKAGE-default}
3030 case "$enableval" in
3031 yes) enable_fast_install=yes ;;
3032 no) enable_fast_install=no ;;
3033 *)
3034   enable_fast_install=no
3035   # Look at the argument we got.  We use all the common list separators.
3036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3037   for pkg in $enableval; do
3038     if test "X$pkg" = "X$p"; then
3039       enable_fast_install=yes
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043   ;;
3044 esac
3045 else
3046   enable_fast_install=yes
3047 fi
3048
3049 echo $ECHO_N "checking build system type... $ECHO_C" 1>&6
3050 echo "configure:3044: checking build system type" 1>&5
3051 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
3052
3053   # Make sure we can run config.sub.
3054   if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
3055     { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; }
3056   fi
3057
3058   ac_cv_build_alias=$build
3059   case "$ac_cv_build_alias" in
3060   NONE)
3061     case $nonopt in
3062     NONE)
3063       ac_cv_build_alias=$host_alias ;;
3064     *) ac_cv_build_alias=$nonopt ;;
3065     esac ;;
3066   esac
3067
3068   ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || exit 1
3069   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3070   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3071   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3072 else
3073   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3074 fi
3075
3076 echo "$ECHO_T""$ac_cv_build" 1>&6
3077
3078 build=$ac_cv_build
3079 build_alias=$ac_cv_build_alias
3080 build_cpu=$ac_cv_build_cpu
3081 build_vendor=$ac_cv_build_vendor
3082 build_os=$ac_cv_build_os
3083
3084 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3085 if test "${with_gnu_ld+set}" = set; then
3086   withval="$with_gnu_ld"
3087   test "$withval" = no || with_gnu_ld=yes
3088 else
3089   with_gnu_ld=no
3090 fi
3091
3092 ac_prog=ld
3093 if test "$ac_cv_prog_gcc" = yes; then
3094   # Check if gcc -print-prog-name=ld gives a path.
3095   echo $ECHO_N "checking for ld used by GCC... $ECHO_C" 1>&6
3096 echo "configure:3090: checking for ld used by GCC" 1>&5
3097   case $target in
3098   *-*-mingw*)
3099     # gcc leaves a trailing carriage return which upsets mingw
3100     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'`
3101     # convert /mingw/mingw32/... into c:/mingw/mingw32/...
3102     ac_prog="C:""$ac_prog" ;;
3103   *)
3104     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3105   esac
3106   case "$ac_prog" in
3107     # Accept absolute paths.
3108     [\\/]* | [A-Za-z]:[\\/]*)
3109       re_direlt='/[^/][^/]*/\.\./'
3110       # Canonicalize the path of ld
3111       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3112       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3113         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3114       done
3115       test -z "$LD" && LD="$ac_prog"
3116       ;;
3117   "")
3118     # If it fails, then pretend we aren't using GCC.
3119     ac_prog=ld
3120     ;;
3121   *)
3122     # If it is relative, then search for the first ld in PATH.
3123     with_gnu_ld=unknown
3124     ;;
3125   esac
3126 elif test "$with_gnu_ld" = yes; then
3127   echo $ECHO_N "checking for GNU ld... $ECHO_C" 1>&6
3128 echo "configure:3120: checking for GNU ld" 1>&5
3129 else
3130   echo $ECHO_N "checking for non-GNU ld... $ECHO_C" 1>&6
3131 echo "configure:3123: checking for non-GNU ld" 1>&5
3132 fi
3133 if test "${ac_cv_path_LD+set}" = set; then
3134   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3135 else
3136   if test -z "$LD"; then
3137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3138   for ac_dir in $PATH; do
3139     test -z "$ac_dir" && ac_dir=.
3140     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3141       ac_cv_path_LD="$ac_dir/$ac_prog"
3142       # Check to see if the program is GNU ld.  I'd rather use --version,
3143       # but apparently some GNU ld's only accept -v.
3144       # Break only if it was the GNU/non-GNU ld that we prefer.
3145       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3146         test "$with_gnu_ld" != no && break
3147       else
3148         test "$with_gnu_ld" != yes && break
3149       fi
3150     fi
3151   done
3152   IFS="$ac_save_ifs"
3153 else
3154   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3155 fi
3156 fi
3157
3158 LD="$ac_cv_path_LD"
3159 if test -n "$LD"; then
3160   echo "$ECHO_T""$LD" 1>&6
3161 else
3162   echo "$ECHO_T""no" 1>&6
3163 fi
3164 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3165 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" 1>&6
3166 echo "configure:3158: checking if the linker ($LD) is GNU ld" 1>&5
3167 if test "${ac_cv_prog_gnu_ld+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3169 else
3170   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3171 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3172   ac_cv_prog_gnu_ld=yes
3173 else
3174   ac_cv_prog_gnu_ld=no
3175 fi
3176 fi
3177 echo "$ECHO_T""$ac_cv_prog_gnu_ld" 1>&6
3178 with_gnu_ld=$ac_cv_prog_gnu_ld
3179
3180 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" 1>&6
3181 echo "configure:3173: checking for $LD option to reload object files" 1>&5
3182 if test "${lt_cv_ld_reload_flag+set}" = set; then
3183   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3184 else
3185   lt_cv_ld_reload_flag='-r'
3186 fi
3187 echo "$ECHO_T""$lt_cv_ld_reload_flag" 1>&6
3188 reload_flag=$lt_cv_ld_reload_flag
3189 test -n "$reload_flag" && reload_flag=" $reload_flag"
3190
3191 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" 1>&6
3192 echo "configure:3184: checking how to recognise dependant libraries" 1>&5
3193 if test "${lt_cv_deplibs_check_method+set}" = set; then
3194   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3195 else
3196   lt_cv_file_magic_cmd='${MAGIC}'
3197 lt_cv_file_magic_test_file=
3198 lt_cv_deplibs_check_method='unknown'
3199 # Need to set the preceding variable on all platforms that support
3200 # interlibrary dependencies.
3201 # 'none' -- dependencies not supported.
3202 # `unknown' -- same as none, but documents that we really don't know.
3203 # 'pass_all' -- all dependencies passed with no checks.
3204 # 'test_compile' -- check by making test program.
3205 # 'file_magic [regex]' -- check by looking for files in library path
3206 # which responds to the $file_magic_cmd with a given egrep regex.
3207 # If you have `file' or equivalent on your system and you're not sure
3208 # whether `pass_all' will *always* work, you probably want this one.
3209
3210 case "$host_os" in
3211 aix4* | beos*)
3212   lt_cv_deplibs_check_method=pass_all
3213   ;;
3214
3215 bsdi4*)
3216     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3217     lt_cv_file_magic_test_file=/shlib/libc.so
3218   ;;
3219
3220 cygwin* | mingw*)
3221   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3222   lt_cv_file_magic_cmd='${OBJDUMP} -f'
3223   ;;
3224
3225 freebsd*)
3226   case "$version_type" in
3227   freebsd-elf*)
3228     lt_cv_deplibs_check_method=pass_all
3229     ;;
3230   esac
3231   ;;
3232
3233 gnu*)
3234   lt_cv_deplibs_check_method=pass_all
3235   ;;
3236
3237 irix5* | irix6*)
3238   case "$host_os" in
3239   irix5*)
3240     # this will be overridden with pass_all, but let us keep it just in case
3241     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3242     ;;
3243   *)
3244     case "$LD" in
3245     *-32|*"-32 ") libmagic=32-bit;;
3246     *-n32|*"-n32 ") libmagic=N32;;
3247     *-64|*"-64 ") libmagic=64-bit;;
3248     *) libmagic=never-match;;
3249     esac
3250     # this will be overridden with pass_all, but let us keep it just in case
3251         lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3252         ;;
3253   esac
3254   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3255   lt_cv_deplibs_check_method=pass_all
3256   ;;
3257
3258 # This must be Linux ELF.
3259 linux-gnu*)
3260   case "$host_cpu" in
3261   alpha* | i*86 | powerpc* | sparc* )
3262     lt_cv_deplibs_check_method=pass_all ;;
3263   *)
3264     # glibc up to 2.1.1 does not perform some relocations on ARM
3265         lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3266       esac
3267   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3268   ;;
3269
3270 osf3* | osf4* | osf5*)
3271   # this will be overridden with pass_all, but let us keep it just in case
3272   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3273   lt_cv_file_magic_test_file=/shlib/libc.so
3274   lt_cv_deplibs_check_method=pass_all
3275   ;;
3276
3277 sco3.2v5*)
3278   lt_cv_deplibs_check_method=pass_all
3279   ;;
3280
3281 solaris*)
3282   lt_cv_deplibs_check_method=pass_all
3283   lt_cv_file_magic_test_file=/lib/libc.so
3284   ;;
3285
3286 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3287   case "$host_vendor" in
3288   ncr)
3289     lt_cv_deplibs_check_method=pass_all
3290     ;;
3291   motorola)
3292         lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3293         lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3294     ;;
3295   esac
3296   ;;
3297 esac
3298
3299 fi
3300 echo "$ECHO_T""$lt_cv_deplibs_check_method" 1>&6
3301 file_magic_cmd=$lt_cv_file_magic_cmd
3302 deplibs_check_method=$lt_cv_deplibs_check_method
3303
3304 if test $host != $build; then
3305   ac_tool_prefix=${host_alias}-
3306 else
3307   ac_tool_prefix=
3308 fi
3309
3310 # Only perform the check for file, if the check method requires it
3311 case "$deplibs_check_method" in
3312 file_magic*)
3313   if test "$file_magic_cmd" = '${MAGIC}'; then
3314
3315 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" 1>&6
3316 echo "configure:3308: checking for ${ac_tool_prefix}file" 1>&5
3317 if test "${lt_cv_path_MAGIC+set}" = set; then
3318   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3319 else
3320   case "$MAGIC" in
3321   /*)
3322   lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
3323   ;;
3324   ?:/*)
3325   ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
3326   ;;
3327   *)
3328   ac_save_MAGIC="$MAGIC"
3329   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3330   ac_dummy="/usr/bin:$PATH"
3331   for ac_dir in $ac_dummy; do
3332     test -z "$ac_dir" && ac_dir=.
3333     if test -f $ac_dir/${ac_tool_prefix}file; then
3334       lt_cv_path_MAGIC="$ac_dir/${ac_tool_prefix}file"
3335       if test -n "$file_magic_test_file"; then
3336         case "$deplibs_check_method" in
3337         "file_magic "*)
3338           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3339           MAGIC="$lt_cv_path_MAGIC"
3340           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3341             egrep "$file_magic_regex" > /dev/null; then
3342             :
3343           else
3344             cat <<EOF 1>&2
3345
3346 *** Warning: the command libtool uses to detect shared libraries,
3347 *** $file_magic_cmd, produces output that libtool cannot recognize.
3348 *** The result is that libtool may fail to recognize shared libraries
3349 *** as such.  This will affect the creation of libtool libraries that
3350 *** depend on shared libraries, but programs linked with such libtool
3351 *** libraries will work regardless of this problem.  Nevertheless, you
3352 *** may want to report the problem to your system manager and/or to
3353 *** bug-libtool@gnu.org
3354
3355 EOF
3356           fi ;;
3357         esac
3358       fi
3359       break
3360     fi
3361   done
3362   IFS="$ac_save_ifs"
3363   MAGIC="$ac_save_MAGIC"
3364   ;;
3365 esac
3366 fi
3367
3368 MAGIC="$lt_cv_path_MAGIC"
3369 if test -n "$MAGIC"; then
3370   echo "$ECHO_T""$MAGIC" 1>&6
3371 else
3372   echo "$ECHO_T""no" 1>&6
3373 fi
3374
3375 if test -z "$lt_cv_path_MAGIC"; then
3376   if test -n "$ac_tool_prefix"; then
3377     echo $ECHO_N "checking for file... $ECHO_C" 1>&6
3378 echo "configure:3370: checking for file" 1>&5
3379 if test "${lt_cv_path_MAGIC+set}" = set; then
3380   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3381 else
3382   case "$MAGIC" in
3383   /*)
3384   lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
3385   ;;
3386   ?:/*)
3387   ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
3388   ;;
3389   *)
3390   ac_save_MAGIC="$MAGIC"
3391   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3392   ac_dummy="/usr/bin:$PATH"
3393   for ac_dir in $ac_dummy; do
3394     test -z "$ac_dir" && ac_dir=.
3395     if test -f $ac_dir/file; then
3396       lt_cv_path_MAGIC="$ac_dir/file"
3397       if test -n "$file_magic_test_file"; then
3398         case "$deplibs_check_method" in
3399         "file_magic "*)
3400           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3401           MAGIC="$lt_cv_path_MAGIC"
3402           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3403             egrep "$file_magic_regex" > /dev/null; then
3404             :
3405           else
3406             cat <<EOF 1>&2
3407
3408 *** Warning: the command libtool uses to detect shared libraries,
3409 *** $file_magic_cmd, produces output that libtool cannot recognize.
3410 *** The result is that libtool may fail to recognize shared libraries
3411 *** as such.  This will affect the creation of libtool libraries that
3412 *** depend on shared libraries, but programs linked with such libtool
3413 *** libraries will work regardless of this problem.  Nevertheless, you
3414 *** may want to report the problem to your system manager and/or to
3415 *** bug-libtool@gnu.org
3416
3417 EOF
3418           fi ;;
3419         esac
3420       fi
3421       break
3422     fi
3423   done
3424   IFS="$ac_save_ifs"
3425   MAGIC="$ac_save_MAGIC"
3426   ;;
3427 esac
3428 fi
3429
3430 MAGIC="$lt_cv_path_MAGIC"
3431 if test -n "$MAGIC"; then
3432   echo "$ECHO_T""$MAGIC" 1>&6
3433 else
3434   echo "$ECHO_T""no" 1>&6
3435 fi
3436
3437   else
3438     MAGIC=:
3439   fi
3440 fi
3441
3442   fi
3443   ;;
3444 esac
3445
3446 case "$target" in
3447 NONE) lt_target="$host" ;;
3448 *) lt_target="$target" ;;
3449 esac
3450
3451 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3452 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3453 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
3454 echo "configure:3446: checking for $ac_word" 1>&5
3455 if test "${ac_cv_prog_RANLIB+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3457 else
3458   if test -n "$RANLIB"; then
3459   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3460 else
3461   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3462 ac_dummy="$PATH"
3463 for ac_dir in $ac_dummy; do
3464   test -z "$ac_dir" && ac_dir=.
3465   if test -f $ac_dir/$ac_word; then
3466     echo "$ac_dir/$ac_word"
3467   fi
3468 done
3469 IFS="$ac_save_ifs"
3470 `; do
3471     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3472     break
3473   done
3474 fi
3475 fi
3476 RANLIB="$ac_cv_prog_RANLIB"
3477 if test -n "$RANLIB"; then
3478   echo "$ECHO_T""$RANLIB" 1>&6
3479 else
3480   echo "$ECHO_T""no" 1>&6
3481 fi
3482
3483 if test -z "$ac_cv_prog_RANLIB"; then
3484   if test -n "$ac_tool_prefix"; then
3485     # Extract the first word of "ranlib", so it can be a program name with args.
3486 set dummy ranlib; ac_word=$2
3487 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
3488 echo "configure:3480: checking for $ac_word" 1>&5
3489 if test "${ac_cv_prog_RANLIB+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3491 else
3492   if test -n "$RANLIB"; then
3493   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3494 else
3495   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3496 ac_dummy="$PATH"
3497 for ac_dir in $ac_dummy; do
3498   test -z "$ac_dir" && ac_dir=.
3499   if test -f $ac_dir/$ac_word; then
3500     echo "$ac_dir/$ac_word"
3501   fi
3502 done
3503 IFS="$ac_save_ifs"
3504 `; do
3505     ac_cv_prog_RANLIB="ranlib"
3506     break
3507   done
3508   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3509 fi
3510 fi
3511 RANLIB="$ac_cv_prog_RANLIB"
3512 if test -n "$RANLIB"; then
3513   echo "$ECHO_T""$RANLIB" 1>&6
3514 else
3515   echo "$ECHO_T""no" 1>&6
3516 fi
3517
3518   else
3519     RANLIB=":"
3520   fi
3521 fi
3522
3523 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3524 set dummy ${ac_tool_prefix}strip; ac_word=$2
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
3526 echo "configure:3518: checking for $ac_word" 1>&5
3527 if test "${ac_cv_prog_STRIP+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3529 else
3530   if test -n "$STRIP"; then
3531   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3532 else
3533   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   test -z "$ac_dir" && ac_dir=.
3537   if test -f $ac_dir/$ac_word; then
3538     echo "$ac_dir/$ac_word"
3539   fi
3540 done
3541 IFS="$ac_save_ifs"
3542 `; do
3543     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3544     break
3545   done
3546 fi
3547 fi
3548 STRIP="$ac_cv_prog_STRIP"
3549 if test -n "$STRIP"; then
3550   echo "$ECHO_T""$STRIP" 1>&6
3551 else
3552   echo "$ECHO_T""no" 1>&6
3553 fi
3554
3555 if test -z "$ac_cv_prog_STRIP"; then
3556   if test -n "$ac_tool_prefix"; then
3557     # Extract the first word of "strip", so it can be a program name with args.
3558 set dummy strip; ac_word=$2
3559 echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
3560 echo "configure:3552: checking for $ac_word" 1>&5
3561 if test "${ac_cv_prog_STRIP+set}" = set; then
3562   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3563 else
3564   if test -n "$STRIP"; then
3565   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3566 else
3567   for ac_path in `IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3568 ac_dummy="$PATH"
3569 for ac_dir in $ac_dummy; do
3570   test -z "$ac_dir" && ac_dir=.
3571   if test -f $ac_dir/$ac_word; then
3572     echo "$ac_dir/$ac_word"
3573   fi
3574 done
3575 IFS="$ac_save_ifs"
3576 `; do
3577     ac_cv_prog_STRIP="strip"
3578     break
3579   done
3580   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
3581 fi
3582 fi
3583 STRIP="$ac_cv_prog_STRIP"
3584 if test -n "$STRIP"; then
3585   echo "$ECHO_T""$STRIP" 1>&6
3586 else
3587   echo "$ECHO_T""no" 1>&6
3588 fi
3589
3590   else
3591     STRIP=":"
3592   fi
3593 fi
3594
3595 # Check for any special flags to pass to ltconfig.
3596 libtool_flags="--cache-file=$cache_file"
3597 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3598 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3599 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3600 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3601 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3602
3603 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3604 if test "${enable_libtool_lock+set}" = set; then
3605   enableval="$enable_libtool_lock"
3606
3607 fi
3608 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3609 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3610
3611 # Check whether --with-pic or --without-pic was given.
3612 if test "${with_pic+set}" = set; then
3613   withval="$with_pic"
3614   pic_mode="$withval"
3615 else
3616   pic_mode=default
3617 fi
3618 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
3619 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
3620
3621 # Some flags need to be propagated to the compiler or linker for good
3622 # libtool support.
3623 case "$lt_target" in
3624 *-*-irix6*)
3625   # Find out which ABI we are using.
3626   echo '#line 3618 "configure"' > conftest.$ac_ext
3627   if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3628     case "`/usr/bin/file conftest.o`" in
3629     *32-bit*)
3630       LD="${LD-ld} -32"
3631       ;;
3632     *N32*)
3633       LD="${LD-ld} -n32"
3634       ;;
3635     *64-bit*)
3636       LD="${LD-ld} -64"
3637       ;;
3638     esac
3639   fi
3640   rm -rf conftest*
3641   ;;
3642
3643 *-*-sco3.2v5*)
3644   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3645   SAVE_CFLAGS="$CFLAGS"
3646   CFLAGS="$CFLAGS -belf"
3647   echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" 1>&6
3648 echo "configure:3640: checking whether the C compiler needs -belf" 1>&5
3649 if test "${lt_cv_cc_needs_belf+set}" = set; then
3650   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3651 else
3652
3653      ac_ext=c
3654 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3655 ac_cpp='$CPP $CPPFLAGS'
3656 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3657 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3658 cross_compiling=$ac_cv_prog_cc_cross
3659
3660      cat >conftest.$ac_ext <<EOF
3661 #line 3653 "configure"
3662 #include "confdefs.h"
3663
3664 int
3665 main()
3666 {
3667
3668   ;
3669   return 0;
3670 }
3671 EOF
3672 if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3673   rm -rf conftest*
3674   lt_cv_cc_needs_belf=yes
3675 else
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   lt_cv_cc_needs_belf=no
3680 fi
3681 rm -f conftest*
3682
3683      ac_ext=c
3684 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3685 ac_cpp='$CPP $CPPFLAGS'
3686 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3687 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3688 cross_compiling=$ac_cv_prog_cc_cross
3689
3690 fi
3691 echo "$ECHO_T""$lt_cv_cc_needs_belf" 1>&6
3692   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3693     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3694     CFLAGS="$SAVE_CFLAGS"
3695   fi
3696   ;;
3697
3698 esac
3699
3700 # Save cache, so that ltconfig can load it
3701 cat >confcache <<\EOF
3702 # This file is a shell script that caches the results of configure
3703 # tests run on this system so they can be shared between configure
3704 # scripts and configure runs.  It is not useful on other systems.
3705 # If it contains results you don't want to keep, you may remove or edit it.
3706 #
3707 # By default, configure uses ./config.cache as the cache file,
3708 # creating it if it does not exist already.  You can give configure
3709 # the --cache-file=FILE option to use a different cache file; that is
3710 # what configure does when it calls configure scripts in
3711 # subdirectories, so they share the cache.
3712 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3713 # config.status only pays attention to the cache file if you give it the
3714 # --recheck option to rerun configure.
3715 #
3716 EOF
3717 # The following way of writing the cache mishandles newlines in values,
3718 # but we know of no workaround that is simple, portable, and efficient.
3719 # So, don't put newlines in cache variables' values.
3720 # Ultrix sh set writes to stderr and can't be redirected directly,
3721 # and sets the high bit in the cache file unless we assign to the vars.
3722 (set) 2>&1 |
3723   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3724   *ac_space=\ *)
3725     # `set' does not quote correctly, so add quotes (double-quote substitution
3726     # turns \\\\ into \\, and sed turns \\ into \).
3727     sed -n \
3728       -e "s/'/'\\\\''/g" \
3729       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3730     ;;
3731   *)
3732     # `set' quotes correctly as required by POSIX, so do not add quotes.
3733     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3734     ;;
3735   esac >>confcache
3736 if cmp -s $cache_file confcache; then :; else
3737   if test -w $cache_file; then
3738     echo "updating cache $cache_file"
3739     cat confcache >$cache_file
3740   else
3741     echo "not updating unwritable cache $cache_file"
3742   fi
3743 fi
3744 rm -f confcache
3745
3746 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3747 AR="$AR" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3748 MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3749 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
3750 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
3751 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
3752 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
3753 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3754 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $lt_target \
3755 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3756
3757 # Reload cache, that may have been modified by ltconfig
3758 if test -r "$cache_file"; then
3759   echo "loading cache $cache_file"
3760       test -f "$cache_file" && . $cache_file
3761 else
3762   echo "creating cache $cache_file"
3763   >$cache_file
3764 fi
3765
3766 # This can be used to rebuild libtool when needed
3767 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3768
3769 # Always use our own libtool.
3770 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3771
3772 # Redirect the config.log output again, so that the ltconfig log is not
3773 # clobbered by the next message.
3774 exec 5>>./config.log
3775
3776 echo $ECHO_N "checking whether optarg is declared... $ECHO_C" 1>&6
3777 echo "configure:3769: checking whether optarg is declared" 1>&5
3778 if test "${ac_cv_have_decl_optarg+set}" = set; then
3779   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3780 else
3781   cat >conftest.$ac_ext <<EOF
3782 #line 3774 "configure"
3783 #include "confdefs.h"
3784 $ac_includes_default
3785 int
3786 main ()
3787 {
3788 #ifndef optarg
3789   char *p = (char *) optarg;
3790 #endif
3791
3792   ;
3793   return 0;
3794 }
3795 EOF
3796 if { (eval echo configure:3788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3797   rm -rf conftest*
3798   ac_cv_have_decl_optarg=yes
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   rm -rf conftest*
3803   ac_cv_have_decl_optarg=no
3804 fi
3805 rm -f conftest*
3806 fi
3807 echo "$ECHO_T""$ac_cv_have_decl_optarg" 1>&6
3808 if test $ac_cv_have_decl_optarg = yes; then
3809   cat >>confdefs.h <<EOF
3810 #define HAVE_DECL_OPTARG 1
3811 EOF
3812
3813 else
3814   cat >>confdefs.h <<EOF
3815 #define HAVE_DECL_OPTARG 0
3816 EOF
3817
3818 fi
3819
3820 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
3821 echo "configure:3813: checking for ANSI C header files" 1>&5
3822 if test "${ac_cv_header_stdc+set}" = set; then
3823   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3824 else
3825
3826 cat >conftest.$ac_ext <<EOF
3827 #line 3819 "configure"
3828 #include "confdefs.h"
3829 #include <stdlib.h>
3830 #include <stdarg.h>
3831 #include <string.h>
3832 #include <float.h>
3833
3834 EOF
3835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3836 { (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3838 if test -z "$ac_err"; then
3839   rm -rf conftest*
3840   ac_cv_header_stdc=yes
3841 else
3842   echo "$ac_err" >&5
3843   echo "configure: failed program was:" >&5
3844   cat conftest.$ac_ext >&5
3845   rm -rf conftest*
3846   ac_cv_header_stdc=no
3847 fi
3848 rm -f conftest*
3849
3850 if test $ac_cv_header_stdc = yes; then
3851   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3852
3853 cat >conftest.$ac_ext <<EOF
3854 #line 3846 "configure"
3855 #include "confdefs.h"
3856 #include <string.h>
3857
3858 EOF
3859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3860   egrep "memchr" >/dev/null 2>&1; then
3861   :
3862 else
3863   rm -rf conftest*
3864   ac_cv_header_stdc=no
3865 fi
3866 rm -f conftest*
3867
3868 fi
3869
3870 if test $ac_cv_header_stdc = yes; then
3871   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3872
3873 cat >conftest.$ac_ext <<EOF
3874 #line 3866 "configure"
3875 #include "confdefs.h"
3876 #include <stdlib.h>
3877
3878 EOF
3879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3880   egrep "free" >/dev/null 2>&1; then
3881   :
3882 else
3883   rm -rf conftest*
3884   ac_cv_header_stdc=no
3885 fi
3886 rm -f conftest*
3887
3888 fi
3889
3890 if test $ac_cv_header_stdc = yes; then
3891   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3892 if test "$cross_compiling" = yes; then
3893   :
3894 else
3895   cat >conftest.$ac_ext <<EOF
3896 #line 3888 "configure"
3897 #include "confdefs.h"
3898 #include <ctype.h>
3899 #if ((' ' & 0x0FF) == 0x020)
3900 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3901 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3902 #else
3903 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3904                      || ('j' <= (c) && (c) <= 'r') \
3905                      || ('s' <= (c) && (c) <= 'z'))
3906 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3907 #endif
3908
3909 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3910 int
3911 main ()
3912 {
3913   int i;
3914   for (i = 0; i < 256; i++)
3915     if (XOR (islower (i), ISLOWER (i))
3916         || toupper (i) != TOUPPER (i))
3917       exit(2);
3918   exit (0);
3919 }
3920 EOF
3921 if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3922 then
3923   :
3924 else
3925   echo "configure: failed program was:" >&5
3926   cat conftest.$ac_ext >&5
3927   rm -fr conftest*
3928   ac_cv_header_stdc=no
3929 fi
3930 rm -fr conftest*
3931
3932 fi
3933
3934 fi
3935 fi
3936 echo "$ECHO_T""$ac_cv_header_stdc" 1>&6
3937 if test $ac_cv_header_stdc = yes; then
3938   cat >>confdefs.h <<\EOF
3939 #define STDC_HEADERS 1
3940 EOF
3941
3942 fi
3943
3944 for ac_header in getopt.h unistd.h sys/sysctl.h sys/time.h
3945 do
3946 ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
3947 echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
3948 echo "configure:3940: checking for $ac_header" 1>&5
3949 if eval "test \"\${$ac_ac_Header+set}\" = set"; then
3950   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3951 else
3952
3953 cat >conftest.$ac_ext <<EOF
3954 #line 3946 "configure"
3955 #include "confdefs.h"
3956 #include <$ac_header>
3957
3958 EOF
3959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3960 { (eval echo configure:3952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3962 if test -z "$ac_err"; then
3963   rm -rf conftest*
3964   eval "$ac_ac_Header=yes"
3965 else
3966   echo "$ac_err" >&5
3967   echo "configure: failed program was:" >&5
3968   cat conftest.$ac_ext >&5
3969   rm -rf conftest*
3970   eval "$ac_ac_Header=no"
3971 fi
3972 rm -f conftest*
3973 fi
3974 echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
3975 if test `eval echo '${'$ac_ac_Header'}'` = yes; then
3976   cat >>confdefs.h <<EOF
3977 #define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
3978 EOF
3979
3980 fi
3981 done
3982
3983 echo $ECHO_N "checking for void... $ECHO_C" 1>&6
3984 echo "configure:3976: checking for void" 1>&5
3985 if test "${ac_cv_type_void+set}" = set; then
3986   echo $ECHO_N "(cached) $ECHO_C" 1>&6
3987 else
3988   cat >conftest.$ac_ext <<EOF
3989 #line 3981 "configure"
3990 #include "confdefs.h"
3991 $ac_includes_default
3992 int
3993 main ()
3994 {
3995 if ((void *) 0)
3996   return 0;
3997 if (sizeof (void))
3998   return 0;
3999   ;
4000   return 0;
4001 }
4002 EOF
4003 if { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4004   rm -rf conftest*
4005   ac_cv_type_void=yes
4006 else
4007   echo "configure: failed program was:" >&5
4008   cat conftest.$ac_ext >&5
4009   rm -rf conftest*
4010   ac_cv_type_void=no
4011 fi
4012 rm -f conftest*
4013 fi
4014 echo "$ECHO_T""$ac_cv_type_void" 1>&6
4015 if test $ac_cv_type_void = yes; then
4016   cat >>confdefs.h <<EOF
4017 #define HAVE_VOID 1
4018 EOF
4019
4020 fi
4021
4022 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" 1>&6
4023 echo "configure:4015: checking for preprocessor stringizing operator" 1>&5
4024 if test "${ac_cv_c_stringize+set}" = set; then
4025   echo $ECHO_N "(cached) $ECHO_C" 1>&6
4026 else
4027
4028 cat >conftest.$ac_ext <<EOF
4029 #line 4021 "configure"
4030 #include "confdefs.h"
4031
4032 #define x(y) #y
4033
4034 char *s = x(teststring);
4035
4036 EOF
4037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4038   egrep "#teststring" >/dev/null 2>&1; then
4039   rm -rf conftest*
4040   ac_cv_c_stringize=no
4041 else
4042   rm -rf conftest*
4043   ac_cv_c_stringize=yes
4044 fi
4045 rm -f conftest*
4046
4047 fi
4048
4049 if test "${ac_cv_c_stringize}" = yes; then
4050   cat >>confdefs.h <<\EOF
4051 #define HAVE_STRINGIZE 1
4052 EOF
4053
4054 fi
4055 echo "$ECHO_T""${ac_cv_c_stringize}" 1>&6
4056
4057 for ac_func in getopt_long getpagesize popen processor_info strtoul sysconf sysctlbyname
4058 do
4059 ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
4060 echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
4061 echo "configure:4053: checking for $ac_func" 1>&5
4062 if eval "test \"\${$ac_ac_var+set}\" = set"; then
4063   echo $ECHO_N "(cached) $ECHO_C" 1>&6
4064 else
4065   cat >conftest.$ac_ext <<EOF
4066 #line 4058 "configure"
4067 #include "confdefs.h"
4068 /* System header to define __stub macros and hopefully few prototypes,
4069     which can conflict with char $ac_func(); below.  */
4070 #include <assert.h>
4071 /* Override any gcc2 internal prototype to avoid an error.  */
4072 /* We use char because int might match the return type of a gcc2
4073     builtin and then its argument prototype would still apply.  */
4074 char $ac_func();
4075 char (*f)();
4076
4077 int
4078 main()
4079 {
4080
4081 /* The GNU C library defines this for functions which it implements
4082     to always fail with ENOSYS.  Some functions are actually named
4083     something starting with __ and the normal name is an alias.  */
4084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4085 choke me
4086 #else
4087 f = $ac_func;
4088 #endif
4089
4090   ;
4091   return 0;
4092 }
4093 EOF
4094 if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4095   rm -rf conftest*
4096   eval "$ac_ac_var=yes"
4097 else
4098   echo "configure: failed program was:" >&5
4099   cat conftest.$ac_ext >&5
4100   rm -rf conftest*
4101   eval "$ac_ac_var=no"
4102 fi
4103 rm -f conftest*
4104
4105 fi
4106 echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
4107 if test `eval echo '${'$ac_ac_var'}'` = yes; then
4108   cat >>confdefs.h <<EOF
4109 #define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
4110 EOF
4111
4112 fi
4113 done
4114
4115 echo $ECHO_N "checking if ansi2knr should be used... $ECHO_C" 1>&6
4116 echo "configure:4108: checking if ansi2knr should be used" 1>&5
4117 if test "${gmp_cv_c_ansi2knr+set}" = set; then
4118   echo $ECHO_N "(cached) $ECHO_C" 1>&6
4119 else
4120   cat >conftest.c <<EOF
4121 int main (int argc, char *argv) { return 0; }
4122 EOF
4123 if { (eval echo configure:4115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4124   gmp_cv_c_ansi2knr=no
4125 else
4126   gmp_cv_c_ansi2knr=yes
4127 fi
4128 rm -f conftest.*
4129
4130 fi
4131 echo "$ECHO_T""$gmp_cv_c_ansi2knr" 1>&6
4132 if test $gmp_cv_c_ansi2knr = no; then
4133   U= ANSI2KNR=
4134 else
4135   U=_ ANSI2KNR=./ansi2knr
4136   # Ensure some checks needed by ansi2knr itself.
4137
4138 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
4139 echo "configure:4131: checking for ANSI C header files" 1>&5
4140 if test "${ac_cv_header_stdc+set}" = set; then
4141   echo $ECHO_N "(cached) $ECHO_C" 1>&6
4142 else
4143
4144 cat >conftest.$ac_ext <<EOF
4145 #line 4137 "configure"
4146 #include "confdefs.h"
4147 #include <stdlib.h>
4148 #include <stdarg.h>
4149 #include <string.h>
4150 #include <float.h>
4151
4152 EOF
4153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4154 { (eval echo configure:4146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4156 if test -z "$ac_err"; then
4157   rm -rf conftest*
4158   ac_cv_header_stdc=yes
4159 else
4160   echo "$ac_err" >&5
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163   rm -rf conftest*
4164   ac_cv_header_stdc=no
4165 fi
4166 rm -f conftest*
4167
4168 if test $ac_cv_header_stdc = yes; then
4169   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4170
4171 cat >conftest.$ac_ext <<EOF
4172 #line 4164 "configure"
4173 #include "confdefs.h"
4174 #include <string.h>
4175
4176 EOF
4177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4178   egrep "memchr" >/dev/null 2>&1; then
4179   :
4180 else
4181   rm -rf conftest*
4182   ac_cv_header_stdc=no
4183 fi
4184 rm -f conftest*
4185
4186 fi
4187
4188 if test $ac_cv_header_stdc = yes; then
4189   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4190
4191 cat >conftest.$ac_ext <<EOF
4192 #line 4184 "configure"
4193 #include "confdefs.h"
4194 #include <stdlib.h>
4195
4196 EOF
4197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4198   egrep "free" >/dev/null 2>&1; then
4199   :
4200 else
4201   rm -rf conftest*
4202   ac_cv_header_stdc=no
4203 fi
4204 rm -f conftest*
4205
4206 fi
4207
4208 if test $ac_cv_header_stdc = yes; then
4209   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4210 if test "$cross_compiling" = yes; then
4211   :
4212 else
4213   cat >conftest.$ac_ext <<EOF
4214 #line 4206 "configure"
4215 #include "confdefs.h"
4216 #include <ctype.h>
4217 #if ((' ' & 0x0FF) == 0x020)
4218 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4219 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4220 #else
4221 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4222                      || ('j' <= (c) && (c) <= 'r') \
4223                      || ('s' <= (c) && (c) <= 'z'))
4224 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4225 #endif
4226
4227 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4228 int
4229 main ()
4230 {
4231   int i;
4232   for (i = 0; i < 256; i++)
4233     if (XOR (islower (i), ISLOWER (i))
4234         || toupper (i) != TOUPPER (i))
4235       exit(2);
4236   exit (0);
4237 }
4238 EOF
4239 if { (eval echo configure:4231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4240 then
4241   :
4242 else
4243   echo "configure: failed program was:" >&5
4244   cat conftest.$ac_ext >&5
4245   rm -fr conftest*
4246   ac_cv_header_stdc=no
4247 fi
4248 rm -fr conftest*
4249
4250 fi
4251
4252 fi
4253 fi
4254 echo "$ECHO_T""$ac_cv_header_stdc" 1>&6
4255 if test $ac_cv_header_stdc = yes; then
4256   cat >>confdefs.h <<\EOF
4257 #define STDC_HEADERS 1
4258 EOF
4259
4260 fi
4261
4262   for ac_header in string.h
4263 do
4264 ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
4265 echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
4266 echo "configure:4258: checking for $ac_header" 1>&5
4267 if eval "test \"\${$ac_ac_Header+set}\" = set"; then
4268   echo $ECHO_N "(cached) $ECHO_C" 1>&6
4269 else
4270
4271 cat >conftest.$ac_ext <<EOF
4272 #line 4264 "configure"
4273 #include "confdefs.h"
4274 #include <$ac_header>
4275
4276 EOF
4277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4278 { (eval echo configure:4270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4280 if test -z "$ac_err"; then
4281   rm -rf conftest*
4282   eval "$ac_ac_Header=yes"
4283 else
4284   echo "$ac_err" >&5
4285   echo "configure: failed program was:" >&5
4286   cat conftest.$ac_ext >&5
4287   rm -rf conftest*
4288   eval "$ac_ac_Header=no"
4289 fi
4290 rm -f conftest*
4291 fi
4292 echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
4293 if test `eval echo '${'$ac_ac_Header'}'` = yes; then
4294   cat >>confdefs.h <<EOF
4295 #define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
4296 EOF
4297
4298 fi
4299 done
4300
4301 fi
4302
4303 syntax=
4304 # For now, we use the old switch for setting syntax.
4305 # FIXME: Remove when conversion to .asm is completed.
4306 case "${target}" in
4307   m680[234]0*-*-linuxaout* | m68k*-*-linuxaout* | \
4308   m68k-next-nextstep* | \
4309   m68000*-*-*)
4310     syntax=mit
4311     ;;
4312   m680[234]0*-*-linux* | m68k*-*-linux*)
4313     syntax=elf
4314     ;;
4315   m680[234]0*-*-* | m68k*-*-*)
4316     syntax=mit
4317     ;;
4318 esac
4319
4320 # Now build an asm-syntax.h file for targets that include that from the
4321 # assembly files.
4322 # FIXME: Remove when conversion to .asm is completed.
4323 case "${family}-${underscore}-${asm_align}-${syntax}" in
4324   m68k-yes-log-mit)
4325     echo '#define MIT_SYNTAX' >asm-syntax.h
4326     cat $srcdir/mpn/underscore.h >>asm-syntax.h
4327     echo '#include "'$srcdir'/mpn/m68k/syntax.h"' >>asm-syntax.h;;
4328   m68k-no-nolog-elf)
4329     echo '#define ELF_SYNTAX' >asm-syntax.h
4330     echo '#define C_SYMBOL_NAME(name) name' >>asm-syntax.h
4331     echo '#include "'$srcdir'/mpn/m68k/syntax.h"' >>asm-syntax.h;;
4332 esac
4333
4334 # The pattern here tests for an absolute path the same way as
4335 # _AC_OUTPUT_FILES in autoconf acgeneral.m4.
4336
4337 echo "dnl  CONFIG_TOP_SRCDIR is a path from the mpn builddir to the top srcdir" >> $gmp_tmpconfigm4
4338
4339 case "$srcdir" in
4340 [\\/]* | ?:[\\/]* )
4341
4342 echo "define(<CONFIG_TOP_SRCDIR>,<\`$srcdir'>)" >> $gmp_tmpconfigm4
4343     ;;
4344 *)
4345
4346 echo "define(<CONFIG_TOP_SRCDIR>,<\`../$srcdir'>)" >> $gmp_tmpconfigm4
4347  ;;
4348 esac
4349
4350 echo "include(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')" >> $gmp_tmpconfigm4p
4351
4352 # Must be after asm-defs.m4
4353
4354 echo "define_not_for_expansion(\`HAVE_TARGET_CPU_$target_cpu')" >> $gmp_tmpconfigm4p
4355
4356 case "$target" in
4357   alpha*-cray-unicos*)
4358     gmp_m4postinc="alpha/unicos.m4"
4359     ;;
4360   alpha*-*-*)
4361     gmp_m4postinc="alpha/default.m4"
4362     ;;
4363   power*-*-*)
4364     case "$target" in
4365       *-*-mach* | *-*-rhapsody* | *-*-nextstep* | *-*-darwin* | *-*-macosx*)
4366         ;;      # these use non-conventional assembly syntax.
4367       powerpc64-*-aix*)
4368         gmp_m4postinc="powerpc32/regmap.m4 powerpc64/aix.m4"
4369         ;;
4370       *-*-aix*)
4371         gmp_m4postinc="powerpc32/regmap.m4 powerpc32/aix.m4"
4372         ;;
4373       *)
4374         gmp_m4postinc="powerpc32/regmap.m4"
4375         ;;
4376     esac
4377     ;;
4378 esac
4379
4380 for tmp_f in $gmp_m4postinc; do
4381
4382 echo "include_mpn(\`$tmp_f')" >> $gmp_tmpconfigm4p
4383
4384 done
4385
4386 # Set up `gmp_links'.  It's a list of link:file pairs that configure will
4387 # process to create link -> file.
4388 gmp_links=
4389
4390 # If the user specified `MPN_PATH', use that instead of the path we've
4391 # come up with.
4392 if test -z "$MPN_PATH"; then
4393   path="$path generic"
4394 else
4395   path="$MPN_PATH"
4396 fi
4397
4398 # Pick the correct source files in $path and link them to mpn/.
4399 # $gmp_mpn_functions lists all functions we need.
4400 #
4401 # The rule is to find a file with the function name and a .asm, .S,
4402 # .s, or .c extension.  Certain multi-function files with special names
4403 # can provide some functions too.  (mpn/Makefile.am passes
4404 # -DOPERATION_<func> to get them to generate the right code.)
4405
4406 # FIXME: udiv and umul aren't in $gmp_mpn_functions_optional yet since
4407 # there's some versions of those files which should be checked for bit
4408 # rot first.  Put them in $extra_functions for each target for now,
4409 # change to standard optionals when all are ready.
4410
4411 # Note: The following lines defining $gmp_mpn_functions_optional
4412 #       and $gmp_mpn_functions are parsed by the "macos/configure"
4413 #       Perl script. So if you change the lines in a major way
4414 #       make sure to run and examine the output from
4415 #
4416 #           % (cd macos; perl configure)
4417
4418 gmp_mpn_functions_optional="copyi copyd com_n           \
4419   and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n"
4420
4421 gmp_mpn_functions="${extra_functions} inlines add_n sub_n mul_1 addmul_1   \
4422   submul_1 lshift rshift diveby3 divrem divrem_1 divrem_2                  \
4423   mod_1 mod_1_rs pre_mod_1 dump                                            \
4424   mul mul_fft mul_n mul_basecase sqr_basecase random                       \
4425   random2 sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp perfsqr \
4426   bdivmod gcd_1 gcd gcdext tdiv_qr bz_divrem_n sb_divrem_mn jacbase        \
4427   $gmp_mpn_functions_optional"
4428
4429 # the list of all object files used by mpn/Makefile.in and the
4430 # top-level Makefile.in, respectively
4431 mpn_objects=
4432 mpn_objs_in_libgmp="mpn/mp_bases.lo"
4433
4434 # SLPJ trace
4435 echo "Peering at file structure (takes a while)..." 1>&6
4436
4437 for tmp_fn in ${gmp_mpn_functions} ; do
4438 # SLPJ trace
4439   echo "...$tmp_fn..." 1>&6
4440
4441 # This line was
4442 #    rm -f mpn/${tmp_fn}.[Ssc] mpn/${tmp_fn}.asm
4443 # but I found that on my NT workstation the command
4444 # would unpredictably hang.  rm wasn't an active process,
4445 # but absolutlely nothing was happening.  
4446 # I *think* that expanding the [Ssc] cures the problem
4447 #    SLPJ May 01
4448   rm -f mpn/${tmp_fn}.S mpn/${tmp_fn}.s mpn/${tmp_fn}.c mpn/${tmp_fn}.asm
4449
4450   echo "...$tmp_fn (done rm)..." 1>&6
4451
4452   # functions that can be provided by multi-function files
4453   tmp_mulfunc=
4454   case $tmp_fn in
4455   add_n|sub_n)       tmp_mulfunc="aors_n"    ;;
4456   addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;;
4457   popcount|hamdist)  tmp_mulfunc="popham"    ;;
4458   and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n)
4459                      tmp_mulfunc="logops_n"  ;;
4460   esac
4461
4462   found=no
4463   for tmp_dir in $path; do
4464
4465 # SLPJ trace
4466 # We get stuck sometimes
4467         echo "  ...dir $tmp_dir..." 1>&6
4468     for tmp_base in $tmp_fn $tmp_mulfunc; do
4469
4470 # SLPJ trace
4471 # We get stuck sometimes
4472         echo "   ...base $tmp_base..." 1>&6
4473       for tmp_ext in asm S s c; do
4474         tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext
4475
4476 # SLPJ trace
4477 # We get stuck sometimes
4478         echo "   ...$tmp_file..." 1>&6
4479
4480         if test -f $tmp_file; then
4481           found=yes
4482
4483           mpn_objects="$mpn_objects ${tmp_fn}.lo"
4484           mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/${tmp_fn}.lo"
4485           gmp_links="$gmp_links mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext"
4486
4487           # duplicate AC_DEFINEs are harmless, so it doesn't matter
4488           # that multi-function files get grepped here repeatedly
4489           gmp_ep="`
4490             sed -n 's/^[        ]*MULFUNC_PROLOGUE(\(.*\))/\1/p' $tmp_file ;
4491             sed -n 's/^[        ]*PROLOGUE.*(\(.*\))/\1/p' $tmp_file
4492           `"
4493           for gmp_tmp in $gmp_ep; do
4494             cat >>confdefs.h <<EOF
4495 #define HAVE_NATIVE_${gmp_tmp} 1
4496 EOF
4497
4498           done
4499
4500           break
4501         fi
4502       done
4503       if test $found = yes; then break ; fi
4504     done
4505     if test $found = yes; then break ; fi
4506   done
4507
4508   if test $found = no; then
4509     for tmp_optional in $gmp_mpn_functions_optional; do
4510       if test $tmp_optional = $tmp_fn; then
4511         found=yes
4512       fi
4513     done
4514     if test $found = no; then
4515       { echo "configure: error: no version of $tmp_fn found in path: $path" 1>&2; exit 1; }
4516     fi
4517   fi
4518 done
4519
4520
4521 # Create link for gmp-mparam.h.
4522
4523 # SLPJ trace
4524 echo "Creating link for gmp-mparam.h..." 1>&6
4525
4526 for tmp_dir in $path ; do
4527   rm -f gmp-mparam.h
4528   if test -f $srcdir/mpn/${tmp_dir}/gmp-mparam.h ; then
4529     gmp_links="$gmp_links gmp-mparam.h:mpn/${tmp_dir}/gmp-mparam.h"
4530
4531     # Copy any KARATSUBA_SQR_THRESHOLD in gmp-mparam.h to config.m4.
4532     # Some versions of sqr_basecase.asm use this.
4533     tmp_gmp_karatsuba_sqr_threshold="`sed -n 's/^#define KARATSUBA_SQR_THRESHOLD[       ]*\([0-9][0-9]*\).*$/\1/p' $srcdir/mpn/${tmp_dir}/gmp-mparam.h`"
4534     if test -n "$tmp_gmp_karatsuba_sqr_threshold"; then
4535
4536 echo "define(<KARATSUBA_SQR_THRESHOLD>,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4
4537
4538     fi
4539
4540     break
4541   fi
4542 done
4543
4544 # SLPJ trace
4545 echo "Digging out links to include in DISTCLEANFILES..." 1>&6
4546
4547 # Dig out the links from `gmp_links' for inclusion in DISTCLEANFILES.
4548 gmp_srclinks=
4549 for f in $gmp_links; do
4550   gmp_srclinks="$gmp_srclinks `echo $f | sed 's/\(.*\):.*/\1/'`"
4551 done
4552
4553 echo "creating $gmp_configm4"
4554 echo "dnl $gmp_configm4.  Generated automatically by configure." > $gmp_configm4
4555 if test -f $gmp_tmpconfigm4; then
4556   echo "changequote(<,>)dnl" >> $gmp_configm4
4557   echo "ifdef(<__CONFIG_M4_INCLUDED__>,,<" >> $gmp_configm4
4558   cat $gmp_tmpconfigm4 >> $gmp_configm4
4559   echo ">)" >> $gmp_configm4
4560   echo "changequote(\`,')dnl" >> $gmp_configm4
4561   rm $gmp_tmpconfigm4
4562 fi
4563 echo "ifdef(\`__CONFIG_M4_INCLUDED__',,\`" >> $gmp_configm4
4564 if test -f $gmp_tmpconfigm4i; then
4565   cat $gmp_tmpconfigm4i >> $gmp_configm4
4566   rm $gmp_tmpconfigm4i
4567 fi
4568 if test -f $gmp_tmpconfigm4p; then
4569   cat $gmp_tmpconfigm4p >> $gmp_configm4
4570   rm $gmp_tmpconfigm4p
4571 fi
4572 echo "')" >> $gmp_configm4
4573 echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4
4574
4575 trap '' 1 2 15
4576 cat >confcache <<\EOF
4577 # This file is a shell script that caches the results of configure
4578 # tests run on this system so they can be shared between configure
4579 # scripts and configure runs.  It is not useful on other systems.
4580 # If it contains results you don't want to keep, you may remove or edit it.
4581 #
4582 # By default, configure uses ./config.cache as the cache file,
4583 # creating it if it does not exist already.  You can give configure
4584 # the --cache-file=FILE option to use a different cache file; that is
4585 # what configure does when it calls configure scripts in
4586 # subdirectories, so they share the cache.
4587 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4588 # config.status only pays attention to the cache file if you give it the
4589 # --recheck option to rerun configure.
4590 #
4591 EOF
4592 # The following way of writing the cache mishandles newlines in values,
4593 # but we know of no workaround that is simple, portable, and efficient.
4594 # So, don't put newlines in cache variables' values.
4595 # Ultrix sh set writes to stderr and can't be redirected directly,
4596 # and sets the high bit in the cache file unless we assign to the vars.
4597 (set) 2>&1 |
4598   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4599   *ac_space=\ *)
4600     # `set' does not quote correctly, so add quotes (double-quote substitution
4601     # turns \\\\ into \\, and sed turns \\ into \).
4602     sed -n \
4603       -e "s/'/'\\\\''/g" \
4604       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4605     ;;
4606   *)
4607     # `set' quotes correctly as required by POSIX, so do not add quotes.
4608     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4609     ;;
4610   esac >>confcache
4611 if cmp -s $cache_file confcache; then :; else
4612   if test -w $cache_file; then
4613     echo "updating cache $cache_file"
4614     cat confcache >$cache_file
4615   else
4616     echo "not updating unwritable cache $cache_file"
4617   fi
4618 fi
4619 rm -f confcache
4620
4621 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4622
4623 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4624 # Let make expand exec_prefix.
4625 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4626
4627 # Any assignment to VPATH causes Sun make to only execute
4628 # the first set of double-colon rules, so remove it if not needed.
4629 # If there is a colon in the path, we need to keep it.
4630 if test "x$srcdir" = x.; then
4631   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4632 fi
4633
4634 DEFS=-DHAVE_CONFIG_H
4635
4636 : ${CONFIG_STATUS=./config.status}
4637 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4638 echo creating $CONFIG_STATUS
4639 cat >$CONFIG_STATUS <<EOF
4640 #! /bin/sh
4641 # Generated automatically by configure.
4642 # Run this file to recreate the current configuration.
4643 # This directory was configured as follows,
4644 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4645 #
4646 # $0 $ac_configure_args
4647 #
4648 # Compiler output produced by configure, useful for debugging
4649 # configure, is in ./config.log if it exists.
4650
4651 # Files that config.status was made for.
4652 config_files="\\
4653   Makefile mpn/Makefile mpz/Makefile"
4654 config_headers="\\
4655   config.h:config.in"
4656 config_links="\\
4657   $gmp_links"
4658 config_commands="\\
4659   default-1"
4660
4661 ac_cs_usage="\\
4662 \\\`$CONFIG_STATUS' instantiates files from templates according to the
4663 current configuration.
4664
4665 Usage: $CONFIG_STATUS [OPTIONS] FILE...
4666
4667   --recheck    Update $CONFIG_STATUS by reconfiguring in the same conditions
4668   --version    Print the version of Autoconf and exit
4669   --help       Display this help and exit
4670   --file=FILE[:TEMPLATE]
4671                Instantiate the configuration file FILE
4672   --header=FILE[:TEMPLATE]
4673                Instantiate the configuration header FILE
4674
4675 Configuration files:
4676 \$config_files
4677
4678 Configuration headers:
4679 \$config_headers
4680
4681 Configuration links:
4682 \$config_links
4683
4684 Configuration commands:
4685 \$config_commands
4686
4687 Report bugs to <bug-autoconf@gnu.org>."
4688
4689 ac_cs_version="\\
4690 $CONFIG_STATUS generated by autoconf version 2.14a.
4691 Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
4692   `echo "$0 $ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'`"
4693
4694 # Root of the tmp file names.  Use pid to allow concurrent executions.
4695 ac_cs_root=cs\$\$
4696 ac_given_srcdir=$srcdir
4697 ac_given_INSTALL="$INSTALL"
4698
4699 # If no file are specified by the user, then we need to provide default
4700 # value.  By we need to know if files were specified by the user.
4701 ac_need_defaults=:
4702 while test \$# != 0
4703 do
4704   case "\$1" in
4705   --*=*)
4706     ac_option=\`echo "\$1" | sed -e 's/=.*//'\`
4707     ac_optarg=\`echo "\$1" | sed -e 's/[^=]*=//'\`
4708     shift
4709     set dummy "\$ac_option" "\$ac_optarg" \${1+"\$@"}
4710     shift
4711     ;;
4712   -*);;
4713   *) # This is not an option, so the user has probably given explicit
4714      # arguments.
4715      ac_need_defaults=false;;
4716   esac
4717
4718   case "\$1" in
4719
4720   # Handling of the options.
4721   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4722     echo "running \${CONFIG_SHELL-/bin/sh} $0 `echo "$ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'` --no-create --no-recursion"
4723     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4724   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4725     echo "\$ac_cs_version"; exit 0 ;;
4726   --he | --h)
4727     # Conflict between --help and --header
4728     echo "$CONFIG_STATUS: ambiguous option: \$ac_option
4729 Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
4730   -help | --help | --hel )
4731     echo "\$ac_cs_usage"; exit 0 ;;
4732   --file | --fil | --fi | --f )
4733     shift
4734     CONFIG_FILES="\$CONFIG_FILES \$1"
4735     ac_need_defaults=false;;
4736   --header | --heade | --head | --hea )
4737     shift
4738     CONFIG_HEADERS="\$CONFIG_FILES \$1"
4739     ac_need_defaults=false;;
4740
4741   # Handling of arguments.
4742   'Makefile' ) CONFIG_FILES="\$CONFIG_FILES Makefile" ;;
4743   'mpz/Makefile' ) CONFIG_FILES="\$CONFIG_FILES mpz/Makefile" ;;
4744   'mpn/Makefile' ) CONFIG_FILES="\$CONFIG_FILES mpn/Makefile" ;;
4745   '$gmp_links' ) CONFIG_LINKS="\$CONFIG_LINKS $gmp_links" ;;
4746   'default-1' ) CONFIG_COMMANDS="\$CONFIG_COMMANDS default-1" ;;
4747   'config.h' ) CONFIG_HEADERS="\$CONFIG_HEADERS config.h:config.in" ;;
4748
4749   # This is an error.
4750   -*) echo "$CONFIG_STATUS: unrecognized option: \$1
4751 Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
4752   *) echo "$CONFIG_STATUS: invalid argument: \$1"; exit 1 ;;
4753   esac
4754   shift
4755 done
4756
4757 EOF
4758
4759 cat >>$CONFIG_STATUS <<\EOF
4760 # If the user did not use the arguments to specify the items to instantiate,
4761 # then the envvar interface is used.  Set only those that are not.
4762 if $ac_need_defaults; then
4763   : ${CONFIG_FILES=$config_files}
4764   : ${CONFIG_HEADERS=$config_headers}
4765   : ${CONFIG_LINKS=$config_links}
4766   : ${CONFIG_COMMANDS=$config_commands}
4767 fi
4768
4769 # Trap to remove the temp files.
4770 trap 'rm -fr $ac_cs_root*; exit 1' 1 2 15
4771
4772 EOF
4773
4774 cat >>$CONFIG_STATUS <<EOF
4775 #
4776 # INIT-COMMANDS section.
4777 #
4778
4779 EOF
4780
4781 cat >>$CONFIG_STATUS <<EOF
4782
4783 #
4784 # CONFIG_FILES section.
4785 #
4786
4787 # No need to generate the scripts if there are no CONFIG_FILES.
4788 # This happens for instance when ./config.status config.h
4789 if test -n "\$CONFIG_FILES"; then
4790   # Protect against being on the right side of a sed subst in config.status.
4791   sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g;
4792    s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' >\$ac_cs_root.subs <<\\CEOF
4793 s%@exec_prefix@%$exec_prefix%;t t
4794 s%@prefix@%$prefix%;t t
4795 s%@program_transform_name@%$program_transform_name%;t t
4796 s%@bindir@%$bindir%;t t
4797 s%@sbindir@%$sbindir%;t t
4798 s%@libexecdir@%$libexecdir%;t t
4799 s%@datadir@%$datadir%;t t
4800 s%@sysconfdir@%$sysconfdir%;t t
4801 s%@sharedstatedir@%$sharedstatedir%;t t
4802 s%@localstatedir@%$localstatedir%;t t
4803 s%@libdir@%$libdir%;t t
4804 s%@includedir@%$includedir%;t t
4805 s%@oldincludedir@%$oldincludedir%;t t
4806 s%@infodir@%$infodir%;t t
4807 s%@mandir@%$mandir%;t t
4808 s%@SHELL@%$SHELL%;t t
4809 s%@ECHO_C@%$ECHO_C%;t t
4810 s%@ECHO_N@%$ECHO_N%;t t
4811 s%@ECHO_T@%$ECHO_T%;t t
4812 s%@CFLAGS@%$CFLAGS%;t t
4813 s%@CPPFLAGS@%$CPPFLAGS%;t t
4814 s%@CXXFLAGS@%$CXXFLAGS%;t t
4815 s%@FFLAGS@%$FFLAGS%;t t
4816 s%@DEFS@%$DEFS%;t t
4817 s%@LDFLAGS@%$LDFLAGS%;t t
4818 s%@LIBS@%$LIBS%;t t
4819 s%@host@%$host%;t t
4820 s%@host_alias@%$host_alias%;t t
4821 s%@host_cpu@%$host_cpu%;t t
4822 s%@host_vendor@%$host_vendor%;t t
4823 s%@host_os@%$host_os%;t t
4824 s%@target@%$target%;t t
4825 s%@target_alias@%$target_alias%;t t
4826 s%@target_cpu@%$target_cpu%;t t
4827 s%@target_vendor@%$target_vendor%;t t
4828 s%@target_os@%$target_os%;t t
4829 s%@build@%$build%;t t
4830 s%@build_alias@%$build_alias%;t t
4831 s%@build_cpu@%$build_cpu%;t t
4832 s%@build_vendor@%$build_vendor%;t t
4833 s%@build_os@%$build_os%;t t
4834 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%;t t
4835 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%;t t
4836 s%@INSTALL_DATA@%$INSTALL_DATA%;t t
4837 s%@PACKAGE@%$PACKAGE%;t t
4838 s%@VERSION@%$VERSION%;t t
4839 s%@ACLOCAL@%$ACLOCAL%;t t
4840 s%@AUTOCONF@%$AUTOCONF%;t t
4841 s%@AUTOMAKE@%$AUTOMAKE%;t t
4842 s%@AUTOHEADER@%$AUTOHEADER%;t t
4843 s%@MAKEINFO@%$MAKEINFO%;t t
4844 s%@AMTAR@%$AMTAR%;t t
4845 s%@install_sh@%$install_sh%;t t
4846 s%@AWK@%$AWK%;t t
4847 s%@SET_MAKE@%$SET_MAKE%;t t
4848 s%@AMDEP@%$AMDEP%;t t
4849 s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%;t t
4850 s%@DEPDIR@%$DEPDIR%;t t
4851 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%;t t
4852 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%;t t
4853 s%@MAINT@%$MAINT%;t t
4854 s%@WANT_MPBSD_TRUE@%$WANT_MPBSD_TRUE%;t t
4855 s%@WANT_MPBSD_FALSE@%$WANT_MPBSD_FALSE%;t t
4856 s%@WANT_MPFR_TRUE@%$WANT_MPFR_TRUE%;t t
4857 s%@WANT_MPFR_FALSE@%$WANT_MPFR_FALSE%;t t
4858 s%@CC@%$CC%;t t
4859 s%@CCAS@%$CCAS%;t t
4860 s%@CPP@%$CPP%;t t
4861 s%@LN_S@%$LN_S%;t t
4862 s%@M4@%$M4%;t t
4863 s%@AR@%$AR%;t t
4864 s%@CALLING_CONVENTIONS_OBJS@%$CALLING_CONVENTIONS_OBJS%;t t
4865 s%@SPEED_CYCLECOUNTER_OBJS@%$SPEED_CYCLECOUNTER_OBJS%;t t
4866 s%@EXEEXT@%$EXEEXT%;t t
4867 s%@OBJEXT@%$OBJEXT%;t t
4868 s%@RANLIB@%$RANLIB%;t t
4869 s%@STRIP@%$STRIP%;t t
4870 s%@LIBTOOL@%$LIBTOOL%;t t
4871 s%@U@%$U%;t t
4872 s%@ANSI2KNR@%$ANSI2KNR%;t t
4873 s%@mpn_objects@%$mpn_objects%;t t
4874 s%@mpn_objs_in_libgmp@%$mpn_objs_in_libgmp%;t t
4875 s%@gmp_srclinks@%$gmp_srclinks%;t t
4876 CEOF
4877
4878 EOF
4879
4880   cat >>$CONFIG_STATUS <<\EOF
4881   # Split the substitutions into bite-sized pieces for seds with
4882   # small command number limits, like on Digital OSF/1 and HP-UX.
4883   ac_max_sed_lines=48
4884   ac_sed_frag=1 # Number of current file.
4885   ac_beg=1 # First line for current file.
4886   ac_end=$ac_max_sed_lines # Line after last line for current file.
4887   ac_more_lines=:
4888   ac_sed_cmds=""
4889   while $ac_more_lines; do
4890     if test $ac_beg -gt 1; then
4891       sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
4892     else
4893       sed "${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
4894     fi
4895     if test ! -s $ac_cs_root.sfrag; then
4896       ac_more_lines=false
4897       rm -f $ac_cs_root.sfrag
4898     else
4899       # The purpose of the label and of the branching condition is to
4900       # speed up the sed processing (if there are no `@' at all, there
4901       # is no need to browse any of the substitutions).
4902       # These are the two extra sed commands mentioned above.
4903       (echo ':t
4904   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $ac_cs_root.sfrag) >$ac_cs_root.s$ac_sed_frag
4905       if test -z "$ac_sed_cmds"; then
4906         ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
4907       else
4908         ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag"
4909       fi
4910       ac_sed_frag=`expr $ac_sed_frag + 1`
4911       ac_beg=$ac_end
4912       ac_end=`expr $ac_end + $ac_max_sed_lines`
4913     fi
4914   done
4915   if test -z "$ac_sed_cmds"; then
4916     ac_sed_cmds=cat
4917   fi
4918 fi # test -n "$CONFIG_FILES"
4919
4920 EOF
4921 cat >>$CONFIG_STATUS <<\EOF
4922 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4923   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4924   case "$ac_file" in
4925   *:*) ac_file_in=`echo "$ac_file" | sed 's%[^:]*:%%'`
4926        ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
4927   *) ac_file_in="${ac_file}.in" ;;
4928   esac
4929
4930   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4931
4932   # Remove last slash and all that follows it.  Not all systems have dirname.
4933   ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
4934   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4935     # The file is in a subdirectory.
4936     test ! -d "$ac_dir" && mkdir "$ac_dir"
4937     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4938     # A "../" for each directory in $ac_dir_suffix.
4939     ac_dots=`echo "$ac_dir_suffix" | sed 's%/[^/]*%../%g'`
4940   else
4941     ac_dir_suffix= ac_dots=
4942   fi
4943
4944   case "$ac_given_srcdir" in
4945   .)  srcdir=.
4946       if test -z "$ac_dots"; then top_srcdir=.
4947       else top_srcdir=`echo $ac_dots | sed 's%/$%%'`; fi ;;
4948   [\\/]* | ?:[\\/]* )
4949       srcdir="$ac_given_srcdir$ac_dir_suffix";
4950       top_srcdir=$ac_given_srcdir ;;
4951   *) # Relative path.
4952     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4953     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4954   esac
4955
4956   case "$ac_given_INSTALL" in
4957   [\\/$]* | ?:[\\/]* ) INSTALL="$ac_given_INSTALL" ;;
4958   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4959   esac
4960
4961   echo creating "$ac_file"
4962   rm -f "$ac_file"
4963   configure_input="Generated automatically from `echo $ac_file_in |
4964                                                  sed 's%.*/%%'` by configure."
4965   case "$ac_file" in
4966   *[Mm]akefile*) ac_comsub="1i\\
4967 # $configure_input" ;;
4968   *) ac_comsub= ;;
4969   esac
4970
4971   # Don't redirect the output to AC_FILE directly: use `mv' so that updating
4972   # is atomic, and doesn't need trapping.
4973   ac_file_inputs=`echo "$ac_file_in" |
4974                   sed -e "s%:% $ac_given_srcdir/%g;s%^%$ac_given_srcdir/%"`
4975   for ac_file_input in $ac_file_inputs;
4976   do
4977     test -f "$ac_file_input" ||
4978         { echo "configure: error: cannot find input file \`$ac_file_input'" 1>&2; exit 1; }
4979   done
4980 EOF
4981 cat >>$CONFIG_STATUS <<EOF
4982   sed -e "$ac_comsub
4983 $ac_vpsub
4984 $extrasub
4985 EOF
4986 cat >>$CONFIG_STATUS <<\EOF
4987 :t
4988 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
4989 s%@configure_input@%$configure_input%;t t
4990 s%@srcdir@%$srcdir%;t t
4991 s%@top_srcdir@%$top_srcdir%;t t
4992 s%@INSTALL@%$INSTALL%;t t
4993 " $ac_file_inputs | (eval "$ac_sed_cmds") >$ac_cs_root.out
4994   mv $ac_cs_root.out $ac_file
4995
4996 fi; done
4997 rm -f $ac_cs_root.s*
4998 EOF
4999 cat >>$CONFIG_STATUS <<\EOF
5000
5001 #
5002 # CONFIG_HEADER section.
5003 #
5004
5005 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5006 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5007 #
5008 # ac_d sets the value in "#define NAME VALUE" lines.
5009 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5010 ac_dB='[        ].*$%\1#\2'
5011 ac_dC=' '
5012 ac_dD='%;t'
5013 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5014 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5015 ac_uB='$%\1#\2define\3'
5016 ac_uC=' '
5017 ac_uD='%;t'
5018
5019 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5020   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5021   case "$ac_file" in
5022   *:*) ac_file_in=`echo "$ac_file" | sed 's%[^:]*:%%'`
5023        ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
5024   *) ac_file_in="${ac_file}.in" ;;
5025   esac
5026
5027   echo creating $ac_file
5028
5029   rm -f $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out
5030   ac_file_inputs=`echo "$ac_file_in" |
5031                   sed -e "s%:% $ac_given_srcdir/%g;s%^%$ac_given_srcdir/%"`
5032     for ac_file_input in $ac_file_inputs;
5033   do
5034     test -f "$ac_file_input" ||
5035         { echo "configure: error: cannot find input file \`$ac_file_input'" 1>&2; exit 1; }
5036   done
5037   # Remove the trailing spaces.
5038   sed -e 's/[   ]*$//' $ac_file_inputs >$ac_cs_root.in
5039
5040 EOF
5041
5042 # Transform confdefs.h into two sed scripts, `conftest.defines' and
5043 # `conftest.undefs', that substitutes the proper values into
5044 # config.h.in to produce config.h.  The first handles `#define'
5045 # templates, and the second `#undef' templates.
5046 # And first: Protect against being on the right side of a sed subst in
5047 # config.status.  Protect against being in an unquoted here document
5048 # in config.status.
5049 rm -f conftest.defines conftest.undefs
5050 ac_cs_root=conftest
5051 cat >$ac_cs_root.hdr <<\EOF
5052 s/[\\&%]/\\&/g
5053 s%[\\$`]%\\&%g
5054 t clear
5055 : clear
5056 s%^[    ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp
5057 t cleanup
5058 s%^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5059 : cleanup
5060 EOF
5061 # If some macros were called several times there might be several times
5062 # the same #defines, which is useless.  Nevertheless, we may not want to
5063 # sort them, since we want the *last* AC_DEFINE to be honored.
5064 uniq confdefs.h | sed -n -f $ac_cs_root.hdr >conftest.defines
5065 sed -e 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
5066 rm -f $ac_cs_root.hdr
5067
5068 # This sed command replaces #undef with comments.  This is necessary, for
5069 # example, in the case of _POSIX_SOURCE, which is predefined and required
5070 # on some systems where configure will not decide to define it.
5071 cat >>conftest.undefs <<\EOF
5072 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5073 EOF
5074
5075 # Break up conftest.defines because some shells have a limit on the size
5076 # of here documents, and old seds have small limits too (100 cmds).
5077 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
5078 echo '  if egrep "^[    ]*#[    ]*define" $ac_cs_root.in >/dev/null; then' >>$CONFIG_STATUS
5079 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
5080 echo '  :' >>$CONFIG_STATUS
5081 rm -f conftest.tail
5082 while grep . conftest.defines >/dev/null
5083 do
5084   # Write a limited-size here document to $ac_cs_root.frag.
5085   echo '  cat >$ac_cs_root.frag <<CEOF' >>$CONFIG_STATUS
5086   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
5087   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
5088   echo 'CEOF
5089   sed -f $ac_cs_root.frag $ac_cs_root.in >$ac_cs_root.out
5090   rm -f $ac_cs_root.in
5091   mv $ac_cs_root.out $ac_cs_root.in
5092 ' >>$CONFIG_STATUS
5093   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
5094   rm -f conftest.defines
5095   mv conftest.tail conftest.defines
5096 done
5097 rm -f conftest.defines
5098 echo '  fi # egrep' >>$CONFIG_STATUS
5099 echo >>$CONFIG_STATUS
5100
5101 # Break up conftest.undefs because some shells have a limit on the size
5102 # of here documents, and old seds have small limits too (100 cmds).
5103 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
5104 rm -f conftest.tail
5105 while grep . conftest.undefs >/dev/null
5106 do
5107   # Write a limited-size here document to $ac_cs_root.frag.
5108   echo '  cat >$ac_cs_root.frag <<CEOF' >>$CONFIG_STATUS
5109   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
5110   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
5111   echo 'CEOF
5112   sed -f $ac_cs_root.frag $ac_cs_root.in >$ac_cs_root.out
5113   rm -f $ac_cs_root.in
5114   mv $ac_cs_root.out $ac_cs_root.in
5115 ' >>$CONFIG_STATUS
5116   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
5117   rm -f conftest.undefs
5118   mv conftest.tail conftest.undefs
5119 done
5120 rm -f conftest.undefs
5121
5122 cat >>$CONFIG_STATUS <<\EOF
5123   rm -f $ac_cs_root.frag $ac_cs_root.h
5124   echo "/* $ac_file.  Generated automatically by configure.  */" >$ac_cs_root.h
5125   cat $ac_cs_root.in >>$ac_cs_root.h
5126   rm -f $ac_cs_root.in
5127   if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then
5128     echo "$ac_file is unchanged"
5129     rm -f $ac_cs_root.h
5130   else
5131     # Remove last slash and all that follows it.  Not all systems have dirname.
5132     ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
5133     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5134       # The file is in a subdirectory.
5135       test ! -d "$ac_dir" && mkdir "$ac_dir"
5136     fi
5137     rm -f $ac_file
5138     mv $ac_cs_root.h $ac_file
5139   fi
5140 fi; done
5141 EOF
5142 cat >>$CONFIG_STATUS <<\EOF
5143
5144 #
5145 # CONFIG_LINKS section.
5146 #
5147 srcdir=$ac_given_srcdir
5148
5149 for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then
5150   ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
5151   ac_source=`echo "$ac_file" | sed 's%[^:]*:%%'`
5152
5153   echo "copying $srcdir/$ac_source to $ac_dest"
5154
5155   if test ! -r $srcdir/$ac_source; then
5156     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5157   fi
5158   rm -f $ac_dest
5159
5160   # Make relative symlinks.
5161   # Remove last slash and all that follows it.  Not all systems have dirname.
5162   ac_dest_dir=`echo $ac_dest | sed 's%/[^/][^/]*$%%'`
5163   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5164     # The dest file is in a subdirectory.
5165     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5166     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5167     # A "../" for each directory in $ac_dest_dir_suffix.
5168     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5169   else
5170     ac_dest_dir_suffix= ac_dots=
5171   fi
5172
5173   case "$srcdir" in
5174   [\\/$]* | ?:[\\/]* ) ac_rel_source="$srcdir/$ac_source" ;;
5175       *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5176   esac
5177
5178   # Make a symlink if possible; otherwise try a hard link.
5179   #if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5180   #   ln $srcdir/$ac_source $ac_dest; then :
5181   if cp $srcdir/$ac_source $ac_dest; then :
5182   else
5183     { echo "configure: error: cannot copy $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5184   fi
5185 fi; done
5186 EOF
5187 cat >>$CONFIG_STATUS <<\EOF
5188
5189 #
5190 # CONFIG_COMMANDS section.
5191 #
5192 for ac_file in .. $CONFIG_COMMANDS; do if test "x$ac_file" != x..; then
5193   ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
5194   ac_source=`echo "$ac_file" | sed 's%[^:]*:%%'`
5195
5196   case "$ac_dest" in
5197     default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
5198   esac
5199 fi;done
5200 EOF
5201
5202 cat >>$CONFIG_STATUS <<\EOF
5203
5204 exit 0
5205 EOF
5206 chmod +x $CONFIG_STATUS
5207 rm -fr confdefs* $ac_clean_files
5208 trap 'exit 1' 1 2 15
5209
5210 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1