OSDN Git Service

Fri Mar 24 15:34:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
[pf3gnuchains/pf3gnuchains3x.git] / newlib / libm / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-newlib-hw-fp    Turn on hardware floating point math"
16 ac_help="$ac_help
17   --enable-multilib         build many library versions (default)"
18 ac_help="$ac_help
19   --enable-target-optspace  optimize for space"
20 ac_help="$ac_help
21   --enable-newlib-mb        enable multibyte support"
22 ac_help="$ac_help
23   --enable-maintainer-mode enable make rules and dependencies not useful
24                           (and sometimes confusing) to the casual installer"
25
26 # Initialize some variables set by options.
27 # The variables have the same names as the options, with
28 # dashes changed to underlines.
29 build=NONE
30 cache_file=./config.cache
31 exec_prefix=NONE
32 host=NONE
33 no_create=
34 nonopt=NONE
35 no_recursion=
36 prefix=NONE
37 program_prefix=NONE
38 program_suffix=NONE
39 program_transform_name=s,x,x,
40 silent=
41 site=
42 sitefile=
43 srcdir=
44 target=NONE
45 verbose=
46 x_includes=NONE
47 x_libraries=NONE
48 bindir='${exec_prefix}/bin'
49 sbindir='${exec_prefix}/sbin'
50 libexecdir='${exec_prefix}/libexec'
51 datadir='${prefix}/share'
52 sysconfdir='${prefix}/etc'
53 sharedstatedir='${prefix}/com'
54 localstatedir='${prefix}/var'
55 libdir='${exec_prefix}/lib'
56 includedir='${prefix}/include'
57 oldincludedir='/usr/include'
58 infodir='${prefix}/info'
59 mandir='${prefix}/man'
60
61 # Initialize some other variables.
62 subdirs=
63 MFLAGS= MAKEFLAGS=
64 SHELL=${CONFIG_SHELL-/bin/sh}
65 # Maximum number of lines to put in a shell here document.
66 ac_max_here_lines=12
67
68 ac_prev=
69 for ac_option
70 do
71
72   # If the previous option needs an argument, assign it.
73   if test -n "$ac_prev"; then
74     eval "$ac_prev=\$ac_option"
75     ac_prev=
76     continue
77   fi
78
79   case "$ac_option" in
80   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81   *) ac_optarg= ;;
82   esac
83
84   # Accept the important Cygnus configure options, so we can diagnose typos.
85
86   case "$ac_option" in
87
88   -bindir | --bindir | --bindi | --bind | --bin | --bi)
89     ac_prev=bindir ;;
90   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91     bindir="$ac_optarg" ;;
92
93   -build | --build | --buil | --bui | --bu)
94     ac_prev=build ;;
95   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96     build="$ac_optarg" ;;
97
98   -cache-file | --cache-file | --cache-fil | --cache-fi \
99   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100     ac_prev=cache_file ;;
101   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103     cache_file="$ac_optarg" ;;
104
105   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106     ac_prev=datadir ;;
107   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108   | --da=*)
109     datadir="$ac_optarg" ;;
110
111   -disable-* | --disable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     eval "enable_${ac_feature}=no" ;;
119
120   -enable-* | --enable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     case "$ac_option" in
128       *=*) ;;
129       *) ac_optarg=yes ;;
130     esac
131     eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135   | --exec | --exe | --ex)
136     ac_prev=exec_prefix ;;
137   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139   | --exec=* | --exe=* | --ex=*)
140     exec_prefix="$ac_optarg" ;;
141
142   -gas | --gas | --ga | --g)
143     # Obsolete; use --with-gas.
144     with_gas=yes ;;
145
146   -help | --help | --hel | --he)
147     # Omit some internal or obsolete options to make the list less imposing.
148     # This message is too long to be a string in the A/UX 3.1 sh.
149     cat << EOF
150 Usage: configure [options] [host]
151 Options: [defaults in brackets after descriptions]
152 Configuration:
153   --cache-file=FILE       cache test results in FILE
154   --help                  print this message
155   --no-create             do not create output files
156   --quiet, --silent       do not print \`checking...' messages
157   --site-file=FILE        use FILE as the site file
158   --version               print the version of autoconf that created configure
159 Directory and file names:
160   --prefix=PREFIX         install architecture-independent files in PREFIX
161                           [$ac_default_prefix]
162   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
163                           [same as prefix]
164   --bindir=DIR            user executables in DIR [EPREFIX/bin]
165   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
166   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
167   --datadir=DIR           read-only architecture-independent data in DIR
168                           [PREFIX/share]
169   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
170   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
171                           [PREFIX/com]
172   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
173   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
174   --includedir=DIR        C header files in DIR [PREFIX/include]
175   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
176   --infodir=DIR           info documentation in DIR [PREFIX/info]
177   --mandir=DIR            man documentation in DIR [PREFIX/man]
178   --srcdir=DIR            find the sources in DIR [configure dir or ..]
179   --program-prefix=PREFIX prepend PREFIX to installed program names
180   --program-suffix=SUFFIX append SUFFIX to installed program names
181   --program-transform-name=PROGRAM
182                           run sed PROGRAM on installed program names
183 EOF
184     cat << EOF
185 Host type:
186   --build=BUILD           configure for building on BUILD [BUILD=HOST]
187   --host=HOST             configure for HOST [guessed]
188   --target=TARGET         configure for TARGET [TARGET=HOST]
189 Features and packages:
190   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
191   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
192   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
193   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
194   --x-includes=DIR        X include files are in DIR
195   --x-libraries=DIR       X library files are in DIR
196 EOF
197     if test -n "$ac_help"; then
198       echo "--enable and --with options recognized:$ac_help"
199     fi
200     exit 0 ;;
201
202   -host | --host | --hos | --ho)
203     ac_prev=host ;;
204   -host=* | --host=* | --hos=* | --ho=*)
205     host="$ac_optarg" ;;
206
207   -includedir | --includedir | --includedi | --included | --include \
208   | --includ | --inclu | --incl | --inc)
209     ac_prev=includedir ;;
210   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
211   | --includ=* | --inclu=* | --incl=* | --inc=*)
212     includedir="$ac_optarg" ;;
213
214   -infodir | --infodir | --infodi | --infod | --info | --inf)
215     ac_prev=infodir ;;
216   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
217     infodir="$ac_optarg" ;;
218
219   -libdir | --libdir | --libdi | --libd)
220     ac_prev=libdir ;;
221   -libdir=* | --libdir=* | --libdi=* | --libd=*)
222     libdir="$ac_optarg" ;;
223
224   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
225   | --libexe | --libex | --libe)
226     ac_prev=libexecdir ;;
227   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
228   | --libexe=* | --libex=* | --libe=*)
229     libexecdir="$ac_optarg" ;;
230
231   -localstatedir | --localstatedir | --localstatedi | --localstated \
232   | --localstate | --localstat | --localsta | --localst \
233   | --locals | --local | --loca | --loc | --lo)
234     ac_prev=localstatedir ;;
235   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
236   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
237   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
238     localstatedir="$ac_optarg" ;;
239
240   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241     ac_prev=mandir ;;
242   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
243     mandir="$ac_optarg" ;;
244
245   -nfp | --nfp | --nf)
246     # Obsolete; use --without-fp.
247     with_fp=no ;;
248
249   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250   | --no-cr | --no-c)
251     no_create=yes ;;
252
253   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
254   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255     no_recursion=yes ;;
256
257   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
258   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
259   | --oldin | --oldi | --old | --ol | --o)
260     ac_prev=oldincludedir ;;
261   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
262   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
263   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
264     oldincludedir="$ac_optarg" ;;
265
266   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267     ac_prev=prefix ;;
268   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
269     prefix="$ac_optarg" ;;
270
271   -program-prefix | --program-prefix | --program-prefi | --program-pref \
272   | --program-pre | --program-pr | --program-p)
273     ac_prev=program_prefix ;;
274   -program-prefix=* | --program-prefix=* | --program-prefi=* \
275   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
276     program_prefix="$ac_optarg" ;;
277
278   -program-suffix | --program-suffix | --program-suffi | --program-suff \
279   | --program-suf | --program-su | --program-s)
280     ac_prev=program_suffix ;;
281   -program-suffix=* | --program-suffix=* | --program-suffi=* \
282   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
283     program_suffix="$ac_optarg" ;;
284
285   -program-transform-name | --program-transform-name \
286   | --program-transform-nam | --program-transform-na \
287   | --program-transform-n | --program-transform- \
288   | --program-transform | --program-transfor \
289   | --program-transfo | --program-transf \
290   | --program-trans | --program-tran \
291   | --progr-tra | --program-tr | --program-t)
292     ac_prev=program_transform_name ;;
293   -program-transform-name=* | --program-transform-name=* \
294   | --program-transform-nam=* | --program-transform-na=* \
295   | --program-transform-n=* | --program-transform-=* \
296   | --program-transform=* | --program-transfor=* \
297   | --program-transfo=* | --program-transf=* \
298   | --program-trans=* | --program-tran=* \
299   | --progr-tra=* | --program-tr=* | --program-t=*)
300     program_transform_name="$ac_optarg" ;;
301
302   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
303   | -silent | --silent | --silen | --sile | --sil)
304     silent=yes ;;
305
306   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307     ac_prev=sbindir ;;
308   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309   | --sbi=* | --sb=*)
310     sbindir="$ac_optarg" ;;
311
312   -sharedstatedir | --sharedstatedir | --sharedstatedi \
313   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
314   | --sharedst | --shareds | --shared | --share | --shar \
315   | --sha | --sh)
316     ac_prev=sharedstatedir ;;
317   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
318   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
319   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320   | --sha=* | --sh=*)
321     sharedstatedir="$ac_optarg" ;;
322
323   -site | --site | --sit)
324     ac_prev=site ;;
325   -site=* | --site=* | --sit=*)
326     site="$ac_optarg" ;;
327
328   -site-file | --site-file | --site-fil | --site-fi | --site-f)
329     ac_prev=sitefile ;;
330   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
331     sitefile="$ac_optarg" ;;
332
333   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
334     ac_prev=srcdir ;;
335   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
336     srcdir="$ac_optarg" ;;
337
338   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
339   | --syscon | --sysco | --sysc | --sys | --sy)
340     ac_prev=sysconfdir ;;
341   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
342   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
343     sysconfdir="$ac_optarg" ;;
344
345   -target | --target | --targe | --targ | --tar | --ta | --t)
346     ac_prev=target ;;
347   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
348     target="$ac_optarg" ;;
349
350   -v | -verbose | --verbose | --verbos | --verbo | --verb)
351     verbose=yes ;;
352
353   -version | --version | --versio | --versi | --vers)
354     echo "configure generated by autoconf version 2.13"
355     exit 0 ;;
356
357   -with-* | --with-*)
358     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
359     # Reject names that are not valid shell variable names.
360     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
361       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362     fi
363     ac_package=`echo $ac_package| sed 's/-/_/g'`
364     case "$ac_option" in
365       *=*) ;;
366       *) ac_optarg=yes ;;
367     esac
368     eval "with_${ac_package}='$ac_optarg'" ;;
369
370   -without-* | --without-*)
371     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
372     # Reject names that are not valid shell variable names.
373     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
374       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375     fi
376     ac_package=`echo $ac_package| sed 's/-/_/g'`
377     eval "with_${ac_package}=no" ;;
378
379   --x)
380     # Obsolete; use --with-x.
381     with_x=yes ;;
382
383   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
384   | --x-incl | --x-inc | --x-in | --x-i)
385     ac_prev=x_includes ;;
386   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
387   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
388     x_includes="$ac_optarg" ;;
389
390   -x-libraries | --x-libraries | --x-librarie | --x-librari \
391   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
392     ac_prev=x_libraries ;;
393   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
394   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
395     x_libraries="$ac_optarg" ;;
396
397   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398     ;;
399
400   *)
401     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
402       echo "configure: warning: $ac_option: invalid host type" 1>&2
403     fi
404     if test "x$nonopt" != xNONE; then
405       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406     fi
407     nonopt="$ac_option"
408     ;;
409
410   esac
411 done
412
413 if test -n "$ac_prev"; then
414   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415 fi
416
417 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418
419 # File descriptor usage:
420 # 0 standard input
421 # 1 file creation
422 # 2 errors and warnings
423 # 3 some systems may open it to /dev/tty
424 # 4 used on the Kubota Titan
425 # 6 checking for... messages and results
426 # 5 compiler messages saved in config.log
427 if test "$silent" = yes; then
428   exec 6>/dev/null
429 else
430   exec 6>&1
431 fi
432 exec 5>./config.log
433
434 echo "\
435 This file contains any messages produced by compilers while
436 running configure, to aid debugging if configure makes a mistake.
437 " 1>&5
438
439 # Strip out --no-create and --no-recursion so they do not pile up.
440 # Also quote any args containing shell metacharacters.
441 ac_configure_args=
442 for ac_arg
443 do
444   case "$ac_arg" in
445   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446   | --no-cr | --no-c) ;;
447   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
452   esac
453 done
454
455 # NLS nuisances.
456 # Only set these to C if already set.  These must not be set unconditionally
457 # because not all systems understand e.g. LANG=C (notably SCO).
458 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
459 # Non-C LC_CTYPE values break the ctype check.
460 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
461 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
463 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
464
465 # confdefs.h avoids OS command line length limits that DEFS can exceed.
466 rm -rf conftest* confdefs.h
467 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
468 echo > confdefs.h
469
470 # A filename unique to this package, relative to the directory that
471 # configure is in, which we can look for to find out if srcdir is correct.
472 ac_unique_file=libm.texinfo
473
474 # Find the source files, if location was not specified.
475 if test -z "$srcdir"; then
476   ac_srcdir_defaulted=yes
477   # Try the directory containing this script, then its parent.
478   ac_prog=$0
479   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
480   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
481   srcdir=$ac_confdir
482   if test ! -r $srcdir/$ac_unique_file; then
483     srcdir=..
484   fi
485 else
486   ac_srcdir_defaulted=no
487 fi
488 if test ! -r $srcdir/$ac_unique_file; then
489   if test "$ac_srcdir_defaulted" = yes; then
490     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
491   else
492     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493   fi
494 fi
495 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496
497 # Prefer explicitly selected file to automatically selected ones.
498 if test -z "$sitefile"; then
499   if test -z "$CONFIG_SITE"; then
500     if test "x$prefix" != xNONE; then
501       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
502     else
503       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
504     fi
505   fi
506 else
507   CONFIG_SITE="$sitefile"
508 fi
509 for ac_site_file in $CONFIG_SITE; do
510   if test -r "$ac_site_file"; then
511     echo "loading site script $ac_site_file"
512     . "$ac_site_file"
513   fi
514 done
515
516 if test -r "$cache_file"; then
517   echo "loading cache $cache_file"
518   . $cache_file
519 else
520   echo "creating cache $cache_file"
521   > $cache_file
522 fi
523
524 ac_ext=c
525 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
526 ac_cpp='$CPP $CPPFLAGS'
527 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
528 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
529 cross_compiling=$ac_cv_prog_cc_cross
530
531 ac_exeext=
532 ac_objext=o
533 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
534   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
535   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
536     ac_n= ac_c='
537 ' ac_t='        '
538   else
539     ac_n=-n ac_c= ac_t=
540   fi
541 else
542   ac_n= ac_c='\c' ac_t=
543 fi
544
545
546
547 # Check whether --enable-newlib_hw_fp or --disable-newlib_hw_fp was given.
548 if test "${enable_newlib_hw_fp+set}" = set; then
549   enableval="$enable_newlib_hw_fp"
550   case "${enableval}" in
551    yes) newlib_hw_fp=true ;;
552    no)  newlib_hw_fp=false ;;
553    *) { echo "configure: error: bad value ${enableval} for --enable-newlib-hw-fp" 1>&2; exit 1; } ;;
554  esac
555 else
556   newlib_hw_fp=false
557 fi
558
559
560
561 if test x$newlib_hw_fp = xtrue; then
562   NEWLIB_HW_FP_TRUE=
563   NEWLIB_HW_FP_FALSE='#'
564 else
565   NEWLIB_HW_FP_TRUE='#'
566   NEWLIB_HW_FP_FALSE=
567 fi
568
569 ac_aux_dir=
570 for ac_dir in ../.. $srcdir/../..; do
571   if test -f $ac_dir/install-sh; then
572     ac_aux_dir=$ac_dir
573     ac_install_sh="$ac_aux_dir/install-sh -c"
574     break
575   elif test -f $ac_dir/install.sh; then
576     ac_aux_dir=$ac_dir
577     ac_install_sh="$ac_aux_dir/install.sh -c"
578     break
579   fi
580 done
581 if test -z "$ac_aux_dir"; then
582   { echo "configure: error: can not find install-sh or install.sh in ../.. $srcdir/../.." 1>&2; exit 1; }
583 fi
584 ac_config_guess=$ac_aux_dir/config.guess
585 ac_config_sub=$ac_aux_dir/config.sub
586 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
587
588
589 # Find a good install program.  We prefer a C program (faster),
590 # so one script is as good as another.  But avoid the broken or
591 # incompatible versions:
592 # SysV /etc/install, /usr/sbin/install
593 # SunOS /usr/etc/install
594 # IRIX /sbin/install
595 # AIX /bin/install
596 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
597 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
598 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
599 # ./install, which can be erroneously created by make from ./install.sh.
600 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
601 echo "configure:602: checking for a BSD compatible install" >&5
602 if test -z "$INSTALL"; then
603 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
604   echo $ac_n "(cached) $ac_c" 1>&6
605 else
606     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
607   for ac_dir in $PATH; do
608     # Account for people who put trailing slashes in PATH elements.
609     case "$ac_dir/" in
610     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
611     *)
612       # OSF1 and SCO ODT 3.0 have their own names for install.
613       # Don't use installbsd from OSF since it installs stuff as root
614       # by default.
615       for ac_prog in ginstall scoinst install; do
616         if test -f $ac_dir/$ac_prog; then
617           if test $ac_prog = install &&
618             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
619             # AIX install.  It has an incompatible calling convention.
620             :
621           else
622             ac_cv_path_install="$ac_dir/$ac_prog -c"
623             break 2
624           fi
625         fi
626       done
627       ;;
628     esac
629   done
630   IFS="$ac_save_IFS"
631
632 fi
633   if test "${ac_cv_path_install+set}" = set; then
634     INSTALL="$ac_cv_path_install"
635   else
636     # As a last resort, use the slow shell script.  We don't cache a
637     # path for INSTALL within a source directory, because that will
638     # break other packages using the cache if that directory is
639     # removed, or if the path is relative.
640     INSTALL="$ac_install_sh"
641   fi
642 fi
643 echo "$ac_t""$INSTALL" 1>&6
644
645 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
646 # It thinks the first close brace ends the variable substitution.
647 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
648
649 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
650
651 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
652
653 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
654 echo "configure:655: checking whether build environment is sane" >&5
655 # Just in case
656 sleep 1
657 echo timestamp > conftestfile
658 # Do `set' in a subshell so we don't clobber the current shell's
659 # arguments.  Must try -L first in case configure is actually a
660 # symlink; some systems play weird games with the mod time of symlinks
661 # (eg FreeBSD returns the mod time of the symlink's containing
662 # directory).
663 if (
664    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
665    if test "$*" = "X"; then
666       # -L didn't work.
667       set X `ls -t $srcdir/configure conftestfile`
668    fi
669    if test "$*" != "X $srcdir/configure conftestfile" \
670       && test "$*" != "X conftestfile $srcdir/configure"; then
671
672       # If neither matched, then we have a broken ls.  This can happen
673       # if, for instance, CONFIG_SHELL is bash and it inherits a
674       # broken ls alias from the environment.  This has actually
675       # happened.  Such a system could not be considered "sane".
676       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
677 alias in your environment" 1>&2; exit 1; }
678    fi
679
680    test "$2" = conftestfile
681    )
682 then
683    # Ok.
684    :
685 else
686    { echo "configure: error: newly created file is older than distributed files!
687 Check your system clock" 1>&2; exit 1; }
688 fi
689 rm -f conftest*
690 echo "$ac_t""yes" 1>&6
691 if test "$program_transform_name" = s,x,x,; then
692   program_transform_name=
693 else
694   # Double any \ or $.  echo might interpret backslashes.
695   cat <<\EOF_SED > conftestsed
696 s,\\,\\\\,g; s,\$,$$,g
697 EOF_SED
698   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
699   rm -f conftestsed
700 fi
701 test "$program_prefix" != NONE &&
702   program_transform_name="s,^,${program_prefix},; $program_transform_name"
703 # Use a double $ so make ignores it.
704 test "$program_suffix" != NONE &&
705   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
706
707 # sed with no file args requires a program.
708 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
709
710 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
711 echo "configure:712: checking whether ${MAKE-make} sets \${MAKE}" >&5
712 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
713 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
714   echo $ac_n "(cached) $ac_c" 1>&6
715 else
716   cat > conftestmake <<\EOF
717 all:
718         @echo 'ac_maketemp="${MAKE}"'
719 EOF
720 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
721 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
722 if test -n "$ac_maketemp"; then
723   eval ac_cv_prog_make_${ac_make}_set=yes
724 else
725   eval ac_cv_prog_make_${ac_make}_set=no
726 fi
727 rm -f conftestmake
728 fi
729 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
730   echo "$ac_t""yes" 1>&6
731   SET_MAKE=
732 else
733   echo "$ac_t""no" 1>&6
734   SET_MAKE="MAKE=${MAKE-make}"
735 fi
736
737 if test $host != $build; then
738   ac_tool_prefix=${host_alias}-
739 else
740   ac_tool_prefix=
741 fi
742
743 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
744 echo "configure:745: checking for Cygwin environment" >&5
745 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
746   echo $ac_n "(cached) $ac_c" 1>&6
747 else
748   cat > conftest.$ac_ext <<EOF
749 #line 750 "configure"
750 #include "confdefs.h"
751
752 int main() {
753
754 #ifndef __CYGWIN__
755 #define __CYGWIN__ __CYGWIN32__
756 #endif
757 return __CYGWIN__;
758 ; return 0; }
759 EOF
760 if { (eval echo configure:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
761   rm -rf conftest*
762   ac_cv_cygwin=yes
763 else
764   echo "configure: failed program was:" >&5
765   cat conftest.$ac_ext >&5
766   rm -rf conftest*
767   ac_cv_cygwin=no
768 fi
769 rm -f conftest*
770 rm -f conftest*
771 fi
772
773 echo "$ac_t""$ac_cv_cygwin" 1>&6
774 CYGWIN=
775 test "$ac_cv_cygwin" = yes && CYGWIN=yes
776 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
777 echo "configure:778: checking for mingw32 environment" >&5
778 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
779   echo $ac_n "(cached) $ac_c" 1>&6
780 else
781   cat > conftest.$ac_ext <<EOF
782 #line 783 "configure"
783 #include "confdefs.h"
784
785 int main() {
786 return __MINGW32__;
787 ; return 0; }
788 EOF
789 if { (eval echo configure:790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
790   rm -rf conftest*
791   ac_cv_mingw32=yes
792 else
793   echo "configure: failed program was:" >&5
794   cat conftest.$ac_ext >&5
795   rm -rf conftest*
796   ac_cv_mingw32=no
797 fi
798 rm -f conftest*
799 rm -f conftest*
800 fi
801
802 echo "$ac_t""$ac_cv_mingw32" 1>&6
803 MINGW32=
804 test "$ac_cv_mingw32" = yes && MINGW32=yes
805
806 # Check whether --enable-multilib or --disable-multilib was given.
807 if test "${enable_multilib+set}" = set; then
808   enableval="$enable_multilib"
809   case "${enableval}" in
810   yes) multilib=yes ;;
811   no)  multilib=no ;;
812   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
813  esac
814 else
815   multilib=yes
816 fi
817
818 # Check whether --enable-target-optspace or --disable-target-optspace was given.
819 if test "${enable_target_optspace+set}" = set; then
820   enableval="$enable_target_optspace"
821   case "${enableval}" in
822   yes) target_optspace=yes ;;
823   no)  target_optspace=no ;;
824   *)   { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
825  esac
826 else
827   target_optspace=
828 fi
829
830 # Check whether --enable-newlib-mb or --disable-newlib-mb was given.
831 if test "${enable_newlib_mb+set}" = set; then
832   enableval="$enable_newlib_mb"
833   case "${enableval}" in
834   yes) newlib_mb=yes ;;
835   no)  newlib_mb=no ;;
836   *)   { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;;
837  esac
838 else
839   newlib_mb=no
840 fi
841
842
843 test -z "${with_target_subdir}" && with_target_subdir=.
844
845 if test "${srcdir}" = "."; then
846   if test "${with_target_subdir}" != "."; then
847     newlib_basedir="${srcdir}/${with_multisrctop}../.."
848   else
849     newlib_basedir="${srcdir}/${with_multisrctop}.."
850   fi
851 else
852   newlib_basedir="${srcdir}/.."
853 fi
854
855
856
857 # Make sure we can run config.sub.
858 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
859 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
860 fi
861
862 echo $ac_n "checking host system type""... $ac_c" 1>&6
863 echo "configure:864: checking host system type" >&5
864
865 host_alias=$host
866 case "$host_alias" in
867 NONE)
868   case $nonopt in
869   NONE)
870     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
871     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
872     fi ;;
873   *) host_alias=$nonopt ;;
874   esac ;;
875 esac
876
877 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
878 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
879 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
880 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
881 echo "$ac_t""$host" 1>&6
882
883
884
885 PACKAGE=newlib
886
887 VERSION=1.8.2
888
889 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
890   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
891 fi
892 cat >> confdefs.h <<EOF
893 #define PACKAGE "$PACKAGE"
894 EOF
895
896 cat >> confdefs.h <<EOF
897 #define VERSION "$VERSION"
898 EOF
899
900
901
902 missing_dir=`cd $ac_aux_dir && pwd`
903 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
904 echo "configure:905: checking for working aclocal" >&5
905 # Run test in a subshell; some versions of sh will print an error if
906 # an executable is not found, even if stderr is redirected.
907 # Redirect stdin to placate older versions of autoconf.  Sigh.
908 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
909    ACLOCAL=aclocal
910    echo "$ac_t""found" 1>&6
911 else
912    ACLOCAL="$missing_dir/missing aclocal"
913    echo "$ac_t""missing" 1>&6
914 fi
915
916 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
917 echo "configure:918: checking for working autoconf" >&5
918 # Run test in a subshell; some versions of sh will print an error if
919 # an executable is not found, even if stderr is redirected.
920 # Redirect stdin to placate older versions of autoconf.  Sigh.
921 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
922    AUTOCONF=autoconf
923    echo "$ac_t""found" 1>&6
924 else
925    AUTOCONF="$missing_dir/missing autoconf"
926    echo "$ac_t""missing" 1>&6
927 fi
928
929 echo $ac_n "checking for working automake""... $ac_c" 1>&6
930 echo "configure:931: checking for working automake" >&5
931 # Run test in a subshell; some versions of sh will print an error if
932 # an executable is not found, even if stderr is redirected.
933 # Redirect stdin to placate older versions of autoconf.  Sigh.
934 if (automake --version) < /dev/null > /dev/null 2>&1; then
935    AUTOMAKE=automake
936    echo "$ac_t""found" 1>&6
937 else
938    AUTOMAKE="$missing_dir/missing automake"
939    echo "$ac_t""missing" 1>&6
940 fi
941
942 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
943 echo "configure:944: checking for working autoheader" >&5
944 # Run test in a subshell; some versions of sh will print an error if
945 # an executable is not found, even if stderr is redirected.
946 # Redirect stdin to placate older versions of autoconf.  Sigh.
947 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
948    AUTOHEADER=autoheader
949    echo "$ac_t""found" 1>&6
950 else
951    AUTOHEADER="$missing_dir/missing autoheader"
952    echo "$ac_t""missing" 1>&6
953 fi
954
955 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
956 echo "configure:957: checking for working makeinfo" >&5
957 # Run test in a subshell; some versions of sh will print an error if
958 # an executable is not found, even if stderr is redirected.
959 # Redirect stdin to placate older versions of autoconf.  Sigh.
960 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
961    MAKEINFO=makeinfo
962    echo "$ac_t""found" 1>&6
963 else
964    MAKEINFO="$missing_dir/missing makeinfo"
965    echo "$ac_t""missing" 1>&6
966 fi
967
968
969
970 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
971 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
972 # are probably using a cross compiler, which will not be able to fully
973 # link an executable.  This should really be fixed in autoconf
974 # itself.
975
976
977
978 # Extract the first word of "gcc", so it can be a program name with args.
979 set dummy gcc; ac_word=$2
980 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
981 echo "configure:982: checking for $ac_word" >&5
982 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
983   echo $ac_n "(cached) $ac_c" 1>&6
984 else
985   if test -n "$CC"; then
986   ac_cv_prog_CC="$CC" # Let the user override the test.
987 else
988   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
989   ac_dummy="$PATH"
990   for ac_dir in $ac_dummy; do
991     test -z "$ac_dir" && ac_dir=.
992     if test -f $ac_dir/$ac_word; then
993       ac_cv_prog_CC="gcc"
994       break
995     fi
996   done
997   IFS="$ac_save_ifs"
998 fi
999 fi
1000 CC="$ac_cv_prog_CC"
1001 if test -n "$CC"; then
1002   echo "$ac_t""$CC" 1>&6
1003 else
1004   echo "$ac_t""no" 1>&6
1005 fi
1006
1007 if test -z "$CC"; then
1008   # Extract the first word of "cc", so it can be a program name with args.
1009 set dummy cc; ac_word=$2
1010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1011 echo "configure:1012: checking for $ac_word" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1013   echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015   if test -n "$CC"; then
1016   ac_cv_prog_CC="$CC" # Let the user override the test.
1017 else
1018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1019   ac_prog_rejected=no
1020   ac_dummy="$PATH"
1021   for ac_dir in $ac_dummy; do
1022     test -z "$ac_dir" && ac_dir=.
1023     if test -f $ac_dir/$ac_word; then
1024       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1025         ac_prog_rejected=yes
1026         continue
1027       fi
1028       ac_cv_prog_CC="cc"
1029       break
1030     fi
1031   done
1032   IFS="$ac_save_ifs"
1033 if test $ac_prog_rejected = yes; then
1034   # We found a bogon in the path, so make sure we never use it.
1035   set dummy $ac_cv_prog_CC
1036   shift
1037   if test $# -gt 0; then
1038     # We chose a different compiler from the bogus one.
1039     # However, it has the same basename, so the bogon will be chosen
1040     # first if we set CC to just the basename; use the full file name.
1041     shift
1042     set dummy "$ac_dir/$ac_word" "$@"
1043     shift
1044     ac_cv_prog_CC="$@"
1045   fi
1046 fi
1047 fi
1048 fi
1049 CC="$ac_cv_prog_CC"
1050 if test -n "$CC"; then
1051   echo "$ac_t""$CC" 1>&6
1052 else
1053   echo "$ac_t""no" 1>&6
1054 fi
1055
1056   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1057 fi
1058
1059 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1060 echo "configure:1061: checking whether we are using GNU C" >&5
1061 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1062   echo $ac_n "(cached) $ac_c" 1>&6
1063 else
1064   cat > conftest.c <<EOF
1065 #ifdef __GNUC__
1066   yes;
1067 #endif
1068 EOF
1069 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1070   ac_cv_prog_gcc=yes
1071 else
1072   ac_cv_prog_gcc=no
1073 fi
1074 fi
1075
1076 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1077
1078 if test $ac_cv_prog_gcc = yes; then
1079   GCC=yes
1080   ac_test_CFLAGS="${CFLAGS+set}"
1081   ac_save_CFLAGS="$CFLAGS"
1082   CFLAGS=
1083   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1084 echo "configure:1085: checking whether ${CC-cc} accepts -g" >&5
1085 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1086   echo $ac_n "(cached) $ac_c" 1>&6
1087 else
1088   echo 'void f(){}' > conftest.c
1089 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1090   ac_cv_prog_cc_g=yes
1091 else
1092   ac_cv_prog_cc_g=no
1093 fi
1094 rm -f conftest*
1095
1096 fi
1097
1098 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1099   if test "$ac_test_CFLAGS" = set; then
1100     CFLAGS="$ac_save_CFLAGS"
1101   elif test $ac_cv_prog_cc_g = yes; then
1102     CFLAGS="-g -O2"
1103   else
1104     CFLAGS="-O2"
1105   fi
1106 else
1107   GCC=
1108   test "${CFLAGS+set}" = set || CFLAGS="-g"
1109 fi
1110
1111
1112 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
1113 # run it explicitly here, it will be run implicitly before
1114 # NEWLIB_CONFIGURE, which doesn't work because that means that it will
1115 # be run before AC_CANONICAL_HOST.
1116 echo $ac_n "checking build system type""... $ac_c" 1>&6
1117 echo "configure:1118: checking build system type" >&5
1118
1119 build_alias=$build
1120 case "$build_alias" in
1121 NONE)
1122   case $nonopt in
1123   NONE) build_alias=$host_alias ;;
1124   *) build_alias=$nonopt ;;
1125   esac ;;
1126 esac
1127
1128 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1129 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1130 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1131 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1132 echo "$ac_t""$build" 1>&6
1133
1134
1135 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1136 set dummy ${ac_tool_prefix}as; ac_word=$2
1137 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1138 echo "configure:1139: checking for $ac_word" >&5
1139 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1140   echo $ac_n "(cached) $ac_c" 1>&6
1141 else
1142   if test -n "$AS"; then
1143   ac_cv_prog_AS="$AS" # Let the user override the test.
1144 else
1145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1146   ac_dummy="$PATH"
1147   for ac_dir in $ac_dummy; do
1148     test -z "$ac_dir" && ac_dir=.
1149     if test -f $ac_dir/$ac_word; then
1150       ac_cv_prog_AS="${ac_tool_prefix}as"
1151       break
1152     fi
1153   done
1154   IFS="$ac_save_ifs"
1155   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1156 fi
1157 fi
1158 AS="$ac_cv_prog_AS"
1159 if test -n "$AS"; then
1160   echo "$ac_t""$AS" 1>&6
1161 else
1162   echo "$ac_t""no" 1>&6
1163 fi
1164
1165
1166
1167 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1168 set dummy ${ac_tool_prefix}ar; ac_word=$2
1169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1170 echo "configure:1171: checking for $ac_word" >&5
1171 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   if test -n "$AR"; then
1175   ac_cv_prog_AR="$AR" # Let the user override the test.
1176 else
1177   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1178   ac_dummy="$PATH"
1179   for ac_dir in $ac_dummy; do
1180     test -z "$ac_dir" && ac_dir=.
1181     if test -f $ac_dir/$ac_word; then
1182       ac_cv_prog_AR="${ac_tool_prefix}ar"
1183       break
1184     fi
1185   done
1186   IFS="$ac_save_ifs"
1187   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1188 fi
1189 fi
1190 AR="$ac_cv_prog_AR"
1191 if test -n "$AR"; then
1192   echo "$ac_t""$AR" 1>&6
1193 else
1194   echo "$ac_t""no" 1>&6
1195 fi
1196
1197
1198
1199 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1200 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1202 echo "configure:1203: checking for $ac_word" >&5
1203 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1204   echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206   if test -n "$RANLIB"; then
1207   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1208 else
1209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1210   ac_dummy="$PATH"
1211   for ac_dir in $ac_dummy; do
1212     test -z "$ac_dir" && ac_dir=.
1213     if test -f $ac_dir/$ac_word; then
1214       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1215       break
1216     fi
1217   done
1218   IFS="$ac_save_ifs"
1219 fi
1220 fi
1221 RANLIB="$ac_cv_prog_RANLIB"
1222 if test -n "$RANLIB"; then
1223   echo "$ac_t""$RANLIB" 1>&6
1224 else
1225   echo "$ac_t""no" 1>&6
1226 fi
1227
1228
1229 if test -z "$ac_cv_prog_RANLIB"; then
1230 if test -n "$ac_tool_prefix"; then
1231   # Extract the first word of "ranlib", so it can be a program name with args.
1232 set dummy ranlib; ac_word=$2
1233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1234 echo "configure:1235: checking for $ac_word" >&5
1235 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1236   echo $ac_n "(cached) $ac_c" 1>&6
1237 else
1238   if test -n "$RANLIB"; then
1239   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1240 else
1241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1242   ac_dummy="$PATH"
1243   for ac_dir in $ac_dummy; do
1244     test -z "$ac_dir" && ac_dir=.
1245     if test -f $ac_dir/$ac_word; then
1246       ac_cv_prog_RANLIB="ranlib"
1247       break
1248     fi
1249   done
1250   IFS="$ac_save_ifs"
1251   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1252 fi
1253 fi
1254 RANLIB="$ac_cv_prog_RANLIB"
1255 if test -n "$RANLIB"; then
1256   echo "$ac_t""$RANLIB" 1>&6
1257 else
1258   echo "$ac_t""no" 1>&6
1259 fi
1260
1261 else
1262   RANLIB=":"
1263 fi
1264 fi
1265
1266
1267 # Find a good install program.  We prefer a C program (faster),
1268 # so one script is as good as another.  But avoid the broken or
1269 # incompatible versions:
1270 # SysV /etc/install, /usr/sbin/install
1271 # SunOS /usr/etc/install
1272 # IRIX /sbin/install
1273 # AIX /bin/install
1274 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1275 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1276 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1277 # ./install, which can be erroneously created by make from ./install.sh.
1278 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1279 echo "configure:1280: checking for a BSD compatible install" >&5
1280 if test -z "$INSTALL"; then
1281 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1282   echo $ac_n "(cached) $ac_c" 1>&6
1283 else
1284     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1285   for ac_dir in $PATH; do
1286     # Account for people who put trailing slashes in PATH elements.
1287     case "$ac_dir/" in
1288     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1289     *)
1290       # OSF1 and SCO ODT 3.0 have their own names for install.
1291       # Don't use installbsd from OSF since it installs stuff as root
1292       # by default.
1293       for ac_prog in ginstall scoinst install; do
1294         if test -f $ac_dir/$ac_prog; then
1295           if test $ac_prog = install &&
1296             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1297             # AIX install.  It has an incompatible calling convention.
1298             :
1299           else
1300             ac_cv_path_install="$ac_dir/$ac_prog -c"
1301             break 2
1302           fi
1303         fi
1304       done
1305       ;;
1306     esac
1307   done
1308   IFS="$ac_save_IFS"
1309
1310 fi
1311   if test "${ac_cv_path_install+set}" = set; then
1312     INSTALL="$ac_cv_path_install"
1313   else
1314     # As a last resort, use the slow shell script.  We don't cache a
1315     # path for INSTALL within a source directory, because that will
1316     # break other packages using the cache if that directory is
1317     # removed, or if the path is relative.
1318     INSTALL="$ac_install_sh"
1319   fi
1320 fi
1321 echo "$ac_t""$INSTALL" 1>&6
1322
1323 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1324 # It thinks the first close brace ends the variable substitution.
1325 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1326
1327 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1328
1329 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1330
1331
1332 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1333 echo "configure:1334: checking whether to enable maintainer-specific portions of Makefiles" >&5
1334     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1335 if test "${enable_maintainer_mode+set}" = set; then
1336   enableval="$enable_maintainer_mode"
1337   USE_MAINTAINER_MODE=$enableval
1338 else
1339   USE_MAINTAINER_MODE=no
1340 fi
1341
1342   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1343   
1344
1345 if test $USE_MAINTAINER_MODE = yes; then
1346   MAINTAINER_MODE_TRUE=
1347   MAINTAINER_MODE_FALSE='#'
1348 else
1349   MAINTAINER_MODE_TRUE='#'
1350   MAINTAINER_MODE_FALSE=
1351 fi
1352   MAINT=$MAINTAINER_MODE_TRUE
1353   
1354
1355
1356 # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
1357 # at least currently, we never actually build a program, so we never
1358 # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
1359 # fails, because we are probably configuring with a cross compiler
1360 # which can't create executables.  So we include AC_EXEEXT to keep
1361 # automake happy, but we don't execute it, since we don't care about
1362 # the result.
1363 if false; then
1364   
1365
1366 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1367 echo "configure:1368: checking for executable suffix" >&5
1368 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1369   echo $ac_n "(cached) $ac_c" 1>&6
1370 else
1371   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1372   ac_cv_exeext=.exe
1373 else
1374   rm -f conftest*
1375   echo 'int main () { return 0; }' > conftest.$ac_ext
1376   ac_cv_exeext=
1377   if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1378     for file in conftest.*; do
1379       case $file in
1380       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1381       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1382       esac
1383     done
1384   else
1385     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1386   fi
1387   rm -f conftest*
1388   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1389 fi
1390 fi
1391
1392 EXEEXT=""
1393 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1394 echo "$ac_t""${ac_cv_exeext}" 1>&6
1395 ac_exeext=$EXEEXT
1396
1397 fi
1398
1399 . ${newlib_basedir}/configure.host
1400
1401 case ${newlib_basedir} in
1402 /* | A-Za-z:/\\*) newlib_flagbasedir=${newlib_basedir} ;;
1403 *) newlib_flagbasedir='$(top_builddir)/'${newlib_basedir} ;;
1404 esac
1405
1406 newlib_cflags="${newlib_cflags} -I"'$(top_builddir)'"/../targ-include -I${newlib_flagbasedir}/libc/include"
1407 case "${host}" in
1408   *-*-cygwin*)
1409     newlib_cflags="${newlib_cflags} -I${newlib_flagbasedir}/../winsup/cygwin/include  -I${newlib_flagbasedir}/../winsup/w32api/include"
1410     ;;
1411 esac
1412
1413 newlib_cflags="${newlib_cflags} -fno-builtin"
1414
1415 NEWLIB_CFLAGS=${newlib_cflags}
1416
1417
1418
1419
1420
1421
1422 trap '' 1 2 15
1423 cat > confcache <<\EOF
1424 # This file is a shell script that caches the results of configure
1425 # tests run on this system so they can be shared between configure
1426 # scripts and configure runs.  It is not useful on other systems.
1427 # If it contains results you don't want to keep, you may remove or edit it.
1428 #
1429 # By default, configure uses ./config.cache as the cache file,
1430 # creating it if it does not exist already.  You can give configure
1431 # the --cache-file=FILE option to use a different cache file; that is
1432 # what configure does when it calls configure scripts in
1433 # subdirectories, so they share the cache.
1434 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1435 # config.status only pays attention to the cache file if you give it the
1436 # --recheck option to rerun configure.
1437 #
1438 EOF
1439 # The following way of writing the cache mishandles newlines in values,
1440 # but we know of no workaround that is simple, portable, and efficient.
1441 # So, don't put newlines in cache variables' values.
1442 # Ultrix sh set writes to stderr and can't be redirected directly,
1443 # and sets the high bit in the cache file unless we assign to the vars.
1444 (set) 2>&1 |
1445   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1446   *ac_space=\ *)
1447     # `set' does not quote correctly, so add quotes (double-quote substitution
1448     # turns \\\\ into \\, and sed turns \\ into \).
1449     sed -n \
1450       -e "s/'/'\\\\''/g" \
1451       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1452     ;;
1453   *)
1454     # `set' quotes correctly as required by POSIX, so do not add quotes.
1455     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1456     ;;
1457   esac >> confcache
1458 if cmp -s $cache_file confcache; then
1459   :
1460 else
1461   if test -w $cache_file; then
1462     echo "updating cache $cache_file"
1463     cat confcache > $cache_file
1464   else
1465     echo "not updating unwritable cache $cache_file"
1466   fi
1467 fi
1468 rm -f confcache
1469
1470 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1471
1472 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1473 # Let make expand exec_prefix.
1474 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1475
1476 # Any assignment to VPATH causes Sun make to only execute
1477 # the first set of double-colon rules, so remove it if not needed.
1478 # If there is a colon in the path, we need to keep it.
1479 if test "x$srcdir" = x.; then
1480   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1481 fi
1482
1483 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1484
1485 # Transform confdefs.h into DEFS.
1486 # Protect against shell expansion while executing Makefile rules.
1487 # Protect against Makefile macro expansion.
1488 cat > conftest.defs <<\EOF
1489 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1490 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1491 s%\[%\\&%g
1492 s%\]%\\&%g
1493 s%\$%$$%g
1494 EOF
1495 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1496 rm -f conftest.defs
1497
1498
1499 # Without the "./", some shells look in PATH for config.status.
1500 : ${CONFIG_STATUS=./config.status}
1501
1502 echo creating $CONFIG_STATUS
1503 rm -f $CONFIG_STATUS
1504 cat > $CONFIG_STATUS <<EOF
1505 #! /bin/sh
1506 # Generated automatically by configure.
1507 # Run this file to recreate the current configuration.
1508 # This directory was configured as follows,
1509 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1510 #
1511 # $0 $ac_configure_args
1512 #
1513 # Compiler output produced by configure, useful for debugging
1514 # configure, is in ./config.log if it exists.
1515
1516 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1517 for ac_option
1518 do
1519   case "\$ac_option" in
1520   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1521     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1522     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1523   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1524     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1525     exit 0 ;;
1526   -help | --help | --hel | --he | --h)
1527     echo "\$ac_cs_usage"; exit 0 ;;
1528   *) echo "\$ac_cs_usage"; exit 1 ;;
1529   esac
1530 done
1531
1532 ac_given_srcdir=$srcdir
1533 ac_given_INSTALL="$INSTALL"
1534
1535 trap 'rm -fr `echo "Makefile math/Makefile mathfp/Makefile common/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1536 EOF
1537 cat >> $CONFIG_STATUS <<EOF
1538
1539 # Protect against being on the right side of a sed subst in config.status.
1540 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1541  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1542 $ac_vpsub
1543 $extrasub
1544 s%@SHELL@%$SHELL%g
1545 s%@CFLAGS@%$CFLAGS%g
1546 s%@CPPFLAGS@%$CPPFLAGS%g
1547 s%@CXXFLAGS@%$CXXFLAGS%g
1548 s%@FFLAGS@%$FFLAGS%g
1549 s%@DEFS@%$DEFS%g
1550 s%@LDFLAGS@%$LDFLAGS%g
1551 s%@LIBS@%$LIBS%g
1552 s%@exec_prefix@%$exec_prefix%g
1553 s%@prefix@%$prefix%g
1554 s%@program_transform_name@%$program_transform_name%g
1555 s%@bindir@%$bindir%g
1556 s%@sbindir@%$sbindir%g
1557 s%@libexecdir@%$libexecdir%g
1558 s%@datadir@%$datadir%g
1559 s%@sysconfdir@%$sysconfdir%g
1560 s%@sharedstatedir@%$sharedstatedir%g
1561 s%@localstatedir@%$localstatedir%g
1562 s%@libdir@%$libdir%g
1563 s%@includedir@%$includedir%g
1564 s%@oldincludedir@%$oldincludedir%g
1565 s%@infodir@%$infodir%g
1566 s%@mandir@%$mandir%g
1567 s%@NEWLIB_HW_FP_TRUE@%$NEWLIB_HW_FP_TRUE%g
1568 s%@NEWLIB_HW_FP_FALSE@%$NEWLIB_HW_FP_FALSE%g
1569 s%@newlib_basedir@%$newlib_basedir%g
1570 s%@host@%$host%g
1571 s%@host_alias@%$host_alias%g
1572 s%@host_cpu@%$host_cpu%g
1573 s%@host_vendor@%$host_vendor%g
1574 s%@host_os@%$host_os%g
1575 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1576 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1577 s%@INSTALL_DATA@%$INSTALL_DATA%g
1578 s%@PACKAGE@%$PACKAGE%g
1579 s%@VERSION@%$VERSION%g
1580 s%@ACLOCAL@%$ACLOCAL%g
1581 s%@AUTOCONF@%$AUTOCONF%g
1582 s%@AUTOMAKE@%$AUTOMAKE%g
1583 s%@AUTOHEADER@%$AUTOHEADER%g
1584 s%@MAKEINFO@%$MAKEINFO%g
1585 s%@SET_MAKE@%$SET_MAKE%g
1586 s%@CC@%$CC%g
1587 s%@build@%$build%g
1588 s%@build_alias@%$build_alias%g
1589 s%@build_cpu@%$build_cpu%g
1590 s%@build_vendor@%$build_vendor%g
1591 s%@build_os@%$build_os%g
1592 s%@AS@%$AS%g
1593 s%@AR@%$AR%g
1594 s%@RANLIB@%$RANLIB%g
1595 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
1596 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
1597 s%@MAINT@%$MAINT%g
1598 s%@EXEEXT@%$EXEEXT%g
1599 s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
1600 s%@machine_dir@%$machine_dir%g
1601 s%@sys_dir@%$sys_dir%g
1602
1603 CEOF
1604 EOF
1605
1606 cat >> $CONFIG_STATUS <<\EOF
1607
1608 # Split the substitutions into bite-sized pieces for seds with
1609 # small command number limits, like on Digital OSF/1 and HP-UX.
1610 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1611 ac_file=1 # Number of current file.
1612 ac_beg=1 # First line for current file.
1613 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1614 ac_more_lines=:
1615 ac_sed_cmds=""
1616 while $ac_more_lines; do
1617   if test $ac_beg -gt 1; then
1618     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1619   else
1620     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1621   fi
1622   if test ! -s conftest.s$ac_file; then
1623     ac_more_lines=false
1624     rm -f conftest.s$ac_file
1625   else
1626     if test -z "$ac_sed_cmds"; then
1627       ac_sed_cmds="sed -f conftest.s$ac_file"
1628     else
1629       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1630     fi
1631     ac_file=`expr $ac_file + 1`
1632     ac_beg=$ac_end
1633     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1634   fi
1635 done
1636 if test -z "$ac_sed_cmds"; then
1637   ac_sed_cmds=cat
1638 fi
1639 EOF
1640
1641 cat >> $CONFIG_STATUS <<EOF
1642
1643 CONFIG_FILES=\${CONFIG_FILES-"Makefile math/Makefile mathfp/Makefile common/Makefile"}
1644 EOF
1645 cat >> $CONFIG_STATUS <<\EOF
1646 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1647   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1648   case "$ac_file" in
1649   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1650        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1651   *) ac_file_in="${ac_file}.in" ;;
1652   esac
1653
1654   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1655
1656   # Remove last slash and all that follows it.  Not all systems have dirname.
1657   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1658   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1659     # The file is in a subdirectory.
1660     test ! -d "$ac_dir" && mkdir "$ac_dir"
1661     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1662     # A "../" for each directory in $ac_dir_suffix.
1663     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1664   else
1665     ac_dir_suffix= ac_dots=
1666   fi
1667
1668   case "$ac_given_srcdir" in
1669   .)  srcdir=.
1670       if test -z "$ac_dots"; then top_srcdir=.
1671       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1672   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1673   *) # Relative path.
1674     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1675     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1676   esac
1677
1678   case "$ac_given_INSTALL" in
1679   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1680   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1681   esac
1682
1683   echo creating "$ac_file"
1684   rm -f "$ac_file"
1685   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1686   case "$ac_file" in
1687   *Makefile*) ac_comsub="1i\\
1688 # $configure_input" ;;
1689   *) ac_comsub= ;;
1690   esac
1691
1692   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1693   sed -e "$ac_comsub
1694 s%@configure_input@%$configure_input%g
1695 s%@srcdir@%$srcdir%g
1696 s%@top_srcdir@%$top_srcdir%g
1697 s%@INSTALL@%$INSTALL%g
1698 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1699 fi; done
1700 rm -f conftest.s*
1701
1702 EOF
1703 cat >> $CONFIG_STATUS <<EOF
1704
1705 EOF
1706 cat >> $CONFIG_STATUS <<\EOF
1707
1708 exit 0
1709 EOF
1710 chmod +x $CONFIG_STATUS
1711 rm -fr confdefs* $ac_clean_files
1712 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1713