gas: consistently emit diagnostics for non-zero data emission to .bss/.struct
[deliverable/binutils-gdb.git] / gas / configure.ac
index fbe8c0b403b02c667948d0271a5beaac5659bdb4..07f825df9791c2d12b27ec7f8667b66cf3ad8f94 100644 (file)
@@ -9,12 +9,12 @@ dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program; see the file COPYING3.  If not see
 dnl <http://www.gnu.org/licenses/>.
@@ -64,6 +64,19 @@ if test x$ac_checking != x ; then
   AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
 fi
 
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+ac_default_compressed_debug_sections=unset
+# Provide a configure time option to override our default.
+AC_ARG_ENABLE(compressed_debug_sections,
+             AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,none}],
+             [compress debug sections by default])],
+[case ,"${enableval}", in
+  ,yes, | ,all, | *,gas,*) ac_default_compressed_debug_sections=yes ;;
+  ,no, | ,none,)  ac_default_compressed_debug_sections=no ;;
+  *)   ac_default_compressed_debug_sections=unset ;;
+esac])dnl
+
 using_cgen=no
 
 AM_BINUTILS_WARNINGS
@@ -403,7 +416,7 @@ changequote([,])dnl
 
         # Decide features one by one.
         AC_MSG_CHECKING(for default configuration of --enable-dx-regs)
-       if test "x${enable_dx_regs}" == xyes; then
+       if test "x${enable_dx_regs}" = xyes; then
          AC_DEFINE(NDS32_DEFAULT_DX_REGS, 1,
                    [Define value for nds32_dx_regs])
        else
@@ -413,7 +426,7 @@ changequote([,])dnl
        AC_MSG_RESULT($enable_dx_regs)
 
         AC_MSG_CHECKING(for default configuration of --enable-perf-ext)
-       if test "x${enable_perf_ext}" == xno; then
+       if test "x${enable_perf_ext}" = xno; then
          AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 0,
                    [Define value for nds32_perf_ext])
        else
@@ -423,7 +436,7 @@ changequote([,])dnl
        AC_MSG_RESULT($enable_perf_ext)
 
         AC_MSG_CHECKING(for default configuration of --enable-perf-ext2)
-       if test "x${enable_perf_ext2}" == xno; then
+       if test "x${enable_perf_ext2}" = xno; then
          AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 0,
                    [Define value for nds32_perf_ext2])
        else
@@ -433,7 +446,7 @@ changequote([,])dnl
        AC_MSG_RESULT($enable_perf_ext2)
 
         AC_MSG_CHECKING(for default configuration of --enable-string-ext)
-       if test "x${enable_string_ext}" == xno; then
+       if test "x${enable_string_ext}" = xno; then
          AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 0,
                    [Define value for nds32_string_ext])
        else
@@ -443,7 +456,7 @@ changequote([,])dnl
        AC_MSG_RESULT($enable_string_ext)
 
         AC_MSG_CHECKING(for default configuration of --enable-audio-ext)
-       if test "x${enable_audio_ext}" == xno; then
+       if test "x${enable_audio_ext}" = xno; then
          AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 0,
                    [Define value for nds32_audio_ext])
        else
@@ -536,6 +549,10 @@ changequote([,])dnl
 
 done
 
+if test x$ac_default_compressed_debug_sections == xyes ; then
+  AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
+fi
+
 # Turn on all targets if possible
 if test ${all_targets} = "yes"; then
   case ${target_cpu_type} in
@@ -719,7 +736,7 @@ AC_DEFINE_UNQUOTED(TARGET_OS,               "${target_os}",    [Target OS.])
 AC_PROG_YACC
 AM_PROG_LEX
 
-ALL_LINGUAS="fr tr es rw id ru fi ja"
+ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
@@ -812,17 +829,12 @@ GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
 GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
 GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
 
-AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf])
+AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf, asprintf])
 
 BFD_BINARY_FOPEN
 
-# Use the system's zlib library.
-zlibinc="-I\$(srcdir)/../zlib"
-AC_ARG_WITH(system-zlib,
-[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
-zlibinc=
-)
-AC_SUBST(zlibinc)
+# Link in zlib if we can.  This allows us to write compressed debug sections.
+AM_ZLIB
 
 # Support for VMS timestamps via cross compile
 
This page took 0.026716 seconds and 4 git commands to generate.