From 3433c2626ca2dc9f9605c88ead2db081dedd8a5f Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 24 Nov 2009 22:47:19 +0000 Subject: [PATCH] * acinclude.m4: Add include of ../config/zlib.m4. * configure.in: AM_ZLIB to check for zlib support. * configure: Regenerate. --- bfd/ChangeLog | 6 ++++++ bfd/acinclude.m4 | 2 ++ bfd/configure | 49 ++++++++++++++++++++++++++++++++++--------------- bfd/configure.in | 2 +- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2f7a85d8e..fed8f89a0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-11-24 Joel Brobecker + + * acinclude.m4: Add include of ../config/zlib.m4. + * configure.in: AM_ZLIB to check for zlib support. + * configure: Regenerate. + 2009-11-23 Paul Brook * libbfd-in.h (_bfd_generic_copy_link_hash_symbol_type): Add diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4 index aaa147ece..d9813bdf1 100644 --- a/bfd/acinclude.m4 +++ b/bfd/acinclude.m4 @@ -1,3 +1,5 @@ +sinclude([../config/zlib.m4]) + dnl See whether we need to use fopen-bin.h rather than fopen-same.h. AC_DEFUN([BFD_BINARY_FOPEN], [AC_REQUIRE([AC_CANONICAL_TARGET]) diff --git a/bfd/configure b/bfd/configure index bef4a3979..d29e79beb 100755 --- a/bfd/configure +++ b/bfd/configure @@ -934,6 +934,7 @@ enable_build_warnings enable_maintainer_mode enable_install_libbfd enable_nls +with_zlib ' ac_precious_vars='build_alias host_alias @@ -1595,6 +1596,7 @@ Optional Packages: --with-pkgversion=PKG Use PKG in the version string in place of "GNU Binutils" --with-bugurl=URL Direct users to URL to report a bug + --with-zlib include zlib support (auto/yes/no) default=auto Some influential environment variables: CC C compiler command @@ -5982,13 +5984,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5985: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5987: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5988: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5990: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5991: output\"" >&5) + (eval echo "\"\$as_me:5993: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7193,7 +7195,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7196 "configure"' > conftest.$ac_ext + echo '#line 7198 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8424,11 +8426,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8427: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8429: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8431: \$? = $ac_status" >&5 + echo "$as_me:8433: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8763,11 +8765,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8766: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8768: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8770: \$? = $ac_status" >&5 + echo "$as_me:8772: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8868,11 +8870,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8871: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8873: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8875: \$? = $ac_status" >&5 + echo "$as_me:8877: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8923,11 +8925,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8926: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8928: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8930: \$? = $ac_status" >&5 + echo "$as_me:8932: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11305,7 +11307,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11308 "configure" +#line 11310 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11401,7 +11403,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11404 "configure" +#line 11406 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13588,7 +13590,19 @@ _ACEOF # Link in zlib if we can. This allows us to read compressed debug sections. # This is used only by compress.c. -{ $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 @@ -13655,6 +13669,11 @@ done fi + 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 we are configured native, pick a core file support file. COREFILE= diff --git a/bfd/configure.in b/bfd/configure.in index f96128ef1..d2d12bdc8 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -206,7 +206,7 @@ AC_CHECK_DECLS(vsnprintf) # Link in zlib if we can. This allows us to read compressed debug sections. # This is used only by compress.c. -AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)]) +AM_ZLIB # If we are configured native, pick a core file support file. COREFILE= -- 2.11.4.GIT