1 dnl Autoconf sets the quotes to [ and ], which hoses shell commands.
2 dnl We get rid of the quotes altogether, and turn them on for AC_*.
6 # Configuration script for the GNU C Library.
7 dnl You can ignore the following line if you are reading this sentence.
8 # DO NOT EDIT! This script is generated from configure.in; edit that instead.
10 # Copyright (C) 1991, 1992 Free Software Foundation, Inc.
11 # This file is part of the GNU C Library.
13 # The GNU C Library is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU Library General Public License as
15 # published by the Free Software Foundation; either version 2 of the
16 # License, or (at your option) any later version.
18 # The GNU C Library is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # Library General Public License for more details.
23 # You should have received a copy of the GNU Library General Public
24 # License along with the GNU C Library; see the file COPYING.LIB. If
25 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
26 # Cambridge, MA 02139, USA.
29 # Configure the GNU C Library.
34 if [ $# -eq 0 -a "${ARCH-${machine}}" != "" ]; then
35 set "${ARCH-${machine}}"
38 # All the standard GNU configure options are accepted but only
39 # --nfp, --with-gnu-ld, and --with-gnu-as are meaningful.
50 if [ x$next != x ]; then
55 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
56 srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
58 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
61 -target | --target | --targe | --targ | --tar | --ta | --t)
64 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
65 target=`echo $arg | sed 's/-*t[a-z]*=//'`
68 -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
72 -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
76 -nfp | --nfp | --nf | --n)
86 -os-release=* | -os-releas=* | -os-relea=* | -os-rele=* | -os-rel=* \
87 | -os-re=* | -os-r=* | --os-release=* | --os-releas=* | --os-relea=* \
88 | --os-rele=* | --os-rel=* | --os-re=* | --os-r=*)
89 release=`echo $arg | sed 's/-*os-r[a-z]*=//'`
91 -os-release | -os-releas | -os-relea | -os-rele | -os-rel \
92 | -os-re | -os-r | --os-release | --os-releas | --os-relea \
93 | --os-rele | --os-rel | --os-re | --os-r)
97 -os-version=* | -os-versio=* | -os-versi=* | -os-vers=* | -os-ver=* \
98 | -os-ver=* | -os-ve=* | -os-v=* | --os-version=* | --os-versio=* \
99 | --os-versi=* | --os-vers=* | --os-ver=* | --os-ver=* | --os-ve=* \
101 version=`echo $arg | sed 's/-*os-v[a-z]*=//'`
103 -os-version | -os-versio | -os-versi | -os-vers | -os-ver \
104 | -os-ver | -os-ve | -os-v |--os-version | --os-versio \
105 | --os-versi | --os-vers | --os-ver | --os-ver | --os-ve | --os-v)
109 -exec_prefix=* | --exec_prefix=* | --exec_prefi=* | --exec_pref=* | --exec_pre=* | --exec_pr=* | --exec_p=* | --exec_=* | --exec=* | --exe=* | --ex=* | --e=*)
110 exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'`
112 -exec_prefix | --exec_prefix | --exec_prefi | --exec_pref | --exec_pre | --exec_pr | --exec_p | --exec_ | --exec | --exe | --ex | --e)
116 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
117 prefix=`echo $arg | sed 's/[-a-z_]*=//'`
119 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
124 echo "Invalid option \`$arg'" 1>&2
128 if [ ! "$target" ]; then
138 # NEXT will be set iff we have seen an option that wants an arg, but no arg.
140 echo "$0: the \`--${next}' option requires an argument" >&2
144 if [ "$lose" = yes -o ! "$target" ]; then
145 echo "Usage: $prog [--srcdir=DIR] [--nfp] [--with-gnu-ld] TARGET" >&2
146 if [ -r config.status ]; then
147 cat config.status >&2
152 dnl This deals with setting srcdir if it needs to be set.
154 AC_PREPARE(features.h)
157 # Canonicalize the configuration name.
158 config=`$srcdir/config.sub $target`
159 if [ ! "$config" ]; then
160 # config.sub has written an error message.
164 sysdep_dir=$srcdir/sysdeps
167 eval "`echo $config | \
168 sed 's/^\(.*\)-\(.*\)-\(.*\)$/machine=\1 vendor=\2 os=\3/'`"
173 sunos* | ultrix* | newsos* | dynix | bsd*)
175 linux* | sysv* | isc* | esix* | sco* | minix*)
185 # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
188 while o=`echo $tail | sed 's/\.[^.]*$//'`; [ $o != $tail ]; do
192 o=`echo $tail | sed 's/[0-9]*$//'`
193 if [ $o != $tail ]; then
197 # For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
200 while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; [ "$b" ]; do
206 # Find what sysdep directories exist.
208 for b in $base ''; do
209 for v in /$vendor ''; do
210 for o in /$ostry ''; do
211 for m in /$machine ''; do
212 if [ -d $sysdep_dir$b$v$o$m ]; then
213 sysnames="$sysnames $b$v$o$m"
214 [ "$o" -o "$b" ] && os_used=t
215 [ "$m" ] && machine_used=t
222 if [ ! "$os_used" -a "$os" != none ]; then
223 echo Operating system $os is not supported. >&2
226 if [ ! "$machine_used" -a "$machine" != none ]; then
227 echo The $machine is not supported. >&2
233 for name in $sysnames; do
234 if echo "$seen" | fgrep -x $name >/dev/null; then
235 # Already in the list.
239 if [ "$seen" = "" ]; then
249 # We have now validated the configuration.
257 echo checking for signed size_t type
258 echo '#include <stddef.h>
259 FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
260 $CPP conftest.c 2>/dev/null | grep '^FOOBAR.*unsigned.*FOOBAR$' \
261 || AC_DEFINE([__SIZE_TYPE__],[unsigned long int])
264 # Find out what this system calls `sys_siglist'.
265 AC_HAVE_FUNCS(sys_siglist _sys_siglist)
267 # Find out the name of the table the system's <ctype.h> uses for character
268 # classification. This is used by sysdeps/unix/common/glue-ctype.c.
269 AC_HAVE_FUNCS(_ctype_ __ctype_ __ctype _ctype__)
272 sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
274 if [ ! "$nfp" -a -d $sysdep_dir/$machine/fpu ]; then
275 sysnames="${machine}/fpu $sysnames"
279 echo $sysnames > Sysnames
282 Configuring the GNU C Library for \`${config}'.
283 Using system-dependent files from directories:
287 for dir in `$srcdir/find-sysdirs < Sysnames`; do
288 if [ -r $sysdep_dir/$dir/uname.c -o -r $sysdep_dir/$dir/uname.S ]; then
293 if [ $uname = generic ]; then
294 if [ ! "$release" -o ! "$version" ] && [ -r /vmunix ]; then
295 kernel_id=`strings /vmunix | grep UNIX`
296 kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
297 kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
303 sysname=`echo $os | sed 's/[0-9.]*$//'`
304 if [ $sysname != $os ]; then
305 config_release=`echo $os | sed s/$sysname//`
308 if [ "$release" ]; then
311 elif [ x`echo "$config_release" | sed "s/^$kernel_release//"` \
312 != x$config_release ]; then
313 # The configuration release is a substring of the kernel release.
314 release=$kernel_release
315 elif [ x$config_release != x ]; then
316 release=$config_release
317 elif [ x$kernel_release != x ]; then
318 release=$kernel_release
321 I don't know what release of $sysname you are using. Please enter the
322 release number now. This information is used only for the \`uname' function,
323 so it is not critical.
326 if [ ! "$release" ]; then
331 if [ "$version" ]; then
334 elif [ ! "$kernel_version" ]; then
336 I don't know what version of $sysname $release you are using. Please enter
337 the version number now. This information is used only for the uname
338 function, so it is not critical.
341 if [ ! "$version" ]; then
345 version=$kernel_version
348 cat > config-name.h <<END
349 /* This file was generated automatically by configure. Do not edit.
350 This is used by the generic uname function. */
351 #define UNAME_SYSNAME "${sysname}"
352 #define UNAME_RELEASE "${release}"
353 #define UNAME_VERSION "${version}"
354 #define UNAME_MACHINE "${machine}-${vendor}"
357 system_name="$sysname $release version $version on $vendor $machine"
359 # Not generic uname. We don't need config-name.h at all.
363 if [ "$gnu_ld" ]; then
364 DEFS="$DEFS -DHAVE_GNU_LD"
366 if [ "$gnu_as" ]; then
367 DEFS="$DEFS -DHAVE_GNU_AS"
371 echo '# This file was generated automatically by configure. Do not edit.'
372 echo '# Put configuration parameters in configparms instead.'
373 echo "config-machine = ${machine}"
374 echo "config-vendor = ${vendor}"
375 echo "config-os = ${os}"
376 if [ "$prefix" ]; then
377 echo "prefix = ${prefix}"
379 if [ "$exec_prefix" ]; then
380 echo "exec_prefix = ${exec_prefix}"
382 echo "config-defines = ${DEFS}"
383 for var in INSTALL INSTALL_PROGRAM INSTALL_DATA RANLIB; do
384 eval "echo \"${var} = \${$var}\""
389 if [ "$gnu_as" ]; then
390 switches="$switches --with-gnu-as"
392 if [ "$gnu_ld" ]; then
393 switches="$switches --with-gnu-ld"
395 if [ "$exec_prefix" ]; then
396 switches="$switches --exec_prefix=$exec_prefix"
398 if [ "$prefix" ]; then
399 switches="$switches --prefix=$prefix"
401 if [ "$release" ]; then
402 switches="$switches --os-release='$release'"
404 if [ "$version" ]; then
405 switches="$switches --os-version='$version'"
408 cat > config.status <<END
410 # This file was generated automatically by configure. Do not edit.
411 # The GNU C library was configured in `pwd` for
412 # $system_name as follows:
413 $0 $config --srcdir=$srcdir $switches
416 if [ $srcdir != . ]; then
417 if [ $srcdir = .. ]; then
419 objdir=`basename $cwd`
424 # This file was generated automatically by configure. Do not edit.
428 \$(MAKE) -C \$(srcdir) ARCH=$objdir \$@
431 echo "# Wrote Makefile in `pwd`." >> config.status
433 chmod a+x config.status
436 dnl This gets rid of the random stuff autoconf has stuffed in weird places.
437 divert(-1)dnl AC_This is here so I can search for `AC_' to find the frobs.
439 dnl compile-command: "m4 /gd/gnu/autoconf/acgeneral.m4 /gd/gnu/autoconf/acspecific.m4 configure.in > configure && chmod a+x configure"