]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* configure.ac (HAVE_ZLIB): Use AM_ZLIB instead of AC_SEARCH_LIBS.
authorIan Lance Taylor <ian@airs.com>
Fri, 7 Dec 2012 21:24:47 +0000 (21:24 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 7 Dec 2012 21:24:47 +0000 (21:24 +0000)
Use $ac_cv_header_zlib_h = yes as the condition in AM_CONDITIONAL.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.

gold/ChangeLog
gold/Makefile.in
gold/aclocal.m4
gold/configure
gold/configure.ac
gold/testsuite/Makefile.in

index b31d11f31944dd4afb87ce1c7a0c00960bd47dcf..1018a1f6727a1ed54bc225ab70b6562e69a0a9e6 100644 (file)
@@ -1,3 +1,12 @@
+2012-12-06  Roland McGrath  <mcgrathr@google.com>
+
+       * configure.ac (HAVE_ZLIB): Use AM_ZLIB instead of AC_SEARCH_LIBS.
+       Use $ac_cv_header_zlib_h = yes as the condition in AM_CONDITIONAL.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+       * Makefile.in: Regenerate.
+       * testsuite/Makefile.in: Regenerate.
+
 2012-11-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gold/14858
index 356b1d63282a95690c0287c8194f316bc759927f..8b1fa7248ea3797a438ce0f2bd13adb6f09d0d54 100644 (file)
@@ -58,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/po.m4 \
        $(top_srcdir)/../config/progtest.m4 \
+       $(top_srcdir)/../config/zlib.m4 \
        $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
index 00cc0f87300abe5c7bd8be041d676c948651cada..8321894627ad08f74147a1d674d1e5bfdbb08a25 100644 (file)
@@ -988,4 +988,5 @@ m4_include([../config/nls.m4])
 m4_include([../config/override.m4])
 m4_include([../config/po.m4])
 m4_include([../config/progtest.m4])
+m4_include([../config/zlib.m4])
 m4_include([../bfd/warning.m4])
index 0bffe088c86b7954ba3c59bb6889cc132516da17..3d14be5303694303fdf239a2fadd79ee88987463 100755 (executable)
@@ -784,6 +784,7 @@ enable_werror
 enable_build_warnings
 with_gold_ldflags
 with_gold_ldadd
+with_zlib
 enable_maintainer_mode
 '
       ac_precious_vars='build_alias
@@ -1441,6 +1442,7 @@ Optional Packages:
   --with-lib-path=dir1:dir2...  set default LIB_PATH
   --with-gold-ldflags=FLAGS  additional link flags for gold
   --with-gold-ldadd=LIBS     additional libraries for gold
+  --with-zlib             include zlib support (auto/yes/no) default=auto
 
 Some influential environment variables:
   CC          C compiler command
@@ -6796,7 +6798,19 @@ esac
 fi
 
 # Link in zlib if we can.  This allows us to write compressed sections.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
+
+  # See if the user specified whether he wants zlib support or not.
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+  withval=$with_zlib;
+else
+  with_zlib=auto
+fi
+
+
+  if test "$with_zlib" != "no"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
 $as_echo_n "checking for library containing zlibVersion... " >&6; }
 if test "${ac_cv_search_zlibVersion+set}" = set; then :
   $as_echo_n "(cached) " >&6
@@ -6863,7 +6877,12 @@ done
 
 fi
 
- if test "$ac_cv_search_zlibVersion" != "no"; then
+    if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
+      as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
+    fi
+  fi
+
+ if test "$ac_cv_header_zlib_h" = "yes"; then
   HAVE_ZLIB_TRUE=
   HAVE_ZLIB_FALSE='#'
 else
index c2326d35994b033a49591b896347d9b6755f2529..bd3e4bd984a607d015a594a445a6f36e5a091e29 100644 (file)
@@ -485,8 +485,8 @@ else
 fi
 
 # Link in zlib if we can.  This allows us to write compressed sections.
-AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
-AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_search_zlibVersion" != "no")
+AM_ZLIB
+AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_header_zlib_h" = "yes")
 
 dnl We have to check these in C, not C++, because autoconf generates
 dnl tests which have no type information, and current glibc provides
index 48878278e171d5f7bb2923ea98b765ab499a9640..771b8538d88da1c83e2b057b5886f47ab7b0536a 100644 (file)
@@ -663,6 +663,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/po.m4 \
        $(top_srcdir)/../config/progtest.m4 \
+       $(top_srcdir)/../config/zlib.m4 \
        $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)