gcc/gcc/configure

10022 lines
272 KiB
Plaintext
Raw Normal View History

#! /bin/sh
1997-08-11 17:56:58 +02:00
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
1997-08-11 17:56:58 +02:00
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
1997-08-11 17:56:58 +02:00
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-local-prefix=DIR specifies directory to put local include"
ac_help="$ac_help
--with-gxx-include-dir=DIR
specifies directory to put g++ header files"
ac_help="$ac_help
--with-cpp-install-dir=DIR
install the user visible C preprocessor in DIR
(relative to PREFIX) as well as PREFIX/bin"
ac_help="$ac_help
--with-gnu-ld arrange to work with GNU ld."
ac_help="$ac_help
--with-ld arrange to use the specified ld (full pathname)"
ac_help="$ac_help
--with-gnu-as arrange to work with GNU as"
ac_help="$ac_help
--with-as arrange to use the specified as (full pathname)"
ac_help="$ac_help
--enable-werror enable -Werror in bootstrap stage2 and later"
ac_help="$ac_help
--enable-checking[=LIST]
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: misc,tree,rtl,rtlflag,gc,gcac;
default is misc,tree,gc,rtlflag"
ac_help="$ac_help
--enable-coverage[=LEVEL]
enable compiler\'s code coverage collection.
Use to measure compiler performance and locate
unused parts of the compiler. With LEVEL, specify
optimization. Values are opt, noopt,
default is noopt"
ac_help="$ac_help
--with-stabs arrange to use stabs instead of host debug format"
ac_help="$ac_help
--with-elf arrange to use ELF instead of host debug format"
ac_help="$ac_help
--enable-multilib enable library support for multiple ABIs"
ac_help="$ac_help
--enable-__cxa_atexit enable __cxa_atexit for C++"
ac_help="$ac_help
--enable-c-mbchar enable multibyte characters for C and C++"
ac_help="$ac_help
--enable-threads enable thread usage for target GCC
--enable-threads=LIB use LIB thread package for target GCC"
ac_help="$ac_help
--enable-objc-gc enable the use of Boehm's garbage collector with
the GNU Objective-C runtime"
ac_help="$ac_help
--with-dwarf2 force the default debug format to be DWARF 2"
ac_help="$ac_help
--disable-shared don't provide a shared libgcc"
ac_help="$ac_help
--with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
ac_help="$ac_help
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
ac_help="$ac_help
--enable-initfini-array use .init_array/.fini_array sections"
ac_help="$ac_help
--enable-sjlj-exceptions
arrange to use setjmp/longjmp exception handling"
ac_help="$ac_help
--enable-libunwind-exceptions force use libunwind for exceptions"
ac_help="$ac_help
--enable-nls use Native Language Support (default)"
ac_help="$ac_help
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
ac_help="$ac_help
--disable-nls do not use Native Language Support"
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
ac_help="$ac_help
--disable-win32-registry
disable lookup of installation paths in the
Registry on Windows hosts
--enable-win32-registry enable registry lookup (default)
--enable-win32-registry=KEY
use KEY instead of GCC version as the last portion
of the registry key"
ac_help="$ac_help
--with-gc={simple,page} choose the garbage collection mechanism to use
with the compiler"
ac_help="$ac_help
--with-system-zlib use installed libz"
ac_help="$ac_help
--enable-maintainer-mode
enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
ac_help="$ac_help
--enable-version-specific-runtime-libs
specify that runtime libraries should be
installed in a compiler-specific directory"
ac_help="$ac_help
--with-slibdir=DIR shared libraries in DIR [LIBDIR]"
1997-08-11 17:56:58 +02:00
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
1997-08-11 17:56:58 +02:00
exec_prefix=NONE
host=NONE
1997-08-11 17:56:58 +02:00
no_create=
nonopt=NONE
1997-08-11 17:56:58 +02:00
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
1997-08-11 17:56:58 +02:00
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
1997-08-11 17:56:58 +02:00
ac_prev=
for ac_option
do
1997-08-11 17:56:58 +02:00
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
1997-08-11 17:56:58 +02:00
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
1997-08-11 17:56:58 +02:00
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
1997-08-11 17:56:58 +02:00
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
1997-08-11 17:56:58 +02:00
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
1997-08-11 17:56:58 +02:00
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
1997-08-11 17:56:58 +02:00
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
1997-08-11 17:56:58 +02:00
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
1997-08-11 17:56:58 +02:00
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
1997-08-11 17:56:58 +02:00
-host | --host | --hos | --ho)
ac_prev=host ;;
1997-08-11 17:56:58 +02:00
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
1997-08-11 17:56:58 +02:00
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
1997-08-11 17:56:58 +02:00
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
exit 0 ;;
1997-08-11 17:56:58 +02:00
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
1997-08-11 17:56:58 +02:00
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
1997-08-11 17:56:58 +02:00
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
1997-08-11 17:56:58 +02:00
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
1997-08-11 17:56:58 +02:00
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
1997-08-11 17:56:58 +02:00
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
1997-08-11 17:56:58 +02:00
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
1997-08-11 17:56:58 +02:00
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
1997-08-11 17:56:58 +02:00
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
1997-08-11 17:56:58 +02:00
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
1997-08-11 17:56:58 +02:00
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1997-08-11 17:56:58 +02:00
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
1997-08-11 17:56:58 +02:00
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
1997-08-11 17:56:58 +02:00
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
1997-08-11 17:56:58 +02:00
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=tree.c
1997-08-11 17:56:58 +02:00
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
1997-08-11 17:56:58 +02:00
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
1997-08-11 17:56:58 +02:00
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
1997-08-11 17:56:58 +02:00
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
1997-08-11 17:56:58 +02:00
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
1997-08-11 17:56:58 +02:00
# Determine the host, build, and target systems
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Do some error checking and defaulting for the host and target type.
# The inputs are:
# configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
# same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
# as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:669: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:690: checking target system type" >&5
target_alias=$target
case "$target_alias" in
NONE)
case $nonopt in
NONE) target_alias=$host_alias ;;
*) target_alias=$nonopt ;;
esac ;;
esac
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:708: checking build system type" >&5
build_alias=$build
case "$build_alias" in
NONE)
case $nonopt in
NONE) build_alias=$host_alias ;;
*) build_alias=$nonopt ;;
esac ;;
esac
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
test "$host_alias" != "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
# Define variables host_canonical and build_canonical
build_canonical=${build}
host_canonical=${host}
target_subdir=
if test "${host}" != "${target}" ; then
target_subdir=${target_alias}/
fi
# Set program_transform_name
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
# Double any \ or $. echo might interpret backslashes.
cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
rm -f conftestsed
fi
test "$program_prefix" != NONE &&
program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# Check for bogus environment variables.
# Test if LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
# LIBRARY_PATH contains the current directory if one of the following
# is true:
# - one of the terminals (":" and ";") is the first or last sign
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
echo "configure:773: checking LIBRARY_PATH variable" >&5
case ${LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
library_path_setting="contains current directory"
;;
*)
library_path_setting="ok"
;;
esac
echo "$ac_t""$library_path_setting" 1>&6
if test "$library_path_setting" != "ok"; then
{ echo "configure: error:
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc. Please change the environment variable
*** and run configure again." 1>&2; exit 1; }
fi
# Test if GCC_EXEC_PREFIX contains the notation for the current directory
# since this would lead to problems installing/building glibc.
# GCC_EXEC_PREFIX contains the current directory if one of the following
# is true:
# - one of the terminals (":" and ";") is the first or last sign
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
echo "configure:798: checking GCC_EXEC_PREFIX variable" >&5
case ${GCC_EXEC_PREFIX} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
gcc_exec_prefix_setting="contains current directory"
;;
*)
gcc_exec_prefix_setting="ok"
;;
esac
echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
if test "$gcc_exec_prefix_setting" != "ok"; then
{ echo "configure: error:
*** GCC_EXEC_PREFIX shouldn't contain the current directory when
*** building gcc. Please change the environment variable
*** and run configure again." 1>&2; exit 1; }
fi
# -----------
# Directories
# -----------
# Specify the local prefix
local_prefix=
# Check whether --with-local-prefix or --without-local-prefix was given.
if test "${with_local_prefix+set}" = set; then
withval="$with_local_prefix"
case "${withval}" in
yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
no) ;;
*) local_prefix=$with_local_prefix ;;
esac
fi
# Default local prefix if it is empty
if test x$local_prefix = x; then
local_prefix=/usr/local
fi
# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
# passed in by the toplevel make and thus we'd get different behavior
# depending on where we built the sources.
gcc_gxx_include_dir=
# Specify the g++ header file directory
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
case "${withval}" in
yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
no) ;;
*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
esac
fi
if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
gcc_gxx_include_dir='${libsubdir}/include/c++'
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
fi
fi
# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
if test "${with_cpp_install_dir+set}" = set; then
withval="$with_cpp_install_dir"
if test x$withval = xyes; then
{ echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
elif test x$withval != xno; then
cpp_install_dir=$withval
fi
fi
# -------------------
# Find default linker
# -------------------
# With GNU ld
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
gnu_ld_flag="$with_gnu_ld"
else
gnu_ld_flag=no
fi
# With pre-defined ld
# Check whether --with-ld or --without-ld was given.
if test "${with_ld+set}" = set; then
withval="$with_ld"
DEFAULT_LINKER="$with_ld"
fi
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test ! -x "$DEFAULT_LINKER"; then
echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
gnu_ld_flag=yes
fi
cat >> confdefs.h <<EOF
#define DEFAULT_LINKER "$DEFAULT_LINKER"
EOF
fi
echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
echo "configure:907: checking whether a default linker was specified" >&5
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test x"$gnu_ld_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
else
echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
fi
else
echo "$ac_t""no" 1>&6
fi
# ----------------------
# Find default assembler
# ----------------------
# With GNU as
# Check whether --with-gnu-as or --without-gnu-as was given.
if test "${with_gnu_as+set}" = set; then
withval="$with_gnu_as"
gas_flag="$with_gnu_as"
else
gas_flag=no
fi
# Check whether --with-as or --without-as was given.
if test "${with_as+set}" = set; then
withval="$with_as"
DEFAULT_ASSEMBLER="$with_as"
fi
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test ! -x "$DEFAULT_ASSEMBLER"; then
echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
gas_flag=yes
fi
cat >> confdefs.h <<EOF
#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
EOF
fi
echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
echo "configure:951: checking whether a default assembler was specified" >&5
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test x"$gas_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
else
echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
fi
else
echo "$ac_t""no" 1>&6
fi
# ---------------
# Find C compiler
# ---------------
# Find the native compiler
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:970: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1000: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1051: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1094 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1130: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1158: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
ac_cv_prog_cc_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
echo "configure:1191: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
echo "configure:1194: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'foo(){}' > conftest.c
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
if { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
test -f conftest.o && { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
if { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
test -f conftest.o && { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
else
# cc exists but doesn't like -o.
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
fi
fi
else
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define NO_MINUS_C_MINUS_O 1
EOF
fi
# autoconf is lame and doesn't give us any substitution variable for this.
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
NO_MINUS_C_MINUS_O=yes
else
OUTPUT_OPTION='-o $@'
fi
# -------------------------
# Check C compiler features
# -------------------------
echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
echo "configure:1255: checking whether ${CC-cc} accepts -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="-Wno-long-long"
cat > conftest.$ac_ext <<EOF
#line 1262 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_cc_no_long_long=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_prog_cc_no_long_long=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"
fi
echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1285: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
CPP="${CC-cc} -E"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1300 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1317 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1334 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:1365: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
#line 1372 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
fi
echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
inline | yes) ;;
no) cat >> confdefs.h <<\EOF
#define inline
EOF
;;
*) cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
;;
esac
echo $ac_n "checking for volatile""... $ac_c" 1>&6
echo "configure:1405: checking for volatile" >&5
if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1410 "configure"
#include "confdefs.h"
int main() {
volatile int foo;
; return 0; }
EOF
if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_volatile=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_c_volatile=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_c_volatile" 1>&6
if test $gcc_cv_c_volatile = yes ; then
cat >> confdefs.h <<\EOF
#define HAVE_VOLATILE 1
EOF
fi
echo $ac_n "checking for long double""... $ac_c" 1>&6
echo "configure:1439: checking for long double" >&5
if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
gcc_cv_c_long_double=yes
else
cat > conftest.$ac_ext <<EOF
#line 1447 "configure"
#include "confdefs.h"
int main() {
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
long double foo = 0.0;
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
; return 0; }
EOF
if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_long_double=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_c_long_double=no
fi
rm -f conftest*
fi
fi
echo "$ac_t""$gcc_cv_c_long_double" 1>&6
if test $gcc_cv_c_long_double = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_LONG_DOUBLE 1
EOF
fi
echo $ac_n "checking for long long int""... $ac_c" 1>&6
echo "configure:1479: checking for long long int" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1484 "configure"
#include "confdefs.h"
int main() {
long long int i;
; return 0; }
EOF
if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_long=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_long_long=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c_long_long" 1>&6
if test $ac_cv_c_long_long = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_LONG_LONG 1
EOF
fi
echo $ac_n "checking for __int64""... $ac_c" 1>&6
echo "configure:1511: checking for __int64" >&5
if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1516 "configure"
#include "confdefs.h"
int main() {
__int64 i;
; return 0; }
EOF
if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c___int64=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c___int64=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c___int64" 1>&6
if test $ac_cv_c___int64 = yes; then
cat >> confdefs.h <<\EOF
#define HAVE___INT64 1
EOF
fi
echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
echo "configure:1544: checking for built-in _Bool" >&5
if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1549 "configure"
#include "confdefs.h"
int main() {
_Bool foo;
; return 0; }
EOF
if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c__bool=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_c__bool=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_c__bool" 1>&6
if test $gcc_cv_c__bool = yes; then
cat >> confdefs.h <<\EOF
#define HAVE__BOOL 1
EOF
fi
# sizeof(char) is 1 by definition.
echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:1580: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
#line 1586 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_short=$ac_size
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test x$ac_cv_sizeof_short != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_short = x ; then
{ echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:1619: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
#line 1625 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
if { (eval echo configure:1635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_int=$ac_size
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test x$ac_cv_sizeof_int != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_int = x ; then
{ echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:1658: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
#line 1664 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test x$ac_cv_sizeof_long != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_long = x ; then
{ echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF
if test $ac_cv_c_long_long = yes; then
echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:1698: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
#line 1704 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (long long) == $ac_size):;
; return 0; }
EOF
if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long_long=$ac_size
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test x$ac_cv_sizeof_long_long != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_long_long = x ; then
{ echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF
fi
if test $ac_cv_c___int64 = yes; then
echo $ac_n "checking size of __int64""... $ac_c" 1>&6
echo "configure:1739: checking size of __int64" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
#line 1745 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (__int64) == $ac_size):;
; return 0; }
EOF
if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof___int64=$ac_size
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test x$ac_cv_sizeof___int64 != x ; then break; fi
done
fi
if test x$ac_cv_sizeof___int64 = x ; then
{ echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF___INT64 $ac_cv_sizeof___int64
EOF
fi
echo $ac_n "checking execution character set""... $ac_c" 1>&6
echo "configure:1780: checking execution character set" >&5
if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1785 "configure"
#include "confdefs.h"
#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
&& 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
ASCII
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "ASCII" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_c_charset=ASCII
fi
rm -f conftest*
if test x${ac_cv_c_charset+set} != xset; then
cat > conftest.$ac_ext <<EOF
#line 1801 "configure"
#include "confdefs.h"
#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
&& 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
EBCDIC
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "EBCDIC" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_c_charset=EBCDIC
fi
rm -f conftest*
fi
if test x${ac_cv_c_charset+set} != xset; then
ac_cv_c_charset=unknown
fi
fi
echo "$ac_t""$ac_cv_c_charset" 1>&6
if test $ac_cv_c_charset = unknown; then
{ echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
elif test $ac_cv_c_charset = EBCDIC; then
cat >> confdefs.h <<\EOF
#define HOST_EBCDIC 1
EOF
fi
# -----------------
# Find Ada compiler
# -----------------
# See if GNAT has been installed
if test $host != $build; then
ac_tool_prefix=${host_alias}-
else
ac_tool_prefix=
fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1846: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$GNATBIND"; then
ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
GNATBIND="$ac_cv_prog_GNATBIND"
if test -n "$GNATBIND"; then
echo "$ac_t""$GNATBIND" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$ac_cv_prog_GNATBIND"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1878: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$GNATBIND"; then
ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_GNATBIND="gnatbind"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
fi
fi
GNATBIND="$ac_cv_prog_GNATBIND"
if test -n "$GNATBIND"; then
echo "$ac_t""$GNATBIND" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
GNATBIND="no"
fi
fi
echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
echo "configure:1911: checking for compiler driver that understands Ada" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
EOF
gcc_cv_prog_adac=no
# Have to do ac_tool_prefix and user overrides by hand.
for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
${ac_tool_prefix}gcc gcc \
${ac_tool_prefix}cc cc \
${ac_tool_prefix}gnatgcc gnatgcc \
${ac_tool_prefix}gnatcc gnatcc \
${ac_tool_prefix}adagcc adagcc \
${ac_tool_prefix}adacc adacc ; do
# There is a bug in all released versions of GCC which causes the
# driver to exit successfully when the appropriate language module
# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
# Therefore we must check for the error message as well as an
# unsuccessful exit.
errors=`($cand -c conftest.adb) 2>&1 || echo failure`
if test x"$errors" = x; then
gcc_cv_prog_adac=$cand
break
fi
done
rm -f conftest.*
fi
echo "$ac_t""$gcc_cv_prog_adac" 1>&6
ADAC=$gcc_cv_prog_adac
if test x$GNATBIND != xno && test x$ADAC != xno; then
have_gnat=yes
else
have_gnat=no
fi
if test x$have_gnat != xno ; then
echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
echo "configure:1954: checking whether ${ADAC} accepts -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
EOF
if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
ac_cv_prog_adac_no_long_long=yes
else
ac_cv_prog_adac_no_long_long=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
else
ac_cv_prog_adac_no_long_long=yes
fi
# ---------------------
# Warnings and checking
# ---------------------
strict1_warn=
if test $ac_cv_prog_cc_no_long_long = yes && \
test $ac_cv_prog_adac_no_long_long = yes ; then
strict1_warn="-pedantic -Wno-long-long"
fi
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
warn_cflags=
if test "x$GCC" = "xyes"; then
warn_cflags='$(GCC_WARN_CFLAGS)'
fi
# Enable -Werror in bootstrap stage2 and later.
# Change the default to "no" on release branches.
# Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then
enableval="$enable_werror"
:
else
enable_werror=yes
fi
if test x$enable_werror = xyes ; then
WERROR=-Werror
fi
# Enable expensive internal checks
# Check whether --enable-checking or --disable-checking was given.
if test "${enable_checking+set}" = set; then
enableval="$enable_checking"
ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
ac_gc_checking=
ac_gc_always_collect=
case "${enableval}" in
yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ;;
no) ;;
*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
set fnord $enableval; shift
IFS="$ac_save_IFS"
for check
do
case $check in
misc) ac_checking=1 ;;
tree) ac_tree_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
gc) ac_gc_checking=1 ;;
gcac) ac_gc_always_collect=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
esac
done
;;
esac
else
# Enable some checks by default for development versions of GCC
ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
fi
nocommon_flag=""
if test x$ac_checking != x ; then
cat >> confdefs.h <<\EOF
#define ENABLE_CHECKING 1
EOF
nocommon_flag=-fno-common
fi
if test x$ac_tree_checking != x ; then
cat >> confdefs.h <<\EOF
#define ENABLE_TREE_CHECKING 1
EOF
fi
if test x$ac_rtl_checking != x ; then
cat >> confdefs.h <<\EOF
#define ENABLE_RTL_CHECKING 1
EOF
fi
if test x$ac_rtlflag_checking != x ; then
cat >> confdefs.h <<\EOF
#define ENABLE_RTL_FLAG_CHECKING 1
EOF
fi
if test x$ac_gc_checking != x ; then
cat >> confdefs.h <<\EOF
#define ENABLE_GC_CHECKING 1
EOF
fi
if test x$ac_gc_always_collect != x ; then
cat >> confdefs.h <<\EOF
#define ENABLE_GC_ALWAYS_COLLECT 1
EOF
fi
valgrind_path_defines=
valgrind_command=
if test x$ac_checking_valgrind != x ; then
# It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both.
echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
echo "configure:2092: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
cat > conftest.$ac_ext <<EOF
#line 2094 "configure"
#include "confdefs.h"
#include <memcheck.h>
#ifndef VALGRIND_DISCARD
#error VALGRIND_DISCARD not defined
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
gcc_cv_header_memcheck_h=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_header_memcheck_h=no
fi
rm -f conftest*
echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
echo "configure:2118: checking for valgrind.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2123 "configure"
#include "confdefs.h"
#include <valgrind.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_valgrind_h=yes
else
echo "$ac_t""no" 1>&6
have_valgrind_h=no
fi
# Extract the first word of "valgrind", so it can be a program name with args.
set dummy valgrind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2153: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$valgrind_path" in
/*)
ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
ac_cv_path_valgrind_path="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
valgrind_path="$ac_cv_path_valgrind_path"
if test -n "$valgrind_path"; then
echo "$ac_t""$valgrind_path" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
{ echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
fi
valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
valgrind_command="$valgrind_path -q"
cat >> confdefs.h <<\EOF
#define ENABLE_VALGRIND_CHECKING 1
EOF
if test $gcc_cv_header_memcheck_h = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_MEMCHECK_H 1
EOF
fi
fi
# Enable code coverage collection
# Check whether --enable-coverage or --disable-coverage was given.
if test "${enable_coverage+set}" = set; then
enableval="$enable_coverage"
case "${enableval}" in
yes|noopt)
coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
;;
opt)
coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
;;
*)
{ echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
;;
esac
else
coverage_flags=""
fi
# -------------------------------
# Miscenalleous configure options
# -------------------------------
# With stabs
# Check whether --with-stabs or --without-stabs was given.
if test "${with_stabs+set}" = set; then
withval="$with_stabs"
stabs="$with_stabs"
else
stabs=no
fi
# With ELF
# Check whether --with-elf or --without-elf was given.
if test "${with_elf+set}" = set; then
withval="$with_elf"
elf="$with_elf"
else
elf=no
fi
# Determine whether or not multilibs are enabled.
# Check whether --enable-multilib or --disable-multilib was given.
if test "${enable_multilib+set}" = set; then
enableval="$enable_multilib"
:
else
enable_multilib=yes
fi
# Enable __cxa_atexit for C++.
# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
if test "${enable___cxa_atexit+set}" = set; then
enableval="$enable___cxa_atexit"
:
fi
# Enable Multibyte Characters for C/C++
# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
if test "${enable_c_mbchar+set}" = set; then
enableval="$enable_c_mbchar"
if test x$enable_c_mbchar != xno; then
cat >> confdefs.h <<\EOF
#define MULTIBYTE_CHARS 1
EOF
fi
fi
# Enable threads
# Pass with no value to take the default
# Pass with a value to specify a thread package
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
enableval="$enable_threads"
:
else
enable_threads=''
fi
enable_threads_flag=$enable_threads
# Check if a valid thread package
case x${enable_threads_flag} in
x | xno)
# No threads
target_thread_file='single'
;;
xyes)
# default
target_thread_file=''
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
target_thread_file=$enable_threads_flag
;;
*)
echo "$enable_threads is an unknown thread package" 1>&2
exit 1
;;
esac
# Check whether --enable-objc-gc or --disable-objc-gc was given.
if test "${enable_objc_gc+set}" = set; then
enableval="$enable_objc_gc"
if test x$enable_objc_gc = xno; then
objc_boehm_gc=''
else
objc_boehm_gc=1
fi
else
objc_boehm_gc=''
fi
# Check whether --with-dwarf2 or --without-dwarf2 was given.
if test "${with_dwarf2+set}" = set; then
withval="$with_dwarf2"
dwarf2="$with_dwarf2"
else
dwarf2=no
fi
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
case $enable_shared in
yes | no) ;;
*)
enable_shared=no
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac
else
enable_shared=yes
fi
# Check whether --with-sysroot or --without-sysroot was given.
if test "${with_sysroot+set}" = set; then
withval="$with_sysroot"
case ${with_sysroot} in
yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
*) TARGET_SYSTEM_ROOT=$with_sysroot ;;
esac
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else
test_prefix=$prefix
fi
else
test_prefix=$exec_prefix
fi
case ${TARGET_SYSTEM_ROOT} in
"${test_prefix}"|"${test_prefix}/"*|\
'${exec_prefix}'|'${exec_prefix}/'*)
t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
TARGET_SYSTEM_ROOT_DEFINE="$t"
;;
esac
else
TARGET_SYSTEM_ROOT=
TARGET_SYSTEM_ROOT_DEFINE=
CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
fi
# -------------------------
# Checks for other programs
# -------------------------
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:2404: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftestmake <<\EOF
all:
@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$ac_t""yes" 1>&6
SET_MAKE=
else
echo "$ac_t""no" 1>&6
SET_MAKE="MAKE=${MAKE-make}"
fi
1997-08-11 17:56:58 +02:00
# Find some useful tools
for ac_prog in mawk gawk nawk awk
1997-08-11 17:56:58 +02:00
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
1997-08-11 17:56:58 +02:00
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2437: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
1997-08-11 17:56:58 +02:00
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AWK="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
1997-08-11 17:56:58 +02:00
fi
fi
AWK="$ac_cv_prog_AWK"
1997-08-11 17:56:58 +02:00
if test -n "$AWK"; then
echo "$ac_t""$AWK" 1>&6
1997-08-11 17:56:58 +02:00
else
echo "$ac_t""no" 1>&6
1997-08-11 17:56:58 +02:00
fi
test -n "$AWK" && break
1997-08-11 17:56:58 +02:00
done
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
echo "configure:2467: checking whether ln works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata_t
echo >conftestdata_f
if ln conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN="ln"
else
if ln -s conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN="ln -s"
else
gcc_cv_prog_LN=cp
fi
fi
rm -f conftestdata_f conftestdata_t
fi
LN="$gcc_cv_prog_LN"
if test "$gcc_cv_prog_LN" = "ln"; then
echo "$ac_t""yes" 1>&6
else
if test "$gcc_cv_prog_LN" = "ln -s"; then
echo "$ac_t""no, using ln -s" 1>&6
else
echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
fi
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2499: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata_t
echo >conftestdata_f
if ln -s conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN_S="ln -s"
else
if ln conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN_S=ln
else
gcc_cv_prog_LN_S=cp
fi
fi
rm -f conftestdata_f conftestdata_t
fi
LN_S="$gcc_cv_prog_LN_S"
if test "$gcc_cv_prog_LN_S" = "ln -s"; then
echo "$ac_t""yes" 1>&6
else
if test "$gcc_cv_prog_LN_S" = "ln"; then
echo "$ac_t""no, using ln" 1>&6
else
echo "$ac_t""no, and neither does ln, so using cp" 1>&6
fi
fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2533: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
1997-08-11 17:56:58 +02:00
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1997-08-11 17:56:58 +02:00
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
1997-08-11 17:56:58 +02:00
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
1997-08-11 17:56:58 +02:00
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2571: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
# OSF/1 installbsd also uses dspmsg, but is usable.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1997-08-11 17:56:58 +02:00
# See if we have the mktemp command.
# Extract the first word of "mktemp", so it can be a program name with args.
set dummy mktemp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2625: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$have_mktemp_command"; then
ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_have_mktemp_command="yes"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
fi
fi
have_mktemp_command="$ac_cv_prog_have_mktemp_command"
if test -n "$have_mktemp_command"; then
echo "$ac_t""$have_mktemp_command" 1>&6
else
echo "$ac_t""no" 1>&6
fi
# Do we have a single-tree copy of texinfo?
if test -f $srcdir/../texinfo/Makefile.in; then
MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
gcc_cv_prog_makeinfo_modern=yes
echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
else
# See if makeinfo has been installed and is modern enough
# that we can use it.
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2664: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$MAKEINFO"; then
ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_MAKEINFO="makeinfo"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
MAKEINFO="$ac_cv_prog_MAKEINFO"
if test -n "$MAKEINFO"; then
echo "$ac_t""$MAKEINFO" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -n "$MAKEINFO"; then
# Found it, now check the version.
echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
echo "configure:2693: checking for modern makeinfo" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
echo "configure:2699: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)
gcc_cv_prog_makeinfo_modern=yes;;
*) gcc_cv_prog_makeinfo_modern=no;;
esac
fi
echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
else
gcc_cv_prog_makeinfo_modern=no
fi
fi
if test $gcc_cv_prog_makeinfo_modern = no; then
echo "configure: warning:
*** Makeinfo is missing or too old.
*** Info documentation will not be built." 1>&2
BUILD_INFO=
else
BUILD_INFO=info
fi
# Is pod2man recent enough to regenerate manpages?
echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
echo "configure:2727: checking for recent Pod::Man" >&5
if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
echo "$ac_t""yes" 1>&6
GENERATED_MANPAGES=generated-manpages
else
echo "$ac_t""no" 1>&6
GENERATED_MANPAGES=
fi
# 'make compare' can be significantly faster, if cmp itself can
# skip bytes instead of using tail. The test being performed is
# "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
# but we need to sink errors and handle broken shells.
echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
echo "configure:2741: checking for cmp's capabilities" >&5
echo abfoo >t1
echo cdfoo >t2
if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
make_compare_target=slowcompare
else
make_compare_target=gnucompare
fi
else
make_compare_target=slowcompare
fi
rm t1 t2
echo "$ac_t""$make_compare_target" 1>&6
# How about lex?
if test -f $srcdir/../flex/skel.c; then
FLEX='$(objdir)/../flex/flex'
else
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2764: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$FLEX"; then
ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_FLEX="flex"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
fi
fi
FLEX="$ac_cv_prog_FLEX"
if test -n "$FLEX"; then
echo "$ac_t""$FLEX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
# Bison?
# The -L switch is so bison can find its skeleton file.
if test -f $srcdir/../bison/bison.simple; then
BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
else
# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2801: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$BISON"; then
ac_cv_prog_BISON="$BISON" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_BISON="bison"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
fi
fi
BISON="$ac_cv_prog_BISON"
if test -n "$BISON"; then
echo "$ac_t""$BISON" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
# --------------------
# Checks for C headers
# --------------------
echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
echo "configure:2835: checking for GNU C library" >&5
if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2840 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
#error Not a GNU C library system
#endif
; return 0; }
EOF
if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_glibc=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_glibc=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_glibc" 1>&6
if test $gcc_cv_glibc = yes; then
cat >> confdefs.h <<\EOF
#define _GNU_SOURCE 1
EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2871: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
1997-12-07 01:31:01 +01:00
else
cat > conftest.$ac_ext <<EOF
#line 2876 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
1997-12-07 01:31:01 +01:00
ac_cv_header_stdc=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_stdc=no
1997-12-07 01:31:01 +01:00
fi
rm -f conftest*
1997-12-07 01:31:01 +01:00
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2901 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
#include <string.h>
EOF
1997-12-07 01:31:01 +01:00
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "memchr" >/dev/null 2>&1; then
1997-12-07 01:31:01 +01:00
:
else
rm -rf conftest*
1997-12-07 01:31:01 +01:00
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2919 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
#include <stdlib.h>
EOF
1997-12-07 01:31:01 +01:00
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "free" >/dev/null 2>&1; then
1997-12-07 01:31:01 +01:00
:
else
rm -rf conftest*
1997-12-07 01:31:01 +01:00
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
1997-12-07 01:31:01 +01:00
:
else
cat > conftest.$ac_ext <<EOF
#line 2940 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
1997-12-07 01:31:01 +01:00
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_header_stdc=no
1997-12-07 01:31:01 +01:00
fi
rm -fr conftest*
1997-12-07 01:31:01 +01:00
fi
1997-12-07 01:31:01 +01:00
fi
fi
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
cat >> confdefs.h <<\EOF
1997-12-07 01:31:01 +01:00
#define STDC_HEADERS 1
EOF
1997-12-07 01:31:01 +01:00
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:2975: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
1997-12-07 01:31:01 +01:00
else
cat > conftest.$ac_ext <<EOF
#line 2980 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
1997-12-07 01:31:01 +01:00
ac_cv_header_time=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_time=no
1997-12-07 01:31:01 +01:00
fi
rm -f conftest*
1997-12-07 01:31:01 +01:00
fi
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
cat >> confdefs.h <<\EOF
1997-12-07 01:31:01 +01:00
#define TIME_WITH_SYS_TIME 1
EOF
1997-12-07 01:31:01 +01:00
fi
echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
echo "configure:3010: checking for working stdbool.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3015 "configure"
#include "confdefs.h"
#include <stdbool.h>
int main() {
bool foo = false;
; return 0; }
EOF
if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_stdbool_h=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_stdbool_h=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
if test $ac_cv_header_stdbool_h = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_STDBOOL_H 1
EOF
fi
echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
echo "configure:3043: checking whether string.h and strings.h may both be included" >&5
if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3048 "configure"
#include "confdefs.h"
#include <string.h>
#include <strings.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:3056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_string=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_header_string=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_header_string" 1>&6
if test $gcc_cv_header_string = yes; then
cat >> confdefs.h <<\EOF
#define STRING_WITH_STRINGS 1
EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:3077: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3082 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
int main() {
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if { (eval echo configure:3098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_sys_wait_h=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
if test $ac_cv_header_sys_wait_h = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_SYS_WAIT_H 1
EOF
fi
for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
direct.h malloc.h langinfo.h ldfcn.h wchar.h
1997-08-11 17:56:58 +02:00
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3125: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3130 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
1997-12-07 01:31:01 +01:00
fi
rm -f conftest*
1997-12-07 01:31:01 +01:00
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
1997-12-07 01:31:01 +01:00
fi
done
# Check for thread headers.
ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for thread.h""... $ac_c" 1>&6
echo "configure:3165: checking for thread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3170 "configure"
#include "confdefs.h"
#include <thread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_thread_h=yes
else
echo "$ac_t""no" 1>&6
have_thread_h=
fi
ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
echo "configure:3199: checking for pthread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3204 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_pthread_h=yes
else
echo "$ac_t""no" 1>&6
have_pthread_h=
fi
# These tests can't be done till we know if we have limits.h.
echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
echo "configure:3234: checking for CHAR_BIT" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3239 "configure"
#include "confdefs.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef CHAR_BIT
found
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "found" >/dev/null 2>&1; then
rm -rf conftest*
gcc_cv_decl_char_bit=yes
else
rm -rf conftest*
gcc_cv_decl_char_bit=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
if test $gcc_cv_decl_char_bit = no; then
echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
echo "configure:3264: checking number of bits in a byte" >&5
if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
i=8
gcc_cv_c_nbby=
while test $i -lt 65; do
cat > conftest.$ac_ext <<EOF
#line 3272 "configure"
#include "confdefs.h"
int main() {
switch(0) {
case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
; }
; return 0; }
EOF
if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_nbby=$i; break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
i=`expr $i + 1`
done
test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
fi
echo "$ac_t""$gcc_cv_c_nbby" 1>&6
if test $gcc_cv_c_nbby = failed; then
{ echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
else
cat >> confdefs.h <<EOF
#define CHAR_BIT $gcc_cv_c_nbby
EOF
fi
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:3307: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 3314 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif
; return 0; }
EOF
if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 3329 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_bigendian=no
fi
rm -f conftest*
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
echo $ac_n "cross-compiling... " 2>&6
else
cat > conftest.$ac_ext <<EOF
#line 3360 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
long l;
char c[sizeof (long)];
} u;
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_c_bigendian=yes
fi
rm -fr conftest*
fi
fi
fi
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = unknown; then
echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
echo "configure:3391: checking to probe for byte ordering" >&5
cat >conftest.c <<EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
int main() { _ascii (); _ebcdic (); return 0; }
EOF
if test -f conftest.c ; then
if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
if test `grep -l BIGenDianSyS conftest.o` ; then
echo $ac_n ' big endian probe OK, ' 1>&6
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o` ; then
echo $ac_n ' little endian probe OK, ' 1>&6
if test $ac_cv_c_bigendian = yes ; then
ac_cv_c_bigendian=unknown;
else
ac_cv_c_bigendian=no
fi
fi
echo $ac_n 'guessing bigendian ... ' >&6
fi
fi
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
fi
if test $ac_cv_c_bigendian = yes; then
cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF
cat >> confdefs.h <<\EOF
#define HOST_WORDS_BIG_ENDIAN 1
EOF
BYTEORDER=4321
else
BYTEORDER=1234
fi
cat >> confdefs.h <<EOF
#define BYTEORDER $BYTEORDER
EOF
if test $ac_cv_c_bigendian = unknown; then
{ echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
fi
# --------
# UNSORTED
# --------
# Stage specific cflags for build.
stage1_cflags=
case $build in
vax-*-*)
if test x$GCC = xyes
then
stage1_cflags="-Wa,-J"
else
stage1_cflags="-J"
fi
;;
powerpc-*-darwin*)
# The spiffy cpp-precomp chokes on some legitimate constructs in GCC
# sources; use -no-cpp-precomp to get to GNU cpp.
# Apple's GCC has bugs in designated initializer handling, so disable
# that too.
stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
;;
esac
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
echo "configure:3471: checking for collect2 libraries" >&5
if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_LIBS="$LIBS"
for libs in '' -lld -lmld \
'-L/usr/lib/cmplrs/cc2.11 -lmld' \
'-L/usr/lib/cmplrs/cc3.11 -lmld'
do
LIBS="$libs"
cat > conftest.$ac_ext <<EOF
#line 3482 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char ldopen();
int main() {
ldopen()
; return 0; }
EOF
if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gcc_cv_collect2_libs="$libs"; break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$save_LIBS"
test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
fi
echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
case $gcc_cv_collect2_libs in
"none required") ;;
*) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
esac
# When building Ada code on Alpha, we need exc_resume which is usually in
# -lexc. So test for it.
save_LIBS="$LIBS"
LIBS=
echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
echo "configure:3519: checking for library containing exc_resume" >&5
if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_exc_resume="no"
cat > conftest.$ac_ext <<EOF
#line 3526 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char exc_resume();
int main() {
exc_resume()
; return 0; }
EOF
if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_exc_resume="none required"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3548 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char exc_resume();
int main() {
exc_resume()
; return 0; }
EOF
if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_exc_resume="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
if test "$ac_cv_search_exc_resume" != "no"; then
test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
else :
fi
GNAT_LIBEXC="$LIBS"
LIBS="$save_LIBS"
# Some systems put ldexp and frexp in libm instead of libc; assume
# they're both in the same place. jcf-dump needs them.
save_LIBS="$LIBS"
LIBS=
echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
echo "configure:3589: checking for library containing ldexp" >&5
if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_ldexp="no"
cat > conftest.$ac_ext <<EOF
#line 3596 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char ldexp();
int main() {
ldexp()
; return 0; }
EOF
if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_ldexp="none required"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_ldexp" = "no" && for i in m; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3618 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char ldexp();
int main() {
ldexp()
; return 0; }
EOF
if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_ldexp="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$ac_t""$ac_cv_search_ldexp" 1>&6
if test "$ac_cv_search_ldexp" != "no"; then
test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
else :
fi
LDEXP_LIB="$LIBS"
LIBS="$save_LIBS"
# See if the stage1 system preprocessor understands the ANSI C
# preprocessor stringification operator. (Used by symcat.h.)
echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
echo "configure:3658: checking for preprocessor stringizing operator" >&5
if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3663 "configure"
#include "confdefs.h"
#define x(y) #y
char *s = x(teststring);
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "#teststring" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_c_stringize=no
else
rm -rf conftest*
ac_cv_c_stringize=yes
fi
rm -f conftest*
fi
if test "${ac_cv_c_stringize}" = yes
then
cat >> confdefs.h <<\EOF
#define HAVE_STRINGIZE 1
EOF
fi
echo "$ac_t""${ac_cv_c_stringize}" 1>&6
1997-12-07 01:31:01 +01:00
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
echo "configure:3696: checking for inttypes.h" >&5
if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3701 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
#include <sys/types.h>
#include <inttypes.h>
int main() {
1997-12-07 01:31:01 +01:00
intmax_t i = -1;
; return 0; }
EOF
if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-07 14:00:46 +01:00
gcc_cv_header_inttypes_h=yes
1997-12-07 01:31:01 +01:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_header_inttypes_h=no
1997-12-07 01:31:01 +01:00
fi
rm -f conftest*
1997-12-07 01:31:01 +01:00
fi
echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-07 14:00:46 +01:00
if test $gcc_cv_header_inttypes_h = yes; then
cat >> confdefs.h <<\EOF
configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-07 14:00:46 +01:00
#define HAVE_INTTYPES_H 1
EOF
configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-07 14:00:46 +01:00
fi
1997-12-07 01:31:01 +01:00
for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
scandir alphasort gettimeofday mbstowcs wcswidth
1997-12-07 01:31:01 +01:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3736: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3741 "configure"
#include "confdefs.h"
1997-12-07 01:31:01 +01:00
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
1997-12-07 01:31:01 +01:00
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
1997-12-07 01:31:01 +01:00
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
1997-12-07 01:31:01 +01:00
#endif
; return 0; }
EOF
if { (eval echo configure:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
1997-12-07 01:31:01 +01:00
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
1997-12-07 01:31:01 +01:00
fi
done
if test x$ac_cv_func_mbstowcs = xyes; then
echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
echo "configure:3791: checking whether mbstowcs works" >&5
if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
gcc_cv_func_mbstowcs_works=yes
else
cat > conftest.$ac_ext <<EOF
#line 3799 "configure"
#include "confdefs.h"
#include <stdlib.h>
int main()
{
mbstowcs(0, "", 0);
return 0;
}
EOF
if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_func_mbstowcs_works=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
gcc_cv_func_mbstowcs_works=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
if test x$gcc_cv_func_mbstowcs_works = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_WORKING_MBSTOWCS 1
EOF
fi
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
echo "configure:3832: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3837 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_ssize_t=yes
else
rm -rf conftest*
ac_cv_type_ssize_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
if test $ac_cv_type_ssize_t = no; then
cat >> confdefs.h <<\EOF
#define ssize_t int
EOF
fi
# Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t).
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:3868: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3873 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "uid_t" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_uid_t=yes
else
rm -rf conftest*
ac_cv_type_uid_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_uid_t" 1>&6
if test $ac_cv_type_uid_t = no; then
cat >> confdefs.h <<\EOF
#define uid_t int
EOF
cat >> confdefs.h <<\EOF
#define gid_t int
EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
echo "configure:3902: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
#line 3910 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
#include <sys/types.h>
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
main()
{
gid_t gidset[NGID];
int i, n;
union { gid_t gval; long lval; } val;
val.lval = -1;
for (i = 0; i < NGID; i++)
gidset[i] = val.gval;
n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
gidset);
/* Exit non-zero if getgroups seems to require an array of ints. This
happens when gid_t is short but getgroups modifies an array of ints. */
exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
}
EOF
if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_type_getgroups=int
fi
rm -fr conftest*
fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
#line 3949 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_getgroups=gid_t
else
rm -rf conftest*
ac_cv_type_getgroups=int
fi
rm -f conftest*
fi
fi
echo "$ac_t""$ac_cv_type_getgroups" 1>&6
cat >> confdefs.h <<EOF
#define GETGROUPS_T $ac_cv_type_getgroups
EOF
if test "${target}" = "${build}"; then
TARGET_GETGROUPS_T=$ac_cv_type_getgroups
else
case "${target}" in
# This condition may need some tweaking. It should include all
# targets where the array type of the second argument of getgroups
# is int and the type of gid_t is not equivalent to int.
*-*-sunos* | *-*-ultrix*)
TARGET_GETGROUPS_T=int
;;
*)
TARGET_GETGROUPS_T=gid_t
;;
esac
fi
echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
echo "configure:3990: checking whether the printf functions support %p" >&5
if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
gcc_cv_func_printf_ptr=no
else
cat > conftest.$ac_ext <<EOF
#line 3998 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
char buf[64];
char *p = buf, *q = NULL;
sprintf(buf, "%p", p);
sscanf(buf, "%p", &q);
return (p != q);
}
EOF
if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_func_printf_ptr=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
gcc_cv_func_printf_ptr=no
fi
rm -fr conftest*
fi
rm -f core core.* *.core
fi
echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
if test $gcc_cv_func_printf_ptr = yes ; then
cat >> confdefs.h <<\EOF
#define HAVE_PRINTF_PTR 1
EOF
fi
case "${host}" in
*-*-uwin*)
{ echo "configure: error:
*** UWIN may not be used as a host platform because
*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
;;
*-*-*vms*)
# Under VMS, vfork works very different than on Unix. The standard test
# won't work, and it isn't easily adaptable. It makes more sense to
# just force it.
ac_cv_func_vfork_works=yes
;;
esac
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:4049: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4054 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_pid_t=yes
else
rm -rf conftest*
ac_cv_type_pid_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = no; then
cat >> confdefs.h <<\EOF
#define pid_t int
EOF
fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
echo "configure:4083: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4088 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_VFORK_H 1
EOF
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
echo "configure:4118: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
echo "configure:4124: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4129 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char vfork();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_vfork) || defined (__stub___vfork)
choke me
#else
vfork();
#endif
; return 0; }
EOF
if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_vfork=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
#line 4174 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent.
The compiler is told about this with #include <vfork.h>,
but some compilers (e.g. gcc -O) don't grok <vfork.h>.
Test for this by using a static variable whose address
is put into a register that is clobbered by the vfork. */
static
#ifdef __cplusplus
sparc_address_test (int arg)
#else
sparc_address_test (arg) int arg;
#endif
{
static pid_t child;
if (!child) {
child = vfork ();
if (child < 0) {
perror ("vfork");
_exit(2);
}
if (!child) {
arg = getpid();
write(-1, "", 0);
_exit (arg);
}
}
}
main() {
pid_t parent = getpid ();
pid_t child;
sparc_address_test ();
child = vfork ();
if (child == 0) {
/* Here is another test for sparc vfork register problems.
This test uses lots of local variables, at least
as many local variables as main has allocated so far
including compiler temporaries. 4 locals are enough for
gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
A buggy compiler should reuse the register of parent
for one of the local variables, since it will think that
parent can't possibly be used any more in this routine.
Assigning to the local variable will thus munge parent
in the parent process. */
pid_t
p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
/* Convince the compiler that p..p7 are live; otherwise, it might
use the same hardware register for all 8 local variables. */
if (p != p1 || p != p2 || p != p3 || p != p4
|| p != p5 || p != p6 || p != p7)
_exit(1);
/* On some systems (e.g. IRIX 3.3),
vfork doesn't separate parent from child file descriptors.
If the child closes a descriptor before it execs or exits,
this munges the parent's descriptor as well.
Test for this by closing stdout in the child. */
_exit(close(fileno(stdout)) != 0);
} else {
int status;
struct stat st;
while (wait(&status) != child)
;
exit(
/* Was there some problem with vforking? */
child < 0
/* Did the child fail? (This shouldn't happen.) */
|| status
/* Did the vfork/compiler bug occur? */
|| parent != getpid()
/* Did the file descriptor bug occur? */
|| fstat(fileno(stdout), &st) != 0
);
}
}
EOF
if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_func_vfork_works=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
if test $ac_cv_func_vfork_works = no; then
cat >> confdefs.h <<\EOF
#define vfork fork
EOF
fi
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4294: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4299 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
# The test program for the next two tests is the same except for one
# set of ifdefs.
cat >ct-mmap.inc <<'EOF'
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <signal.h>
#include <setjmp.h>
#include <stdio.h>
#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
# define HAVE_SYS_PARAM_H 1
# endif
# ifdef _SC_PAGESIZE
# define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
# ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
# else /* no EXEC_PAGESIZE */
# ifdef NBPG
# define getpagesize() NBPG * CLSIZE
# ifndef CLSIZE
# define CLSIZE 1
# endif /* no CLSIZE */
# else /* no NBPG */
# ifdef NBPC
# define getpagesize() NBPC
# else /* no NBPC */
# ifdef PAGESIZE
# define getpagesize() PAGESIZE
# endif /* PAGESIZE */
# endif /* no NBPC */
# endif /* no NBPG */
# endif /* no EXEC_PAGESIZE */
# else /* no HAVE_SYS_PARAM_H */
# define getpagesize() 8192 /* punt totally */
# endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */
#endif /* no HAVE_GETPAGESIZE */
#ifndef MAP_FAILED
# define MAP_FAILED -1
#endif
#undef perror_exit
#define perror_exit(str, val) \
do { perror(str); exit(val); } while (0)
/* Some versions of cygwin mmap require that munmap is called with the
same parameters as mmap. GCC expects that this is not the case.
Test for various forms of this problem. Warning - icky signal games. */
static sigset_t unblock_sigsegv;
static jmp_buf r;
static size_t pg;
static int devzero;
static char *
anonmap (size)
size_t size;
{
#ifdef USE_MAP_ANON
return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
#else
return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE, devzero, 0);
#endif
}
static void
sigsegv (unused)
int unused;
{
sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
longjmp (r, 1);
}
/* Basic functionality test. */
void
test_0 ()
{
char *x = anonmap (pg);
if (x == (char *) MAP_FAILED)
perror_exit("test 0 mmap", 2);
*(int *)x += 1;
if (munmap(x, pg) < 0)
perror_exit("test 0 munmap", 3);
}
/* 1. If we map a 2-page region and unmap its second page, the first page
must remain. */
static void
test_1 ()
{
char *x = anonmap (pg * 2);
if (x == (char *)MAP_FAILED)
perror_exit ("test 1 mmap", 4);
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 1 fault", 5);
x[0] = 1;
x[pg] = 1;
if (munmap (x + pg, pg) < 0)
perror_exit ("test 1 munmap 1", 6);
x[0] = 2;
if (setjmp (r) == 0)
{
x[pg] = 1;
perror_exit ("test 1 no fault", 7);
}
if (munmap (x, pg) < 0)
perror_exit ("test 1 munmap 2", 8);
}
/* 2. If we map a 2-page region and unmap its first page, the second
page must remain. */
static void
test_2 ()
{
char *x = anonmap (pg * 2);
if (x == (char *)MAP_FAILED)
perror_exit ("test 2 mmap", 9);
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 2 fault", 10);
x[0] = 1;
x[pg] = 1;
if (munmap (x, pg) < 0)
perror_exit ("test 2 munmap 1", 11);
x[pg] = 2;
if (setjmp (r) == 0)
{
x[0] = 1;
perror_exit ("test 2 no fault", 12);
}
if (munmap (x+pg, pg) < 0)
perror_exit ("test 2 munmap 2", 13);
}
/* 3. If we map two adjacent 1-page regions and unmap them both with
one munmap, both must go away.
Getting two adjacent 1-page regions with two mmap calls is slightly
tricky. All OS's tested skip over already-allocated blocks; therefore
we have been careful to unmap all allocated regions in previous tests.
HP/UX allocates pages backward in memory. No OS has yet been observed
to be so perverse as to leave unmapped space between consecutive calls
to mmap. */
static void
test_3 ()
{
char *x, *y, *z;
x = anonmap (pg);
if (x == (char *)MAP_FAILED)
perror_exit ("test 3 mmap 1", 14);
y = anonmap (pg);
if (y == (char *)MAP_FAILED)
perror_exit ("test 3 mmap 2", 15);
if (y != x + pg)
{
if (y == x - pg)
z = y, y = x, x = z;
else
{
fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
(unsigned long)x, (unsigned long)y);
exit (16);
}
}
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 3 fault", 17);
x[0] = 1;
y[0] = 1;
if (munmap (x, pg*2) < 0)
perror_exit ("test 3 munmap", 18);
if (setjmp (r) == 0)
{
x[0] = 1;
perror_exit ("test 3 no fault 1", 19);
}
signal (SIGSEGV, sigsegv);
if (setjmp (r) == 0)
{
y[0] = 1;
perror_exit ("test 3 no fault 2", 20);
}
}
int
main ()
{
sigemptyset (&unblock_sigsegv);
sigaddset (&unblock_sigsegv, SIGSEGV);
pg = getpagesize ();
#ifndef USE_MAP_ANON
devzero = open ("/dev/zero", O_RDWR);
if (devzero < 0)
perror_exit ("open /dev/zero", 1);
#endif
test_0();
test_1();
test_2();
test_3();
exit(0);
}
EOF
echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
echo "configure:4593: checking for working mmap from /dev/zero" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
# When cross-building, assume that this works, unless we know it
# doesn't. Of course, we have no way of knowing if there even is a /dev/zero
# on the host, let alone whether mmap will work on it.
case "$host_os" in
cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
darwin* ) ac_cv_func_mmap_dev_zero=no ;;
* ) ac_cv_func_mmap_dev_zero=yes ;;
esac
else
cat > conftest.$ac_ext <<EOF
#line 4608 "configure"
#include "confdefs.h"
#include "ct-mmap.inc"
EOF
if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_dev_zero=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
if test $? -lt 4
then ac_cv_func_mmap_dev_zero=no
else ac_cv_func_mmap_dev_zero=buggy
fi
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
if test $ac_cv_func_mmap_dev_zero = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_MMAP_DEV_ZERO 1
EOF
fi
echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
echo "configure:4639: checking for working mmap with MAP_ANON(YMOUS)" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
# Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
# just because it's there. Some SCO Un*xen define it but don't implement it.
case "$host_os" in
darwin* ) ac_cv_func_mmap_anon=yes ;;
* ) ac_cv_func_mmap_anon=no ;;
esac
else
cat > conftest.$ac_ext <<EOF
#line 4652 "configure"
#include "confdefs.h"
#define USE_MAP_ANON
#include "ct-mmap.inc"
EOF
if { (eval echo configure:4657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_anon=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
if test $? -lt 4
then ac_cv_func_mmap_anon=no
else ac_cv_func_mmap_anon=buggy
fi
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
if test $ac_cv_func_mmap_anon = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_MMAP_ANON 1
EOF
fi
rm -f ct-mmap.inc
echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
echo "configure:4685: checking for working mmap of a file" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Create a file one thousand bytes long.
for i in 1 2 3 4 5 6 7 8 9 0
do for j in 1 2 3 4 5 6 7 8 9 0
do echo $i $j xxxxx
done
done > conftestdata$$
if test "$cross_compiling" = yes; then
case "$host_os" in
darwin* ) ac_cv_func_mmap_file=yes ;;
* ) ac_cv_func_mmap_file=no ;;
esac
else
cat > conftest.$ac_ext <<EOF
#line 4703 "configure"
#include "confdefs.h"
/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
Richard Henderson and Alexandre Oliva.
Check whether read-only mmap of a plain file works. */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
int main()
{
char *x;
int fd;
struct stat st;
fd = open("conftestdata$$", O_RDONLY);
if (fd < 0)
exit(1);
if (fstat (fd, &st))
exit(2);
x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (x == (char *) -1)
exit(3);
if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
exit(4);
if (munmap(x, st.st_size) < 0)
exit(5);
exit(0);
}
EOF
if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_file=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_func_mmap_file=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
if test $ac_cv_func_mmap_file = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_MMAP_FILE 1
EOF
fi
am_cv_lib_iconv_ldpath=
# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
withval="$with_libiconv_prefix"
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
done
fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
echo "configure:4779: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
#line 4787 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
; return 0; }
EOF
if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
cat > conftest.$ac_ext <<EOF
#line 4809 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
; return 0; }
EOF
if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
LIBS="$am_save_LIBS"
fi
fi
echo "$ac_t""$am_cv_func_iconv" 1>&6
if test "$am_cv_func_iconv" = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
echo "configure:4840: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4846 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
int main() {
; return 0; }
EOF
if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
am_cv_proto_iconv_arg1="const"
fi
rm -f conftest*
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
echo "$ac_t""${ac_t:-
}$am_cv_proto_iconv" 1>&6
cat >> confdefs.h <<EOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
EOF
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
for ac_func in getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
fprintf_unlocked strstr errno vasprintf \
malloc realloc calloc free basename getopt clock
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
echo "configure:4903: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4908 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
#include "ansidecl.h"
#include "system.h"
int main() {
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
if { (eval echo configure:4922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 1
EOF
else
echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 0
EOF
fi
done
if test x = y ; then
cat >> confdefs.h <<\EOF
#define HAVE_DECL_GETENV 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_ATOL 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_SBRK 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_ABORT 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_ATOF 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_GETCWD 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_GETWD 1
EOF
\
cat >> confdefs.h <<\EOF
#define HAVE_DECL_STRSIGNAL 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_PUTC_UNLOCKED 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_FPUTS_UNLOCKED 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_FWRITE_UNLOCKED 1
EOF
\
cat >> confdefs.h <<\EOF
#define HAVE_DECL_FPRINTF_UNLOCKED 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_STRSTR 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_ERRNO 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_VASPRINTF 1
EOF
\
cat >> confdefs.h <<\EOF
#define HAVE_DECL_MALLOC 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_REALLOC 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_CALLOC 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_FREE 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_BASENAME 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_GETOPT 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_CLOCK 1
EOF
fi
for ac_func in getrlimit setrlimit getrusage
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
echo "configure:5024: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5029 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
int main() {
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
if { (eval echo configure:5047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 1
EOF
else
echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 0
EOF
fi
done
if test x = y ; then
cat >> confdefs.h <<\EOF
#define HAVE_DECL_GETRLIMIT 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_SETRLIMIT 1
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DECL_GETRUSAGE 1
EOF
fi
cat > conftest.$ac_ext <<EOF
#line 5086 "configure"
#include "confdefs.h"
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
int main() {
rlim_t l = 0;
; return 0; }
EOF
if { (eval echo configure:5099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define rlim_t long
EOF
fi
rm -f conftest*
for ac_func in ldgetname
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
echo "configure:5116: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5121 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_LDFCN_H
#include <ldfcn.h>
#endif
int main() {
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
if { (eval echo configure:5139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 1
EOF
else
echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 0
EOF
fi
done
if test x = y ; then
cat >> confdefs.h <<\EOF
#define HAVE_DECL_LDGETNAME 1
EOF
fi
for ac_func in times
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
echo "configure:5175: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5180 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
int main() {
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
if { (eval echo configure:5198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 1
EOF
else
echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
#define $ac_tr_decl 0
EOF
fi
done
if test x = y ; then
cat >> confdefs.h <<\EOF
#define HAVE_DECL_TIMES 1
EOF
fi
# More time-related stuff.
echo $ac_n "checking for struct tms""... $ac_c" 1>&6
echo "configure:5232: checking for struct tms" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5238 "configure"
#include "confdefs.h"
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
int main() {
struct tms tms;
; return 0; }
EOF
if { (eval echo configure:5251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tms=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_struct_tms=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_struct_tms" 1>&6
if test $ac_cv_struct_tms = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_TMS 1
EOF
fi
# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
# revisit after autoconf 2.50.
echo $ac_n "checking for clock_t""... $ac_c" 1>&6
echo "configure:5274: checking for clock_t" >&5
if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5280 "configure"
#include "confdefs.h"
#include "ansidecl.h"
#include "system.h"
int main() {
clock_t x;
; return 0; }
EOF
if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_type_clock_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_type_clock_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
if test $gcc_cv_type_clock_t = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_CLOCK_T 1
EOF
fi
echo $ac_n "checking for uchar""... $ac_c" 1>&6
echo "configure:5311: checking for uchar" >&5
if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5316 "configure"
#include "confdefs.h"
#include "ansidecl.h"
#include "system.h"
int main() {
if ((uchar *)0) return 0;
if (sizeof(uchar)) return 0;
; return 0; }
EOF
if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_uchar=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_type_uchar=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_type_uchar" 1>&6
if test $ac_cv_type_uchar = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_UCHAR 1
EOF
fi
# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
CFLAGS="$saved_CFLAGS"
# Check whether --enable-initfini-array or --disable-initfini-array was given.
if test "${enable_initfini_array+set}" = set; then
enableval="$enable_initfini_array"
:
else
echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
echo "configure:5357: checking for .preinit_array/.init_array/.fini_array support" >&5
if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
gcc_cv_initfini_array=no
else
cat > conftest.$ac_ext <<EOF
#line 5365 "configure"
#include "confdefs.h"
static int x = -1;
int main (void) { return x; }
int foo (void) { x = 0; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
EOF
if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_initfini_array=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
gcc_cv_initfini_array=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$gcc_cv_initfini_array" 1>&6
enable_initfini_array=$gcc_cv_initfini_array
fi
if test $enable_initfini_array = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_INITFINI_ARRAY 1
EOF
fi
# mkdir takes a single argument on some systems.
echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
echo "configure:5401: checking if mkdir takes one argument" >&5
if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5406 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_DIRECT_H
# include <direct.h>
#endif
int main() {
mkdir ("foo", 0);
; return 0; }
EOF
if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_mkdir_takes_one_arg=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_mkdir_takes_one_arg=yes
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
if test $gcc_cv_mkdir_takes_one_arg = yes ; then
cat >> confdefs.h <<\EOF
#define MKDIR_TAKES_ONE_ARG 1
EOF
fi
1997-08-11 17:56:58 +02:00
# File extensions
manext='.1'
objext='.o'
# With Setjmp/Longjmp based exception handling.
# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
if test "${enable_sjlj_exceptions+set}" = set; then
enableval="$enable_sjlj_exceptions"
sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
cat >> confdefs.h <<EOF
#define CONFIG_SJLJ_EXCEPTIONS $sjlj
EOF
fi
echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
echo "configure:5463: checking for main in -lunwind" >&5
ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lunwind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5471 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
use_libunwind_default=yes
else
echo "$ac_t""no" 1>&6
use_libunwind_default=no
fi
# Use libunwind based exception handling.
# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
if test "${enable_libunwind_exceptions+set}" = set; then
enableval="$enable_libunwind_exceptions"
use_libunwind_exceptions=$enableval
else
use_libunwind_exceptions=$use_libunwind_default
fi
if test x"$use_libunwind_exceptions" = xyes; then
cat >> confdefs.h <<\EOF
#define USE_LIBUNWIND_EXCEPTIONS 1
EOF
fi
# --------------------------------------------------------
# Build, host, and target specific configuration fragments
# --------------------------------------------------------
target_gtfiles=
1997-08-11 17:56:58 +02:00
build_xm_file=
build_xm_defines=
1997-08-11 17:56:58 +02:00
build_install_headers_dir=install-headers-tar
build_exeext=
host_xm_file=
host_xm_defines=
1997-08-11 17:56:58 +02:00
host_xmake_file=
host_truncate_target=
host_exeext=
1997-08-11 17:56:58 +02:00
# Decode the host machine, then the target machine.
# For the host machine, we save the xm_file variable as host_xm_file;
# then we decode the target machine and forget everything else
# that came from the host machine.
for machine in $build $host $target; do
. ${srcdir}/config.gcc
1997-08-11 17:56:58 +02:00
done
extra_objs="${host_extra_objs} ${extra_objs}"
# Default the target-machine variables that were not explicitly set.
if test x"$tm_file" = x
1997-08-11 17:56:58 +02:00
then tm_file=$cpu_type/$cpu_type.h; fi
if test x"$extra_headers" = x
1997-08-11 17:56:58 +02:00
then extra_headers=; fi
if test x$md_file = x
then md_file=$cpu_type/$cpu_type.md; fi
1997-08-11 17:56:58 +02:00
if test x$out_file = x
1997-08-11 17:56:58 +02:00
then out_file=$cpu_type/$cpu_type.c; fi
if test x"$tmake_file" = x
1997-08-11 17:56:58 +02:00
then tmake_file=$cpu_type/t-$cpu_type
fi
if test x"$dwarf2" = xyes
then tm_file="$tm_file tm-dwarf2.h"
fi
1997-08-11 17:56:58 +02:00
# Say what files are being used for the output code and MD file.
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
1997-08-11 17:56:58 +02:00
echo "Using \`$srcdir/config/$md_file' as machine description file."
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
# If any of the xm_file variables contain nonexistent files, warn
# about them and drop them.
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
bx=
for x in $build_xm_file; do
if test -f $srcdir/config/$x
then bx="$bx $x"
else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
fi
done
build_xm_file="$bx"
hx=
for x in $host_xm_file; do
if test -f $srcdir/config/$x
then hx="$hx $x"
else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
fi
done
host_xm_file="$hx"
tx=
for x in $xm_file; do
if test -f $srcdir/config/$x
then tx="$tx $x"
else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
fi
done
xm_file="$tx"
1997-08-11 17:56:58 +02:00
count=a
for f in $tm_file; do
count=${count}x
done
if test $count = ax; then
1997-08-11 17:56:58 +02:00
echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
else
echo "Using the following target machine macro files:"
for f in $tm_file; do
echo " $srcdir/config/$f"
done
fi
if test x$need_64bit_hwint = xyes; then
cat >> confdefs.h <<\EOF
#define NEED_64BIT_HOST_WIDE_INT 1
EOF
fi
1997-08-11 17:56:58 +02:00
count=a
for f in $host_xm_file; do
count=${count}x
done
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
if test $count = a; then
:
elif test $count = ax; then
1997-08-11 17:56:58 +02:00
echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
else
echo "Using the following host machine macro files:"
for f in $host_xm_file; do
echo " $srcdir/config/$f"
done
fi
echo "Using ${out_host_hook_obj} for host machine hooks."
1997-08-11 17:56:58 +02:00
if test "$host_xm_file" != "$build_xm_file"; then
1997-08-11 17:56:58 +02:00
count=a
for f in $build_xm_file; do
count=${count}x
done
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
if test $count = a; then
:
elif test $count = ax; then
1997-08-11 17:56:58 +02:00
echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
else
echo "Using the following build machine macro files:"
for f in $build_xm_file; do
echo " $srcdir/config/$f"
done
fi
fi
if test x$thread_file = x; then
if test x$target_thread_file != x; then
thread_file=$target_thread_file
else
thread_file='single'
fi
1997-08-11 17:56:58 +02:00
fi
if test x$enable___cxa_atexit = xyes || \
test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
cat >> confdefs.h <<\EOF
#define DEFAULT_USE_CXA_ATEXIT 1
EOF
fi
# Look for a file containing extra machine modes.
if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
extra_modes_file='$(srcdir)'/config/${extra_modes}
cat >> confdefs.h <<EOF
#define EXTRA_MODES_FILE "$extra_modes"
EOF
cat >> confdefs.h <<\EOF
#define EXTRA_CC_MODES 1
EOF
fi
# auto-host.h is the file containing items generated by autoconf and is
# the first file included by config.h.
# If host=build, it is correct to have bconfig include auto-host.h
# as well. If host!=build, we are in error and need to do more
# work to find out the build config parameters.
if test x$host = x$build
then
configure.in: Kill tm.h. * configure.in: Kill tm.h. Include the files in the $tm_file list in all three of config.h, hconfig.h, tconfig.h, after the relevant set of xm_files. Put TARGET_CPU_DEFAULT in all three, include insn-codes.h in all three (#ifndef GENERATOR_FILE). * configure: Regenerate. * Makefile.in (clean): Don't delete tm.h. * system.h: If SUCCESS_EXIT_CODE and FATAL_EXIT_CODE are not defined, set them from EXIT_SUCCESS and EXIT_FAILURE. If those are not defined, set SEC and FEC to 0 and 1. * gcc.texi: Update to match. * crtstuff.c: Include tconfig.h, not auto-host.h and tm.h. * config/fp-bit.c, config/m68k/aux-crt2.asm, config/m68k/aux-crtn.asm, config/m68k/aux-mcount.c: Include tconfig.h, not tm.h. * config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h, config/a29k/xm-unix.h, config/alpha/xm-alpha.h, config/arc/xm-arc.h, config/avr/xm-avr.h, config/c4x/xm-c4x.h, config/clipper/xm-clix.h, config/convex/xm-convex.h, config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h, config/h8300/xm-h8300.h, config/i370/xm-linux.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/ia64/xm-ia64.h, config/m32r/xm-m32r.h, config/m68hc11/xm-m68hc11.h, config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, config/mips/xm-mips.h, config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pa/xm-linux.h, config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, config/pa/xm-papro.h, config/pdp11/xm-pdp11.h, config/pj/xm-pj.h, config/romp/xm-romp.h, config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h, config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, config/v850/xm-v850.h, config/vax/xm-vax.h, config/we32k/xm-we32k.h: Don't include tm.h. Don't define SUCCESS_EXIT_CODE or FATAL_EXIT_CODE. * config/i370/xm-i370.h, config/i370/xm-mvs.h, config/i370/xm-oe.h: Don't include tm.h. Don't define SUCCESS_EXIT_CODE. * config/vax/xm-vms.h: Don't include tm.h. * config/xm-lynx.h, config/avr/xm-avr.h, config/fr30/xm-fr30.h, config/pdp11/xm-pdp11.h, Delete; made empty by above changes. * config/i386/xm-lynx.h, config/m68k/xm-lynx.h, config/rs6000/xm-lynx.h, config/sparc/xm-lynx.h: Don't include config/xm-lynx.h or tm.h. * config/xm-gnu.h: Don't include fcntl.h. * config/sparc/xm-lynx.h: Don't include sys/types.h and sys/wait.h. * config/clipper/xm-clix.h, config/vax/xm-vax.h: Don't define isinf. From-SVN: r40199
2001-03-03 04:32:55 +01:00
build_auto=auto-host.h
FORBUILD=..
else
# We create a subdir, then run autoconf in the subdir.
# To prevent recursion we set host and build for the new
# invocation of configure to the build for this invocation
# of configure.
tempdir=build.$$
rm -rf $tempdir
mkdir $tempdir
cd $tempdir
case ${srcdir} in
/* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
*) realsrcdir=../${srcdir};;
esac
saved_CFLAGS="${CFLAGS}"
CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
${realsrcdir}/configure \
--target=$target_alias --host=$build_alias --build=$build_alias
CFLAGS="${saved_CFLAGS}"
# We just finished tests for the build machine, so rename
# the file auto-build.h in the gcc directory.
mv auto-host.h ../auto-build.h
cd ..
rm -rf $tempdir
configure.in: Kill tm.h. * configure.in: Kill tm.h. Include the files in the $tm_file list in all three of config.h, hconfig.h, tconfig.h, after the relevant set of xm_files. Put TARGET_CPU_DEFAULT in all three, include insn-codes.h in all three (#ifndef GENERATOR_FILE). * configure: Regenerate. * Makefile.in (clean): Don't delete tm.h. * system.h: If SUCCESS_EXIT_CODE and FATAL_EXIT_CODE are not defined, set them from EXIT_SUCCESS and EXIT_FAILURE. If those are not defined, set SEC and FEC to 0 and 1. * gcc.texi: Update to match. * crtstuff.c: Include tconfig.h, not auto-host.h and tm.h. * config/fp-bit.c, config/m68k/aux-crt2.asm, config/m68k/aux-crtn.asm, config/m68k/aux-mcount.c: Include tconfig.h, not tm.h. * config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h, config/a29k/xm-unix.h, config/alpha/xm-alpha.h, config/arc/xm-arc.h, config/avr/xm-avr.h, config/c4x/xm-c4x.h, config/clipper/xm-clix.h, config/convex/xm-convex.h, config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h, config/h8300/xm-h8300.h, config/i370/xm-linux.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/ia64/xm-ia64.h, config/m32r/xm-m32r.h, config/m68hc11/xm-m68hc11.h, config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, config/mips/xm-mips.h, config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pa/xm-linux.h, config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, config/pa/xm-papro.h, config/pdp11/xm-pdp11.h, config/pj/xm-pj.h, config/romp/xm-romp.h, config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h, config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, config/v850/xm-v850.h, config/vax/xm-vax.h, config/we32k/xm-we32k.h: Don't include tm.h. Don't define SUCCESS_EXIT_CODE or FATAL_EXIT_CODE. * config/i370/xm-i370.h, config/i370/xm-mvs.h, config/i370/xm-oe.h: Don't include tm.h. Don't define SUCCESS_EXIT_CODE. * config/vax/xm-vms.h: Don't include tm.h. * config/xm-lynx.h, config/avr/xm-avr.h, config/fr30/xm-fr30.h, config/pdp11/xm-pdp11.h, Delete; made empty by above changes. * config/i386/xm-lynx.h, config/m68k/xm-lynx.h, config/rs6000/xm-lynx.h, config/sparc/xm-lynx.h: Don't include config/xm-lynx.h or tm.h. * config/xm-gnu.h: Don't include fcntl.h. * config/sparc/xm-lynx.h: Don't include sys/types.h and sys/wait.h. * config/clipper/xm-clix.h, config/vax/xm-vax.h: Don't define isinf. From-SVN: r40199
2001-03-03 04:32:55 +01:00
build_auto=auto-build.h
FORBUILD=../build-$build_alias
fi
configure.in: Kill tm.h. * configure.in: Kill tm.h. Include the files in the $tm_file list in all three of config.h, hconfig.h, tconfig.h, after the relevant set of xm_files. Put TARGET_CPU_DEFAULT in all three, include insn-codes.h in all three (#ifndef GENERATOR_FILE). * configure: Regenerate. * Makefile.in (clean): Don't delete tm.h. * system.h: If SUCCESS_EXIT_CODE and FATAL_EXIT_CODE are not defined, set them from EXIT_SUCCESS and EXIT_FAILURE. If those are not defined, set SEC and FEC to 0 and 1. * gcc.texi: Update to match. * crtstuff.c: Include tconfig.h, not auto-host.h and tm.h. * config/fp-bit.c, config/m68k/aux-crt2.asm, config/m68k/aux-crtn.asm, config/m68k/aux-mcount.c: Include tconfig.h, not tm.h. * config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h, config/a29k/xm-unix.h, config/alpha/xm-alpha.h, config/arc/xm-arc.h, config/avr/xm-avr.h, config/c4x/xm-c4x.h, config/clipper/xm-clix.h, config/convex/xm-convex.h, config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h, config/h8300/xm-h8300.h, config/i370/xm-linux.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/ia64/xm-ia64.h, config/m32r/xm-m32r.h, config/m68hc11/xm-m68hc11.h, config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, config/mips/xm-mips.h, config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pa/xm-linux.h, config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, config/pa/xm-papro.h, config/pdp11/xm-pdp11.h, config/pj/xm-pj.h, config/romp/xm-romp.h, config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h, config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, config/v850/xm-v850.h, config/vax/xm-vax.h, config/we32k/xm-we32k.h: Don't include tm.h. Don't define SUCCESS_EXIT_CODE or FATAL_EXIT_CODE. * config/i370/xm-i370.h, config/i370/xm-mvs.h, config/i370/xm-oe.h: Don't include tm.h. Don't define SUCCESS_EXIT_CODE. * config/vax/xm-vms.h: Don't include tm.h. * config/xm-lynx.h, config/avr/xm-avr.h, config/fr30/xm-fr30.h, config/pdp11/xm-pdp11.h, Delete; made empty by above changes. * config/i386/xm-lynx.h, config/m68k/xm-lynx.h, config/rs6000/xm-lynx.h, config/sparc/xm-lynx.h: Don't include config/xm-lynx.h or tm.h. * config/xm-gnu.h: Don't include fcntl.h. * config/sparc/xm-lynx.h: Don't include sys/types.h and sys/wait.h. * config/clipper/xm-clix.h, config/vax/xm-vax.h: Don't define isinf. From-SVN: r40199
2001-03-03 04:32:55 +01:00
tm_file="${tm_file} defaults.h"
tm_p_file="${tm_p_file} tm-preds.h"
host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
# put this back in temporarily.
xm_file="ansidecl.h ${xm_file}"
configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-07 14:00:46 +01:00
# --------
# UNSORTED
# --------
1997-08-11 17:56:58 +02:00
# Truncate the target if necessary
if test x$host_truncate_target != x; then
1997-08-11 17:56:58 +02:00
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
fi
Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger. d egcs/ChangeLog: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger. (Makefile): Depend on $(gcc_version_trigger). * configure (gcc_version): Change default initializer to empty string. (gcc_version_trigger): New variable; pass this variable down to subdir configures to enable them checking gcc's version themselves. Emit make macros for both gcc_version vars. (topsrcdir): Initialize reliably. (recursion line): Remove --with-gcc-version=${gcc_version}. egcs/gcc/ChangeLog: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (gcc_version, gcc_version_trigger): New macros. (version): Initialize from $(gcc_version). * configure.in (version): Rename to gcc_version. (gcc_version_trigger): New variable; call AC_SUBST for it and emit it into the generated config.status. * configure: Regenerate. egcs/libf2c/ChangeLog.egcs: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (gcc_version_trigger): Add new macro. (config.status): Add dependency upon $(gcc_version_trigger). * configure.in (gcc_version_trigger): New variable; initialize using value from toplevel configure; add AC_SUBST for it. (gcc_version): Change initialization to use this new variable. * configure: Regenerate. egcs/libio/ChangeLog: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * config.shared (FLAGS_TO_PASS): Add gcc_version_trigger. (Makefile): Add dependency upon $(gcc_version_trigger). From-SVN: r20736
1998-06-26 04:13:51 +02:00
# Get the version trigger filename from the toplevel
if test "${with_gcc_version_trigger+set}" = set; then
Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger. d egcs/ChangeLog: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger. (Makefile): Depend on $(gcc_version_trigger). * configure (gcc_version): Change default initializer to empty string. (gcc_version_trigger): New variable; pass this variable down to subdir configures to enable them checking gcc's version themselves. Emit make macros for both gcc_version vars. (topsrcdir): Initialize reliably. (recursion line): Remove --with-gcc-version=${gcc_version}. egcs/gcc/ChangeLog: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (gcc_version, gcc_version_trigger): New macros. (version): Initialize from $(gcc_version). * configure.in (version): Rename to gcc_version. (gcc_version_trigger): New variable; call AC_SUBST for it and emit it into the generated config.status. * configure: Regenerate. egcs/libf2c/ChangeLog.egcs: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (gcc_version_trigger): Add new macro. (config.status): Add dependency upon $(gcc_version_trigger). * configure.in (gcc_version_trigger): New variable; initialize using value from toplevel configure; add AC_SUBST for it. (gcc_version): Change initialization to use this new variable. * configure: Regenerate. egcs/libio/ChangeLog: 1998-06-26 Manfred Hollstein <manfred@s-direktnet.de> * config.shared (FLAGS_TO_PASS): Add gcc_version_trigger. (Makefile): Add dependency upon $(gcc_version_trigger). From-SVN: r20736
1998-06-26 04:13:51 +02:00
gcc_version_trigger=$with_gcc_version_trigger
else
gcc_version_trigger=${srcdir}/version.c
fi
gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
1997-08-11 17:56:58 +02:00
# Compile in configure arguments.
if test -f configargs.h ; then
# Being re-configured.
gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
else
gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
fi
cat > configargs.h <<EOF
/* Generated automatically. */
static const char configuration_arguments[] = "$gcc_config_arguments";
static const char thread_model[] = "$thread_file";
static const struct {
const char *name, *value;
} configure_default_options[] = $configure_default_options;
EOF
# Internationalization
PACKAGE=gcc
VERSION="$gcc_version"
1997-08-11 17:56:58 +02:00
# Enable NLS support by default
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
:
1997-08-11 17:56:58 +02:00
else
enable_nls=yes
fi
1997-08-11 17:56:58 +02:00
# if cross compiling, disable NLS support.
# It's not worth the trouble, at least for now.
if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
enable_nls=no
fi
1997-08-11 17:56:58 +02:00
echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
echo "configure:5787: checking for library containing strerror" >&5
if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_strerror="no"
cat > conftest.$ac_ext <<EOF
#line 5794 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strerror();
int main() {
strerror()
; return 0; }
EOF
if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_strerror="none required"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
1997-08-11 17:56:58 +02:00
fi
rm -f conftest*
test "$ac_cv_search_strerror" = "no" && for i in cposix; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 5816 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strerror();
int main() {
strerror()
; return 0; }
EOF
if { (eval echo configure:5827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_strerror="-l$i"
break
1997-08-11 17:56:58 +02:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
1997-08-11 17:56:58 +02:00
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$ac_t""$ac_cv_search_strerror" 1>&6
if test "$ac_cv_search_strerror" != "no"; then
test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
else :
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:5850: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
1997-08-11 17:56:58 +02:00
else
cat > conftest.$ac_ext <<EOF
#line 5855 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in an arm
of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
; return 0; }
EOF
if { (eval echo configure:5904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
1997-08-11 17:56:58 +02:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_const=no
1997-08-11 17:56:58 +02:00
fi
rm -f conftest*
1997-08-11 17:56:58 +02:00
fi
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
cat >> confdefs.h <<\EOF
#define const
EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:5925: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5930 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_off_t=yes
else
rm -rf conftest*
ac_cv_type_off_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
cat >> confdefs.h <<\EOF
#define off_t long
EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:5958: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5963 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_size_t=yes
else
rm -rf conftest*
ac_cv_type_size_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:5993: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5998 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
if test $ac_cv_header_alloca_h = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA_H 1
EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:6026: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6031 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
# endif
#endif
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_func_alloca_works=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF
fi
if test $ac_cv_func_alloca_works = no; then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
ALLOCA=alloca.${ac_objext}
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:6091: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6096 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "webecray" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_os_cray=yes
else
rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6121: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6126 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF
break
else
echo "$ac_t""no" 1>&6
fi
done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:6176: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
#line 6184 "configure"
#include "confdefs.h"
find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
}
main ()
{
exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF
fi
echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
echo "configure:6226: checking whether we are using the GNU C Library 2.1 or newer" >&5
if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6231 "configure"
#include "confdefs.h"
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "Lucky GNU user" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_gnu_library_2_1=yes
else
rm -rf conftest*
ac_cv_gnu_library_2_1=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
GLIBC21="$ac_cv_gnu_library_2_1"
for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6267: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6272 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6308: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6313 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
am_cv_lib_iconv_ldpath=
# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
withval="$with_libiconv_prefix"
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
done
fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
echo "configure:6377: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
#line 6385 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
; return 0; }
EOF
if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
cat > conftest.$ac_ext <<EOF
#line 6407 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
; return 0; }
EOF
if { (eval echo configure:6417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
LIBS="$am_save_LIBS"
fi
fi
echo "$ac_t""$am_cv_func_iconv" 1>&6
if test "$am_cv_func_iconv" = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
echo "configure:6438: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6444 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
int main() {
; return 0; }
EOF
if { (eval echo configure:6463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
am_cv_proto_iconv_arg1="const"
fi
rm -f conftest*
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
echo "$ac_t""${ac_t:-
}$am_cv_proto_iconv" 1>&6
cat >> confdefs.h <<EOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
EOF
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi
echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
echo "configure:6492: checking for nl_langinfo and CODESET" >&5
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6497 "configure"
#include "confdefs.h"
#include <langinfo.h>
int main() {
char* cs = nl_langinfo(CODESET);
; return 0; }
EOF
if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_langinfo_codeset=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
am_cv_langinfo_codeset=no
fi
rm -f conftest*
fi
echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
if test $am_cv_langinfo_codeset = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_LANGINFO_CODESET 1
EOF
fi
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:6527: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6532 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
am_cv_val_LC_MESSAGES=no
fi
rm -f conftest*
fi
echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
if test $am_cv_val_LC_MESSAGES = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_LC_MESSAGES 1
EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
echo "configure:6560: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
fi
echo "$ac_t""$USE_NLS" 1>&6
BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no
INTLLIBS=
INTLDEPS=
if test "$USE_NLS" = "yes"; then
cat >> confdefs.h <<\EOF
#define ENABLE_NLS 1
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
echo "configure:6583: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
fi
echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
CATOBJEXT=NONE
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
echo "configure:6603: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6608 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_LIBINTL_H 1
EOF
echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
echo "configure:6634: checking for GNU gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6639 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int main() {
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gnugettext1_libc=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gt_cv_func_gnugettext1_libc=no
fi
rm -f conftest*
fi
echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
echo "configure:6664: checking for GNU gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gt_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $LIBICONV"
cat > conftest.$ac_ext <<EOF
#line 6671 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int main() {
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gnugettext1_libintl=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gt_cv_func_gnugettext1_libintl=no
fi
rm -f conftest*
LIBS="$gt_save_LIBS"
fi
echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
fi
if test "$gt_cv_func_gnugettext1_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
&& test "$PACKAGE" != gettext; }; then
cat >> confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF
if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
INTLLIBS="-lintl $LIBICONV"
fi
gt_save_LIBS="$LIBS"
LIBS="$LIBS $INTLLIBS"
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6713: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6718 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
LIBS="$gt_save_LIBS"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6770: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$MSGFMT" in
/*)
ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
ac_cv_path_MSGFMT="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
echo "$ac_t""$MSGFMT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6804: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$GMSGFMT" in
/*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
echo "$ac_t""$GMSGFMT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6841: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$XGETTEXT" in
/*)
ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
echo "$ac_t""$XGETTEXT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
CATOBJEXT=.gmo
fi
else
echo "$ac_t""no" 1>&6
fi
if test "$CATOBJEXT" = "NONE"; then
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
INTLOBJS="\$(GETTOBJS)"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6891: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$MSGFMT" in
/*)
ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
ac_cv_path_MSGFMT="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
echo "$ac_t""$MSGFMT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6925: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$GMSGFMT" in
/*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
echo "$ac_t""$GMSGFMT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6961: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$XGETTEXT" in
/*)
ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
echo "$ac_t""$XGETTEXT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
INTLDEPS="\$(top_builddir)/intl/libintl.a"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
fi
if test "$GMSGFMT" != ":"; then
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
: ;
else
echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
GMSGFMT=":"
fi
fi
if test "$XGETTEXT" != ":"; then
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
: ;
else
echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
XGETTEXT=":"
fi
fi
POSUB=po
fi
if test "$PACKAGE" = gettext; then
BUILD_INCLUDED_LIBINTL=yes
fi
for ac_prog in bison
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7033: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$INTLBISON"; then
ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_INTLBISON="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
INTLBISON="$ac_cv_prog_INTLBISON"
if test -n "$INTLBISON"; then
echo "$ac_t""$INTLBISON" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$INTLBISON" && break
done
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
echo $ac_n "checking version of bison""... $ac_c" 1>&6
echo "configure:7066: checking version of bison" >&5
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
echo "$ac_t""$ac_prog_version" 1>&6
fi
if test $ac_verc_fail = yes; then
INTLBISON=:
fi
if test $USE_INCLUDED_LIBINTL = yes; then
cat >> confdefs.h <<\EOF
#define USE_INCLUDED_LIBINTL 1
EOF
fi
nls_cv_header_intl=
nls_cv_header_libgt=
DATADIRNAME=share
INSTOBJEXT=.mo
GENCAT=gencat
if test "x$CATOBJEXT" != x; then
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
echo "configure:7111: checking for catalogs to be installed" >&5
# Look for .po and .gmo files in the source directory.
CATALOGS=
XLINGUAS=
for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
# If there aren't any .gmo files the shell will give us the
# literal string "../path/to/srcdir/po/*.gmo" which has to be
# weeded out.
case "$cat" in *\**)
continue;;
esac
# The quadruple backslash is collapsed to a double backslash
# by the backticks, then collapsed again by the double quotes,
# leaving us with one backslash in the sed expression (right
# before the dot that mustn't act as a wildcard). The dot to
# be escaped in the second expression is hiding inside CATOBJEXT.
cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
# The user is allowed to set LINGUAS to a list of languages to
# install catalogs for. If it's empty that means "all of them."
if test "x$LINGUAS" = x; then
CATALOGS="$CATALOGS $cat"
XLINGUAS="$XLINGUAS $lang"
else
case "$LINGUAS" in *$lang*)
CATALOGS="$CATALOGS $cat"
XLINGUAS="$XLINGUAS $lang"
;;
esac
fi
done
LINGUAS="$XLINGUAS"
echo "$ac_t""$LINGUAS" 1>&6
fi
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
INTL_LIBTOOL_SUFFIX_PREFIX=
# Windows32 Registry support for specifying GCC installation paths.
# Check whether --enable-win32-registry or --disable-win32-registry was given.
if test "${enable_win32_registry+set}" = set; then
enableval="$enable_win32_registry"
:
fi
case $host_os in
win32 | pe | cygwin* | mingw32* | uwin*)
echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
echo "configure:7169: checking whether windows registry support is requested" >&5
if test "x$enable_win32_registry" != xno; then
cat >> confdefs.h <<\EOF
#define ENABLE_WIN32_REGISTRY 1
EOF
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
echo "configure:7178: checking for library containing RegOpenKeyExA" >&5
if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_RegOpenKeyExA="no"
cat > conftest.$ac_ext <<EOF
#line 7185 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char RegOpenKeyExA();
int main() {
RegOpenKeyExA()
; return 0; }
EOF
if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_RegOpenKeyExA="none required"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 7207 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char RegOpenKeyExA();
int main() {
RegOpenKeyExA()
; return 0; }
EOF
if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_RegOpenKeyExA="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
else :
fi
else
echo "$ac_t""no" 1>&6
fi
# Check if user specified a different registry key.
case "x${enable_win32_registry}" in
x | xyes)
# default.
gcc_cv_win32_registry_key="$VERSION"
;;
xno)
# no registry lookup.
gcc_cv_win32_registry_key=''
;;
*)
# user-specified key.
gcc_cv_win32_registry_key="$enable_win32_registry"
;;
esac
if test "x$enable_win32_registry" != xno; then
echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
echo "configure:7260: checking registry key on windows hosts" >&5
cat >> confdefs.h <<EOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
EOF
echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
fi
;;
esac
# Get an absolute path to the GCC top-level source directory
Makefile.in: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * config-ml.in: Likewise. * configure: Likewise. * configure.in: Likewise. boehm-gc: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Regenerate. * configure: Regenerate. config: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. contrib: * test_installed: Allow for PWDCMD to override hardcoded pwd. * test_summary: Likewise. gcc: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * fixinc/check.tpl: Likewise. * fixinc/fixinc.dgux: Likewise. * fixinc/fixinc.svr4: Likewise. * fixinc/fixinc.winnt: Likewise. * fixinc/fixincl.sh: Likewise. * fixproto: Likewise. * configure: Regenerate. gcc/ada: * Makefile.adalib: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Likewise. gcc/f: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/java: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/po: * exgettext: Allow for PWDCMD to override hardcoded pwd. gcc/treelang: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. libf2c: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Likewise. * configure: Regenerate. libjava: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. libobjc: * aclocal.m4: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. libstdc++-v3: * Makefile.am: Allow for PWDCMD to override hardcoded pwd. * acinclude.m4: Likewise. * docs/html/Makefile: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. zlib: * configure.in: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. * ChangeLog: Move entries to ChangeLog.gcj. From-SVN: r53523
2002-05-16 19:43:21 +02:00
holddir=`${PWDCMD-pwd}`
cd $srcdir
Makefile.in: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * config-ml.in: Likewise. * configure: Likewise. * configure.in: Likewise. boehm-gc: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Regenerate. * configure: Regenerate. config: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. contrib: * test_installed: Allow for PWDCMD to override hardcoded pwd. * test_summary: Likewise. gcc: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * fixinc/check.tpl: Likewise. * fixinc/fixinc.dgux: Likewise. * fixinc/fixinc.svr4: Likewise. * fixinc/fixinc.winnt: Likewise. * fixinc/fixincl.sh: Likewise. * fixproto: Likewise. * configure: Regenerate. gcc/ada: * Makefile.adalib: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Likewise. gcc/f: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/java: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/po: * exgettext: Allow for PWDCMD to override hardcoded pwd. gcc/treelang: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. libf2c: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Likewise. * configure: Regenerate. libjava: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. libobjc: * aclocal.m4: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. libstdc++-v3: * Makefile.am: Allow for PWDCMD to override hardcoded pwd. * acinclude.m4: Likewise. * docs/html/Makefile: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. zlib: * configure.in: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. * ChangeLog: Move entries to ChangeLog.gcj. From-SVN: r53523
2002-05-16 19:43:21 +02:00
topdir=`${PWDCMD-pwd}`
cd $holddir
# Conditionalize the makefile for this host machine.
# Make-host contains the concatenation of all host makefile fragments
# [there can be more than one]. This file is built by configure.frag.
host_overrides=Make-host
dep_host_xmake_file=
for f in .. ${host_xmake_file}
do
if test -f ${srcdir}/config/$f
then
dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
fi
done
# Conditionalize the makefile for this target machine.
# Make-target contains the concatenation of all host makefile fragments
# [there can be more than one]. This file is built by configure.frag.
target_overrides=Make-target
dep_tmake_file=
for f in .. ${tmake_file}
do
if test -f ${srcdir}/config/$f
then
dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
fi
done
symbolic_link='ln -s'
# If the host doesn't support symlinks, modify CC in
# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
# Otherwise, we can use "CC=$(CC)".
rm -f symtest.tem
if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
then
cc_set_by_configure="\$(CC)"
quoted_cc_set_by_configure="\$(CC)"
stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
else
rm -f symtest.tem
if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
then
symbolic_link="cp -p"
else
symbolic_link="cp"
fi
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
fi
rm -f symtest.tem
out_object_file=`basename $out_file .c`.o
tm_file_list=
for f in $tm_file; do
case $f in
ansidecl.h )
tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
defaults.h )
tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
*) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
esac
done
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
tm_p_file_list=
for f in $tm_p_file; do
case $f in
tm-preds.h )
tm_p_file_list="${tm_p_file_list} $f" ;;
*) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
esac
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
done
host_xm_file_list=
for f in $host_xm_file; do
case $f in
ansidecl.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-host.h )
host_xm_file_list="${host_xm_file_list} $f" ;;
defaults.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
*) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
esac
done
build_xm_file_list=
for f in $build_xm_file; do
case $f in
ansidecl.h )
build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-build.h | auto-host.h )
build_xm_file_list="${build_xm_file_list} $f" ;;
defaults.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
*) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
esac
done
# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
CROSS=
ALL=all.internal
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
if test x$host != x$target
then
CROSS="-DCROSS_COMPILE"
ALL=all.cross
SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
case "$host","$target" in
i?86-*-*,x86_64-*-* \
| powerpc*-*-*,powerpc64*-*-*)
CROSS="$CROSS -DNATIVE_CROSS" ;;
esac
elif test "x$TARGET_SYSTEM_ROOT" != x; then
# This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
fi
# If this is a cross-compiler that does not
# have its own set of headers then define
# inhibit_libc
# If this is using newlib, without having the headers available now,
# then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
inhibit_libc=
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
test x$with_newlib = xyes ; } &&
test "x$with_headers" = x ; then
inhibit_libc=-Dinhibit_libc
fi
# When building gcc with a cross-compiler, we need to adjust things so
# that the generator programs are still built with the native compiler.
# Also, we cannot run fixincludes or fix-header.
# These are the normal (build=host) settings:
BUILD_PREFIX=
BUILD_PREFIX_1=ignore-
BUILD_CC='$(CC)'
BUILD_CFLAGS='$(ALL_CFLAGS)'
STMP_FIXINC=stmp-fixinc
STMP_FIXPROTO=stmp-fixproto
# And these apply if build != host.
if test x$build != x$host
then
BUILD_PREFIX=build-
BUILD_PREFIX_1=build-
BUILD_CC='$(CC_FOR_BUILD)'
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
if test "x$TARGET_SYSTEM_ROOT" = x; then
STMP_FIXINC=
STMP_FIXPROTO=
fi
fi
# Expand extra_headers to include complete path.
# This substitutes for lots of t-* files.
extra_headers_list=
if test "x$extra_headers" = x
then true
else
# Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
for file in $extra_headers;
do
extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
done
fi
# Add a definition of USE_COLLECT2 if system wants one.
case $use_collect2 in
no) use_collect2= ;;
"") ;;
*)
host_xm_defines="${host_xm_defines} USE_COLLECT2"
xm_defines="${xm_defines} USE_COLLECT2"
;;
esac
# Identify the assembler which will work hand-in-glove with the newly
# built GCC, so that we can examine its features. This is the assembler
# which will be driven by the driver program.
#
# If build != host, and we aren't building gas in-tree, we identify a
# build->target assembler and hope that it will have the same features
# as the host->target assembler we'll be using.
echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
echo "configure:7471: checking what assembler to use" >&5
in_tree_gas=no
gcc_cv_as=
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
if test -x "$DEFAULT_ASSEMBLER"; then
gcc_cv_as="$DEFAULT_ASSEMBLER"
elif test -x "$AS"; then
gcc_cv_as="$AS"
elif test -x as$host_exeext; then
# Build using assembler in the current directory.
gcc_cv_as=./as$host_exeext
elif test -f $gcc_cv_as_gas_srcdir/configure.in \
&& test -f ../gas/Makefile; then
# Single tree build which includes gas.
in_tree_gas=yes
gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
for f in $gcc_cv_as_bfd_srcdir/configure \
$gcc_cv_as_gas_srcdir/configure \
$gcc_cv_as_gas_srcdir/configure.in \
$gcc_cv_as_gas_srcdir/Makefile.in ; do
gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
if test x$gcc_cv_gas_version != x; then
break
fi
done
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
rm -f as$host_exeext
$symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
fi
if test "x$gcc_cv_as" = x; then
# Search the same directories that the installed compiler will
# search. Else we may find the wrong assembler and lose. If we
# do not find a suitable assembler binary, then try the user's
# path.
#
# Also note we have to check MD_EXEC_PREFIX before checking the
# user's path. Unfortunately, there is no good way to get at the
# value of MD_EXEC_PREFIX here. So we do a brute force search
# through all the known MD_EXEC_PREFIX values. Ugh. This needs
# to be fixed as part of the make/configure rewrite too.
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else
test_prefix=$prefix
fi
else
test_prefix=$exec_prefix
fi
# If the loop below does not find an assembler, then use whatever
# one we can find in the users's path.
# user's path.
if test "x$program_prefix" != xNONE; then
gcc_cv_as=${program_prefix}as$host_exeext
else
gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
fi
test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
$test_prefix/lib/gcc-lib/$target_alias \
/usr/lib/gcc/$target_alias/$gcc_version \
/usr/lib/gcc/$target_alias \
$test_prefix/$target_alias/bin/$target_alias/$gcc_version \
$test_prefix/$target_alias/bin"
if test x$host = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
/udk/usr/ccs/bin \
/bsd43/usr/lib/cmplrs/cc \
/usr/cross64/usr/bin \
/usr/lib/cmplrs/cc \
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
fi
for dir in $test_dirs; do
if test -x $dir/as$host_exeext; then
gcc_cv_as=$dir/as$host_exeext
break;
fi
done
fi
case $in_tree_gas in
yes)
echo "$ac_t"""newly built gas"" 1>&6
;;
no)
echo "$ac_t""$gcc_cv_as" 1>&6
;;
esac
# Identify the linker which will work hand-in-glove with the newly
# built GCC, so that we can examine its features. This is the linker
# which will be driven by the driver program.
#
# If build != host, and we aren't building gas in-tree, we identify a
# build->target linker and hope that it will have the same features
# as the host->target linker we'll be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6
echo "configure:7582: checking what linker to use" >&5
in_tree_ld=no
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
gcc_cv_ld=
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
if test -x "$DEFAULT_LINKER"; then
gcc_cv_ld="$DEFAULT_LINKER"
elif test -x "$LD"; then
gcc_cv_ld="$LD"
elif test -x collect-ld$host_exeext; then
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
# Build using linker in the current directory.
gcc_cv_ld=./collect-ld$host_exeext
elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
&& test -f ../ld/Makefile; then
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
# Single tree build which includes ld.
in_tree_ld=yes
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
do
gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
if test x$gcc_cv_gld_version != x; then
break
fi
done
gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
rm -f collect-ld$host_exeext
$symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
2>/dev/null
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
fi
if test "x$gcc_cv_ld" = x; then
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
# Search the same directories that the installed compiler will
# search. Else we may find the wrong linker and lose. If we
# do not find a suitable linker binary, then try the user's
# path.
#
# Also note we have to check MD_EXEC_PREFIX before checking the
# user's path. Unfortunately, there is no good way to get at the
# value of MD_EXEC_PREFIX here. So we do a brute force search
# through all the known MD_EXEC_PREFIX values. Ugh. This needs
# to be fixed as part of the make/configure rewrite too.
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else
test_prefix=$prefix
fi
else
test_prefix=$exec_prefix
fi
# If the loop below does not find an linker, then use whatever
# one we can find in the users's path.
# user's path.
if test "x$program_prefix" != xNONE; then
gcc_cv_ld=${program_prefix}ld$host_exeext
else
gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
fi
test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
$test_prefix/lib/gcc-lib/$target_alias \
/usr/lib/gcc/$target_alias/$gcc_version \
/usr/lib/gcc/$target_alias \
$test_prefix/$target_alias/bin/$target_alias/$gcc_version \
$test_prefix/$target_alias/bin"
if test x$host = x$target; then
test_dirs="$test_dirs \
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
/udk/usr/ccs/bin \
/bsd43/usr/lib/cmplrs/cc \
/usr/cross64/usr/bin \
/usr/lib/cmplrs/cc \
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
fi
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
for dir in $test_dirs; do
if test -x $dir/ld$host_exeext; then
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
gcc_cv_ld=$dir/ld$host_exeext
break;
fi
done
fi
case $in_tree_ld in
yes)
echo "$ac_t"""newly built ld"" 1>&6
;;
no)
echo "$ac_t""$gcc_cv_ld" 1>&6
;;
esac
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
# Figure out what nm we will be using.
gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:7685: checking what nm to use" >&5
in_tree_nm=no
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test -f $gcc_cv_binutils_srcdir/configure.in \
&& test -f ../binutils/Makefile; then
# Single tree build which includes binutils.
in_tree_nm=yes
gcc_cv_nm=./nm$host_exeext
rm -f nm$host_exeext
$symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
elif test "x$program_prefix" != xNONE; then
gcc_cv_nm=${program_prefix}nm$host_exeext
else
gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
fi
case $in_tree_nm in
yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
esac
# Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
echo "configure:7708: checking what objdump to use" >&5
in_tree_objdump=no
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
elif test -f $gcc_cv_binutils_srcdir/configure.in \
&& test -f ../binutils/Makefile; then
# Single tree build which includes binutils.
in_tree_objdump=yes
gcc_cv_objdump=./objdump$host_exeext
rm -f objdump$host_exeext
$symbolic_link ../binutils/objdump$host_exeext \
objdump$host_exeext 2>/dev/null
elif test "x$program_prefix" != xNONE; then
gcc_cv_objdump=${program_prefix}objdump$host_exeext
else
gcc_cv_objdump=`echo objdump | \
sed ${program_transform_name}`$host_exeext
fi
case $in_tree_objdump in
yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
esac
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:7733: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test $in_tree_gas = yes; then
# Gas version 2.6 and later support for .balign and .p2align.
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 6 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_alignment_features=".balign and .p2align"
cat >> confdefs.h <<\EOF
#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
EOF
fi
# Gas version 2.8 and later support specifying the maximum
# bytes to skip when using .p2align.
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 8 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_alignment_features=".p2align including maximum skip"
cat >> confdefs.h <<\EOF
#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
EOF
fi
elif test x$gcc_cv_as != x; then
# Check if we have .balign and .p2align
echo ".balign 4" > conftest.s
echo ".p2align 2" >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".balign and .p2align"
cat >> confdefs.h <<\EOF
#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
EOF
fi
rm -f conftest.s conftest.o
# Check if specifying the maximum bytes to skip when
# using .p2align is supported.
echo ".p2align 4,,7" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".p2align including maximum skip"
cat >> confdefs.h <<\EOF
#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
EOF
fi
rm -f conftest.s conftest.o
fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:7794: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 9 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_subsections="working .subsection -1"
fi
fi
elif test x$gcc_cv_as != x; then
# Check if we have .subsection
echo ".subsection 1" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_subsections=".subsection"
if test x$gcc_cv_nm != x; then
cat > conftest.s <<EOF
conftest_label1: .word 0
.subsection -1
conftest_label2: .word 0
.previous
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
$gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
$gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
:
else
gcc_cv_as_subsections="working .subsection -1"
fi
fi
fi
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_SUBSECTION_ORDERING 1
EOF
fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:7843: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 2 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_weak="yes"
fi
elif test x$gcc_cv_as != x; then
# Check if we have .weak
echo " .weak foobar" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_weak="yes"
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_weak" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_WEAK 1
EOF
fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:7873: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& (test $gcc_cv_gas_minor_version -gt 12 \
|| (test $gcc_cv_gas_minor_version -eq 12 \
&& test $gcc_cv_gas_patch_version -ge 1 )) \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_hidden="yes"
fi
fi
elif test x$gcc_cv_as != x; then
# Check if we have .hidden
echo " .hidden foobar" > conftest.s
echo "foobar:" >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_hidden="yes"
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
# This is irritatingly difficult to feature test for. Look for
# the date string after the version number.
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then
# If there was date string, but was earlier than 2002-04-04, fail
gcc_cv_as_hidden="no"
elif test -z "$ld_vers"; then
# If there was no date string nor ld version number, something is wrong
gcc_cv_as_hidden="no"
else
ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
test -z "$ld_vers_patch" && ld_vers_patch=0
if test "$ld_vers_major" -lt 2; then
gcc_cv_as_hidden="no"
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
gcc_cv_as_hidden="no"
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
-a "$ld_vers_patch" -eq 0; then
gcc_cv_as_hidden="no"
fi
fi
fi
fi
fi
case "$target" in
mips-sgi-irix6*)
if test x"$gnu_ld_flag" = x"no"; then
# Even if using gas with .hidden support, the resulting object files
# cannot be linked with the IRIX 6 O32 linker. With the N32 and
# N64 linkers, the problem is that the linker refuses to accept
# -call_shared (passed by default to the linker) and -r (used to
# link the object file generated without .hidden directives with
# one that hides symbols), so we also lose.
gcc_cv_as_hidden=no
fi
;;
esac
if test x"$gcc_cv_as_hidden" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_HIDDEN 1
EOF
fi
echo "$ac_t""$gcc_cv_as_hidden" 1>&6
libgcc_visibility=$gcc_cv_as_hidden
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
echo "configure:7954: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_leb128="yes"
fi
fi
elif test x$gcc_cv_as != x; then
# Check if we have .[us]leb128, and support symbol arithmetic with it.
cat > conftest.s <<EOF
.data
.uleb128 L2 - L1
L1:
.uleb128 1280
.sleb128 -1010
L2:
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_leb128="yes"
# GAS versions before 2.11 do not support uleb128,
# despite appearing to.
# ??? There exists an elf-specific test that will crash
# the assembler. Perhaps it's better to figure out whether
# arbitrary sections are supported and try the test.
as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
if echo "$as_ver" | grep GNU > /dev/null; then
as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
as_major=`echo $as_ver | sed 's/\..*//'`
as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
if test $as_major -eq 2 -a $as_minor -lt 11; then
gcc_cv_as_leb128="no"
fi
fi
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_leb128" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_LEB128 1
EOF
fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
echo "configure:8008: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 12 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_eh_frame="yes"
fi
fi
elif test x$gcc_cv_as != x; then
# Check if this is GAS.
as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
rm -f a.out 2> /dev/null
if echo "$as_ver" | grep GNU > /dev/null; then
# Versions up to and including 2.11.0 may mis-optimize
# .eh_frame data. Try something.
cat > conftest.s <<EOF
.text
.LFB1:
.4byte 0
.L1:
.4byte 0
.LFE1:
.section .eh_frame,"aw",@progbits
__FRAME_BEGIN__:
.4byte .LECIE1-.LSCIE1
.LSCIE1:
.4byte 0x0
.byte 0x1
.ascii "z\0"
.byte 0x1
.byte 0x78
.byte 0x1a
.byte 0x0
.byte 0x4
.4byte 1
.p2align 1
.LECIE1:
.LSFDE1:
.4byte .LEFDE1-.LASFDE1
.LASFDE1:
.4byte .LASFDE1-__FRAME_BEGIN__
.4byte .LFB1
.4byte .LFE1-.LFB1
.byte 0x4
.4byte .LFE1-.LFB1
.byte 0x4
.4byte .L1-.LFB1
.LEFDE1:
EOF
cat > conftest.lit <<EOF
0000 10000000 00000000 017a0001 781a0004 .........z..x...
0010 01000000 12000000 18000000 00000000 ................
0020 08000000 04080000 0044 .........D
EOF
cat > conftest.big <<EOF
0000 00000010 00000000 017a0001 781a0004 .........z..x...
0010 00000001 00000012 00000018 00000000 ................
0020 00000008 04000000 0844 .........D
EOF
# If the assembler didn't choke, and we can objdump,
# and we got the correct data, then succeed.
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
| tail -3 > conftest.got \
&& { cmp conftest.lit conftest.got > /dev/null 2>&1 \
|| cmp conftest.big conftest.got > /dev/null 2>&1; }
then
gcc_cv_as_eh_frame="yes"
else
gcc_cv_as_eh_frame="bad"
if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
cat >> confdefs.h <<\EOF
#define USE_AS_TRADITIONAL_FORMAT 1
EOF
fi
fi
fi
rm -f conftest.*
fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
echo "configure:8098: checking assembler section merging support" >&5
configure.in: Check whether assembler supports section merging. * configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
2001-09-11 18:50:05 +02:00
gcc_cv_as_shf_merge=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 12 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_shf_merge=yes
fi
fi
configure.in: Check whether assembler supports section merging. * configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
2001-09-11 18:50:05 +02:00
elif test x$gcc_cv_as != x; then
# Check if we support SHF_MERGE sections
echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
configure.in: Check whether assembler supports section merging. * configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
2001-09-11 18:50:05 +02:00
gcc_cv_as_shf_merge=yes
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_shf_merge" = xyes; then
cat >> confdefs.h <<\EOF
configure.in: Check whether assembler supports section merging. * configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
2001-09-11 18:50:05 +02:00
#define HAVE_GAS_SHF_MERGE 1
EOF
configure.in: Check whether assembler supports section merging. * configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
2001-09-11 18:50:05 +02:00
fi
echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
configure.in: Check whether assembler supports section merging. * configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
2001-09-11 18:50:05 +02:00
echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
echo "configure:8130: checking assembler thread-local storage support" >&5
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
gcc_cv_as_tls=no
conftest_s=
tls_first_major=
tls_first_minor=
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
tls_as_opt=
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
case "$target" in
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
alpha*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
.text
ldq $27,__tls_get_addr($29) !literal!1
lda $16,foo($29) !tlsgd!1
jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
ldq $27,__tls_get_addr($29) !literal!2
lda $16,foo($29) !tlsldm!2
jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
ldq $1,foo($29) !gotdtprel
ldah $2,foo($29) !dtprelhi
lda $3,foo($2) !dtprello
lda $4,foo($29) !dtprel
ldq $1,foo($29) !gottprel
ldah $2,foo($29) !tprelhi
lda $3,foo($2) !tprello
lda $4,foo($29) !tprel'
tls_first_major=2
tls_first_minor=13
;;
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
i[34567]86-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
.text
movl %gs:0, %eax
leal foo@TLSGD(,%ebx,1), %eax
leal foo@TLSLDM(%ebx), %eax
leal foo@DTPOFF(%eax), %edx
movl foo@GOTTPOFF(%ebx), %eax
subl foo@GOTTPOFF(%ebx), %eax
i386.c (x86_64_sign_extended_value): Add allow_rip argument. * config/i386/i386.c (x86_64_sign_extended_value): Add allow_rip argument. In CM_SMALL_PIC model consider SYMBOL_REFs binding locally or from constant pool or LABEL_REFs as sign extended if allow_rip. Change all +-1GB limits to +-16MB. (x86_64_general_operand, x86_64_szext_general_operand, x86_64_nonmemory_operand, x86_64_movabs_operand, x86_64_szext_nonmemory_operand, x86_64_immediate_operand, legitimate_address_p, ix86_expand_int_movcc): Update callers. (local_symbolic_operand): Don't allow offsets bigger than +-16MB in CM_SMALL_PIC model. (legitimate_pic_address_disp_p): Don't check offsets before calling local_symbolic_operand. (legitimize_pic_address): Force offsets bigger than +-16MB into register. * config/i386/i386.h (EXTRA_CONSTRAINT, CONST_COSTS): Likewise. * config/i386/i386-protos.h (x86_64_sign_extended_value): Update prototype. * configure.in: Test for @GOTNTPOFF and @INDNTPOFF on IA-32 too. Add x86-64 test. Set tls_first_minor to 14 on IA-32 and x86-64. * configure: Rebuilt. * config/i386/i386.c (x86_64_sign_extended_value): Don't allow TLS SYMBOL_REFs unless enclosed in UNSPEC. Handle UNSPEC_DTPOFF, UNSPEC_GOTNTPOFF and UNSPEC_NTPOFF. (legitimate_address_p): Allow foo@dtpoff(base) even on TARGET_64BIT -fpic. (ix86_encode_section_info): Don't ever generate TLSGD or TLSLD for non-pic code if TARGET_64BIT. (legitimize_address): Generate 64-bit TLS sequences. (output_pic_addr_const): Support x86-64 TLS operators. (i386_output_dwarf_dtprel): Output 64-bit DTPOFF as .long f@DTPOFF, 0. (print_operand_address): Use %fs instead of %gs on TARGET_64BIT. Don't append (%rip) in 64-bit TLSGD and TLSLD sequences. (output_addr_const_extra): Support x86-64 TLS operators. (maybe_get_pool_constant): Handle TARGET_64BIT -fpic. (ix86_tls_get_addr): Use __tls_get_addr on TARGET_64BIT unconditionally. * config/i386/i386.md (*tls_global_dynamic_gnu): Renamed to... (*tls_global_dynamic_32_gnu): ..., add !TARGET_64BIT. (*tls_global_dynamic_sun): Renamed to... (*tls_global_dynamic_32_sun): ..., add !TARGET_64BIT. (tls_global_dynamic): Renamed to... (tls_global_dynamic_32): ... this. (tls_global_dynamic_64, *tls_global_dynamic_64): New. (*tls_local_dynamic_base_dynamic_gnu): Renamed to... (*tls_local_dynamic_base_dynamic_32_gnu): ..., add !TARGET_64BIT. (*tls_local_dynamic_base_dynamic_sun): Renamed to... (*tls_local_dynamic_base_dynamic_32_sun): ..., add !TARGET_64BIT. (tls_local_dynamic_base_dynamic): Renamed to... (tls_local_dynamic_base_dynamic_32): ... this. (tls_local_dynamic_base_dynamic_64, *tls_local_dynamic_base_dynamic_64): New. (*tls_local_dynamic_once): Renamed to... (*tls_local_dynamic_32_once): ... this. * gcc.dg/tls/pic-1.c: New test. * gcc.dg/tls/nonpic-1.c: New test. * gcc.dg/20021018-1.c: New test. From-SVN: r58383
2002-10-21 22:27:14 +02:00
addl foo@GOTNTPOFF(%ebx), %eax
movl foo@INDNTPOFF, %eax
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
movl $foo@TPOFF, %eax
subl $foo@TPOFF, %eax
leal foo@NTPOFF(%ecx), %eax'
tls_first_major=2
i386.c (x86_64_sign_extended_value): Add allow_rip argument. * config/i386/i386.c (x86_64_sign_extended_value): Add allow_rip argument. In CM_SMALL_PIC model consider SYMBOL_REFs binding locally or from constant pool or LABEL_REFs as sign extended if allow_rip. Change all +-1GB limits to +-16MB. (x86_64_general_operand, x86_64_szext_general_operand, x86_64_nonmemory_operand, x86_64_movabs_operand, x86_64_szext_nonmemory_operand, x86_64_immediate_operand, legitimate_address_p, ix86_expand_int_movcc): Update callers. (local_symbolic_operand): Don't allow offsets bigger than +-16MB in CM_SMALL_PIC model. (legitimate_pic_address_disp_p): Don't check offsets before calling local_symbolic_operand. (legitimize_pic_address): Force offsets bigger than +-16MB into register. * config/i386/i386.h (EXTRA_CONSTRAINT, CONST_COSTS): Likewise. * config/i386/i386-protos.h (x86_64_sign_extended_value): Update prototype. * configure.in: Test for @GOTNTPOFF and @INDNTPOFF on IA-32 too. Add x86-64 test. Set tls_first_minor to 14 on IA-32 and x86-64. * configure: Rebuilt. * config/i386/i386.c (x86_64_sign_extended_value): Don't allow TLS SYMBOL_REFs unless enclosed in UNSPEC. Handle UNSPEC_DTPOFF, UNSPEC_GOTNTPOFF and UNSPEC_NTPOFF. (legitimate_address_p): Allow foo@dtpoff(base) even on TARGET_64BIT -fpic. (ix86_encode_section_info): Don't ever generate TLSGD or TLSLD for non-pic code if TARGET_64BIT. (legitimize_address): Generate 64-bit TLS sequences. (output_pic_addr_const): Support x86-64 TLS operators. (i386_output_dwarf_dtprel): Output 64-bit DTPOFF as .long f@DTPOFF, 0. (print_operand_address): Use %fs instead of %gs on TARGET_64BIT. Don't append (%rip) in 64-bit TLSGD and TLSLD sequences. (output_addr_const_extra): Support x86-64 TLS operators. (maybe_get_pool_constant): Handle TARGET_64BIT -fpic. (ix86_tls_get_addr): Use __tls_get_addr on TARGET_64BIT unconditionally. * config/i386/i386.md (*tls_global_dynamic_gnu): Renamed to... (*tls_global_dynamic_32_gnu): ..., add !TARGET_64BIT. (*tls_global_dynamic_sun): Renamed to... (*tls_global_dynamic_32_sun): ..., add !TARGET_64BIT. (tls_global_dynamic): Renamed to... (tls_global_dynamic_32): ... this. (tls_global_dynamic_64, *tls_global_dynamic_64): New. (*tls_local_dynamic_base_dynamic_gnu): Renamed to... (*tls_local_dynamic_base_dynamic_32_gnu): ..., add !TARGET_64BIT. (*tls_local_dynamic_base_dynamic_sun): Renamed to... (*tls_local_dynamic_base_dynamic_32_sun): ..., add !TARGET_64BIT. (tls_local_dynamic_base_dynamic): Renamed to... (tls_local_dynamic_base_dynamic_32): ... this. (tls_local_dynamic_base_dynamic_64, *tls_local_dynamic_base_dynamic_64): New. (*tls_local_dynamic_once): Renamed to... (*tls_local_dynamic_32_once): ... this. * gcc.dg/tls/pic-1.c: New test. * gcc.dg/tls/nonpic-1.c: New test. * gcc.dg/20021018-1.c: New test. From-SVN: r58383
2002-10-21 22:27:14 +02:00
tls_first_minor=14
;;
x86_64-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
.text
movq %fs:0, %rax
leaq foo@TLSGD(%rip), %rdi
leaq foo@TLSLD(%rip), %rdi
leaq foo@DTPOFF(%rax), %rdx
movq foo@GOTTPOFF(%rip), %rax
movq $foo@TPOFF, %rax'
tls_first_major=2
tls_first_minor=14
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
;;
configure.in (HAVE_AS_TLS): Add ia64 test. * configure.in (HAVE_AS_TLS): Add ia64 test. * configure: Rebuild. * config/ia64/ia64.c (ia64_tls_size_string, ia64_tls_size): New. (override_options): Set it. (TARGET_HAVE_TLS): New. (sdata_symbolic_operand): Look for 's'. (tls_symbolic_operand): New. (ia64_expand_load_address): Abort for tls symbols. (gen_tls_get_addr): New. (gen_thread_pointer): New. (ia64_expand_move): Split out from movdi. Handle tls symbols. (rtx_needs_barrier): Add new unspecs. (ia64_encode_section_info): Handle tls symbols. (ia64_strip_name_encoding): Strip two encoding chars. * config/ia64/ia64.h (ia64_tls_size, ia64_tls_size_string): New. (TARGET_TLS14, TARGET_TLS22, TARGET_TLS64): New. (TARGET_OPTIONS): Add tls-size. (ENCODE_SECTION_INFO_CHAR): Rename from SDATA_NAME_FLAG_CHAR. * config/ia64/ia64.md (UNSPEC_LTOFF_DTPMOD, UNSPEC_LTOFF_DTPREL, UNSPEC_DTPREL, UNSPEC_LTOFF_TPREL, UNSPEC_TPREL, UNSPEC_LD_BASE): New. (movqi, movhi, movsi, movdi, movti): Use ia64_expand_move. (movsf, movdf): Likewise. (movdi_symbolic): Use match_scratch. Don't split if we won't have a scratch availiable. (load_ltoff_dtpmod, load_dtprel, load_dtprel64, load_dtprel22, add_dtprel, add_dtprel14, add_dtprel22, load_ltoff_tprel, load_tprel, load_tprel64, load_tprel22, add_tprel, add_tprel14, add_tprel22): New. * config/ia64/ia64-protos.h: Update. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use sdata_symbolic_operand. (ASM_OUTPUT_LABELREF): Strip two characters. From-SVN: r53874
2002-05-25 21:51:43 +02:00
ia64-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: data8 25
.text
addl r16 = @ltoff(@dtpmod(foo#)), gp
addl r17 = @ltoff(@dtprel(foo#)), gp
addl r18 = @ltoff(@tprel(foo#)), gp
addl r19 = @dtprel(foo#), gp
adds r21 = @dtprel(foo#), r13
movl r23 = @dtprel(foo#)
addl r20 = @tprel(foo#), gp
adds r22 = @tprel(foo#), r13
movl r24 = @tprel(foo#)'
tls_first_major=2
tls_first_minor=13
;;
configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. 2003-05-12 Janis Johnson <janis187@us.ibm.com> Alan Modra <amodra@bigpond.net.au> Jakub Jelinek <jakub@redhat.com> * configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. * configure: Rebuild. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/rs6000.c (rs6000_tls_size): New. (rs6000_tls_size_string): New. (rs6000_parse_tls_size_option): New. (rs6000_legitimize_tls_address): New. (rs6000_tls_get_addr): New. (rs6000_got_sym): New. (rs6000_tls_symbol_ref): New. (rs6000_tls_symbol_ref_1): New. (rs6000_get_some_local_dynamic_name): New. (rs6000_get_some_local_dynamic_name_1): New. (TARGET_HAVE_TLS): New. (TARGET_CANNOT_FORCE_CONST_MEM): New. (rs6000_override_options): Handle -mtls-size option. (constant_pool_expr_1): Handle TLS symbols. (rs6000_legitimize_address): Handle TLS symbols. (rs6000_tls_referenced_p): New. (rs6000_legitimate_address): Handle TLS symbols. (rs6000_emit_move): Handle TLS symbols. (print_operand): Handle TLS symbols. (uses_TOC): Handle TLS symbols. (rs6000_emit_prologue): Use symbol for unspec constant. * config/rs6000/rs6000.h (HAVE_AS_TLS): New. (some_ld_name): New. (LEGITIMATE_CONSTANT_P): Handle TLS symbols. (PRINT_OPERAND_PUNCT_VALID_P): Handle TLS symbols. (PREDICATE_CODES): Add rs6000_tls_symbol_ref. * config/rs6000/rs6000.md (load_toc_v4_PIC_1, load_toc_v4_PIC_1b): Support TLS. (tls_gd_32, tls_gd_64, tls_ld_32, tls_ld_64, tls_dtprel_32, tls_dtprel_64, tls_dtprel_ha_32, tls_dtprel_ha_64, tls_dtprel_lo_32, tls_dtprel_lo_64, tls_got_dtprel_32, tls_got_dtprel_64, tls_tprel_32, tls_tprel_64, tls_tprel_ha_32, tls_tprel_ha_64, tls_tprel_lo_32, tls_tprel_lo_64, tls_got_tprel_32, tls_got_tprel_64, tls_tls_32, tls_tls_64): New. * config/rs6000/sysv4.h (SUBTARGET_OPTIONS): Add tls_size. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r66742
2003-05-13 00:30:31 +02:00
powerpc-*-*)
conftest_s='
.section ".tdata","awT",@progbits
.align 2
ld0: .space 4
ld1: .space 4
x1: .space 4
x2: .space 4
x3: .space 4
.text
addi 3,31,ld0@got@tlsgd
bl __tls_get_addr
addi 3,31,x1@got@tlsld
bl __tls_get_addr
addi 9,3,x1@dtprel
addis 9,3,x2@dtprel@ha
addi 9,9,x2@dtprel@l
lwz 9,x3@got@tprel(31)
add 9,9,x@tls
addi 9,2,x1@tprel
addis 9,2,x2@tprel@ha
addi 9,9,x2@tprel@l'
tls_first_major=2
tls_first_minor=14
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
tls_as_opt=-a32
configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. 2003-05-12 Janis Johnson <janis187@us.ibm.com> Alan Modra <amodra@bigpond.net.au> Jakub Jelinek <jakub@redhat.com> * configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. * configure: Rebuild. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/rs6000.c (rs6000_tls_size): New. (rs6000_tls_size_string): New. (rs6000_parse_tls_size_option): New. (rs6000_legitimize_tls_address): New. (rs6000_tls_get_addr): New. (rs6000_got_sym): New. (rs6000_tls_symbol_ref): New. (rs6000_tls_symbol_ref_1): New. (rs6000_get_some_local_dynamic_name): New. (rs6000_get_some_local_dynamic_name_1): New. (TARGET_HAVE_TLS): New. (TARGET_CANNOT_FORCE_CONST_MEM): New. (rs6000_override_options): Handle -mtls-size option. (constant_pool_expr_1): Handle TLS symbols. (rs6000_legitimize_address): Handle TLS symbols. (rs6000_tls_referenced_p): New. (rs6000_legitimate_address): Handle TLS symbols. (rs6000_emit_move): Handle TLS symbols. (print_operand): Handle TLS symbols. (uses_TOC): Handle TLS symbols. (rs6000_emit_prologue): Use symbol for unspec constant. * config/rs6000/rs6000.h (HAVE_AS_TLS): New. (some_ld_name): New. (LEGITIMATE_CONSTANT_P): Handle TLS symbols. (PRINT_OPERAND_PUNCT_VALID_P): Handle TLS symbols. (PREDICATE_CODES): Add rs6000_tls_symbol_ref. * config/rs6000/rs6000.md (load_toc_v4_PIC_1, load_toc_v4_PIC_1b): Support TLS. (tls_gd_32, tls_gd_64, tls_ld_32, tls_ld_64, tls_dtprel_32, tls_dtprel_64, tls_dtprel_ha_32, tls_dtprel_ha_64, tls_dtprel_lo_32, tls_dtprel_lo_64, tls_got_dtprel_32, tls_got_dtprel_64, tls_tprel_32, tls_tprel_64, tls_tprel_ha_32, tls_tprel_ha_64, tls_tprel_lo_32, tls_tprel_lo_64, tls_got_tprel_32, tls_got_tprel_64, tls_tls_32, tls_tls_64): New. * config/rs6000/sysv4.h (SUBTARGET_OPTIONS): Add tls_size. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r66742
2003-05-13 00:30:31 +02:00
;;
powerpc64-*-*)
conftest_s='
.section ".tdata","awT",@progbits
.align 3
ld0: .space 8
ld1: .space 8
x1: .space 8
x2: .space 8
x3: .space 8
.text
addi 3,2,ld0@got@tlsgd
bl .__tls_get_addr
nop
addi 3,2,ld1@toc
bl .__tls_get_addr
nop
addi 3,2,x1@got@tlsld
bl .__tls_get_addr
nop
addi 9,3,x1@dtprel
bl .__tls_get_addr
nop
addis 9,3,x2@dtprel@ha
addi 9,9,x2@dtprel@l
bl .__tls_get_addr
nop
ld 9,x3@got@dtprel(2)
add 9,9,3
bl .__tls_get_addr
nop'
tls_first_major=2
tls_first_minor=14
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
tls_as_opt=-a64
configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. 2003-05-12 Janis Johnson <janis187@us.ibm.com> Alan Modra <amodra@bigpond.net.au> Jakub Jelinek <jakub@redhat.com> * configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. * configure: Rebuild. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/rs6000.c (rs6000_tls_size): New. (rs6000_tls_size_string): New. (rs6000_parse_tls_size_option): New. (rs6000_legitimize_tls_address): New. (rs6000_tls_get_addr): New. (rs6000_got_sym): New. (rs6000_tls_symbol_ref): New. (rs6000_tls_symbol_ref_1): New. (rs6000_get_some_local_dynamic_name): New. (rs6000_get_some_local_dynamic_name_1): New. (TARGET_HAVE_TLS): New. (TARGET_CANNOT_FORCE_CONST_MEM): New. (rs6000_override_options): Handle -mtls-size option. (constant_pool_expr_1): Handle TLS symbols. (rs6000_legitimize_address): Handle TLS symbols. (rs6000_tls_referenced_p): New. (rs6000_legitimate_address): Handle TLS symbols. (rs6000_emit_move): Handle TLS symbols. (print_operand): Handle TLS symbols. (uses_TOC): Handle TLS symbols. (rs6000_emit_prologue): Use symbol for unspec constant. * config/rs6000/rs6000.h (HAVE_AS_TLS): New. (some_ld_name): New. (LEGITIMATE_CONSTANT_P): Handle TLS symbols. (PRINT_OPERAND_PUNCT_VALID_P): Handle TLS symbols. (PREDICATE_CODES): Add rs6000_tls_symbol_ref. * config/rs6000/rs6000.md (load_toc_v4_PIC_1, load_toc_v4_PIC_1b): Support TLS. (tls_gd_32, tls_gd_64, tls_ld_32, tls_ld_64, tls_dtprel_32, tls_dtprel_64, tls_dtprel_ha_32, tls_dtprel_ha_64, tls_dtprel_lo_32, tls_dtprel_lo_64, tls_got_dtprel_32, tls_got_dtprel_64, tls_tprel_32, tls_tprel_64, tls_tprel_ha_32, tls_tprel_ha_64, tls_tprel_lo_32, tls_tprel_lo_64, tls_got_tprel_32, tls_got_tprel_64, tls_tls_32, tls_tls_64): New. * config/rs6000/sysv4.h (SUBTARGET_OPTIONS): Add tls_size. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r66742
2003-05-13 00:30:31 +02:00
;;
configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. * configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. * configure: Regenerate. * config/s390/s390-protos.h (tls_symbolic_operand): Add prototype. (tls_symbolic_reference_mentioned_p): Add prototype. (s390_tls_get_offset): Add prototype. (emit_pic_move): Remove prototype, replace by ... (emit_symbolic_move): .. this new prototype. * config/s390/s390.c (TARGET_HAVE_TLS): Conditionally define. (tls_model_chars): New global variable. (s390_encode_section_info): Encode TLS model. Use targetm.binds_local_p to check for local symbols. (s390_strip_name_encoding): New function. (TARGET_STRIP_NAME_ENCODING): Define. (get_thread_pointer): New function. (legitimize_tls_address): New function. (legitimize_address): Call it. (emit_pic_move): Remove, replace by ... (emit_symbolic_move): ... this new function. (larl_operand): Handle TLS operands. (legitimate_constant_p): Likewise. (s390_decompose_address): Likewise. (s390_cannot_force_const_mem): New function. (TARGET_CANNOT_FORCE_CONST_MEM): Define. (s390_output_symbolic_const): Handle TLS unspecs. (print_operand): New code 'J'. (machine_function): Add struct member 'some_ld_name'. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (enum s390_builtin): New type. (code_for_builtin_64, code_for_builtin_31): New global variables. (s390_init_builtins, s390_expand_builtin): New functions. (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): Define. * config/s390/s390.h (TLS_SYMBOLIC_CONST): New macro. (ASM_OUTPUT_LABELREF): Define. (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Handle TLS constants. * config/s390/s390.md: Define TLS UNSPEC constants. ("movdi", "movsi"): Handle TLS operands. ("get_tp_64", "get_tp_31", "set_tp_64", "set_tp_31"): New insns. ("*tls_load_64", "*tls_load_31"): New insns. ("call_value_tls", "call_value_tls_exp"): New expanders. ("brasl_tls", "bras_tls", "basr_tls_64", "basr_tls_31", "bas_tls_64", "bas_tls_31"): New insns. From-SVN: r61714
2003-01-24 18:10:22 +01:00
s390-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
.text
.long foo@TLSGD
.long foo@TLSLDM
.long foo@DTPOFF
.long foo@NTPOFF
.long foo@GOTNTPOFF
.long foo@INDNTPOFF
l %r1,foo@GOTNTPOFF(%r12)
l %r1,0(%r1):tls_load:foo
bas %r14,0(%r1,%r13):tls_gdcall:foo
bas %r14,0(%r1,%r13):tls_ldcall:foo'
tls_first_major=2
tls_first_minor=14
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
tls_as_opt=-m31
configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. * configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. * configure: Regenerate. * config/s390/s390-protos.h (tls_symbolic_operand): Add prototype. (tls_symbolic_reference_mentioned_p): Add prototype. (s390_tls_get_offset): Add prototype. (emit_pic_move): Remove prototype, replace by ... (emit_symbolic_move): .. this new prototype. * config/s390/s390.c (TARGET_HAVE_TLS): Conditionally define. (tls_model_chars): New global variable. (s390_encode_section_info): Encode TLS model. Use targetm.binds_local_p to check for local symbols. (s390_strip_name_encoding): New function. (TARGET_STRIP_NAME_ENCODING): Define. (get_thread_pointer): New function. (legitimize_tls_address): New function. (legitimize_address): Call it. (emit_pic_move): Remove, replace by ... (emit_symbolic_move): ... this new function. (larl_operand): Handle TLS operands. (legitimate_constant_p): Likewise. (s390_decompose_address): Likewise. (s390_cannot_force_const_mem): New function. (TARGET_CANNOT_FORCE_CONST_MEM): Define. (s390_output_symbolic_const): Handle TLS unspecs. (print_operand): New code 'J'. (machine_function): Add struct member 'some_ld_name'. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (enum s390_builtin): New type. (code_for_builtin_64, code_for_builtin_31): New global variables. (s390_init_builtins, s390_expand_builtin): New functions. (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): Define. * config/s390/s390.h (TLS_SYMBOLIC_CONST): New macro. (ASM_OUTPUT_LABELREF): Define. (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Handle TLS constants. * config/s390/s390.md: Define TLS UNSPEC constants. ("movdi", "movsi"): Handle TLS operands. ("get_tp_64", "get_tp_31", "set_tp_64", "set_tp_31"): New insns. ("*tls_load_64", "*tls_load_31"): New insns. ("call_value_tls", "call_value_tls_exp"): New expanders. ("brasl_tls", "bras_tls", "basr_tls_64", "basr_tls_31", "bas_tls_64", "bas_tls_31"): New insns. From-SVN: r61714
2003-01-24 18:10:22 +01:00
;;
s390x-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
.text
.quad foo@TLSGD
.quad foo@TLSLDM
.quad foo@DTPOFF
.quad foo@NTPOFF
.quad foo@GOTNTPOFF
lg %r1,foo@GOTNTPOFF(%r12)
larl %r1,foo@INDNTPOFF
brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
tls_first_major=2
tls_first_minor=14
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
tls_as_opt="-m64 -Aesame"
configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. * configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. * configure: Regenerate. * config/s390/s390-protos.h (tls_symbolic_operand): Add prototype. (tls_symbolic_reference_mentioned_p): Add prototype. (s390_tls_get_offset): Add prototype. (emit_pic_move): Remove prototype, replace by ... (emit_symbolic_move): .. this new prototype. * config/s390/s390.c (TARGET_HAVE_TLS): Conditionally define. (tls_model_chars): New global variable. (s390_encode_section_info): Encode TLS model. Use targetm.binds_local_p to check for local symbols. (s390_strip_name_encoding): New function. (TARGET_STRIP_NAME_ENCODING): Define. (get_thread_pointer): New function. (legitimize_tls_address): New function. (legitimize_address): Call it. (emit_pic_move): Remove, replace by ... (emit_symbolic_move): ... this new function. (larl_operand): Handle TLS operands. (legitimate_constant_p): Likewise. (s390_decompose_address): Likewise. (s390_cannot_force_const_mem): New function. (TARGET_CANNOT_FORCE_CONST_MEM): Define. (s390_output_symbolic_const): Handle TLS unspecs. (print_operand): New code 'J'. (machine_function): Add struct member 'some_ld_name'. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (enum s390_builtin): New type. (code_for_builtin_64, code_for_builtin_31): New global variables. (s390_init_builtins, s390_expand_builtin): New functions. (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): Define. * config/s390/s390.h (TLS_SYMBOLIC_CONST): New macro. (ASM_OUTPUT_LABELREF): Define. (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Handle TLS constants. * config/s390/s390.md: Define TLS UNSPEC constants. ("movdi", "movsi"): Handle TLS operands. ("get_tp_64", "get_tp_31", "set_tp_64", "set_tp_31"): New insns. ("*tls_load_64", "*tls_load_31"): New insns. ("call_value_tls", "call_value_tls_exp"): New expanders. ("brasl_tls", "bras_tls", "basr_tls_64", "basr_tls_31", "bas_tls_64", "bas_tls_31"): New insns. From-SVN: r61714
2003-01-24 18:10:22 +01:00
;;
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
esac
if test -z "$tls_first_major"; then
:
elif test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq $tls_first_major \
&& test $gcc_cv_gas_minor_version -ge $tls_first_minor \
|| test $gcc_cv_gas_major_version -gt $tls_first_major ; then
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
gcc_cv_as_tls=yes
fi
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
elif test x$gcc_cv_as != x; then
echo "$conftest_s" > conftest.s
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
then
gcc_cv_as_tls=yes
fi
rm -f conftest.s conftest.o
fi
if test "$gcc_cv_as_tls" = yes; then
cat >> confdefs.h <<\EOF
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
#define HAVE_AS_TLS 1
EOF
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
fi
echo "$ac_t""$gcc_cv_as_tls" 1>&6
configure.in (HAVE_AS_TLS): New test. * configure.in (HAVE_AS_TLS): New test. * config.in, configure: Rebuild. * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. (ix86_tls_dialect_string, ix86_tls_dialect): New. (override_options): Set it. (tls_model_chars, tls_symbolic_operand): New. (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. (local_exec_symbolic_operand): New. (get_pic_label_name): Merge into output_set_got. (ix86_asm_file_end): Emit pic_label_name if defined. (legitimate_constant_p, constant_address_p): New. (legitimate_pic_operand_p): New. (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. (legitimate_address_p): Likewise. (ix86_encode_section_info): Rename from i386_; handle tls decls. (ix86_strip_name_encoding): New. (get_thread_pointer): New. (legitimize_address): Handle tls symbols. (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. Remove UNSPEC_PLT. (struct machine_function): Add some_ld_name. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. (print_operand) [&]: Use it. Handle UNSPEC_TP. (output_addr_const_extra): New. (maybe_get_pool_constant): New. (ix86_split_to_parts): Use it. (ix86_expand_move): Handle tls symbols. (ix86_tls_get_addr): New. * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. (TARGET_OPTIONS): Add tls-dialect. (CONSTANT_ADDRESS_P): Use new out-of-line function. (LEGITIMATE_CONSTANT_P): Likewise. (LEGITIMATE_PIC_OPERAND_P): Likewise. (TARGET_STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. (OUTPUT_ADDR_CONST_EXTRA): New. (PREDICATE_CODES): Update. (ix86_tls_dialect, ix86_tls_dialect_string): New. * config/i386/i386.md: Regroup and renumber unspec constants. (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. (tls_global_dynamic, tls_local_dynamic_base): New. (tls_local_dynamic_once): New. * config/i386/i386-protos.h: Update. From-SVN: r53812
2002-05-23 23:55:30 +02:00
case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
echo "configure:8340: checking assembler supports explicit relocations" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_explicit_relocs=unknown
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 12 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_explicit_relocs=yes
fi
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
.set nomacro
.text
extbl $3, $2, $3 !lituse_bytoff!1
ldq $2, a($29) !literal!1
ldq $4, b($29) !literal!2
ldq_u $3, 0($2) !lituse_base!1
ldq $27, f($29) !literal!5
jsr $26, ($27), f !lituse_jsr!5
ldah $29, 0($26) !gpdisp!3
lda $0, c($29) !gprel
ldah $1, d($29) !gprelhigh
lda $1, d($1) !gprellow
lda $29, 0($29) !gpdisp!3
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_explicit_relocs=yes
else
gcc_cv_as_explicit_relocs=no
fi
rm -f conftest.s conftest.o
fi
fi
echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
if test "x$gcc_cv_as_explicit_relocs" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_EXPLICIT_RELOCS 1
EOF
fi
;;
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:8393: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_register_pseudo_op=unknown
if test x$gcc_cv_as != x; then
# Check if we have .register
echo ".register %g2, #scratch" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_register_pseudo_op=yes
else
gcc_cv_as_register_pseudo_op=no
fi
rm -f conftest.s conftest.o
fi
fi
echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_REGISTER_PSEUDO_OP 1
EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
echo "configure:8421: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_relax_opt=unknown
if test x$gcc_cv_as != x; then
# Check if gas supports -relax
echo ".text" > conftest.s
if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_relax_opt=yes
else
gcc_cv_as_relax_opt=no
fi
rm -f conftest.s conftest.o
fi
fi
echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
if test "x$gcc_cv_as_relax_opt" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_RELAX_OPTION 1
EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
echo "configure:8449: checking assembler and linker support unaligned pc related relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_sparc_ua_pcrel=unknown
if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
gcc_cv_as_sparc_ua_pcrel=no
echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
gcc_cv_as_sparc_ua_pcrel=yes
fi
rm -f conftest.s conftest.o conftest
fi
fi
echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_SPARC_UA_PCREL 1
EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
echo "configure:8476: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
gcc_cv_as_sparc_ua_pcrel_hidden=unknown
if test x$gcc_cv_objdump != x; then
gcc_cv_as_sparc_ua_pcrel_hidden=no
echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
echo "foo: .skip 4" >> conftest.s
if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
&& $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
| grep ' 31000000 07323334' > /dev/null 2>&1; then
if $gcc_cv_objdump -R conftest 2> /dev/null \
| grep 'DISP32' > /dev/null 2>&1; then
:
else
gcc_cv_as_sparc_ua_pcrel_hidden=yes
fi
fi
fi
rm -f conftest.s conftest.o conftest
else
gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
fi
fi
echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
EOF
fi
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:8516: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_offsetable_lo10=unknown
if test "x$gcc_cv_as" != x; then
# Check if assembler has offsetable %lo()
echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
> /dev/null 2>&1 &&
$gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
> /dev/null 2>&1; then
if cmp conftest.o conftest1.o > /dev/null 2>&1; then
gcc_cv_as_offsetable_lo10=no
else
gcc_cv_as_offsetable_lo10=yes
fi
else
gcc_cv_as_offsetable_lo10=no
fi
rm -f conftest.s conftest.o conftest1.s conftest1.o
fi
fi
echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_OFFSETABLE_LO10 1
EOF
fi
;;
i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:8555: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 9 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_instructions="filds fists"
fi
elif test x$gcc_cv_as != x; then
set "filds fists" "filds mem; fists mem"
while test $# -gt 0
do
echo "$2" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
fi
shift 2
done
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_instructions" != x; then
cat >> confdefs.h <<EOF
#define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
EOF
fi
echo "$ac_t""$gcc_cv_as_instructions" 1>&6
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
echo "configure:8589: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_gotoff_in_data=yes
fi
elif test x$gcc_cv_as != x; then
cat > conftest.s <<EOF
.text
.L0:
nop
.data
.long .L0@GOTOFF
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_gotoff_in_data=yes
fi
fi
cat >> confdefs.h <<EOF
#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
EOF
echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
;;
ia64*-*-*)
echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
echo "configure:8623: checking assembler supports ltoffx and ldxmov" >&5
if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_ltoffx_ldxmov_relocs=unknown
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 14 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_ltoffx_ldxmov_relocs=yes
fi
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
.text
addl r15 = @ltoffx(x#), gp
;;
ld8.mov r16 = [r15], x#
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_ltoffx_ldxmov_relocs=yes
else
gcc_cv_as_ltoffx_ldxmov_relocs=no
fi
rm -f conftest.s conftest.o
fi
fi
echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
EOF
fi
;;
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:8668: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
# info to the output file. So, as supported targets are added to gas 2.11,
# add some instruction here to (also) show we expect this might work.
# ??? Once 2.11 is released, probably need to add first known working
# version to the per-target configury.
case "$target" in
i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
| x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* | xstormy16*-*-*)
insn="nop"
;;
ia64*-*-*)
insn="nop 0"
;;
esac
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
&& test x"$insn" != x ; then
gcc_cv_as_dwarf2_debug_line="yes"
fi
fi
elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo ' .file 1 "conftest.s"' > conftest.s
echo ' .loc 1 3 0' >> conftest.s
echo " $insn" >> conftest.s
# ??? This fails with non-gnu grep.
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
&& grep debug_line conftest.o > /dev/null 2>&1 ; then
# The .debug_line file table must be in the exact order that
# we specified the files, since these indices are also used
# by DW_AT_decl_file. Approximate this test by testing if
# the assembler bitches if the same index is assigned twice.
echo ' .file 1 "foo.s"' > conftest.s
echo ' .file 1 "bar.s"' >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_dwarf2_debug_line="no"
else
gcc_cv_as_dwarf2_debug_line="yes"
fi
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_DWARF2_DEBUG_LINE 1
EOF
fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
echo "configure:8730: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
&& test x"$insn" != x ; then
gcc_cv_as_gdwarf2_flag="yes"
fi
fi
elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo '' > conftest.s
# ??? This fails with non-gnu grep.
if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_gdwarf2_flag="yes"
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
EOF
fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
echo "configure:8764: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
&& test x"$insn" != x ; then
gcc_cv_as_gstabs_flag="yes"
fi
fi
elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo '' > conftest.s
# ??? This fails with non-gnu grep.
if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
gcc_cv_as_gstabs_flag="yes"
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gstabs_flag" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_GSTABS_DEBUG_FLAG 1
EOF
fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
echo "configure:8797: checking linker read-only and read-write section mixing" >&5
gcc_cv_ld_ro_rw_mix=unknown
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
gcc_cv_ld_ro_rw_mix=read-write
fi
elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
echo '.section "myfoosect", "a"' > conftest1.s
echo '.section "myfoosect", "aw"' > conftest2.s
echo '.byte 1' >> conftest2.s
echo '.section "myfoosect", "a"' > conftest3.s
echo '.byte 0' >> conftest3.s
if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
&& $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
&& $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
&& $gcc_cv_ld -shared -o conftest1.so conftest1.o \
conftest2.o conftest3.o; then
gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
| grep -A1 myfoosect`
if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
gcc_cv_ld_ro_rw_mix=read-only
else
gcc_cv_ld_ro_rw_mix=read-write
fi
fi
fi
rm -f conftest.* conftest[123].*
fi
if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
cat >> confdefs.h <<\EOF
#define HAVE_LD_RO_RW_SECTION_MIXING 1
EOF
fi
echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
echo "configure:8835: checking linker PT_GNU_EH_FRAME support" >&5
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
gcc_cv_ld_eh_frame_hdr=no
if test $in_tree_ld = yes ; then
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
gcc_cv_ld_eh_frame_hdr=yes
fi
elif test x$gcc_cv_ld != x; then
# Check if linker supports --eh-frame-hdr option
if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
gcc_cv_ld_eh_frame_hdr=yes
fi
fi
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
cat >> confdefs.h <<\EOF
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
#define HAVE_LD_EH_FRAME_HDR 1
EOF
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
fi
echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
configure.in: Check for ld. * configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
2001-12-15 12:49:18 +01:00
configure.in (HAVE_LD_PIE): Check for ld -pie. * configure.in (HAVE_LD_PIE): Check for ld -pie. * config.in: Rebuilt. * configure: Rebuilt. * toplev.c (flag_pie, flag_shlib): New variables. (f_options): Add -fpie and -fPIE. (parse_options_and_default_flags): Set flag_pic if -fpie/-fPIE. Set flag_shlib if flag_pic and not -fpie/-fPIE. * flags.h (flag_pic, flag_shlib): Add. * varasm.c (default_binds_local_p): Use flag_shlib instead of flag_pic. * gcc.c (LINK_PIE_SPEC): Define. (LINK_COMMAND_SPEC): Use LINK_PIE_SPEC. (option_map): Add --pie -> -pie mapping. * config/sol2.h (ASM_SPEC): Handle -fpie the same way as -fpic and -fPIE the same way as -fPIC. * config/openbsd.h (ASM_SPEC): Likewise. * config/frv/frv.h (ASM_SPEC): Likewise. * config/arm/linux-gas.h (SUBTARGET_CPP_SPEC): Likewise. * config/arm/semi.h (ASM_SPEC): Likewise. * config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/freebsd-spec.h (FBSD_CPP_SPEC): Likewise. * config/i386/beos-elf.h (CC1_SPEC): Likewise. * config/i386/freebsd-aout.h (ASM_SPEC): Likewise. * config/m68k/linux.h (CPP_SPEC): Likewise. * config/m68k/netbsd.h (ASM_SPEC): Likewise. * config/m68k/openbsd.h (ASM_SPEC): Likewise. * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. * config/mips/linux.h (SUBTARGET_CPP_SPEC): Likewise. * config/mips/openbsd.h (SUBTARGET_ASM_SPEC): Likewise. * config/pa/pa-linux.h (CPP_SPEC): Likewise. * config/netbsd-aout.h (ASM_SPEC): Likewise. * config/rs6000/sysv4.h (ASM_SPEC, CPP_SYSV_SPEC): Likewise. * config/rs6000/vxworks.h (CPP_SPEC): Likewise. * config/sparc/linux.h (CPP_SUBTARGET_SPEC, ASM_SPEC): Likewise. * config/sparc/linux64.h (CPP_SUBTARGET_SPEC, ASM_SPEC): Likewise. * config/sparc/sparc.h (ASM_SPEC): Likewise. * config/sparc/sp64-elf.h (ASM_SPEC): Likewise. * config/sparc/sysv4.h (ASM_SPEC): Likewise. * config/sparc/netbsd-elf.h (ASM_SPEC): Likewise. * config/sparc/openbsd64.h (ASM_SPEC): Likewise. * config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise. * config/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Handle -pie. Simplify. * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/i386/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/ia64/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/rs6000/sysv4.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/rs6000/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/sparc/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/sparc/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * doc/invoke.texi: Document -pie, -fpie and -fPIE options. From-SVN: r67359
2003-06-03 11:06:55 +02:00
echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
echo "configure:8856: checking linker position independent executable support" >&5
configure.in (HAVE_LD_PIE): Check for ld -pie. * configure.in (HAVE_LD_PIE): Check for ld -pie. * config.in: Rebuilt. * configure: Rebuilt. * toplev.c (flag_pie, flag_shlib): New variables. (f_options): Add -fpie and -fPIE. (parse_options_and_default_flags): Set flag_pic if -fpie/-fPIE. Set flag_shlib if flag_pic and not -fpie/-fPIE. * flags.h (flag_pic, flag_shlib): Add. * varasm.c (default_binds_local_p): Use flag_shlib instead of flag_pic. * gcc.c (LINK_PIE_SPEC): Define. (LINK_COMMAND_SPEC): Use LINK_PIE_SPEC. (option_map): Add --pie -> -pie mapping. * config/sol2.h (ASM_SPEC): Handle -fpie the same way as -fpic and -fPIE the same way as -fPIC. * config/openbsd.h (ASM_SPEC): Likewise. * config/frv/frv.h (ASM_SPEC): Likewise. * config/arm/linux-gas.h (SUBTARGET_CPP_SPEC): Likewise. * config/arm/semi.h (ASM_SPEC): Likewise. * config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/freebsd-spec.h (FBSD_CPP_SPEC): Likewise. * config/i386/beos-elf.h (CC1_SPEC): Likewise. * config/i386/freebsd-aout.h (ASM_SPEC): Likewise. * config/m68k/linux.h (CPP_SPEC): Likewise. * config/m68k/netbsd.h (ASM_SPEC): Likewise. * config/m68k/openbsd.h (ASM_SPEC): Likewise. * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. * config/mips/linux.h (SUBTARGET_CPP_SPEC): Likewise. * config/mips/openbsd.h (SUBTARGET_ASM_SPEC): Likewise. * config/pa/pa-linux.h (CPP_SPEC): Likewise. * config/netbsd-aout.h (ASM_SPEC): Likewise. * config/rs6000/sysv4.h (ASM_SPEC, CPP_SYSV_SPEC): Likewise. * config/rs6000/vxworks.h (CPP_SPEC): Likewise. * config/sparc/linux.h (CPP_SUBTARGET_SPEC, ASM_SPEC): Likewise. * config/sparc/linux64.h (CPP_SUBTARGET_SPEC, ASM_SPEC): Likewise. * config/sparc/sparc.h (ASM_SPEC): Likewise. * config/sparc/sp64-elf.h (ASM_SPEC): Likewise. * config/sparc/sysv4.h (ASM_SPEC): Likewise. * config/sparc/netbsd-elf.h (ASM_SPEC): Likewise. * config/sparc/openbsd64.h (ASM_SPEC): Likewise. * config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise. * config/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Handle -pie. Simplify. * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/i386/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/ia64/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/rs6000/sysv4.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/rs6000/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/sparc/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * config/sparc/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. * doc/invoke.texi: Document -pie, -fpie and -fPIE options. From-SVN: r67359
2003-06-03 11:06:55 +02:00
gcc_cv_ld_pie=no
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
gcc_cv_ld_pie=yes
fi
elif test x$gcc_cv_ld != x; then
# Check if linker supports -pie option
if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
gcc_cv_ld_pie=yes
fi
fi
if test x"$gcc_cv_ld_pie" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_LD_PIE 1
EOF
fi
echo "$ac_t""$gcc_cv_ld_pie" 1>&6
# Miscellaneous target-specific checks.
case "$target" in
mips*-*-*)
echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
echo "configure:8880: checking whether libgloss uses STARTUP directives consistently" >&5
gcc_cv_mips_libgloss_startup=no
gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else
test_prefix=$prefix
fi
else
test_prefix=$exec_prefix
fi
for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
do
if grep '^STARTUP' $f > /dev/null 2>&1; then
gcc_cv_mips_libgloss_startup=yes
break
fi
done
if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
EOF
fi
echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
echo "configure:8908: checking whether the assembler has explicit relocation support" >&5
if test x$gcc_cv_mips_explicit_relocs = x; then
gcc_cv_mips_explicit_relocs=no
if test x$gcc_cv_as != x; then
echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
gcc_cv_mips_explicit_relocs=yes
fi
rm -f conftest.s conftest.o
fi
fi
if test $gcc_cv_mips_explicit_relocs = yes; then
test x$target_cpu_default != x || target_cpu_default=0
target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
fi
echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
;;
esac
if test x$with_sysroot = x && test x$host = x$target \
&& test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
cat >> confdefs.h <<EOF
#define PREFIX_INCLUDE_DIR "$prefix/include"
EOF
fi
1997-08-11 17:56:58 +02:00
# Figure out what language subdirectories are present.
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
# go away some day.
# NB: embedded tabs in this IF block -- do not untabify
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
enable_languages="${LANGUAGES}"
echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
else
enable_languages=all
fi
else
if test x"${enable_languages}" = x \
|| test x"${enable_languages}" = xyes;
then
{ echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
fi
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
fi
enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
# First scan to see if an enabled language requires some other language.
# We assume that a given config-lang.in will list all the language
# front ends it requires, even if some are required indirectly.
for lang in ${srcdir}/*/config-lang.in ..
do
case $lang in
..)
;;
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
${srcdir}/[*]/config-lang.in)
;;
*)
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
for other in $this_lang_requires
do
case ,${enable_languages}, in
*,$other,*)
;;
*,all,*)
;;
*,$lang_alias,*)
enable_languages="$enable_languages,$other"
;;
esac
done
;;
esac
done
expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
found_languages=
1997-08-11 17:56:58 +02:00
subdirs=
for lang in ${srcdir}/*/config-lang.in ..
do
case $lang in
..) ;;
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
${srcdir}/[*]/config-lang.in) ;;
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
*)
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
if test "x$lang_alias" = x
then
echo "$lang doesn't set \$language." 1>&2
exit 1
fi
case ${build_by_default},${enable_languages}, in
*,$lang_alias,*) add_this_lang=yes ;;
no,*) add_this_lang=no ;;
*,all,*) add_this_lang=yes ;;
*) add_this_lang=no ;;
esac
found_languages="${found_languages} ${lang_alias}"
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
if test x"${add_this_lang}" = xyes; then
case $lang in
${srcdir}/ada/config-lang.in)
if test x$have_gnat = xyes ; then
configure (skip-this-dir): Add handling for new shell script... ./ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. ./gcc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages which can be configured. (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ (Makefile): Pass actual LANGUAGES through the environment when re-configuring. (cstamp-h): Likewise. (config.status): Likewise. * configure.in (enable_languages): Add new configuration parameter "--enable-languages=lang1,lang2,...". (${srcdir}/*/config-lang.in): Change handling to configure only those directories, that the user might have enabled; default to "all" existing languages. * configure: Regenerate. ./libchill/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libf2c/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libio/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. ./libobjc/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. * configure: Regenerate. ./libstdc++/ChangeLog:1998-11-26 Manfred Hollstein <manfred@s-direktnet.de> * configure.in (compiler_name): Add check to detect if this language's compiler has been built. From-SVN: r23892
1998-11-26 02:48:34 +01:00
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
fi
;;
*)
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
;;
esac
fi
;;
1997-08-11 17:56:58 +02:00
esac
done
missing_languages=
for expected_language in ${expected_languages} ..
do
if test "${expected_language}" != ..; then
missing_language="${expected_language}"
if test "${expected_language}" = "c" \
|| test "${expected_language}" = "all"; then
missing_language=
fi
for found_language in ${found_languages} ..
do
if test "${found_language}" != ..; then
if test "${expected_language}" = "${found_language}"; then
missing_language=
fi
fi
done
if test "x${missing_language}" != x; then
missing_languages="${missing_languages} ${missing_language}"
fi
fi
done
if test "x$missing_languages" != x; then
{ echo "configure: error:
The following requested languages were not found:${missing_languages}
The following languages were available: c${found_languages}" 1>&2; exit 1; }
fi
# Make gthr-default.h if we have a thread file.
gthread_flags=
if test $thread_file != single; then
rm -f gthr-default.h
echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
gthread_flags=-DHAVE_GTHR_DEFAULT
fi
# Find out what GC implementation we want, or may, use.
# Check whether --with-gc or --without-gc was given.
if test "${with_gc+set}" = set; then
withval="$with_gc"
case "$withval" in
simple | page)
GGC=ggc-$withval
;;
*)
{ echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
;;
esac
else
GGC=ggc-page
fi
echo "Using $GGC for garbage collection."
# Use the system's zlib library.
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
zlibdir=-L../zlib
zlibinc="-I\$(srcdir)/../zlib"
# Check whether --with-system-zlib or --without-system-zlib was given.
if test "${with_system_zlib+set}" = set; then
withval="$with_system_zlib"
zlibdir=
zlibinc=
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:9103: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
maintainer_mode=$enableval
else
maintainer_mode=no
fi
echo "$ac_t""$maintainer_mode" 1>&6
if test "$maintainer_mode" = "yes"; then
MAINT=''
else
MAINT='#'
fi
1997-08-11 17:56:58 +02:00
# Make empty files to contain the specs and options for each language.
# Then add #include lines to for a compiler that has specs and/or options.
lang_specs_files=
lang_options_files=
lang_tree_files=
1997-08-11 17:56:58 +02:00
for subdir in . $subdirs
do
if test -f $srcdir/$subdir/lang-specs.h; then
lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
1997-08-11 17:56:58 +02:00
fi
if test -f $srcdir/$subdir/lang-options.h; then
lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
1997-08-11 17:56:58 +02:00
fi
if test -f $srcdir/$subdir/$subdir-tree.def; then
lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
fi
1997-08-11 17:56:58 +02:00
done
# These (without "all_") are set in each config-lang.in.
# `language' must be a single word so is spelled singularly.
all_languages=
all_boot_languages=
all_compilers=
all_stagestuff=
Makefile.in (INSTALL_HEADERS): Add 'install-mkheaders'. 2002-05-26 Geoffrey Keating <geoffk@redhat.com> * Makefile.in (INSTALL_HEADERS): Add 'install-mkheaders'. (mkheaders): New rule. (install-mkheaders): New rule. * configure.in (all_outputs): Add mkheaders. * configure: Regenerate. * mkheaders.in: New file. Index: gcc/Makefile.in =================================================================== RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v retrieving revision 1.880 diff -p -u -p -r1.880 Makefile.in --- gcc/Makefile.in 25 May 2002 22:01:40 -0000 1.880 +++ gcc/Makefile.in 27 May 2002 04:14:19 -0000 @@ -434,7 +434,7 @@ FLOAT_H=@float_h_file@ LIBCONVERT = # Control whether header files are installed. -INSTALL_HEADERS=install-headers +INSTALL_HEADERS=install-headers install-mkheaders # Control whether Info documentation is built and installed. BUILD_INFO = @BUILD_INFO@ @@ -878,6 +878,9 @@ gccbug: $(srcdir)/gccbug.in mklibgcc: $(srcdir)/mklibgcc.in CONFIG_FILES=mklibgcc CONFIG_HEADERS= ./config.status +mkheaders: $(srcdir)/mkheaders.in + CONFIG_FILES=mkheaders CONFIG_HEADERS= ./config.status + # cstamp-h.in controls rebuilding of config.in. # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't # delete it. A stamp file is needed as autoheader won't update the file if @@ -2839,6 +2842,47 @@ install-headers-cpio: stmp-int-hdrs $(ST # Install the include directory using cp. install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir cp -p -r include $(libsubdir) + +itoolsdir = $(libsubdir)/install-tools +# Don't install the headers. Instead, install appropriate scripts +# and supporting files for fixincludes to be run later. +install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir \ + mkheaders xlimits.h + -rm -rf $(itoolsdir) + $(SHELL) $(srcdir)/mkinstalldirs $(itoolsdir)/include + for file in $(USER_H); do \ + realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ + $(INSTALL_DATA) $$file \ + $(itoolsdir)/include/$$realfile ; \ + done + if [ x$(FLOAT_H) != xMakefile.in ]; then \ + $(INSTALL_DATA) $(srcdir)/config/$(FLOAT_H) \ + $(itoolsdir)/include/float.h ; \ + else :; fi + $(INSTALL_DATA) xlimits.h $(itoolsdir)/include/limits.h + if [ x$(STMP_FIXINC) != x ] ; then \ + $(INSTALL_DATA) $(srcdir)/README-fixinc \ + $(itoolsdir)/include/README ; \ + $(INSTALL_PROGRAM) fixinc.sh $(itoolsdir)/fixinc.sh ; \ + $(INSTALL_PROGRAM) fixinc/fixincl $(itoolsdir)/fixincl ; \ + $(INSTALL_DATA) $(srcdir)/gsyslimits.h $(itoolsdir)/gsyslimits.h ; \ + else :; fi + if [ x$(STMP_FIXPROTO) != x ] ; then \ + $(INSTALL_PROGRAM) $(srcdir)/mkinstalldirs \ + $(itoolsdir)/mkinstalldirs ; \ + $(INSTALL_PROGRAM) $(srcdir)/fixproto $(itoolsdir)/fixproto ; \ + $(INSTALL_PROGRAM) fix-header$(build_exeext) \ + $(itoolsdir)/fix-header$(build_exeext) ; \ + else :; fi + $(INSTALL_PROGRAM) mkheaders $(itoolsdir)/mkheaders + echo 'SYSTEM_HEADER_DIR="$(SYSTEM_HEADER_DIR)"' \ + > $(itoolsdir)/mkheaders.conf + echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \ + >> $(itoolsdir)/mkheaders.conf + echo 'FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"' \ + >> $(itoolsdir)/mkheaders.conf + echo 'STMP_FIXPROTO="$(STMP_FIXPROTO)"' >> $(itoolsdir)/mkheaders.conf + echo 'STMP_FIXINC="$(STMP_FIXINC)"' >> $(itoolsdir)/mkheaders.conf # Use this target to install the program `collect2' under the name `collect2'. install-collect2: collect2 installdirs Index: gcc/configure =================================================================== RCS file: /cvs/gcc/gcc/gcc/configure,v retrieving revision 1.606 diff -p -u -p -r1.606 configure --- gcc/configure 25 May 2002 19:51:40 -0000 1.606 +++ gcc/configure 27 May 2002 04:14:21 -0000 @@ -8065,7 +8065,7 @@ all_languages= all_boot_languages= all_compilers= all_stagestuff= -all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc' +all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' # List of language makefile fragments. all_lang_makefiles= Index: gcc/configure.in =================================================================== RCS file: /cvs/gcc/gcc/gcc/configure.in,v retrieving revision 1.593 diff -p -u -p -r1.593 configure.in --- gcc/configure.in 25 May 2002 19:51:41 -0000 1.593 +++ gcc/configure.in 27 May 2002 04:14:21 -0000 @@ -2312,7 +2312,7 @@ all_languages= all_boot_languages= all_compilers= all_stagestuff= -all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc' +all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' # List of language makefile fragments. all_lang_makefiles= Index: gcc/mkheaders.in =================================================================== RCS file: gcc/mkheaders.in diff -N gcc/mkheaders.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gcc/mkheaders.in 27 May 2002 04:14:21 -0000 @@ -0,0 +1,101 @@ +#!/bin/sh + +# Copyright (C) 2002 Free Software Foundation, Inc. + +#This file is part of GCC. + +#GCC is free software; you can redistribute it and/or modify it under +#the terms of the GNU General Public License as published by the Free +#Software Foundation; either version 2, or (at your option) any later +#version. + +#GCC is distributed in the hope that it will be useful, but WITHOUT +#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +#for more details. + +#You should have received a copy of the GNU General Public License +#along with GCC; see the file COPYING. If not, write to the Free +#Software Foundation, 59 Temple Place - Suite 330, Boston, MA +#02111-1307, USA. + +# Basic information +target=@target@ +target_alias=@target_alias@ +version=@gcc_version@ + +VERBOSE=0 +while [ x$1 = x-v ] ; do + shift + VERBOSE=`expr $VERBOSE + 1` +done +export VERBOSE + +if [ x$1 = x--help ] ; then + echo "Usage: mkheaders [options] [prefix]" + echo "Options:" + echo " -v Print more output (may be repeated for even more output)" + echo " --help This help" + echo " --version Print version information" + exit 0 +fi + +if [ x$1 = x--version ] ; then + echo "mkheaders (GCC) version $version" + echo "Copyright 2002 Free Software Foundation, Inc." + echo "This program is free software; you may redistribute it under the" + echo "terms of the GNU General Public License. This program has" + echo "absolutely no warranty." + exit 0 +fi + +# Common prefix for installation directories. +if [ x$1 != x ] ; then + prefix=$1 +else + prefix=@prefix@ +fi +# Directory in which to put localized header files. On the systems with +# gcc as the native cc, `local_prefix' may not be `prefix' which is +# `/usr'. +# NOTE: local_prefix *should not* default from prefix. +local_prefix=@local_prefix@ +# Directory in which to put host dependent programs and libraries +exec_prefix=@exec_prefix@ +# Directory in which to put the directories used by the compiler. +libdir=@libdir@ +# Directory in which the compiler finds executables, libraries, etc. +libsubdir=${libdir}/gcc-lib/${target_alias}/${version} +# Since gcc_tooldir does not exist at build-time, use -B${build_tooldir}/bin/ +build_tooldir=${exec_prefix}/${target_alias} +# Directory to search for site-specific includes. +local_includedir=${local_prefix}/include +includedir=${prefix}/include + +itoolsdir=${libsubdir}/install-tools +incdir=${libsubdir}/include + +. ${itoolsdir}/mkheaders.conf + +cd ${itoolsdir} +rm -rf ${incdir}/* + +if [ x${STMP_FIXINC} != x ] ; then + TARGET_MACHINE="${target}" target_canonical="${target}" \ + ${SHELL} ./fixinc.sh ${incdir} \ + ${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS} + rm -f ${incdir}/syslimits.h + if [ -f ${incdir}/limits.h ]; then + mv ${incdir}/limits.h ${incdir}/syslimits.h + else + cp gsyslimits.h ${incdir}/syslimits.h + fi +fi + +cp include/* ${incdir} + +if [ x${STMP_FIXPROTO} != x ] ; then + mkinstalldirs="${SHELL} ${itoolsdir}/mkinstalldirs" + export FIXPROTO_DEFINES mkinstalldirs + ${SHELL} fixproto ${incdir} ${incdir} ${SYSTEM_HEADER_DIR} || exit 1 +fi From-SVN: r53907
2002-05-27 06:24:54 +02:00
all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
1997-08-11 17:56:58 +02:00
# List of language makefile fragments.
all_lang_makefiles=
# Files for gengtype
all_gtfiles="$target_gtfiles"
# Files for gengtype with language
all_gtfiles_files_langs=
all_gtfiles_files_files=
1997-08-11 17:56:58 +02:00
# Add the language fragments.
# Languages are added via two mechanisms. Some information must be
# recorded in makefile variables, these are defined in config-lang.in.
# We accumulate them and plug them into the main Makefile.
# The other mechanism is a set of hooks for each of the main targets
# like `clean', `install', etc.
language_fragments="Make-lang"
language_hooks="Make-hooks"
for s in .. $subdirs
do
if test $s != ".."
1997-08-11 17:56:58 +02:00
then
language=
boot_language=
compilers=
stagestuff=
outputs=
gtfiles=
1997-08-11 17:56:58 +02:00
. ${srcdir}/$s/config-lang.in
if test "x$language" = x
1997-08-11 17:56:58 +02:00
then
echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
exit 1
fi
all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
if test -f ${srcdir}/$s/Makefile.in
then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
fi
1997-08-11 17:56:58 +02:00
all_languages="$all_languages $language"
if test "x$boot_language" = xyes
1997-08-11 17:56:58 +02:00
then
all_boot_languages="$all_boot_languages $language"
fi
all_compilers="$all_compilers $compilers"
all_stagestuff="$all_stagestuff $stagestuff"
all_outputs="$all_outputs $outputs"
all_gtfiles="$all_gtfiles $gtfiles"
for f in .. $gtfiles
do
if test $f != ".."
then
all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
fi
done
1997-08-11 17:56:58 +02:00
fi
done
# Pick up gtfiles for c
gtfiles=
s="c"
. ${srcdir}/c-config-lang.in
all_gtfiles="$all_gtfiles $gtfiles"
for f in .. $gtfiles
do
if test $f != ".."
then
all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
fi
done
check_languages=
for language in .. $all_languages
do
if test $language != ".."
then
check_languages="$check_languages check-$language"
fi
done
1997-08-11 17:56:58 +02:00
# Since we can't use `::' targets, we link each language in
# with a set of hooks, reached indirectly via lang.${target}.
rm -f Make-hooks
touch Make-hooks
target_list="all.build all.cross start.encap rest.encap tags \
info dvi generated-manpages \
1997-08-11 17:56:58 +02:00
install-normal install-common install-info install-man \
uninstall \
1997-08-11 17:56:58 +02:00
mostlyclean clean distclean extraclean maintainer-clean \
stage1 stage2 stage3 stage4"
for t in $target_list
do
x=
for lang in .. $all_languages
1997-08-11 17:56:58 +02:00
do
if test $lang != ".."; then
x="$x $lang.$t"
1997-08-11 17:56:58 +02:00
fi
done
echo "lang.$t: $x" >> Make-hooks
done
# Create .gdbinit.
1997-08-11 17:56:58 +02:00
echo "dir ." > .gdbinit
echo "dir ${srcdir}" >> .gdbinit
if test x$gdb_needs_out_file_path = xyes
then
echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
fi
if test "x$subdirs" != x; then
for s in $subdirs
do
echo "dir ${srcdir}/$s" >> .gdbinit
done
1997-08-11 17:56:58 +02:00
fi
echo "source ${srcdir}/gdbinit.in" >> .gdbinit
1997-08-11 17:56:58 +02:00
# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
# absolute path for gcc_tooldir based on inserting the number of up-directory
# movements required to get from $(exec_prefix) to $(prefix) into the basic
# $(libsubdir)/@(unlibsubdir) based path.
# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
# make and thus we'd get different behavior depending on where we built the
# sources.
if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
else
# An explanation of the sed strings:
# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
# -e 's|/$||' match a trailing forward slash and eliminates it
# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
#
# (*) Note this pattern overwrites the first character of the string
# with a forward slash if one is not already present. This is not a
# problem because the exact names of the sub-directories concerned is
# unimportant, just the number of them matters.
#
# The practical upshot of these patterns is like this:
#
# prefix exec_prefix result
# ------ ----------- ------
# /foo /foo/bar ../
# /foo/ /foo/bar ../
# /foo /foo/bar/ ../
# /foo/ /foo/bar/ ../
# /foo /foo/bar/ugg ../../
#
dollar='$$'
gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
fi
# Find a directory in which to install a shared libgcc.
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
if test "${enable_version_specific_runtime_libs+set}" = set; then
enableval="$enable_version_specific_runtime_libs"
:
fi
# Check whether --with-slibdir or --without-slibdir was given.
if test "${with_slibdir+set}" = set; then
withval="$with_slibdir"
slibdir="$with_slibdir"
else
if test "${enable_version_specific_runtime_libs+set}" = set; then
slibdir='$(libsubdir)'
elif test "$host" != "$target"; then
slibdir='$(build_tooldir)/lib'
else
slibdir='$(libdir)'
fi
fi
Makefile.in: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * config-ml.in: Likewise. * configure: Likewise. * configure.in: Likewise. boehm-gc: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Regenerate. * configure: Regenerate. config: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. contrib: * test_installed: Allow for PWDCMD to override hardcoded pwd. * test_summary: Likewise. gcc: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * fixinc/check.tpl: Likewise. * fixinc/fixinc.dgux: Likewise. * fixinc/fixinc.svr4: Likewise. * fixinc/fixinc.winnt: Likewise. * fixinc/fixincl.sh: Likewise. * fixproto: Likewise. * configure: Regenerate. gcc/ada: * Makefile.adalib: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Likewise. gcc/f: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/java: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/po: * exgettext: Allow for PWDCMD to override hardcoded pwd. gcc/treelang: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. libf2c: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Likewise. * configure: Regenerate. libjava: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. libobjc: * aclocal.m4: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. libstdc++-v3: * Makefile.am: Allow for PWDCMD to override hardcoded pwd. * acinclude.m4: Likewise. * docs/html/Makefile: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. zlib: * configure.in: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. * ChangeLog: Move entries to ChangeLog.gcj. From-SVN: r53523
2002-05-16 19:43:21 +02:00
objdir=`${PWDCMD-pwd}`
1997-08-11 17:56:58 +02:00
# Process the language and host/target makefile fragments.
${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
# Substitute configuration variables
configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. * configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. Warn unless they're $cpu/xm-$cpu.h. Don't generate *config.h here. AC_SUBST all variables needed to generate *config.h. * configure: Regenerate. * mkconfig.sh: New helper script, from code removed from configure.in. * Makefile.in: Zap all MALLOC variables - no longer used anywhere, and malloc.c doesn't exist. Substitute in variables needed to generate *config.h. Stop lying about the dependencies contained in CONFIG_H and GCONFIG_H. (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), $(TM_P_H), etc. as appropriate. * config.gcc: Zap references to deleted files. * ggc-none.c: Don't include rtl.h or tm_p.h. * config/i386/xm-beos.h, config/i386/xm-dgux.h, config/i386/xm-djgpp.h, config/i386/xm-dos.h, config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, config/i386/xm-linux.h, config/i386/xm-linux.h, config/i386/xm-next.h, config/i386/xm-openbsd.h, config/i386/xm-sun.h, config/i386/xm-sysv3.h: Don't include i386/xm-i386.h. * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, config/i386/xm-i386.h, config/i860/xm-i860.h, config/i960/xm-i960.h, config/mcore/xm-mcore.h, config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: Delete (empty except comments, #includes of other deleted files, and macros used nowhere). cp: * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. From-SVN: r40350
2001-03-09 21:53:56 +01:00
1997-08-11 17:56:58 +02:00
# Echo that links are built
if test x$host = x$target
1997-08-11 17:56:58 +02:00
then
str1="native "
else
str1="cross-"
str2=" from $host"
fi
if test x$host != x$build
1997-08-11 17:56:58 +02:00
then
str3=" on a $build system"
fi
if test "x$str2" != x || test "x$str3" != x
1997-08-11 17:56:58 +02:00
then
str4=
fi
echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
if test "x$str2" != x || test "x$str3" != x
1997-08-11 17:56:58 +02:00
then
echo " ${str2}${str3}." 1>&2
fi
# Truncate the target if necessary
if test x$host_truncate_target != x; then
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
fi
1997-08-11 17:56:58 +02:00
# Configure the subdirectories
# AC_CONFIG_SUBDIRS($subdirs)
# Create the Makefile
# and configure language subdirectories
trap '' 1 2 15
cat > confcache <<\EOF
1997-08-11 17:56:58 +02:00
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
1997-08-11 17:56:58 +02:00
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
1997-08-11 17:56:58 +02:00
#
EOF
1997-08-11 17:56:58 +02:00
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
1997-08-11 17:56:58 +02:00
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
1997-08-11 17:56:58 +02:00
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1997-08-11 17:56:58 +02:00
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
1997-08-11 17:56:58 +02:00
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1997-08-11 17:56:58 +02:00
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
DEFS=-DHAVE_CONFIG_H
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@build_canonical@%$build_canonical%g
s%@host_canonical@%$host_canonical%g
s%@target_subdir@%$target_subdir%g
s%@CC@%$CC%g
s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
s%@CPP@%$CPP%g
s%@GNATBIND@%$GNATBIND%g
s%@ADAC@%$ADAC%g
s%@strict1_warn@%$strict1_warn%g
s%@warn_cflags@%$warn_cflags%g
s%@WERROR@%$WERROR%g
s%@nocommon_flag@%$nocommon_flag%g
s%@valgrind_path@%$valgrind_path%g
s%@valgrind_path_defines@%$valgrind_path_defines%g
s%@valgrind_command@%$valgrind_command%g
s%@coverage_flags@%$coverage_flags%g
s%@enable_multilib@%$enable_multilib%g
s%@enable_shared@%$enable_shared%g
s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AWK@%$AWK%g
s%@LN@%$LN%g
s%@LN_S@%$LN_S%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@have_mktemp_command@%$have_mktemp_command%g
s%@MAKEINFO@%$MAKEINFO%g
s%@BUILD_INFO@%$BUILD_INFO%g
s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
s%@make_compare_target@%$make_compare_target%g
s%@FLEX@%$FLEX%g
s%@BISON@%$BISON%g
s%@stage1_cflags@%$stage1_cflags%g
s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
s%@LDEXP_LIB@%$LDEXP_LIB%g
s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
s%@LIBICONV@%$LIBICONV%g
s%@manext@%$manext%g
s%@objext@%$objext%g
s%@extra_modes_file@%$extra_modes_file%g
s%@FORBUILD@%$FORBUILD%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ALLOCA@%$ALLOCA%g
s%@GLIBC21@%$GLIBC21%g
s%@USE_NLS@%$USE_NLS%g
s%@MSGFMT@%$MSGFMT%g
s%@GMSGFMT@%$GMSGFMT%g
s%@XGETTEXT@%$XGETTEXT%g
s%@INTLBISON@%$INTLBISON%g
s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
s%@CATALOGS@%$CATALOGS%g
s%@CATOBJEXT@%$CATOBJEXT%g
s%@INTLLIBS@%$INTLLIBS%g
s%@INTLDEPS@%$INTLDEPS%g
s%@INTLOBJS@%$INTLOBJS%g
s%@POSUB@%$POSUB%g
s%@DATADIRNAME@%$DATADIRNAME%g
s%@INSTOBJEXT@%$INSTOBJEXT%g
s%@GENCAT@%$GENCAT%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
s%@CROSS@%$CROSS%g
s%@ALL@%$ALL%g
s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
s%@inhibit_libc@%$inhibit_libc%g
s%@BUILD_PREFIX@%$BUILD_PREFIX%g
s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
s%@BUILD_CC@%$BUILD_CC%g
s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
s%@STMP_FIXINC@%$STMP_FIXINC%g
s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
s%@libgcc_visibility@%$libgcc_visibility%g
s%@gthread_flags@%$gthread_flags%g
s%@GGC@%$GGC%g
s%@zlibdir@%$zlibdir%g
s%@zlibinc@%$zlibinc%g
s%@MAINT@%$MAINT%g
s%@gcc_tooldir@%$gcc_tooldir%g
s%@dollar@%$dollar%g
s%@slibdir@%$slibdir%g
s%@objdir@%$objdir%g
s%@subdirs@%$subdirs%g
s%@srcdir@%$srcdir%g
s%@all_boot_languages@%$all_boot_languages%g
s%@all_compilers@%$all_compilers%g
s%@all_gtfiles@%$all_gtfiles%g
s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
s%@all_lang_makefiles@%$all_lang_makefiles%g
s%@all_languages@%$all_languages%g
s%@all_stagestuff@%$all_stagestuff%g
s%@build_exeext@%$build_exeext%g
s%@build_install_headers_dir@%$build_install_headers_dir%g
s%@build_xm_file_list@%$build_xm_file_list%g
s%@build_xm_file@%$build_xm_file%g
s%@build_xm_defines@%$build_xm_defines%g
s%@check_languages@%$check_languages%g
s%@cc_set_by_configure@%$cc_set_by_configure%g
s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
s%@cpp_install_dir@%$cpp_install_dir%g
s%@dep_host_xmake_file@%$dep_host_xmake_file%g
s%@dep_tmake_file@%$dep_tmake_file%g
s%@extra_headers_list@%$extra_headers_list%g
s%@extra_objs@%$extra_objs%g
s%@extra_parts@%$extra_parts%g
s%@extra_passes@%$extra_passes%g
s%@extra_programs@%$extra_programs%g
s%@float_h_file@%$float_h_file%g
s%@gcc_config_arguments@%$gcc_config_arguments%g
s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
s%@libstdcxx_incdir@%$libstdcxx_incdir%g
s%@gcc_version@%$gcc_version%g
s%@gcc_version_full@%$gcc_version_full%g
s%@gcc_version_trigger@%$gcc_version_trigger%g
s%@host_exeext@%$host_exeext%g
s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
s%@host_xm_file_list@%$host_xm_file_list%g
s%@host_xm_file@%$host_xm_file%g
s%@host_xm_defines@%$host_xm_defines%g
s%@out_host_hook_obj@%$out_host_hook_obj%g
s%@install@%$install%g
s%@lang_options_files@%$lang_options_files%g
s%@lang_specs_files@%$lang_specs_files%g
s%@lang_tree_files@%$lang_tree_files%g
s%@local_prefix@%$local_prefix%g
s%@md_file@%$md_file%g
s%@objc_boehm_gc@%$objc_boehm_gc%g
s%@out_file@%$out_file%g
s%@out_object_file@%$out_object_file%g
s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
s%@symbolic_link@%$symbolic_link%g
s%@thread_file@%$thread_file%g
s%@tm_file_list@%$tm_file_list%g
s%@tm_file@%$tm_file%g
s%@tm_defines@%$tm_defines%g
s%@tm_p_file_list@%$tm_p_file_list%g
s%@tm_p_file@%$tm_p_file%g
s%@xm_file@%$xm_file%g
s%@xm_defines@%$xm_defines%g
s%@c_target_objs@%$c_target_objs%g
s%@cxx_target_objs@%$cxx_target_objs%g
s%@target_cpu_default@%$target_cpu_default%g
1997-08-11 17:56:58 +02:00
/@target_overrides@/r $target_overrides
s%@target_overrides@%%g
1997-08-11 17:56:58 +02:00
/@host_overrides@/r $host_overrides
s%@host_overrides@%%g
1997-08-11 17:56:58 +02:00
/@language_fragments@/r $language_fragments
s%@language_fragments@%%g
1997-08-11 17:56:58 +02:00
/@language_hooks@/r $language_hooks
s%@language_hooks@%%g
1997-08-11 17:56:58 +02:00
CEOF
EOF
1997-08-11 17:56:58 +02:00
cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
1997-08-11 17:56:58 +02:00
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1997-08-11 17:56:58 +02:00
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
1997-08-11 17:56:58 +02:00
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
1997-08-11 17:56:58 +02:00
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1997-08-11 17:56:58 +02:00
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
1997-08-11 17:56:58 +02:00
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1997-08-11 17:56:58 +02:00
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
1997-08-11 17:56:58 +02:00
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
1997-08-11 17:56:58 +02:00
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='\([ ]\)%\1#\2define\3'
1997-08-11 17:56:58 +02:00
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="auto-host.h:config.in"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1997-08-11 17:56:58 +02:00
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
1997-08-11 17:56:58 +02:00
esac
echo creating $ac_file
rm -f conftest.frag conftest.in conftest.out
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
cat $ac_file_inputs > conftest.in
EOF
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h. And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
1997-08-11 17:56:58 +02:00
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
1997-08-11 17:56:58 +02:00
rm -f conftest.tail
while :
1997-08-11 17:56:58 +02:00
do
ac_lines=`grep -c . conftest.vals`
# grep -c gives empty output for an empty file on some AIX systems.
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
# Write a limited-size here document to conftest.frag.
echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1997-08-11 17:56:58 +02:00
echo 'CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
' >> $CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
rm -f conftest.vals
mv conftest.tail conftest.vals
1997-08-11 17:56:58 +02:00
done
rm -f conftest.vals
cat >> $CONFIG_STATUS <<\EOF
rm -f conftest.frag conftest.h
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
cat conftest.in >> conftest.h
rm -f conftest.in
if cmp -s $ac_file conftest.h 2>/dev/null; then
echo "$ac_file is unchanged"
rm -f conftest.h
else
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
fi
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
1997-08-11 17:56:58 +02:00
EOF
cat >> $CONFIG_STATUS <<EOF
subdirs='$subdirs'
symbolic_link='$symbolic_link'
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
esac
# PO directories have a Makefile.in generated from Makefile.in.in.
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
case "$ac_given_srcdir" in
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
/*) top_srcdir="$ac_given_srcdir" ;;
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
fi
;;
esac
done
1997-08-11 17:56:58 +02:00
case x$CONFIG_HEADERS in
xauto-host.h:config.in)
1997-08-11 17:56:58 +02:00
echo > cstamp-h ;;
esac
# If the host supports symlinks, point stage[1234] at ../stage[1234] so
# bootstrapping and the installation procedure can still use
# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
# FLAGS_TO_PASS has been modified to solve the problem there.
# This is virtually a duplicate of what happens in configure.lang; we do
# an extra check to make sure this only happens if ln -s can be used.
if test "$symbolic_link" = "ln -s"; then
for d in .. ${subdirs} fixinc ; do
if test $d != ..; then
Makefile.in: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * config-ml.in: Likewise. * configure: Likewise. * configure.in: Likewise. boehm-gc: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Regenerate. * configure: Regenerate. config: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. contrib: * test_installed: Allow for PWDCMD to override hardcoded pwd. * test_summary: Likewise. gcc: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * fixinc/check.tpl: Likewise. * fixinc/fixinc.dgux: Likewise. * fixinc/fixinc.svr4: Likewise. * fixinc/fixinc.winnt: Likewise. * fixinc/fixincl.sh: Likewise. * fixproto: Likewise. * configure: Regenerate. gcc/ada: * Makefile.adalib: Allow for PWDCMD to override hardcoded pwd. * Makefile.in: Likewise. gcc/f: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/java: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. gcc/po: * exgettext: Allow for PWDCMD to override hardcoded pwd. gcc/treelang: * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. libf2c: * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * aclocal.m4: Likewise. * configure: Regenerate. libjava: * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * configure.in: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. libobjc: * aclocal.m4: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. libstdc++-v3: * Makefile.am: Allow for PWDCMD to override hardcoded pwd. * acinclude.m4: Likewise. * docs/html/Makefile: Likewise. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. zlib: * configure.in: Allow for PWDCMD to override hardcoded pwd. * configure: Regenerate. * ChangeLog: Move entries to ChangeLog.gcj. From-SVN: r53523
2002-05-16 19:43:21 +02:00
STARTDIR=`${PWDCMD-pwd}`
cd $d
for t in stage1 stage2 stage3 stage4 include
do
rm -f $t
$symbolic_link ../$t $t 2>/dev/null
done
cd $STARTDIR
fi
done
else true ; fi
# Avoid having to add intl to our include paths.
if test -f intl/libintl.h; then
echo creating libintl.h
echo '#include "intl/libintl.h"' >libintl.h
fi
exit 0
EOF
1997-08-11 17:56:58 +02:00
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1997-08-11 17:56:58 +02:00