Line 1... |
Line 1... |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
# 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
|
# Inc.
|
#
|
#
|
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 3 of the License, or
|
# (at your option) any later version.
|
# (at your option) any later version.
|
#
|
#
|
# This program is distributed in the hope that it will be useful, but
|
# This program is distributed in the hope that it will be useful, but
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# General Public License for more details.
|
# General Public License for more details.
|
#
|
#
|
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
# along with this program; if not, write to the Free Software
|
# along with this program; see the file COPYING3. If not see
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# .
|
|
|
##############################################################################
|
##############################################################################
|
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
|
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
|
|
|
sinclude(config/acx.m4)
|
m4_include(config/acx.m4)
|
|
m4_include(config/override.m4)
|
|
m4_include(config/proginstall.m4)
|
|
|
AC_INIT(move-if-change)
|
AC_INIT(move-if-change)
|
AC_PREREQ(2.59)
|
AC_PREREQ(2.64)
|
|
AC_DISABLE_OPTION_CHECKING
|
|
|
|
progname=$0
|
|
# if PWD already has a value, it is probably wrong.
|
|
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
|
|
|
|
# Export original configure arguments for use by sub-configures.
|
|
# Quote arguments with shell meta charatcers.
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS=
|
|
set -- "$progname" "$@"
|
|
for ac_arg
|
|
do
|
|
case "$ac_arg" in
|
|
*" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*)
|
|
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
|
|
# if the argument is of the form -foo=baz, quote the baz part only
|
|
ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
|
|
*) ;;
|
|
esac
|
|
# Add the quoted argument to the list.
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
|
|
done
|
|
if test "$silent" = yes; then
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
|
|
fi
|
|
# Remove the initial space we just introduced and, as these will be
|
|
# expanded by make, quote '$'.
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
|
|
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
|
|
|
# Find the build, host, and target systems.
|
# Find the build, host, and target systems.
|
ACX_NONCANONICAL_BUILD
|
ACX_NONCANONICAL_BUILD
|
ACX_NONCANONICAL_HOST
|
ACX_NONCANONICAL_HOST
|
ACX_NONCANONICAL_TARGET
|
ACX_NONCANONICAL_TARGET
|
Line 45... |
Line 77... |
|
|
# Get 'install' or 'install-sh' and its variants.
|
# Get 'install' or 'install-sh' and its variants.
|
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
ACX_PROG_LN
|
ACX_PROG_LN
|
AC_PROG_LN_S
|
AC_PROG_LN_S
|
|
AC_PROG_SED
|
|
AC_PROG_AWK
|
|
|
### we might need to use some other shell than /bin/sh for running subshells
|
### we might need to use some other shell than /bin/sh for running subshells
|
### If we are on Windows, search for the shell. This will permit people
|
### If we are on Windows, search for the shell. This will permit people
|
### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
|
### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
|
### without also having to set CONFIG_SHELL. This code will work when
|
### without also having to set CONFIG_SHELL. This code will work when
|
Line 80... |
Line 114... |
;;
|
;;
|
esac
|
esac
|
|
|
config_shell=${CONFIG_SHELL-/bin/sh}
|
config_shell=${CONFIG_SHELL-/bin/sh}
|
|
|
progname=$0
|
|
# if PWD already has a value, it is probably wrong.
|
|
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
|
|
|
|
# Export original configure arguments for use by sub-configures.
|
|
# Quote arguments with shell meta charatcers.
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS=
|
|
set -- "$progname" "$@"
|
|
for ac_arg
|
|
do
|
|
case "$ac_arg" in
|
|
*" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*)
|
|
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
|
|
# if the argument is of the form -foo=baz, quote the baz part only
|
|
ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
|
|
*) ;;
|
|
esac
|
|
# Add the quoted argument to the list.
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
|
|
done
|
|
if test "$silent" = yes; then
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
|
|
fi
|
|
# Remove the initial space we just introduced and, as these will be
|
|
# expanded by make, quote '$'.
|
|
TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
|
|
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
|
|
|
|
moveifchange=${srcdir}/move-if-change
|
moveifchange=${srcdir}/move-if-change
|
|
|
srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
|
srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
|
|
|
# We pass INSTALL explicitly to sub-makes. Make sure that it is not
|
# We pass INSTALL explicitly to sub-makes. Make sure that it is not
|
Line 153... |
Line 159... |
# these tools are built for the build environment
|
# these tools are built for the build environment
|
build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
|
build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
|
|
|
# these libraries are used by various programs built for the host environment
|
# these libraries are used by various programs built for the host environment
|
#
|
#
|
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
|
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libiconv"
|
|
|
# these tools are built for the host environment
|
# these tools are built for the host environment
|
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
# know that we are building the simulator.
|
# know that we are building the simulator.
|
# binutils, gas and ld appear in that order because it makes sense to run
|
# binutils, gas and ld appear in that order because it makes sense to run
|
# "make check" in that particular order.
|
# "make check" in that particular order.
|
host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
|
# If --enable-gold is used, "gold" will replace "ld".
|
|
host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
|
|
|
# libgcj represents the runtime libraries only used by gcj.
|
# libgcj represents the runtime libraries only used by gcj.
|
libgcj="target-libffi \
|
libgcj="target-libffi \
|
target-zlib \
|
target-zlib \
|
target-qthreads \
|
target-qthreads \
|
Line 236... |
Line 243... |
|
|
use_gnu_ld=
|
use_gnu_ld=
|
# Make sure we don't let GNU ld be added if we didn't want it.
|
# Make sure we don't let GNU ld be added if we didn't want it.
|
if test x$with_gnu_ld = xno ; then
|
if test x$with_gnu_ld = xno ; then
|
use_gnu_ld=no
|
use_gnu_ld=no
|
noconfigdirs="$noconfigdirs ld"
|
noconfigdirs="$noconfigdirs ld gold"
|
fi
|
fi
|
|
|
use_gnu_as=
|
use_gnu_as=
|
# Make sure we don't let GNU as be added if we didn't want it.
|
# Make sure we don't let GNU as be added if we didn't want it.
|
if test x$with_gnu_as = xno ; then
|
if test x$with_gnu_as = xno ; then
|
Line 287... |
Line 294... |
case ${with_newlib} in
|
case ${with_newlib} in
|
no) skipdirs="${skipdirs} target-newlib" ;;
|
no) skipdirs="${skipdirs} target-newlib" ;;
|
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
|
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
|
esac
|
esac
|
|
|
|
# Handle --enable-gold.
|
|
|
|
AC_ARG_ENABLE(gold,
|
|
[ --enable-gold use gold instead of ld],
|
|
ENABLE_GOLD=$enableval,
|
|
ENABLE_GOLD=no)
|
|
if test "${ENABLE_GOLD}" = "yes"; then
|
|
# Check for ELF target.
|
|
is_elf=no
|
|
case "${target}" in
|
|
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
|
|
| *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
|
|
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
|
|
case "${target}" in
|
|
*-*-linux*aout* | *-*-linux*oldld*)
|
|
;;
|
|
*)
|
|
is_elf=yes
|
|
;;
|
|
esac
|
|
esac
|
|
|
|
if test "$is_elf" = "yes"; then
|
|
# Check for target supported by gold.
|
|
case "${target}" in
|
|
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
|
|
configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
|
|
;;
|
|
esac
|
|
fi
|
|
fi
|
|
|
# Configure extra directories which are host specific
|
# Configure extra directories which are host specific
|
|
|
case "${host}" in
|
case "${host}" in
|
*-cygwin*)
|
*-cygwin*)
|
configdirs="$configdirs libtermcap" ;;
|
configdirs="$configdirs libtermcap" ;;
|
Line 370... |
Line 409... |
|
|
|
|
# Disable libmudflap on some systems.
|
# Disable libmudflap on some systems.
|
if test x$enable_libmudflap = x ; then
|
if test x$enable_libmudflap = x ; then
|
case "${target}" in
|
case "${target}" in
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux*)
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu)
|
# Enable libmudflap by default in GNU and friends.
|
# Enable libmudflap by default in GNU and friends.
|
;;
|
;;
|
*-*-freebsd*)
|
*-*-freebsd*)
|
# Enable libmudflap by default in FreeBSD.
|
# Enable libmudflap by default in FreeBSD.
|
;;
|
;;
|
Line 387... |
Line 426... |
|
|
# Disable libgomp on non POSIX hosted systems.
|
# Disable libgomp on non POSIX hosted systems.
|
if test x$enable_libgomp = x ; then
|
if test x$enable_libgomp = x ; then
|
# Enable libgomp by default on hosted POSIX systems.
|
# Enable libgomp by default on hosted POSIX systems.
|
case "${target}" in
|
case "${target}" in
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
|
;;
|
;;
|
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
|
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
|
;;
|
;;
|
*-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
|
*-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
|
;;
|
;;
|
Line 408... |
Line 447... |
|
|
case "${target}" in
|
case "${target}" in
|
*-*-chorusos)
|
*-*-chorusos)
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
;;
|
;;
|
powerpc-*-darwin* | i[[3456789]]86-*-darwin* | x86_64-*-darwin9*)
|
powerpc-*-darwin*)
|
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
|
noconfigdirs="$noconfigdirs ld gas gdb gprof"
|
|
noconfigdirs="$noconfigdirs sim target-rda"
|
|
;;
|
|
i[[3456789]]86-*-darwin*)
|
|
noconfigdirs="$noconfigdirs ld gprof"
|
|
noconfigdirs="$noconfigdirs sim target-rda"
|
|
;;
|
|
x86_64-*-darwin[[912]]*)
|
|
noconfigdirs="$noconfigdirs ld gas gprof"
|
noconfigdirs="$noconfigdirs sim target-rda"
|
noconfigdirs="$noconfigdirs sim target-rda"
|
;;
|
;;
|
*-*-darwin*)
|
*-*-darwin*)
|
noconfigdirs="$noconfigdirs ld gas gdb gprof"
|
noconfigdirs="$noconfigdirs ld gas gdb gprof"
|
noconfigdirs="$noconfigdirs sim target-rda"
|
noconfigdirs="$noconfigdirs sim target-rda"
|
Line 526... |
Line 573... |
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
libgloss_dir=arm
|
libgloss_dir=arm
|
;;
|
;;
|
arm*-*-linux-gnueabi)
|
arm*-*-linux-gnueabi)
|
noconfigdirs="$noconfigdirs target-qthreads"
|
noconfigdirs="$noconfigdirs target-qthreads"
|
noconfigdirs="$noconfigdirs target-libobjc"
|
|
case ${with_newlib} in
|
case ${with_newlib} in
|
no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
esac
|
esac
|
libgloss_dir=arm
|
libgloss_dir=arm
|
;;
|
;;
|
Line 552... |
Line 598... |
;;
|
;;
|
arm-*-riscix*)
|
arm-*-riscix*)
|
noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
|
;;
|
;;
|
avr-*-*)
|
avr-*-*)
|
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
|
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj} target-libssp"
|
;;
|
;;
|
bfin-*-*)
|
bfin-*-*)
|
noconfigdirs="$noconfigdirs gdb"
|
noconfigdirs="$noconfigdirs gdb"
|
if test x${is_cross_compiler} != xno ; then
|
if test x${is_cross_compiler} != xno ; then
|
target_configdirs="${target_configdirs} target-bsp target-cygmon"
|
target_configdirs="${target_configdirs} target-bsp target-cygmon"
|
Line 566... |
Line 612... |
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
|
;;
|
;;
|
c54x*-*-* | tic54x-*-*)
|
c54x*-*-* | tic54x-*-*)
|
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
|
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
|
;;
|
;;
|
|
cr16-*-*)
|
|
noconfigdirs="$noconfigdirs ${libgcj} gdb"
|
|
;;
|
cris-*-* | crisv32-*-*)
|
cris-*-* | crisv32-*-*)
|
unsupported_languages="$unsupported_languages java"
|
unsupported_languages="$unsupported_languages java"
|
case "${target}" in
|
case "${target}" in
|
*-*-aout)
|
*-*-aout)
|
unsupported_languages="$unsupported_languages fortran"
|
unsupported_languages="$unsupported_languages fortran"
|
Line 600... |
Line 649... |
noconfigdirs="$noconfigdirs ${libgcj} gdb"
|
noconfigdirs="$noconfigdirs ${libgcj} gdb"
|
;;
|
;;
|
frv-*-*)
|
frv-*-*)
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
;;
|
;;
|
|
moxie-*-*)
|
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
|
noconfigdirs="$noconfigdirs gprof"
|
|
;;
|
h8300*-*-*)
|
h8300*-*-*)
|
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
|
;;
|
;;
|
h8500-*-*)
|
h8500-*-*)
|
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
|
Line 644... |
Line 697... |
;;
|
;;
|
ia64*-**-hpux*)
|
ia64*-**-hpux*)
|
# No gdb or ld support yet.
|
# No gdb or ld support yet.
|
noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
|
noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
|
;;
|
;;
|
|
ia64*-*-*vms*)
|
|
# No gdb or ld support yet.
|
|
noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
|
|
;;
|
i370-*-opened*)
|
i370-*-opened*)
|
;;
|
;;
|
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
|
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
libgloss_dir=i386
|
libgloss_dir=i386
|
Line 679... |
Line 736... |
target_configdirs="$target_configdirs target-winsup"
|
target_configdirs="$target_configdirs target-winsup"
|
noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
|
noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
|
;;
|
;;
|
*-*-cygwin*)
|
*-*-cygwin*)
|
target_configdirs="$target_configdirs target-libtermcap target-winsup"
|
target_configdirs="$target_configdirs target-libtermcap target-winsup"
|
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-gperf target-libgloss"
|
# always build newlib if winsup directory is present.
|
# always build newlib if winsup directory is present.
|
if test -d "$srcdir/winsup/cygwin"; then
|
if test -d "$srcdir/winsup/cygwin"; then
|
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
|
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
|
elif test -d "$srcdir/newlib"; then
|
elif test -d "$srcdir/newlib"; then
|
echo "Warning: winsup/cygwin is missing so newlib can't be built."
|
echo "Warning: winsup/cygwin is missing so newlib can't be built."
|
Line 749... |
Line 806... |
mt-*-*)
|
mt-*-*)
|
noconfigdirs="$noconfigdirs sim"
|
noconfigdirs="$noconfigdirs sim"
|
;;
|
;;
|
powerpc-*-aix*)
|
powerpc-*-aix*)
|
# copied from rs6000-*-* entry
|
# copied from rs6000-*-* entry
|
noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
|
noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-newlib ${libgcj}"
|
;;
|
;;
|
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
|
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
|
target_configdirs="$target_configdirs target-winsup"
|
target_configdirs="$target_configdirs target-winsup"
|
noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
|
noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
|
# always build newlib.
|
# always build newlib.
|
Line 776... |
Line 833... |
;;
|
;;
|
rs6000-*-lynxos*)
|
rs6000-*-lynxos*)
|
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
|
;;
|
;;
|
rs6000-*-aix*)
|
rs6000-*-aix*)
|
noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
|
noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-newlib ${libgcj}"
|
;;
|
;;
|
rs6000-*-*)
|
rs6000-*-*)
|
noconfigdirs="$noconfigdirs gprof ${libgcj}"
|
noconfigdirs="$noconfigdirs gprof ${libgcj}"
|
;;
|
;;
|
m68k-apollo-*)
|
m68k-apollo-*)
|
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
|
;;
|
;;
|
|
microblaze*)
|
|
noconfigdirs="$noconfigdirs gprof ${libgcj}"
|
|
;;
|
mips*-sde-elf*)
|
mips*-sde-elf*)
|
skipdirs="$skipdirs target-libiberty"
|
skipdirs="$skipdirs target-libiberty"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
if test x$with_newlib = xyes; then
|
if test x$with_newlib = xyes; then
|
noconfigdirs="$noconfigdirs gprof"
|
noconfigdirs="$noconfigdirs gprof"
|
Line 822... |
Line 882... |
i[[3456789]]86-*-vsta) ;; # don't add gprof back in
|
i[[3456789]]86-*-vsta) ;; # don't add gprof back in
|
i[[3456789]]86-*-go32*) ;; # don't add gprof back in
|
i[[3456789]]86-*-go32*) ;; # don't add gprof back in
|
i[[3456789]]86-*-msdosdjgpp*) ;; # don't add gprof back in
|
i[[3456789]]86-*-msdosdjgpp*) ;; # don't add gprof back in
|
*) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
|
*) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
|
esac
|
esac
|
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
|
case "${target}" in
|
|
sh*-*-elf)
|
|
noconfigdirs="$noconfigdirs ${libgcj}" ;;
|
|
*)
|
|
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;;
|
|
esac
|
;;
|
;;
|
sparclet-*-aout* | sparc86x-*-*)
|
sparclet-*-aout* | sparc86x-*-*)
|
libgloss_dir=sparc
|
libgloss_dir=sparc
|
;;
|
;;
|
sparc-*-elf*)
|
sparc-*-elf*)
|
Line 851... |
Line 916... |
sparc-*-solaris2.[[0-6]] | sparc-*-solaris2.[[0-6]].*)
|
sparc-*-solaris2.[[0-6]] | sparc-*-solaris2.[[0-6]].*)
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
;;
|
;;
|
sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
|
sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
|
;;
|
;;
|
spu-*-*)
|
|
skipdirs="target-libssp"
|
|
;;
|
|
v810-*-*)
|
v810-*-*)
|
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
|
;;
|
;;
|
v850-*-*)
|
v850-*-*)
|
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
|
Line 878... |
Line 940... |
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
;;
|
;;
|
ip2k-*-*)
|
ip2k-*-*)
|
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
|
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
|
;;
|
;;
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
;;
|
;;
|
*-*-lynxos*)
|
*-*-lynxos*)
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
;;
|
;;
|
Line 1006... |
Line 1068... |
;;
|
;;
|
i[[3456789]]86-*-msdosdjgpp*)
|
i[[3456789]]86-*-msdosdjgpp*)
|
host_makefile_frag="config/mh-djgpp"
|
host_makefile_frag="config/mh-djgpp"
|
;;
|
;;
|
*-cygwin*)
|
*-cygwin*)
|
|
ACX_CHECK_CYGWIN_CAT_WORKS
|
host_makefile_frag="config/mh-cygwin"
|
host_makefile_frag="config/mh-cygwin"
|
;;
|
;;
|
*-mingw32*)
|
*-mingw*)
|
host_makefile_frag="config/mh-mingw"
|
|
;;
|
|
*-mingw64*)
|
|
host_makefile_frag="config/mh-mingw"
|
host_makefile_frag="config/mh-mingw"
|
;;
|
;;
|
*-interix*)
|
*-interix*)
|
host_makefile_frag="config/mh-interix"
|
host_makefile_frag="config/mh-interix"
|
;;
|
;;
|
Line 1029... |
Line 1089... |
m68k-sun-sunos*)
|
m68k-sun-sunos*)
|
# Sun's C compiler needs the -J flag to be able to compile cp-parse.c
|
# Sun's C compiler needs the -J flag to be able to compile cp-parse.c
|
# without overflowing the jump tables (-J says to use a 32 bit table)
|
# without overflowing the jump tables (-J says to use a 32 bit table)
|
tentative_cc="cc -J"
|
tentative_cc="cc -J"
|
;;
|
;;
|
*-hp-hpux*)
|
hppa*-hp-hpux10*)
|
|
tentative_cc="cc -Wp,-H256000"
|
|
host_makefile_frag="config/mh-pa-hpux10"
|
|
;;
|
|
hppa*-hp-hpux* | hppa*-*-hiux*)
|
tentative_cc="cc -Wp,-H256000"
|
tentative_cc="cc -Wp,-H256000"
|
|
host_makefile_frag="config/mh-pa"
|
;;
|
;;
|
*-*-hiux*)
|
hppa*-*)
|
|
host_makefile_frag="config/mh-pa"
|
|
;;
|
|
*-hp-hpux* | *-*-hiux*)
|
tentative_cc="cc -Wp,-H256000"
|
tentative_cc="cc -Wp,-H256000"
|
;;
|
;;
|
rs6000-*-lynxos*)
|
rs6000-*-lynxos*)
|
# /bin/cc is less than useful for our purposes. Always use GCC
|
# /bin/cc is less than useful for our purposes. Always use GCC
|
tentative_cc="/usr/cygnus/progressive/bin/gcc"
|
tentative_cc="/usr/cygnus/progressive/bin/gcc"
|
Line 1136... |
Line 1204... |
fi
|
fi
|
|
|
ACX_PROG_GNAT
|
ACX_PROG_GNAT
|
ACX_PROG_CMP_IGNORE_INITIAL
|
ACX_PROG_CMP_IGNORE_INITIAL
|
|
|
# Check for GMP and MPFR
|
# See if we are building gcc with C++.
|
|
AC_ARG_ENABLE(build-with-cxx,
|
|
[ --enable-build-with-cxx build with C++ compiler instead of C compiler],
|
|
ENABLE_BUILD_WITH_CXX=$enableval,
|
|
ENABLE_BUILD_WITH_CXX=no)
|
|
|
|
# Check for GMP, MPFR and MPC
|
gmplibs="-lmpfr -lgmp"
|
gmplibs="-lmpfr -lgmp"
|
gmpinc=
|
gmpinc=
|
have_gmp=no
|
have_gmp=no
|
|
mpclibs=-lmpc
|
|
mpcinc=
|
|
have_mpc=no
|
|
|
|
# Specify a location for mpc
|
|
# check for this first so it ends up on the link line before mpfr.
|
|
AC_ARG_WITH(mpc, [ --with-mpc=PATH specify prefix directory for installed MPC package.
|
|
Equivalent to --with-mpc-include=PATH/include
|
|
plus --with-mpc-lib=PATH/lib])
|
|
AC_ARG_WITH(mpc_include, [ --with-mpc-include=PATH
|
|
specify directory for installed MPC include files])
|
|
AC_ARG_WITH(mpc_lib, [ --with-mpc-lib=PATH specify directory for the installed MPC library])
|
|
|
|
if test "x$with_mpc" != x; then
|
|
mpclibs="-L$with_mpc/lib -lmpc"
|
|
mpcinc="-I$with_mpc/include $mpcinc"
|
|
fi
|
|
if test "x$with_mpc_include" != x; then
|
|
mpcinc="-I$with_mpc_include $mpcinc"
|
|
fi
|
|
if test "x$with_mpc_lib" != x; then
|
|
mpclibs="-L$with_mpc_lib -lmpc"
|
|
fi
|
|
if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
|
|
mpclibs='-L$$r/$(HOST_SUBDIR)/mpc/src/.libs -L$$r/$(HOST_SUBDIR)/mpc/src/_libs -lmpc'
|
|
mpcinc='-I$$s/mpc/src '"$mpcinc"
|
|
# Do not test the mpc version. Assume that it is sufficient, since
|
|
# it is in the source tree, and the library has not been built yet
|
|
# but it would be included on the link line in the version check below
|
|
# hence making the test fail.
|
|
have_mpc=yes
|
|
fi
|
|
|
# Specify a location for mpfr
|
# Specify a location for mpfr
|
# check for this first so it ends up on the link line before gmp.
|
# check for this first so it ends up on the link line before gmp.
|
AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH this option has been REMOVED],
|
AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH this option has been REMOVED],
|
AC_MSG_ERROR([The --with-mpfr-dir=PATH option has been removed.
|
AC_MSG_ERROR([The --with-mpfr-dir=PATH option has been removed.
|
Line 1167... |
Line 1273... |
gmplibs="-L$with_mpfr_lib $gmplibs"
|
gmplibs="-L$with_mpfr_lib $gmplibs"
|
fi
|
fi
|
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
|
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
|
gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs"
|
gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs"
|
gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
|
gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
|
|
extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr'
|
# Do not test the mpfr version. Assume that it is sufficient, since
|
# Do not test the mpfr version. Assume that it is sufficient, since
|
# it is in the source tree, and the library has not been built yet
|
# it is in the source tree, and the library has not been built yet
|
# but it would be included on the link line in the version check below
|
# but it would be included on the link line in the version check below
|
# hence making the test fail.
|
# hence making the test fail.
|
have_gmp=yes
|
have_gmp=yes
|
Line 1199... |
Line 1306... |
gmplibs="-L$with_gmp_lib $gmplibs"
|
gmplibs="-L$with_gmp_lib $gmplibs"
|
fi
|
fi
|
if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
|
if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
|
gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
|
gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
|
gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
|
gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
|
|
extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp'
|
|
extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp'
|
# Do not test the gmp version. Assume that it is sufficient, since
|
# Do not test the gmp version. Assume that it is sufficient, since
|
# it is in the source tree, and the library has not been built yet
|
# it is in the source tree, and the library has not been built yet
|
# but it would be included on the link line in the version check below
|
# but it would be included on the link line in the version check below
|
# hence making the test fail.
|
# hence making the test fail.
|
have_gmp=yes
|
have_gmp=yes
|
Line 1213... |
Line 1322... |
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
CFLAGS="$CFLAGS $gmpinc"
|
CFLAGS="$CFLAGS $gmpinc"
|
# Check GMP actually works
|
# Check GMP actually works
|
AC_MSG_CHECKING([for correct version of gmp.h])
|
AC_MSG_CHECKING([for correct version of gmp.h])
|
AC_TRY_COMPILE([#include "gmp.h"],[
|
AC_TRY_COMPILE([#include "gmp.h"],[
|
#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
|
#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 2)
|
choke me
|
choke me
|
#endif
|
#endif
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
|
|
|
|
# If we have GMP, check the MPFR version.
|
if test x"$have_gmp" = xyes; then
|
if test x"$have_gmp" = xyes; then
|
saved_LIBS="$LIBS"
|
dnl MPFR 2.3.1 is acceptable, but MPFR 2.3.2 is better.
|
LIBS="$LIBS $gmplibs"
|
|
dnl MPFR 2.2.1 is acceptable, but MPFR 2.3.0 is better.
|
|
AC_MSG_CHECKING([for correct version of mpfr.h])
|
AC_MSG_CHECKING([for correct version of mpfr.h])
|
AC_TRY_LINK([#include
|
AC_TRY_COMPILE([#include
|
#include ],[
|
#include ],[
|
#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
|
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
|
|
choke me
|
|
#endif
|
|
], AC_TRY_COMPILE([#include
|
|
#include ],[
|
|
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,2)
|
|
choke me
|
|
#endif
|
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])]),
|
|
[AC_MSG_RESULT([no]); have_gmp=no])
|
|
fi
|
|
|
|
# Check for the MPC header version.
|
|
if test x"$have_mpc" != xyes ; then
|
|
CFLAGS="$CFLAGS $mpcinc"
|
|
AC_MSG_CHECKING([for the correct version of mpc.h])
|
|
AC_TRY_COMPILE([#include ],[
|
|
#if MPC_VERSION < MPC_VERSION_NUM (0,6,0)
|
choke me
|
choke me
|
#endif
|
#endif
|
|
], [AC_MSG_RESULT([yes]); have_mpc=maybe],
|
|
[AC_MSG_RESULT([no]); have_mpc=no; mpclibs= ; mpcinc= ])
|
|
fi
|
|
|
|
# Now check the MPFR library.
|
|
if test x"$have_gmp" = xyes; then
|
|
saved_LIBS="$LIBS"
|
|
LIBS="$LIBS $gmplibs"
|
|
AC_MSG_CHECKING([for the correct version of the gmp/mpfr libraries])
|
|
AC_TRY_LINK([#include
|
|
#include ],[
|
mpfr_t n;
|
mpfr_t n;
|
mpfr_t x;
|
mpfr_t x;
|
int t;
|
int t;
|
mpfr_init (n);
|
mpfr_init (n);
|
mpfr_init (x);
|
mpfr_init (x);
|
mpfr_atan2 (n, n, x, GMP_RNDN);
|
mpfr_atan2 (n, n, x, GMP_RNDN);
|
mpfr_erfc (n, x, GMP_RNDN);
|
mpfr_erfc (n, x, GMP_RNDN);
|
mpfr_subnormalize (x, t, GMP_RNDN);
|
mpfr_subnormalize (x, t, GMP_RNDN);
|
], [AC_TRY_LINK([#include
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
|
#include ],[
|
|
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,0)
|
|
choke me
|
|
#endif
|
|
mpfr_t n; mpfr_init(n);
|
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
|
|
[AC_MSG_RESULT([no]); have_gmp=no])
|
|
LIBS="$saved_LIBS"
|
LIBS="$saved_LIBS"
|
fi
|
fi
|
|
|
|
if test x"$have_mpc" = xmaybe; then
|
|
saved_LIBS="$LIBS"
|
|
LIBS="$LIBS $mpclibs $gmplibs"
|
|
AC_MSG_CHECKING([for the correct version of the mpc library])
|
|
AC_TRY_LINK([#include ],[
|
|
mpc_t n;
|
|
mpc_init2 (n, 53);
|
|
mpc_set_ui_ui (n, 1, 1, MPC_RNDNN);
|
|
mpc_sin (n, n, MPC_RNDNN);
|
|
mpc_cos (n, n, MPC_RNDNN);
|
|
mpc_tan (n, n, MPC_RNDNN);
|
|
mpc_sinh (n, n, MPC_RNDNN);
|
|
mpc_cosh (n, n, MPC_RNDNN);
|
|
mpc_tanh (n, n, MPC_RNDNN);
|
|
mpc_exp (n, n, MPC_RNDNN);
|
|
mpc_log (n, n, MPC_RNDNN);
|
|
mpc_sqrt (n, n, MPC_RNDNN);
|
|
mpc_proj (n, n, MPC_RNDNN);
|
|
mpc_neg (n, n, MPC_RNDNN);
|
|
mpc_sqr (n, n, MPC_RNDNN);
|
|
mpc_clear (n);
|
|
], [AC_MSG_RESULT([yes]); have_mpc=yes],
|
|
[AC_MSG_RESULT([no]); have_mpc=no; mpclibs= ; mpcinc= ])
|
|
LIBS="$saved_LIBS"
|
|
fi
|
|
|
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
|
|
if test x$have_gmp != xyes; then
|
if test x$have_gmp != xyes; then
|
AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
|
AC_MSG_ERROR([Building GCC requires GMP 4.2+ and MPFR 2.3.2+.
|
Try the --with-gmp and/or --with-mpfr options to specify their locations.
|
Try the --with-gmp and/or --with-mpfr options to specify their locations.
|
Copies of these libraries' source code can be found at their respective
|
Copies of these libraries' source code can be found at their respective
|
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
|
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
|
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
|
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
|
If you obtained GMP and/or MPFR from a vendor distribution package, make
|
If you obtained GMP and/or MPFR from a vendor distribution package, make
|
sure that you have installed both the libraries and the header files.
|
sure that you have installed both the libraries and the header files.
|
They may be located in separate packages.])
|
They may be located in separate packages.])
|
fi
|
fi
|
fi
|
fi
|
|
|
# Flags needed for both GMP and/or MPFR
|
if test x$have_mpc != xyes ; then
|
|
mpcinc=
|
|
mpclibs=
|
|
fi
|
|
|
|
gmpinc="$mpcinc $gmpinc"
|
|
gmplibs="$mpclibs $gmplibs"
|
|
|
|
# Flags needed for both GMP, MPFR and/or MPC.
|
AC_SUBST(gmplibs)
|
AC_SUBST(gmplibs)
|
AC_SUBST(gmpinc)
|
AC_SUBST(gmpinc)
|
|
AC_SUBST(extra_mpfr_configure_flags)
|
|
AC_SUBST(extra_mpc_gmp_configure_flags)
|
|
AC_SUBST(extra_mpc_mpfr_configure_flags)
|
|
|
|
# Allow host libstdc++ to be specified for static linking with PPL.
|
|
AC_ARG_WITH(host-libstdcxx, [ --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
|
|
when linking with PPL])
|
|
|
|
case $with_host_libstdcxx in
|
|
no|yes)
|
|
AC_MSG_ERROR([-with-host-libstdcxx needs an argument])
|
|
;;
|
|
esac
|
|
|
|
# Linker flags to use for stage1 or when not boostrapping.
|
|
AC_ARG_WITH(stage1-ldflags,
|
|
[ --with-stage1-ldflags=FLAGS Linker flags for stage1],
|
|
[if test "$withval" = "no" -o "$withval" = "yes"; then
|
|
stage1_ldflags=
|
|
else
|
|
stage1_ldflags=$withval
|
|
fi],
|
|
[stage1_ldflags=])
|
|
AC_SUBST(stage1_ldflags)
|
|
|
|
# Libraries to use for stage1 or when not bootstrapping.
|
|
AC_ARG_WITH(stage1-libs,
|
|
[ -with-stage1-libs=LIBS Libraries for stage1],
|
|
[if test "$withval" = "no" -o "$withval" = "yes"; then
|
|
stage1_libs=
|
|
else
|
|
stage1_libs=$withval
|
|
fi],
|
|
[stage1_libs=$with_host_libstdcxx])
|
|
AC_SUBST(stage1_libs)
|
|
|
|
# Linker flags to use for stage2 and later builds.
|
|
AC_ARG_WITH(boot-ldflags,
|
|
[ --with-boot-ldflags=FLAGS Linker flags for stage2 and later],
|
|
[if test "$withval" = "no" -o "$withval" = "yes"; then
|
|
poststage1_ldflags=
|
|
else
|
|
poststage1_ldflags=$withval
|
|
fi],
|
|
[if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
|
|
poststage1_ldflags=-static-libstdc++
|
|
else
|
|
poststage1_ldflags=
|
|
fi])
|
|
AC_SUBST(poststage1_ldflags)
|
|
|
|
# Libraries to use for stage2 and later builds. This defaults to the
|
|
# argument passed to --with-host-libstdcxx.
|
|
AC_ARG_WITH(boot-libs,
|
|
[ --with-boot-libs=LIBS Libraries for stage2 and later],
|
|
[if test "$withval" = "no" -o "$withval" = "yes"; then
|
|
poststage1_libs=
|
|
else
|
|
poststage1_libs=$withval
|
|
fi],
|
|
[poststage1_libs=$with_host_libstdcxx])
|
|
AC_SUBST(poststage1_libs)
|
|
|
|
# Check for PPL
|
|
ppl_major_version=0
|
|
ppl_minor_version=10
|
|
ppllibs=" -lppl_c -lppl -lgmpxx"
|
|
pplinc=
|
|
|
|
AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
|
|
Equivalent to --with-ppl-include=PATH/include
|
|
plus --with-ppl-lib=PATH/lib],, with_ppl=no)
|
|
AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
|
|
AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
|
|
|
|
case $with_ppl in
|
|
no)
|
|
ppllibs=
|
|
;;
|
|
*)
|
|
ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
|
|
pplinc="-I$with_ppl/include $pplinc"
|
|
LIBS="$ppllibs $LIBS"
|
|
;;
|
|
esac
|
|
if test "x$with_ppl_include" != x; then
|
|
pplinc="-I$with_ppl_include $pplinc"
|
|
fi
|
|
if test "x$with_ppl_lib" != x; then
|
|
ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
|
|
LIBS="$ppllibs $LIBS"
|
|
fi
|
|
if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
|
|
ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
|
|
pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
|
|
LIBS="$ppllibs $LIBS"
|
|
fi
|
|
|
|
AC_ARG_ENABLE(ppl-version-check,
|
|
[ --disable-ppl-version-check disable check for PPL version],
|
|
ENABLE_PPL_CHECK=$enableval,
|
|
ENABLE_PPL_CHECK=yes)
|
|
|
|
if test "${ENABLE_PPL_CHECK}" = "yes"; then
|
|
saved_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS $pplinc $gmpinc"
|
|
AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
|
|
AC_TRY_COMPILE([#include "ppl_c.h"],[
|
|
#if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
|
|
choke me
|
|
#endif
|
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ])
|
|
CFLAGS="$saved_CFLAGS"
|
|
fi
|
|
|
|
# Flags needed for PPL
|
|
AC_SUBST(ppllibs)
|
|
AC_SUBST(pplinc)
|
|
|
|
|
|
# Check for CLOOG
|
|
clooglibs=" -lcloog "
|
|
clooginc=" -DCLOOG_PPL_BACKEND "
|
|
|
|
AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
|
|
Equivalent to --with-cloog-include=PATH/include
|
|
plus --with-cloog-lib=PATH/lib],, with_cloog=no)
|
|
AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files])
|
|
AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library])
|
|
|
|
case $with_cloog in
|
|
no)
|
|
clooglibs=
|
|
clooginc=
|
|
;;
|
|
*)
|
|
clooglibs="-L$with_cloog/lib -lcloog"
|
|
clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
|
|
LIBS="$clooglibs $LIBS"
|
|
;;
|
|
esac
|
|
if test "x$with_cloog_include" != x; then
|
|
clooginc="-I$with_cloog_include -DCLOOG_PPL_BACKEND "
|
|
fi
|
|
if test "x$with_cloog_lib" != x; then
|
|
clooglibs="-L$with_cloog_lib -lcloog"
|
|
LIBS="$clooglibs $LIBS"
|
|
fi
|
|
if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then
|
|
clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog '
|
|
clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND '
|
|
LIBS="$clooglibs $LIBS"
|
|
fi
|
|
|
|
AC_ARG_ENABLE(cloog-version-check,
|
|
[ --disable-cloog-version-check disable check for CLooG version],
|
|
ENABLE_CLOOG_CHECK=$enableval,
|
|
ENABLE_CLOOG_CHECK=yes)
|
|
|
|
if test "${ENABLE_CLOOG_CHECK}" = "yes"; then
|
|
saved_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
|
|
AC_MSG_CHECKING([for correct version of CLooG])
|
|
AC_TRY_COMPILE([#include "cloog/cloog.h"],[
|
|
#if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
|
|
choke me
|
|
#endif
|
|
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
|
|
CFLAGS="$saved_CFLAGS"
|
|
fi
|
|
|
|
# Flags needed for CLOOG
|
|
AC_SUBST(clooglibs)
|
|
AC_SUBST(clooginc)
|
|
|
|
|
# By default, C is the only stage 1 language.
|
# By default, C is the only stage 1 language.
|
stage1_languages=,c,
|
stage1_languages=,c,
|
|
|
|
# Target libraries that we bootstrap.
|
|
bootstrap_target_libs=,target-libgcc,
|
|
|
# Figure out what language subdirectories are present.
|
# Figure out what language subdirectories are present.
|
# Look if the user specified --enable-languages="..."; if not, use
|
# Look if the user specified --enable-languages="..."; if not, use
|
# the environment variable $LANGUAGES if defined. $LANGUAGES might
|
# the environment variable $LANGUAGES if defined. $LANGUAGES might
|
# go away some day.
|
# go away some day.
|
# NB: embedded tabs in this IF block -- do not untabify
|
# NB: embedded tabs in this IF block -- do not untabify
|
Line 1352... |
Line 1694... |
if test x${language} = x; then
|
if test x${language} = x; then
|
echo "${lang_frag} doesn't set \$language." 1>&2
|
echo "${lang_frag} doesn't set \$language." 1>&2
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
|
if test "$language" = "c++" -a "$ENABLE_BUILD_WITH_CXX" = "yes"; then
|
|
boot_language=yes
|
|
fi
|
|
|
case ,${enable_languages}, in
|
case ,${enable_languages}, in
|
*,${language},*)
|
*,${language},*)
|
# Language was explicitly selected; include it.
|
# Language was explicitly selected; include it.
|
add_this_lang=yes
|
add_this_lang=yes
|
;;
|
;;
|
Line 1418... |
Line 1764... |
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
|
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
|
case ${boot_language} in
|
case ${boot_language} in
|
yes)
|
yes)
|
# Add to (comma-separated) list of stage 1 languages.
|
# Add to (comma-separated) list of stage 1 languages.
|
stage1_languages="${stage1_languages}${language},"
|
stage1_languages="${stage1_languages}${language},"
|
|
# We need to bootstrap any supporting libraries.
|
|
bootstrap_target_libs="${bootstrap_target_libs}${target_libs},"
|
;;
|
;;
|
esac
|
esac
|
;;
|
;;
|
esac
|
esac
|
;;
|
;;
|
Line 1748... |
Line 2096... |
with_gnu_as=yes
|
with_gnu_as=yes
|
extra_host_args="$extra_host_args --with-gnu-as"
|
extra_host_args="$extra_host_args --with-gnu-as"
|
fi
|
fi
|
|
|
if test x${use_gnu_ld} = x &&
|
if test x${use_gnu_ld} = x &&
|
echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
|
echo " ${configdirs} " | egrep " (go)?ld " > /dev/null 2>&1 ; then
|
with_gnu_ld=yes
|
with_gnu_ld=yes
|
extra_host_args="$extra_host_args --with-gnu-ld"
|
extra_host_args="$extra_host_args --with-gnu-ld"
|
fi
|
fi
|
|
|
# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
|
# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
|
Line 1858... |
Line 2206... |
target_makefile_frag="config/mt-sde"
|
target_makefile_frag="config/mt-sde"
|
;;
|
;;
|
mipsisa*-*-elfoabi*)
|
mipsisa*-*-elfoabi*)
|
target_makefile_frag="config/mt-mips-elfoabi"
|
target_makefile_frag="config/mt-mips-elfoabi"
|
;;
|
;;
|
|
mips*-*-*linux* | mips*-*-gnu*)
|
|
target_makefile_frag="config/mt-mips-gnu"
|
|
;;
|
*-*-netware*)
|
*-*-netware*)
|
target_makefile_frag="config/mt-netware"
|
target_makefile_frag="config/mt-netware"
|
;;
|
;;
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
|
target_makefile_frag="config/mt-gnu"
|
target_makefile_frag="config/mt-gnu"
|
;;
|
;;
|
*-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
|
*-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
|
# nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
|
# nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
|
# commands to handle both 32-bit and 64-bit objects. These flags are
|
# commands to handle both 32-bit and 64-bit objects. These flags are
|
Line 2001... |
Line 2352... |
fi
|
fi
|
fi
|
fi
|
;;
|
;;
|
esac
|
esac
|
|
|
|
# Decide which environment variable is used to find dynamic libraries.
|
case "${host}" in
|
case "${host}" in
|
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
|
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
|
*-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
|
*-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
|
|
*-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
|
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
|
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
|
esac
|
esac
|
|
|
|
# On systems where the dynamic library environment variable is PATH,
|
|
# gcc/ will put dynamic libraries into a subdirectory to avoid adding
|
|
# built executables to PATH.
|
|
if test "$RPATH_ENVVAR" = PATH; then
|
|
GCC_SHLIB_SUBDIR=/shlib
|
|
else
|
|
GCC_SHLIB_SUBDIR=
|
|
fi
|
|
|
# Record target_configdirs and the configure arguments for target and
|
# Record target_configdirs and the configure arguments for target and
|
# build configuration in Makefile.
|
# build configuration in Makefile.
|
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
|
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
|
build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
|
build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
|
|
|
Line 2135... |
Line 2497... |
if test -z "${no_recursion}" \
|
if test -z "${no_recursion}" \
|
&& test -f ${target_subdir}/${module}/Makefile; then
|
&& test -f ${target_subdir}/${module}/Makefile; then
|
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
|
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
|
rm -f ${target_subdir}/${module}/Makefile
|
rm -f ${target_subdir}/${module}/Makefile
|
fi
|
fi
|
|
|
|
# We only bootstrap target libraries listed in bootstrap_target_libs.
|
|
case $bootstrap_target_libs in
|
|
*,target-$module,*) target_bootstrap_suffix=$bootstrap_suffix ;;
|
|
*) target_bootstrap_suffix=no-bootstrap ;;
|
|
esac
|
|
|
extrasub="$extrasub
|
extrasub="$extrasub
|
/^@if target-$module\$/d
|
/^@if target-$module\$/d
|
/^@endif target-$module\$/d
|
/^@endif target-$module\$/d
|
/^@if target-$module-$bootstrap_suffix\$/d
|
/^@if target-$module-$target_bootstrap_suffix\$/d
|
/^@endif target-$module-$bootstrap_suffix\$/d"
|
/^@endif target-$module-$target_bootstrap_suffix\$/d"
|
done
|
done
|
|
|
extrasub="$extrasub
|
extrasub="$extrasub
|
/^@if /,/^@endif /d"
|
/^@if /,/^@endif /d"
|
|
|
Line 2294... |
Line 2663... |
rm -f conftestsed.out
|
rm -f conftestsed.out
|
baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
|
baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
|
if test "$silent" = yes; then
|
if test "$silent" = yes; then
|
baseargs="$baseargs --silent"
|
baseargs="$baseargs --silent"
|
fi
|
fi
|
|
baseargs="$baseargs --disable-option-checking"
|
|
|
# For the build-side libraries, we just need to pretend we're native,
|
# For the build-side libraries, we just need to pretend we're native,
|
# and not use the same cache file. Multilibs are neither needed nor
|
# and not use the same cache file. Multilibs are neither needed nor
|
# desired.
|
# desired.
|
build_configargs="--cache-file=../config.cache ${baseargs}"
|
build_configargs="--cache-file=../config.cache ${baseargs}"
|
Line 2464... |
Line 2834... |
AC_SUBST_FILE(alphaieee_frag)
|
AC_SUBST_FILE(alphaieee_frag)
|
AC_SUBST_FILE(ospace_frag)
|
AC_SUBST_FILE(ospace_frag)
|
|
|
# Miscellanea: directories, flags, etc.
|
# Miscellanea: directories, flags, etc.
|
AC_SUBST(RPATH_ENVVAR)
|
AC_SUBST(RPATH_ENVVAR)
|
|
AC_SUBST(GCC_SHLIB_SUBDIR)
|
AC_SUBST(tooldir)
|
AC_SUBST(tooldir)
|
AC_SUBST(build_tooldir)
|
AC_SUBST(build_tooldir)
|
AC_SUBST(CONFIGURE_GDB_TK)
|
AC_SUBST(CONFIGURE_GDB_TK)
|
AC_SUBST(GDB_TK)
|
AC_SUBST(GDB_TK)
|
AC_SUBST(INSTALL_GDB_TK)
|
AC_SUBST(INSTALL_GDB_TK)
|
Line 2537... |
Line 2908... |
AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
|
AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
|
case " $build_configdirs " in
|
case " $build_configdirs " in
|
*" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
|
*" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
|
*)
|
*)
|
changequote(,)
|
changequote(,)
|
# For an installed makeinfo, we require it to be from texinfo 4.6 or
|
# For an installed makeinfo, we require it to be from texinfo 4.7 or
|
# higher, else we use the "missing" dummy.
|
# higher, else we use the "missing" dummy.
|
if ${MAKEINFO} --version \
|
if ${MAKEINFO} --version \
|
| egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
|
| egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
|
:
|
:
|
else
|
else
|
MAKEINFO="$MISSING makeinfo"
|
MAKEINFO="$MISSING makeinfo"
|
fi
|
fi
|
;;
|
;;
|
Line 2702... |
Line 3073... |
*) stage1_cflags="-g -J" ;;
|
*) stage1_cflags="-g -J" ;;
|
esac ;;
|
esac ;;
|
esac
|
esac
|
|
|
# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
|
# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
|
if test "$GCC" = yes; then
|
if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then
|
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
|
|
# Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
|
# Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
|
CFLAGS="$CFLAGS -fkeep-inline-functions"
|
CFLAGS="$CFLAGS -fkeep-inline-functions"
|
AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
|
AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
|
Line 2749... |
Line 3120... |
yes) stage2_werror_flag="--enable-werror-always" ;;
|
yes) stage2_werror_flag="--enable-werror-always" ;;
|
*) stage2_werror_flag="" ;;
|
*) stage2_werror_flag="" ;;
|
esac
|
esac
|
AC_SUBST(stage2_werror_flag)
|
AC_SUBST(stage2_werror_flag)
|
|
|
# Flags needed to enable html installing and building
|
# Specify what files to not compare during bootstrap.
|
AC_ARG_WITH(datarootdir,
|
|
[ --with-datarootdir use datarootdir as the data root directory.],
|
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
|
[datarootdir="\${prefix}/${withval}"],
|
case "$target" in
|
[datarootdir="\${prefix}/share"])
|
hppa*64*-*-hpux*) ;;
|
|
hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/*" ;;
|
AC_ARG_WITH(docdir,
|
esac
|
[ --with-docdir install documentation in this directory.],
|
AC_SUBST(compare_exclusions)
|
[docdir="\${prefix}/${withval}"],
|
|
[docdir="\${datarootdir}/doc"])
|
|
|
|
AC_ARG_WITH(pdfdir,
|
|
[ --with-pdfdir install pdf in this directory.],
|
|
[pdfdir="\${prefix}/${withval}"],
|
|
[pdfdir="\${docdir}"])
|
|
|
|
AC_ARG_WITH(htmldir,
|
|
[ --with-htmldir install html in this directory.],
|
|
[htmldir="\${prefix}/${withval}"],
|
|
[htmldir="\${docdir}"])
|
|
|
|
AC_SUBST(datarootdir)
|
|
AC_SUBST(docdir)
|
|
AC_SUBST(pdfdir)
|
|
AC_SUBST(htmldir)
|
|
|
|
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile)
|