summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-27 10:13:12 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-27 10:13:12 +0000
commite0e4357b88efe5dc53e50d341a09de4d02331200 (patch)
treecafff2748190357bac05d69d344e79b0e38d1e27 /config
parent7b48bf2011b4020c4a5a2d5d4149b03983f72cc2 (diff)
downloadgcc-tarball-e0e4357b88efe5dc53e50d341a09de4d02331200.tar.gz
gcc-6.1.0gcc-6.1.0
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog56
-rw-r--r--config/bitfields.m425
-rw-r--r--config/bootstrap-asan.mk2
-rw-r--r--config/bootstrap-mpx.mk9
-rw-r--r--config/dfp.m42
-rw-r--r--config/gettext.m44
-rw-r--r--config/iconv.m447
-rw-r--r--config/isl.m447
-rw-r--r--config/po.m44
-rw-r--r--config/sjlj.m412
-rw-r--r--config/stdint.m42
-rw-r--r--config/tcl.m44
-rw-r--r--config/warnings.m4112
-rw-r--r--config/zlib.m427
14 files changed, 299 insertions, 54 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index 370ed72b2b..4f1c354a57 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,14 +1,58 @@
-2015-12-04 Release Manager
+2016-04-27 Release Manager
- * GCC 5.3.0 released.
+ * GCC 6.1.0 released.
-2015-07-16 Release Manager
+2015-10-21 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
- * GCC 5.2.0 released.
+ * bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
+ LSAN_OPTIONS=detect_leaks.
-2015-04-22 Release Manager
+2015-08-24 Yaakov Selkowitz <yselkowi@redhat.com>
- * GCC 5.1.0 released.
+ * iconv.m4 (AM_ICONV_LINK): Use in-tree libiconv when present.
+
+2015-07-24 Micahel Darling <darlingm@gmail.com>
+
+ PR other/66259
+ * gettext.m4: Reflects renaming of configure.in to configure.ac
+ * po.m4: Likewise
+ * stdint.m4: Likewise
+ * tcl.m4: Likewise
+
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * zlib.m4: Sync with binutils-gdb.
+
+2015-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dfp.m4 (enable_decimal_float): Also set to yes for
+ i?86*-*-elfiamcu target.
+
+2015-05-27 Jason Merrill <jason@redhat.com>
+
+ PR bootstrap/66304
+ * warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
+ (ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
+ (ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
+ (ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
+ (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
+
+2015-05-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sjlj.m4: New file.
+
+2015-05-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * bitfields.m4: Change int to long long, and use bitfields of
+ width 1 instead of 0.
+
+2015-05-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * bitfields.m4: New file.
+
+2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bootstrap-mpx.mk: New file.
2015-04-10 Jakub Jelinek <jakub@redhat.com>
Iain Sandoe <iain@codesourcery.com>
diff --git a/config/bitfields.m4 b/config/bitfields.m4
new file mode 100644
index 0000000000..8185cd302a
--- /dev/null
+++ b/config/bitfields.m4
@@ -0,0 +1,25 @@
+dnl Copyright (C) 2015 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.
+
+# Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
+# alignment.
+
+AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
+[
+ AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
+ [
+ AC_TRY_COMPILE(
+ [struct foo1 { char x; char y:1; char z; };
+struct foo2 { char x; long long int y:1; char z; };
+int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
+ [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
+ ])
+ if test $gt_cv_bitfield_type_matters = yes; then
+ AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
+ [Define if the type of bitfields effects alignment.])
+ fi
+])
diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk
index 52ef30e99c..70baaf9bb1 100644
--- a/config/bootstrap-asan.mk
+++ b/config/bootstrap-asan.mk
@@ -1,7 +1,7 @@
# This option enables -fsanitize=address for stage2 and stage3.
# Suppress LeakSanitizer in bootstrap.
-export ASAN_OPTIONS="detect_leaks=0"
+export LSAN_OPTIONS="detect_leaks=0"
STAGE2_CFLAGS += -fsanitize=address
STAGE3_CFLAGS += -fsanitize=address
diff --git a/config/bootstrap-mpx.mk b/config/bootstrap-mpx.mk
new file mode 100644
index 0000000000..acc2a2e7a9
--- /dev/null
+++ b/config/bootstrap-mpx.mk
@@ -0,0 +1,9 @@
+# This option enables -fcheck-pointer-bounds -mmpx for stage2 and stage3.
+
+STAGE2_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
+STAGE3_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
+POSTSTAGE1_LDFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 \
+ -static-libmpx -static-libmpxwrappers \
+ -B$$r/prev-$(TARGET_SUBDIR)/libmpx \
+ -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxrt/.libs \
+ -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxwrap/.libs
diff --git a/config/dfp.m4 b/config/dfp.m4
index 48683f0f97..5b29089cec 100644
--- a/config/dfp.m4
+++ b/config/dfp.m4
@@ -21,7 +21,7 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
[
case $1 in
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
- i?86*-*-gnu* | \
+ i?86*-*-elfiamcu | i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
i?86*-*-cygwin* | x86_64*-*-cygwin*)
enable_decimal_float=yes
diff --git a/config/gettext.m4 b/config/gettext.m4
index 16070b40a9..45fa6b4ab7 100644
--- a/config/gettext.m4
+++ b/config/gettext.m4
@@ -81,7 +81,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
dnl Ideally we would do this search only after the
dnl if test "$USE_NLS" = "yes"; then
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
- dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT
dnl the configure script would need to contain the same shell code
dnl again, outside any 'if'. There are two solutions:
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
@@ -303,7 +303,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
- dnl For backward compatibility. Some configure.ins may be using this.
+ dnl For backward compatibility. Some configure.acs may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=
diff --git a/config/iconv.m4 b/config/iconv.m4
index c5f3579827..5f9304a6ba 100644
--- a/config/iconv.m4
+++ b/config/iconv.m4
@@ -7,6 +7,7 @@ dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl From Bruno Haible.
+dnl with modifications to support building with in-tree libiconv
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
[
@@ -28,24 +29,51 @@ AC_DEFUN([AM_ICONV_LINK],
dnl accordingly.
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
- dnl Add $INCICONV to CPPFLAGS before performing the following checks,
- dnl because if the user has installed libiconv and not disabled its use
- dnl via --without-libiconv-prefix, he wants to use it. The first
- dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
+ dnl Add $INCICONV to CPPFLAGS before performing the first check,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. This first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
+ CPPFLAGS="$am_save_CPPFLAGS"
+
+ if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
+ for _libs in .libs _libs; do
+ am_save_CPPFLAGS="$CPPFLAGS"
+ am_save_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS -I../libiconv/include"
+ LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ INCICONV="-I../libiconv/include"
+ LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
+ LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBS="$am_save_LIBS"
+ if test "$am_cv_func_iconv" = "yes"; then
+ break
+ fi
+ done
+ fi
+
if test "$am_cv_func_iconv" != yes; then
+ am_save_CPPFLAGS="$CPPFLAGS"
am_save_LIBS="$LIBS"
+ CPPFLAGS="$LIBS $INCICONV"
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
@@ -54,6 +82,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
+ CPPFLAGS="$am_save_CPPFLAGS"
LIBS="$am_save_LIBS"
fi
])
@@ -61,12 +90,10 @@ AC_DEFUN([AM_ICONV_LINK],
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
fi
if test "$am_cv_lib_iconv" = yes; then
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_MSG_CHECKING([how to link with libiconv])
AC_MSG_RESULT([$LIBICONV])
else
- dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
- dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
diff --git a/config/isl.m4 b/config/isl.m4
index 459fac1e3e..92524af32d 100644
--- a/config/isl.m4
+++ b/config/isl.m4
@@ -19,23 +19,23 @@
# ISL_INIT_FLAGS ()
# -------------------------
-# Provide configure switches for ISL support.
+# Provide configure switches for isl support.
# Initialize isllibs/islinc according to the user input.
AC_DEFUN([ISL_INIT_FLAGS],
[
AC_ARG_WITH([isl-include],
[AS_HELP_STRING(
[--with-isl-include=PATH],
- [Specify directory for installed ISL include files])])
+ [Specify directory for installed isl include files])])
AC_ARG_WITH([isl-lib],
[AS_HELP_STRING(
[--with-isl-lib=PATH],
- [Specify the directory for the installed ISL library])])
+ [Specify the directory for the installed isl library])])
AC_ARG_ENABLE(isl-version-check,
[AS_HELP_STRING(
[--disable-isl-version-check],
- [disable check for ISL version])],
+ [disable check for isl version])],
ENABLE_ISL_CHECK=$enableval,
ENABLE_ISL_CHECK=yes)
@@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS],
if test "x${with_isl_lib}" != x; then
isllibs="-L$with_isl_lib"
fi
- dnl If no --with-isl flag was specified and there is in-tree ISL
+ dnl If no --with-isl flag was specified and there is in-tree isl
dnl source, set up flags to use that and skip any version tests
- dnl as we cannot run them before building ISL.
+ dnl as we cannot run them before building isl.
if test "x${islinc}" = x && test "x${isllibs}" = x \
&& test -d ${srcdir}/isl; then
isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
ENABLE_ISL_CHECK=no
- AC_MSG_WARN([using in-tree ISL, disabling version check])
+ AC_MSG_WARN([using in-tree isl, disabling version check])
fi
isllibs="${isllibs} -lisl"
@@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS],
# ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
# ----------------------------------------------------
-# Provide actions for failed ISL detection.
+# Provide actions for failed isl detection.
AC_DEFUN([ISL_REQUESTED],
[
AC_REQUIRE([ISL_INIT_FLAGS])
@@ -94,7 +94,7 @@ AC_DEFUN([ISL_REQUESTED],
# ISL_CHECK_VERSION ISL_CHECK_VERSION ()
# ----------------------------------------------------------------
-# Test that ISL contains functionality added to the minimum expected version.
+# Test whether isl contains functionality added to the minimum expected version.
AC_DEFUN([ISL_CHECK_VERSION],
[
if test "${ENABLE_ISL_CHECK}" = yes ; then
@@ -103,15 +103,32 @@ AC_DEFUN([ISL_CHECK_VERSION],
_isl_saved_LIBS=$LIBS
CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
- LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
- LIBS="${_isl_saved_LIBS} -lisl"
+ LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
+ LIBS="${_isl_saved_LIBS} -lisl -lgmp"
- AC_MSG_CHECKING([for compatible ISL])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])],
- [gcc_cv_isl=yes],
- [gcc_cv_isl=no])
+ AC_MSG_CHECKING([for isl 0.16, 0.15, or deprecated 0.14])
+ AC_TRY_LINK([#include <isl/ctx.h>],
+ [isl_ctx_get_max_operations (isl_ctx_alloc ());],
+ [gcc_cv_isl=yes],
+ [gcc_cv_isl=no])
AC_MSG_RESULT([$gcc_cv_isl])
+ if test "${gcc_cv_isl}" = no ; then
+ AC_MSG_RESULT([recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated])
+ fi
+
+ AC_MSG_CHECKING([for isl 0.16 or 0.15])
+ AC_TRY_LINK([#include <isl/schedule.h>],
+ [isl_options_set_schedule_serialize_sccs (NULL, 0);],
+ [ac_has_isl_options_set_schedule_serialize_sccs=yes],
+ [ac_has_isl_options_set_schedule_serialize_sccs=no])
+ AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
+
+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+ islver="0.15"
+ AC_SUBST([islver])
+ fi
+
CFLAGS=$_isl_saved_CFLAGS
LDFLAGS=$_isl_saved_LDFLAGS
LIBS=$_isl_saved_LIBS
diff --git a/config/po.m4 b/config/po.m4
index 2edd5a7d3b..6ceef420f1 100644
--- a/config/po.m4
+++ b/config/po.m4
@@ -117,14 +117,14 @@ AC_DEFUN([AM_PO_SUBDIRS],
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
# Hide the ALL_LINGUAS assigment from automake.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
- # The set of available languages was given in configure.in.
+ # The set of available languages was given in configure.ac.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
case "$ac_given_srcdir" in
diff --git a/config/sjlj.m4 b/config/sjlj.m4
new file mode 100644
index 0000000000..71c8b319b8
--- /dev/null
+++ b/config/sjlj.m4
@@ -0,0 +1,12 @@
+dnl Check if the compiler is configured for setjmp/longjmp exceptions.
+AC_DEFUN([GCC_CHECK_SJLJ_EXCEPTIONS],
+ [AC_CACHE_CHECK([whether the compiler is configured for setjmp/longjmp exceptions],
+ ac_cv_sjlj_exceptions,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#ifdef __USING_SJLJ_EXCEPTIONS__
+ this will fail
+ #endif]],
+ [[int i;]])],
+ [ac_cv_sjlj_exceptions=no],
+ [ac_cv_sjlj_exceptions=yes])])])
diff --git a/config/stdint.m4 b/config/stdint.m4
index 61898a75fa..59f4359544 100644
--- a/config/stdint.m4
+++ b/config/stdint.m4
@@ -39,7 +39,7 @@ dnl If your installed header files require the stdint-types you will want to
dnl create an installable file mylib-int.h that all your other installable
dnl header may include. So, for a library package named "mylib", just use
dnl GCC_HEADER_STDINT(mylib-int.h)
-dnl in configure.in and install that header file in Makefile.am along with
+dnl in configure.ac and install that header file in Makefile.am along with
dnl the other headers (mylib.h). The mylib-specific headers can simply
dnl use "#include <mylib-int.h>" to obtain the stdint-types.
dnl
diff --git a/config/tcl.m4 b/config/tcl.m4
index 59a0c7e0a5..4542a4b23d 100644
--- a/config/tcl.m4
+++ b/config/tcl.m4
@@ -2136,7 +2136,7 @@ dnl # preprocessing tests use only CPPFLAGS.
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
fi
-dnl Not at all clear what this was doing in Tcl's configure.in
+dnl Not at all clear what this was doing in Tcl's configure.ac
dnl or why it was needed was needed. In any event, this sort of
dnl things needs to be done in the big loop above.
dnl REMOVE THIS BLOCK LATER! (mdejong)
@@ -3235,7 +3235,7 @@ AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [
# created. Accumulates.
#
# Requires presence of SC_OUTPUT_COMMANDS_PRE at the end
-# of configure.in (right before AC_OUTPUT).
+# of configure.ac (right before AC_OUTPUT).
#
#--------------------------------------------------------------------
diff --git a/config/warnings.m4 b/config/warnings.m4
index b64b594e62..ce007f9b73 100644
--- a/config/warnings.m4
+++ b/config/warnings.m4
@@ -18,11 +18,12 @@
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
-# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS)
+# 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_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -48,6 +49,7 @@ for real_option in $1; do
done
CFLAGS="$save_CFLAGS"
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_OPTS
# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
@@ -55,6 +57,7 @@ m4_popdef([acx_Var])dnl
# 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_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -77,6 +80,7 @@ AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
AS_VAR_POPDEF([acx_Pedantic])dnl
m4_popdef([acx_Woptions])dnl
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC
# ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
@@ -88,6 +92,7 @@ m4_popdef([acx_Var])dnl
# appeared on the configure command line.
AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -114,4 +119,109 @@ AS_IF([test $enable_werror_always = yes],
[acx_Var="$acx_Var${acx_Var:+ }-Werror"])
AS_VAR_POPDEF([acx_GCCvers])])
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNINGS_ARE_ERRORS
+
+# ACX_PROG_CXX_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CXXFLAGS])
+# Sets @VARIABLE@ to the subset of the given options which the
+# compiler accepts.
+AC_DEFUN([ACX_PROG_CXX_WARNING_OPTS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_CXXFLAGS])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+save_CXXFLAGS="$CXXFLAGS"
+for real_option in $1; do
+ # Do the check with the no- prefix removed since gcc silently
+ # accepts any -Wno-* option on purpose
+ case $real_option in
+ -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+ *) option=$real_option ;;
+ esac
+ AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
+ AC_CACHE_CHECK([whether $CXX supports $option], acx_Woption,
+ [CXXFLAGS="$option"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_VAR_SET(acx_Woption, yes)],
+ [AS_VAR_SET(acx_Woption, no)])
+ ])
+ AS_IF([test AS_VAR_GET(acx_Woption) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }$real_option"])
+ AS_VAR_POPDEF([acx_Woption])dnl
+done
+CXXFLAGS="$save_CXXFLAGS"
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_OPTS
+
+# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
+# Append to VARIABLE "-pedantic" + the argument, if the compiler is G++
+# and accepts all of those options simultaneously, otherwise to nothing.
+AC_DEFUN([ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+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
+# Do the check with the no- prefix removed from the warning options
+# since gcc silently accepts any -Wno-* option on purpose
+m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl
+AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl
+AS_IF([test "$GXX" = yes],
+[AC_CACHE_CHECK([whether $CXX supports -pedantic ]acx_Woptions, acx_Pedantic,
+[save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="-pedantic acx_Woptions"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_VAR_SET(acx_Pedantic, yes)],
+ [AS_VAR_SET(acx_Pedantic, no)])
+CXXFLAGS="$save_CXXFLAGS"])
+AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"])
+])
+AS_VAR_POPDEF([acx_Pedantic])dnl
+m4_popdef([acx_Woptions])dnl
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC
+
+# ACX_PROG_CXX_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
+# sets @VARIABLE@ to "-Werror" if the compiler is G++ >=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 @VARIABLE@ will be set to -Werror only if --enable-werror-always
+# appeared on the configure command line.
+AC_DEFUN([ACX_PROG_CXX_WARNINGS_ARE_ERRORS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+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],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ m4_if($1, [manual],,
+ [AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl
+ AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers,
+ [set fnord `echo $1 | tr '.' ' '`
+ shift
+ AC_PREPROC_IFELSE(
+[#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \
+ < [$]1 * 10000 + [$]2 * 100 + [$]3
+#error insufficient
+#endif],
+ [AS_VAR_SET(acx_GXXvers, yes)],
+ [AS_VAR_SET(acx_GXXvers, no)])])
+ AS_IF([test AS_VAR_GET(acx_GXXvers) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ AS_VAR_POPDEF([acx_GXXvers])])
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNINGS_ARE_ERRORS
diff --git a/config/zlib.m4 b/config/zlib.m4
index b0174994ec..afa57d112e 100644
--- a/config/zlib.m4
+++ b/config/zlib.m4
@@ -1,18 +1,19 @@
-dnl A function to check for zlib availability. zlib is used by default
-dnl unless the user configured with --disable-nls.
+dnl A function to check if the system's zlib library should be used. The
+dnl builtin zlib dnl is used by default unless the user configured with
+dnl --with-system-zlib.
AC_DEFUN([AM_ZLIB],
[
- # See if the user specified whether he wants zlib support or not.
- AC_ARG_WITH(zlib,
- [ --with-zlib include zlib support (auto/yes/no) [default=auto]],
- [], [with_zlib=auto])
-
- if test "$with_zlib" != "no"; then
- AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
- if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
- AC_MSG_ERROR([zlib (libz) library was explicitly requested but not found])
- fi
+ # Use the system's zlib library.
+ zlibdir="-L\$(top_builddir)/../zlib"
+ zlibinc="-I\$(top_srcdir)/../zlib"
+ AC_ARG_WITH(system-zlib,
+ [AS_HELP_STRING([--with-system-zlib], [use installed libz])],
+ if test x$with_system_zlib = xyes ; then
+ zlibdir=
+ zlibinc=
fi
+ )
+ AC_SUBST(zlibdir)
+ AC_SUBST(zlibinc)
])
-