summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog180
-rw-r--r--config/acx.m4139
-rw-r--r--config/confsubdir.m4127
-rw-r--r--config/depstand.m45
-rw-r--r--config/gettext-sister.m422
-rw-r--r--config/gxx-include-dir.m48
-rw-r--r--config/ld-symbolic.m445
-rw-r--r--config/mh-ppc-aix11
-rw-r--r--config/mh-ppc-darwin4
-rw-r--r--config/mt-mep8
-rw-r--r--config/mt-spu4
-rw-r--r--config/multi.m465
-rw-r--r--config/stdint.m448
-rw-r--r--config/tls.m470
-rw-r--r--config/unwind_ipinfo.m422
-rw-r--r--config/warnings.m447
16 files changed, 743 insertions, 62 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index 1ddcfd41628d..3c43dcde1e60 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,7 +1,169 @@
+2007-06-27 Mike Stump <mrs@apple.com>
+
+ * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Fixup logic for cross
+ builds.
+
+2007-06-20 Mike Stump <mrs@apple.com>
+
+ * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Fix incremental builds.
+ (ACX_HAVE_GCC_FOR_TARGET): Likewise.
+
+2007-06-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines.
+
+2007-06-04 Olivier Hainque <hainque@adacore.com>
+
+ * mh-ppc-aix: Add default ADAFLAGS to BOOT_ADAFLAGS.
+
+2007-05-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * confsubdir.m4: Move here from newlib.
+
+2007-05-23 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ * mh-ppc-darwin: Temporarily disable.
+
+2007-04-11 Kai Tietz <kai.tietz@onevision.com>
+
+ * stdint.m4: Make template compatible with older cygwin
+ types.h, wrapping each type in a __XXX_t_defined #ifdef.
+
+2007-03-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * acx.m4 (ACX_BUGURL): Set BUGURL first. Quote $BUGURL first
+ when setting REPORT_BUGS_TEXI.
+
+2007-03-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * acx.m4 (ACX_BUGURL): Replace "@" with "@@" for
+ REPORT_BUGS_TEXI.
+
+2007-03-23 Joseph Myers <joseph@codesourcery.com>
+
+ * acx.m4 (ACX_PKGVERSION, ACX_BUGURL): Define.
+
+2007-03-07 Andreas Schwab <schwab@suse.de>
+
+ * acx.m4 (GCC_TARGET_TOOL): Expand backquotes outside
+ AC_MSG_RESULT.
+
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * mt-spu (all-ld): Depend on all-binutils.
+
+2007-02-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * acx.m4 (NCN_STRICT_CHECK_TOOLS): Mark environment variable as
+ precious. Prefer it over a cached value. Use cached value
+ verbosely.
+ (NCN_STRICT_CHECK_TARGET_TOOLS): Likewise. Don't override
+ environment variable with build-time tools.
+
+2006-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * mt-spu: New file.
+
+2007-02-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Avoid AC_PATH_PROG
+ with an empty path.
+
+2007-02-07 Bruno Haible <bruno@clisp.org>
+
+ PR libgomp/28468
+ * config/tls.m4 (GCC_CHECK_TLS): Also check whether the libc supports
+ TLS via __thread.
+
+2007-01-31 Daniel Franke <franke.daniel@gmail.com>
+
+ PR libgomp/30546
+ * acx.m4 (ACX_PROG_CHECK_VER): Locate a program and check that its
+ version is acceptable.
+
+2007-01-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make
+ directory.
+
+2007-01-23 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/30541
+ * config/acx.m4 (ACX_PROG_GNAT): Check for gnatmake.
+
+2007-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-symbolic.m4: New.
+
+2007-01-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * warnings.m4: Use m4_expand_once to clear the AC_SUBST'ed variable.
+ (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Fix typo. Add optional 2nd argument.
+
+2007-01-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * warnings.m4: Add second parameter with name of variable.
+ Always append to the variable if it exists.
+
+2007-01-01 Mike Stump <mrs@apple.com>
+
+ * mh-ppc-darwin: Remove support for building with Apple's gcc-3.1.
+
+2006-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking
+ if static linking doesn't even work.
+
+2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * tls.m4 (GCC_CHECK_TLS): Fall back to a link test.
+
+2006-10-14 Geoffrey Keating <geoffk@apple.com>
+
+ * multi.m4: New file, from automake version 2 branch.
+
+2006-09-18 Tom Tromey <tromey@redhat.com>
+
+ * tls.m4 (GCC_CHECK_TLS): Pass empty argument as "help arg" to
+ GCC_ENABLE.
+
+2006-07-25 Paolo Bonzini <bonzini@gnu.org>
+
+ PR build/26188
+ * stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t.
+
+2006-07-21 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/26792
+ * unwind_ipinfo.m4: New.
+
+2006-07-21 David Daney <ddaney@avtrex.com>
+
+ PR libgcj/28426
+ * gxx-include-dir.m4: Use target_alias in path for cross build.
+
+2006-07-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4: Support --with-build-libsubdir and AC_SUBST
+ build_libsubdir.
+
+2006-06-13 Richard Earnshaw <rearnsha@arm.com>
+ Alexandre Oliva <aoliva@redhat.com>
+
+ * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Add optional
+ argument for where to search for NLS config file.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some
+ defines otherwise gotten from AM_GNU_GETTEXT. Remove the
+ po/ prefix from CATALOGS.
+
2006-02-14 Paolo Bonzini <bonzini@gnu.org>
- Andreas Schwab <schwab@suse.de>
+ Andreas Schwab <schwab@suse.de>
- * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name.
+ * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name.
(ACX_CHECK_INSTALLED_TARGET_TOOL): Likewise, and always set $1.
2006-01-26 Paolo Bonzini <bonzini@gnu.org>
@@ -15,19 +177,19 @@
2006-01-02 Paolo Bonzini <bonzini@gnu.org>
- PR target/25259
- * stdint.m4: New.
+ PR target/25259
+ * stdint.m4: New.
2005-12-20 Paolo Bonzini <bonzini@gnu.org>
- Revert Ada-related part of the previous change.
+ Revert Ada-related part of the previous change.
- * mt-ppc-aix: Delete.
+ * mt-ppc-aix: Delete.
2005-12-19 Paolo Bonzini <bonzini@gnu.org>
-
- * mt-ppc-aix, mh-ppc-aix: New.
-
+
+ * mt-ppc-aix, mh-ppc-aix: New.
+
2005-12-05 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (GCC_TARGET_TOOL): New.
diff --git a/config/acx.m4 b/config/acx.m4
index 7c4c21386f18..c8a32c9f9ed5 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -74,8 +74,22 @@ dnl # amount to a lot more with autoconf 2.5x.
AC_DEFUN([GCC_TOPLEV_SUBDIRS],
[AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_TARGET]) []dnl
AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl
+
+# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
+# have matching libraries, they should use host libraries: Makefile.tpl
+# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
+# However, they still use the build modules, because the corresponding
+# host modules (e.g. bison) are only built for the host when bootstrap
+# finishes. So:
+# - build_subdir is where we find build modules, and never changes.
+# - build_libsubdir is where we find build libraries, and can be overridden.
+
# Prefix 'build-' so this never conflicts with target_subdir.
build_subdir="build-${build_noncanonical}"
+AC_ARG_WITH(build-libsubdir,
+[ --with-build-libsubdir=[DIR] Directory where to find libraries for build system],
+build_libsubdir="$withval",
+build_libsubdir="$build_subdir")
# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
if ( test $srcdir = . && test -d gcc ) \
|| test -d $srcdir/../host-${host_noncanonical}; then
@@ -85,6 +99,7 @@ else
fi
# No prefix.
target_subdir=${target_noncanonical}
+AC_SUBST([build_libsubdir]) []dnl
AC_SUBST([build_subdir]) []dnl
AC_SUBST([host_subdir]) []dnl
AC_SUBST([target_subdir]) []dnl
@@ -108,6 +123,20 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
AC_DEFUN([NCN_STRICT_CHECK_TOOLS],
[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
+AC_ARG_VAR([$1], [$1 for the host])
+
+if test -n "[$]$1"; then
+ ac_cv_prog_$1=[$]$1
+elif test -n "$ac_cv_prog_$1"; then
+ $1=$ac_cv_prog_$1
+fi
+
+if test -n "$ac_cv_prog_$1"; then
+ for ncn_progname in $2; do
+ AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4])
+ done
+fi
+
for ncn_progname in $2; do
if test -n "$ncn_tool_prefix"; then
AC_CHECK_PROG([$1], [${ncn_tool_prefix}${ncn_progname}],
@@ -135,7 +164,21 @@ fi
AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOLS],
[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
-if test -n "$with_build_time_tools"; then
+AC_ARG_VAR([$1], patsubst([$1], [_FOR_TARGET$], [])[ for the target])
+
+if test -n "[$]$1"; then
+ ac_cv_prog_$1=[$]$1
+elif test -n "$ac_cv_prog_$1"; then
+ $1=$ac_cv_prog_$1
+fi
+
+if test -n "$ac_cv_prog_$1"; then
+ for ncn_progname in $2; do
+ AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4])
+ done
+fi
+
+if test -z "$ac_cv_prog_$1" && test -n "$with_build_time_tools"; then
for ncn_progname in $2; do
AC_MSG_CHECKING([for ${ncn_progname} in $with_build_time_tools])
if test -x $with_build_time_tools/${ncn_progname}; then
@@ -168,6 +211,8 @@ if test -z "$ac_cv_prog_$1" ; then
else
$1="${ncn_target_tool_prefix}[$]2"
fi], [$1="$3"])
+else
+ $1="$ac_cv_prog_$1"
fi
]) []dnl # NCN_STRICT_CHECK_TARGET_TOOLS
@@ -281,11 +326,11 @@ if test -z "$ac_cv_path_$1" ; then
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
$1=`$GCC_FOR_TARGET --print-prog-name=$2`
- test [$]$1=$2 && $1=
- ac_cv_path_$1=[$]$1
+ test [$]$1 = $2 && $1=
+ test -n "[$]$1" && ac_cv_path_$1=[$]$1
fi
fi
-if test -z "$ac_cv_path_$1" ; then
+if test -z "$ac_cv_path_$1" && test -n "$gcc_cv_tool_dirs"; then
AC_PATH_PROG([$1], [$2], [], [$gcc_cv_tool_dirs])
fi
if test -z "$ac_cv_path_$1" ; then
@@ -315,11 +360,12 @@ ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
# understands Ada. We use the user's CC setting, already found.
#
# Sets the shell variable have_gnat to yes or no as appropriate, and
-# substitutes GNATBIND.
+# substitutes GNATBIND and GNATMAKE.
AC_DEFUN([ACX_PROG_GNAT],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
AC_REQUIRE([AC_PROG_CC])
AC_CHECK_TOOL(GNATBIND, gnatbind, no)
+AC_CHECK_TOOL(GNATMAKE, gnatmake, no)
AC_CACHE_CHECK([whether compiler driver understands Ada],
acx_cv_cc_gcc_supports_ada,
[cat >conftest.adb <<EOF
@@ -340,7 +386,7 @@ if test x"$errors" = x && test -f conftest.$ac_objext; then
fi
rm -f conftest.*])
-if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
+if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no
@@ -441,7 +487,8 @@ AC_DEFUN([GCC_TARGET_TOOL],
if test "x${build}" != "x${host}" ; then
if expr "x[$]$2" : "x/" > /dev/null; then
# We already found the complete path
- AC_MSG_RESULT(pre-installed in `dirname [$]$2`)
+ ac_dir=`dirname [$]$2`
+ AC_MSG_RESULT(pre-installed in $ac_dir)
else
# Canadian cross, just use what we found
AC_MSG_RESULT(pre-installed)
@@ -464,7 +511,8 @@ else
AC_MSG_RESULT(just compiled)
el])if expr "x[$]$2" : "x/" > /dev/null; then
# We already found the complete path
- AC_MSG_RESULT(pre-installed in `dirname [$]$2`)
+ ac_dir=`dirname [$]$2`
+ AC_MSG_RESULT(pre-installed in $ac_dir)
elif test "x$target" = "x$host"; then
# We can use an host tool
$2='$($3)'
@@ -473,4 +521,77 @@ else
# We need a cross tool
AC_MSG_RESULT(pre-installed)
fi
-fi])
+fi
+AC_SUBST($2)])
+
+
+dnl Locate a program and check that its version is acceptable.
+dnl ACX_PROG_CHECK_VER(var, name, version-switch,
+dnl version-extract-regexp, version-glob)
+AC_DEFUN([ACX_CHECK_PROG_VER],[
+ AC_CHECK_PROG([$1], [$2], [$2])
+ if test -n "[$]$1"; then
+ # Found it, now check the version.
+ AC_CACHE_CHECK([for modern $2],
+ [gcc_cv_prog_$2_modern],
+ [ac_prog_version=`eval [$]$1 $3 2>&1 |
+ sed -n 's/^.*patsubst([[$4]],/,\/).*$/\1/p'`
+
+ [case $ac_prog_version in
+ '') gcc_cv_prog_$2_modern=no;;
+ $5) gcc_cv_prog_$2_modern=yes;;
+ *) gcc_cv_prog_$2_modern=no;;
+ esac]
+ ])
+ else
+ gcc_cv_prog_$2_modern=no
+ fi
+ if test $gcc_cv_prog_$2_modern = no; then
+ $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2"
+ fi
+])
+
+dnl Support the --with-pkgversion configure option.
+dnl ACX_PKGVERSION(default-pkgversion)
+AC_DEFUN([ACX_PKGVERSION],[
+ AC_ARG_WITH(pkgversion,
+ AS_HELP_STRING([--with-pkgversion=PKG],
+ [Use PKG in the version string in place of "$1"]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([package version not specified]) ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac],
+ PKGVERSION="($1) "
+ )
+ AC_SUBST(PKGVERSION)
+])
+
+dnl Support the --with-bugurl configure option.
+dnl ACX_BUGURL(default-bugurl)
+AC_DEFUN([ACX_BUGURL],[
+ AC_ARG_WITH(bugurl,
+ AS_HELP_STRING([--with-bugurl=URL],
+ [Direct users to URL to report a bug]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([bug URL not specified]) ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac],
+ BUGURL="$1"
+ )
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+ AC_SUBST(REPORT_BUGS_TO)
+ AC_SUBST(REPORT_BUGS_TEXI)
+])
diff --git a/config/confsubdir.m4 b/config/confsubdir.m4
new file mode 100644
index 000000000000..4e1e8c4641c5
--- /dev/null
+++ b/config/confsubdir.m4
@@ -0,0 +1,127 @@
+dnl Fix Autoconf-2.59 AC_CONFIG_SUBDIRS whitespace mangling,
+dnl by overriding the broken internal Autoconf macro with a
+dnl backport of the 2.60 fix.
+dnl
+dnl This file should be a no-op for Autoconf versions != 2.59.
+dnl It can be removed once the complete tree has moved to a
+dnl newer Autoconf version.
+
+dnl m4_PACKAGE_VERSION is an undocumented Autoconf macro.
+dnl We use it because this fix is intended for 2.59 only.
+dnl A feature test for the broken AC_CONFIG_SUBDIRS instead
+dnl would be better but is tricky.
+dnl
+dnl Use ifdef/ifelse over m4_ifdef/m4_ifelse to be clean for 2.13.
+dnl Redefine AC_CONFIG_SUBDIRS so aclocal pulls in this file
+dnl when needed.
+
+ifdef([m4_PACKAGE_VERSION],
+[ifelse(m4_PACKAGE_VERSION, [2.59], [
+
+dnl Redefine AC_CONFIG_SUBDIRS so this file is picked up if needed.
+AC_DEFUN([AC_CONFIG_SUBDIRS], defn([AC_CONFIG_SUBDIRS]))
+
+dnl Override the broken macro.
+# _AC_OUTPUT_SUBDIRS
+# ------------------
+# This is a subroutine of AC_OUTPUT, but it does not go into
+# config.status, rather, it is called after running config.status.
+m4_define([_AC_OUTPUT_SUBDIRS],
+[
+#
+# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -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=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d "$srcdir/$ac_dir" || continue
+
+ AC_MSG_NOTICE([configuring in $ac_dir])
+ AS_MKDIR_P(["$ac_dir"])
+ _AC_SRCPATHS(["$ac_dir"])
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ AC_MSG_WARN([no configuration information is in $ac_dir])
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file=$ac_top_builddir$cache_file ;;
+ esac
+
+ AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
+ fi
+
+ cd "$ac_popdir"
+ done
+fi
+])# _AC_OUTPUT_SUBDIRS
+])])
diff --git a/config/depstand.m4 b/config/depstand.m4
index 8f936e0c2635..beaf2cc7bf00 100644
--- a/config/depstand.m4
+++ b/config/depstand.m4
@@ -1,6 +1,6 @@
## -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -132,5 +132,6 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# As AM_SET_DEPDIR, but also create the directory at config.status time.
AC_DEFUN([ZW_CREATE_DEPDIR],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_CONFIG_COMMANDS([depdir], [mkdir $DEPDIR], [DEPDIR=$DEPDIR])
+AC_CONFIG_COMMANDS([depdir], [$SHELL $ac_aux_dir/mkinstalldirs $DEPDIR],
+ [ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
])
diff --git a/config/gettext-sister.m4 b/config/gettext-sister.m4
index d10aae80b6b2..e8e6b668416b 100644
--- a/config/gettext-sister.m4
+++ b/config/gettext-sister.m4
@@ -19,8 +19,9 @@ INCINTL= AC_SUBST(INCINTL)
XGETTEXT= AC_SUBST(XGETTEXT)
GMSGFMT= AC_SUBST(GMSGFMT)
POSUB= AC_SUBST(POSUB)
-if test -f ../intl/config.intl; then
- . ../intl/config.intl
+
+if test -f ifelse([$1],,[../intl],[$1])/config.intl; then
+ . ifelse([$1],,[../intl],[$1])/config.intl
fi
AC_MSG_CHECKING([whether NLS is requested])
if test x"$USE_NLS" != xyes; then
@@ -46,8 +47,8 @@ else
# 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).
- cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
- lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
# 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
@@ -63,4 +64,17 @@ else
done
LINGUAS="$XLINGUAS"
AC_MSG_RESULT($LINGUAS)
+
+ dnl Set up some additional variables which our po/Make-in files
+ dnl may need.
+
+ dnl For backward compatibility. Some Makefiles may be using these.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+ CATOBJEXT=.gmo
+ AC_SUBST(CATOBJEXT)
fi])
diff --git a/config/gxx-include-dir.m4 b/config/gxx-include-dir.m4
index 0e6e4ffc3975..4f54d427f7e2 100644
--- a/config/gxx-include-dir.m4
+++ b/config/gxx-include-dir.m4
@@ -17,7 +17,13 @@ case "${with_gxx_include_dir}" in
yes) gxx_include_dir='$(libsubdir)/include/c++' ;;
*)
libstdcxx_incdir='c++/$(gcc_version)'
- gxx_include_dir='$(prefix)/include/$(libstdcxx_incdir)' ;;
+ gxx_include_dir='include/$(libstdcxx_incdir)'
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir"
+ else
+ gxx_include_dir='${prefix}/'"$gxx_include_dir"
+ fi;;
esac ;;
*) gxx_include_dir=${with_gxx_include_dir} ;;
esac
diff --git a/config/ld-symbolic.m4 b/config/ld-symbolic.m4
new file mode 100644
index 000000000000..16d64f9ad383
--- /dev/null
+++ b/config/ld-symbolic.m4
@@ -0,0 +1,45 @@
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Set SYMBOLIC_LDFLAGS to -Bsymbolic-functions for GNU linker if it
+dnl is supported.
+AC_DEFUN([ACX_PROG_LD_GNU_SYMBOLIC],
+[AC_CACHE_CHECK([if the GNU linker ($LD) supports -Bsymbolic-functions],
+acl_cv_prog_gnu_ld_symbolic, [
+acl_cv_prog_gnu_ld_symbolic=no
+AC_REQUIRE([AC_LIB_PROG_LD_GNU])
+if test x"$with_gnu_ld" = x"yes"; then
+ if $LD --help 2>&1 </dev/null | grep Bsymbolic-functions 1>&5; then
+ acl_cv_prog_gnu_ld_symbolic=yes
+ fi
+fi])
+if test x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then
+ SYMBOLIC_LDFLAGS="-Wl,-Bsymbolic-functions"
+else
+ SYMBOLIC_LDFLAGS=''
+fi
+])
+
+dnl Set DYNAMIC_LIST_CPP_NEW_LDFLAGS to --dynamic-list-cpp-new for GNU
+dnl linker if it is supported.
+AC_DEFUN([ACX_PROG_LD_GNU_DYNAMIC_LIST_CPP_NEW],
+[AC_CACHE_CHECK([if the GNU linker ($LD) supports --dynamic-list-cpp-new],
+acl_cv_prog_gnu_ld_dynamic_list_cpp_new, [
+acl_cv_prog_gnu_ld_dynamic_list_cpp_new=no
+AC_REQUIRE([ACX_PROG_LD_GNU_SYMBOLIC])
+if test x"$with_gnu_ld" = x"yes" -a \
+ x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then
+ if $LD --help 2>&1 </dev/null | grep dynamic-list-cpp-new 1>&5; then
+ acl_cv_prog_gnu_ld_dynamic_list_cpp_new=yes
+ fi
+fi])
+if test x"$acl_cv_prog_gnu_ld_dynamic_list_cpp_new" = x"yes"; then
+ DYNAMIC_LIST_CPP_NEW_LDFLAGS="$SYMBOLIC_LDFLAGS -Wl,--dynamic-list-cpp-new"
+else
+ DYNAMIC_LIST_CPP_NEW_LDFLAGS=''
+fi
+])
diff --git a/config/mh-ppc-aix b/config/mh-ppc-aix
index f2bc76a0c3ed..a56985fa9402 100644
--- a/config/mh-ppc-aix
+++ b/config/mh-ppc-aix
@@ -1,8 +1,9 @@
-# Compile Ada files with minimal-toc. The primary focus is gnatlib, so
-# that the library does not use nearly the entire TOC of applications
-# until gnatlib is built as a shared library on AIX. Compiling the
-# compiler with -mminimal-toc does not cause any harm.
-BOOT_ADAFLAGS = -mminimal-toc
+# Compile Ada files with minimal-toc in addition to the default flags (at
+# least -gnatg is required to compile language defined units). The primary
+# focus is gnatlib, so that the library does not use nearly the entire TOC of
+# applications until gnatlib is built as a shared library on AIX. Compiling
+# the compiler with -mminimal-toc does not cause any harm.
+BOOT_ADAFLAGS = -gnatapg -mminimal-toc
BOOT_LDFLAGS = -Wl,-bbigtoc
LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;`
diff --git a/config/mh-ppc-darwin b/config/mh-ppc-darwin
index 44fd620b66e2..8e64791f6eef 100644
--- a/config/mh-ppc-darwin
+++ b/config/mh-ppc-darwin
@@ -2,5 +2,5 @@
# position-independent-code -- the usual default on Darwin. This fix speeds
# compiles by 3-5%.
-BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
-
+# Broken because of PR32009.
+# BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
diff --git a/config/mt-mep b/config/mt-mep
new file mode 100644
index 000000000000..849d128a3f5b
--- /dev/null
+++ b/config/mt-mep
@@ -0,0 +1,8 @@
+
+EXTRA_TARGET_HOST_ALL_MODULES:=$(EXTRA_TARGET_HOST_ALL_MODULES) all-utils
+EXTRA_TARGET_HOST_INSTALL_MODULES:=$(EXTRA_TARGET_HOST_INSTALL_MODULES) install-utils
+
+all-utils : all-libiberty
+
+install-utils : all-libiberty
+
diff --git a/config/mt-spu b/config/mt-spu
new file mode 100644
index 000000000000..c2dbc66e9997
--- /dev/null
+++ b/config/mt-spu
@@ -0,0 +1,4 @@
+# spu ld makefile invokes as-new in maintainer mode.
+all-ld: $(MAINT) all-gas
+# spu ld makefile invokes bin2c
+all-ld: all-binutils
diff --git a/config/multi.m4 b/config/multi.m4
new file mode 100644
index 000000000000..98417679f519
--- /dev/null
+++ b/config/multi.m4
@@ -0,0 +1,65 @@
+## -*- Autoconf -*-
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
+# ---------------------------------------------------
+# Add --enable-multilib to configure.
+AC_DEFUN([AM_ENABLE_MULTILIB],
+[# Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+[ --enable-multilib build many library versions (default)],
+[case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+ [multilib=yes])
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../$2"
+ else
+ multi_basedir="$srcdir/$with_multisrctop$2"
+ fi
+else
+ multi_basedir="$srcdir/$2"
+fi
+AC_SUBST(multi_basedir)
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+AC_OUTPUT_COMMANDS([
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" ]m4_default([$1],Makefile)[ "*)
+ ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
+ ;;
+esac],
+ [
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"])])dnl
diff --git a/config/stdint.m4 b/config/stdint.m4
index 21ef2ec43ac1..025ffad9ea29 100644
--- a/config/stdint.m4
+++ b/config/stdint.m4
@@ -61,14 +61,17 @@ for i in stdint.h $inttype_headers; do
break
done
if test "$acx_cv_header_stdint" = stddef.h; then
- acx_cv_header_stdint_kind="(lacks uintptr_t)"
+ acx_cv_header_stdint_kind="(lacks uintmax_t)"
for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
unset ac_cv_type_uint32_t
unset ac_cv_type_uint64_t
_AS_ECHO_N([looking for an incomplete stdint.h in $i, ])
AC_CHECK_TYPE(uint32_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
#include <$i>])
- AC_CHECK_TYPE(uint64_t,,[acx_cv_header_stdint_kind="(lacks uintptr_t and uint64_t)"], [#include <sys/types.h>
+ AC_CHECK_TYPE(uint64_t,,,[#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(uintptr_t,,,[#include <sys/types.h>
#include <$i>])
break
done
@@ -81,7 +84,7 @@ if test "$acx_cv_header_stdint" = stddef.h; then
_AS_ECHO_N([looking for u_intXX_t types in $i, ])
AC_CHECK_TYPE(u_int32_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
#include <$i>])
- AC_CHECK_TYPE(u_int64_t,,[acx_cv_header_stdint_kind="(u_intXX_t style, lacks u_int64_t)"], [#include <sys/types.h>
+ AC_CHECK_TYPE(u_int64_t,,,[#include <sys/types.h>
#include <$i>])
break
done
@@ -215,33 +218,51 @@ if test "$acx_cv_header_stdint" = stddef.h; then
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
typedef unsigned $acx_cv_type_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
typedef unsigned $acx_cv_type_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
typedef unsigned $acx_cv_type_int32_t uint32_t;
#endif
+ #endif
#ifndef _INT8_T
#define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
typedef $acx_cv_type_int8_t int8_t;
#endif
+ #endif
#ifndef _INT16_T
#define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
typedef $acx_cv_type_int16_t int16_t;
#endif
+ #endif
#ifndef _INT32_T
#define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
typedef $acx_cv_type_int32_t int32_t;
#endif
+ #endif
EOF
elif test "$ac_cv_type_u_int32_t" = yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -259,18 +280,27 @@ elif test "$ac_cv_type_u_int32_t" = yes; then
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
typedef u_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
typedef u_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
typedef u_int32_t uint32_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -318,8 +348,11 @@ elif test "$ac_cv_type_u_int64_t" = yes; then
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
typedef u_int64_t uint64_t;
#endif
+ #endif
EOF
elif test -n "$acx_cv_type_int64_t"; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -331,8 +364,11 @@ elif test -n "$acx_cv_type_int64_t"; then
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
typedef unsigned $acx_cv_type_int64_t uint64_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -341,8 +377,10 @@ else
#if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
#ifndef _INT64_T
#define _INT64_T
+ #ifndef __int64_t_defined
typedef long long int64_t;
#endif
+ #endif
#ifndef _UINT64_T
#define _UINT64_T
typedef unsigned long long uint64_t;
@@ -387,8 +425,12 @@ if test "$ac_cv_type_uintptr_t" != yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
/* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
EOF
fi
diff --git a/config/tls.m4 b/config/tls.m4
index 5cbb6854f6c7..c8f3ff0a3733 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -1,19 +1,73 @@
dnl Check whether the target supports TLS.
AC_DEFUN([GCC_CHECK_TLS], [
- GCC_ENABLE(tls, yes, [Use thread-local storage])
+ GCC_ENABLE(tls, yes, [], [Use thread-local storage])
AC_CACHE_CHECK([whether the target supports thread-local storage],
have_tls, [
AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
[dnl If the test case passed with dynamic linking, try again with
- dnl static linking. This fails at least with some older Red Hat
- dnl releases.
- save_LDFLAGS="$LDFLAGS"
+ dnl static linking, but only if static linking is supported (not
+ dnl on Solaris 10). This fails with some older Red Hat releases.
+ chktls_save_LDFLAGS="$LDFLAGS"
LDFLAGS="-static $LDFLAGS"
- AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
- [have_tls=yes], [have_tls=no], [])
- LDFLAGS="$save_LDFLAGS"],
+ AC_LINK_IFELSE([int main() { return 0; }],
+ AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
+ [have_tls=yes], [have_tls=no],[]),
+ [have_tls=yes])
+ LDFLAGS="$chktls_save_LDFLAGS"
+ if test $have_tls = yes; then
+ dnl So far, the binutils and the compiler support TLS.
+ dnl Also check whether the libc supports TLS, i.e. whether a variable
+ dnl with __thread linkage has a different address in different threads.
+ dnl First, find the thread_CFLAGS necessary for linking a program that
+ dnl calls pthread_create.
+ chktls_save_CFLAGS="$CFLAGS"
+ thread_CFLAGS=failed
+ for flag in '' '-pthread' '-lpthread'; do
+ CFLAGS="$flag $chktls_save_CFLAGS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>
+ void *g(void *d) { return NULL; }],
+ [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
+ [thread_CFLAGS="$flag"])
+ if test "X$thread_CFLAGS" != Xfailed; then
+ break
+ fi
+ done
+ CFLAGS="$chktls_save_CFLAGS"
+ if test "X$thread_CFLAGS" != Xfailed; then
+ CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>
+ __thread int a;
+ static int *a_in_other_thread;
+ static void *
+ thread_func (void *arg)
+ {
+ a_in_other_thread = &a;
+ return (void *)0;
+ }],
+ [pthread_t thread;
+ void *thread_retval;
+ int *a_in_main_thread;
+ if (pthread_create (&thread, (pthread_attr_t *)0,
+ thread_func, (void *)0))
+ return 0;
+ a_in_main_thread = &a;
+ if (pthread_join (thread, &thread_retval))
+ return 0;
+ return (a_in_other_thread == a_in_main_thread);])],
+ [have_tls=yes], [have_tls=no], [])
+ CFLAGS="$chktls_save_CFLAGS"
+ fi
+ fi],
[have_tls=no],
- [AC_COMPILE_IFELSE([__thread int foo;], [have_tls=yes], [have_tls=no])]
+ [dnl This is the cross-compiling case. Assume libc supports TLS if the
+ dnl binutils and the compiler do.
+ AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
+ [have_tls=yes], [have_tls=no])
+ ]
)])
if test "$enable_tls $have_tls" = "yes yes"; then
AC_DEFINE(HAVE_TLS, 1,
diff --git a/config/unwind_ipinfo.m4 b/config/unwind_ipinfo.m4
new file mode 100644
index 000000000000..5587d9c3fb06
--- /dev/null
+++ b/config/unwind_ipinfo.m4
@@ -0,0 +1,22 @@
+dnl
+dnl Check whether _Unwind_GetIPInfo is available.
+dnl
+AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_MSG_CHECKING([for _Unwind_GetIPInfo])
+ AC_CACHE_VAL(gcc_cv_getipinfo, [
+ AC_TRY_LINK([extern "C" { extern void _Unwind_GetIPInfo(); }],
+ [_Unwind_GetIPInfo();],
+ [gcc_cv_getipinfo=yes],
+ [gcc_cv_getipinfo=no])
+ ])
+ if test $gcc_cv_getipinfo = yes; then
+ AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
+ fi
+ AC_MSG_RESULT($gcc_cv_getipinfo)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
diff --git a/config/warnings.m4 b/config/warnings.m4
index 8b832382bea6..d3358b6a8944 100644
--- a/config/warnings.m4
+++ b/config/warnings.m4
@@ -1,6 +1,6 @@
# Autoconf include file defining macros related to compile-time warnings.
-# Copyright 2004, 2005 Free Software Foundation, Inc.
+# Copyright 2004, 2005, 2007 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -19,13 +19,15 @@
#Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#02110-1301, USA.
-# ACX_PROG_CC_WARNING_OPTS([-Wfoo -Wbar -Wbaz])
-# Sets @WARN_CFLAGS@ to the subset of the given options which the
+# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS)
+# Sets @VARIABLE@ to the subset of the given options which the
# compiler accepts.
AC_DEFUN([ACX_PROG_CC_WARNING_OPTS],
[AC_REQUIRE([AC_PROG_CC])dnl
-AC_SUBST([WARN_CFLAGS])dnl
-WARN_CFLAGS=
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
save_CFLAGS="$CFLAGS"
for option in $1; do
AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
@@ -36,20 +38,23 @@ for option in $1; do
[AS_VAR_SET(acx_Woption, no)])
])
AS_IF([test AS_VAR_GET(acx_Woption) = yes],
- [WARN_CFLAGS="$WARN_CFLAGS${WARN_CFLAGS:+ }$option"])
+ [acx_Var="$acx_Var${acx_Var:+ }$option"])
AS_VAR_POPDEF([acx_Woption])dnl
done
CFLAGS="$save_CFLAGS"
+m4_popdef([acx_Var])dnl
])# ACX_PROG_CC_WARNING_OPTS
-# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long ...])
-# Sets WARN_PEDANTIC to "-pedantic" + the argument, if the compiler is GCC
+# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC)
+# Append to VARIABLE "-pedantic" + the argument, if the compiler is GCC
# and accepts all of those options simultaneously, otherwise to nothing.
AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC],
[AC_REQUIRE([AC_PROG_CC])dnl
-AC_SUBST([WARN_PEDANTIC])dnl
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_$1])dnl
-WARN_PEDANTIC=
AS_IF([test "$GCC" = yes],
[AC_CACHE_CHECK([whether $CC supports -pedantic $1], acx_Pedantic,
[save_CFLAGS="$CFLAGS"
@@ -59,28 +64,31 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
[AS_VAR_SET(acx_Pedantic, no)])
CFLAGS="$save_CFLAGS"])
AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
- [WARN_PEDANTIC="-pedantic $1"])
+ [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"])
])
AS_VAR_POPDEF([acx_Pedantic])dnl
+m4_popdef([acx_Var])dnl
])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC
-# ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z])
-# sets WERROR to "-Werror" if the compiler is GCC >=x.y.z, or if
+# ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
+# sets @VARIABLE@ to "-Werror" if the compiler is GCC >=x.y.z, or if
# --enable-werror-always was given on the command line, otherwise
# to nothing.
# If the argument is the word "manual" instead of a version number,
-# then WERROR will be set to -Werror only if --enable-werror-always
+# then @VARIABLE@ will be set to -Werror only if --enable-werror-always
# appeared on the configure command line.
AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS],
[AC_REQUIRE([AC_PROG_CC])dnl
-AC_SUBST([WERROR])dnl
-WERROR=
+m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
AC_ARG_ENABLE(werror-always,
AS_HELP_STRING([--enable-werror-always],
[enable -Werror despite compiler version]),
[], [enable_werror_always=no])
AS_IF([test $enable_werror_always = yes],
- [WERROR=-Werror],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
m4_if($1, [manual],,
[AS_VAR_PUSHDEF([acx_GCCvers], [acx_cv_prog_cc_gcc_$1_or_newer])dnl
AC_CACHE_CHECK([whether $CC is GCC >=$1], acx_GCCvers,
@@ -94,6 +102,7 @@ AS_IF([test $enable_werror_always = yes],
[AS_VAR_SET(acx_GCCvers, yes)],
[AS_VAR_SET(acx_GCCvers, no)])])
AS_IF([test AS_VAR_GET(acx_GCCvers) = yes],
- [WERROR=-WerrorB])
- AS_VAR_POPDEF([acx_GCCvers])]))
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ AS_VAR_POPDEF([acx_GCCvers])])
+m4_popdef([acx_Var])dnl
])# ACX_PROG_CC_WARNINGS_ARE_ERRORS