OSDN Git Service

* common.m4: Add test for libz and zlib.h.
authorHans-Peter Nilsson <hp@axis.com>
Fri, 11 Jul 2008 02:42:35 +0000 (02:42 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Fri, 11 Jul 2008 02:42:35 +0000 (02:42 +0000)
sim/common/common.m4

index f587754..215208d 100644 (file)
@@ -54,6 +54,10 @@ AC_CHECK_FUNCS(getrusage time sigaction __setfpucw)
 AC_CHECK_LIB(socket, bind)
 AC_CHECK_LIB(nsl, gethostbyname)
 
+# BFD conditionally uses zlib, so we must link it in if libbfd does, by
+# using the same condition.
+AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+
 . ${srcdir}/../../bfd/configure.host
 
 dnl Standard (and optional) simulator options.