Fix zlib link test
authorScott Cantor <cantor.2@osu.edu>
Tue, 15 Nov 2011 20:10:22 +0000 (20:10 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 15 Nov 2011 20:10:22 +0000 (20:10 +0000)
configure.ac

index 74d0cb7..8ed1f41 100644 (file)
@@ -102,7 +102,11 @@ else
 fi
 
 AC_CHECK_HEADER([zlib.h],,AC_MSG_ERROR([unable to find zlib header files]))
 fi
 
 AC_CHECK_HEADER([zlib.h],,AC_MSG_ERROR([unable to find zlib header files]))
-AC_CHECK_LIB([z],[deflateInit2_],[],AC_MSG_ERROR([unable to link with zlib library]))
+AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[#include <zlib.h>]],
+        [[zlibVersion()]])],,
+    [AC_MSG_ERROR([unable to link with zlib])])
+
 
 # OpenSSL settings
 AC_ARG_WITH(openssl,
 
 # OpenSSL settings
 AC_ARG_WITH(openssl,