]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - configure.ac
Configure zlib with --enable-host-shared for shared bfd
[thirdparty/binutils-gdb.git] / configure.ac
index ef5f5b1770be50d1350a09a000737271b9c97446..a81d7813247a5d1593bb646f36b073c314984901 100644 (file)
@@ -2276,14 +2276,23 @@ fi
 
 # Sometimes we have special requirements for the host libiberty.
 extra_host_libiberty_configure_flags=
+extra_host_zlib_configure_flags=
 case " $configdirs " in
   *" lto-plugin "* | *" libcc1 "*)
     # When these are to be built as shared libraries, the same applies to
     # libiberty.
     extra_host_libiberty_configure_flags=--enable-shared
     ;;
+  *" bfd "*)
+    # When bfd is to be built as a shared library, the same applies to
+    # zlib.
+    if test "$enable_shared" = "yes"; then
+      extra_host_zlib_configure_flags=--enable-host-shared
+    fi
+    ;;
 esac
 AC_SUBST(extra_host_libiberty_configure_flags)
+AC_SUBST(extra_host_zlib_configure_flags)
 
 # Produce a warning message for the subdirs we can't configure.
 # This isn't especially interesting in the Cygnus tree, but in the individual