@@ -760,6 +760,7 @@ enable_version_specific_runtime_libs
enable_generated_files_in_srcdir
enable_multilib
enable_dependency_tracking
+enable_werror
enable_shared
enable_static
with_pic
@@ -1410,6 +1411,7 @@ Optional Features:
--enable-multilib build many library versions (default)
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --enable-werror turns on -Werror [default=yes]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -4280,9 +4282,17 @@ fi
# in both places for now and restore CFLAGS at the end of config.
save_CFLAGS="$CFLAGS"
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror;
+fi
+
# Add -Wall -Werror if we are using GCC.
if test "x$GCC" = "xyes"; then
- XCFLAGS="$XCFLAGS -Wall -Werror"
+ XCFLAGS="$XCFLAGS -Wall"
+ if test "x$enable_werror" != "xno"; then
+ XCFLAGS="$XCFLAGS -Werror"
+ fi
fi
# Find other programs we need.
@@ -11088,7 +11098,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11091 "configure"
+#line 11101 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11194,7 +11204,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11197 "configure"
+#line 11207 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -113,9 +113,14 @@ AC_SUBST(CFLAGS)
# in both places for now and restore CFLAGS at the end of config.
save_CFLAGS="$CFLAGS"
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
+ [turns on -Werror @<:@default=yes@:>@])])
# Add -Wall -Werror if we are using GCC.
if test "x$GCC" = "xyes"; then
- XCFLAGS="$XCFLAGS -Wall -Werror"
+ XCFLAGS="$XCFLAGS -Wall"
+ if test "x$enable_werror" != "xno"; then
+ XCFLAGS="$XCFLAGS -Werror"
+ fi
fi
# Find other programs we need.
URL: http://gcc.gnu.org/PR32193 Signed-off-by: Mike Frysinger <vapier@gentoo.org> 2012-12-23 Mike Frysinger <vapier@gentoo.org> PR libgomp/32193 * configure.ac: Call AC_ARG_ENABLE(werror). (XCFLAGS): Add -Werror when enable_werror is not no. * configure: Regenerated. --- libgomp/configure | 16 +++++++++++++--- libgomp/configure.ac | 7 ++++++- 2 files changed, 19 insertions(+), 4 deletions(-)