fix zlib autodetection error introduced in [3360]. Fixes #517

This commit is contained in:
cg25 2009-05-06 19:51:03 +00:00
parent ff3db926fb
commit 60f299c8a8
1 changed files with 2 additions and 3 deletions

View File

@ -267,8 +267,7 @@ AC_MSG_CHECKING([which zlib implementation to use])
case "$zlib" in
"detect")
AC_MSG_RESULT([autodetect])
AC_CHECK_LIB(z, main,
[zlib="system"],
AC_CHECK_LIB(z, main, ,
[zlib="shipped"]
)
;;
@ -294,7 +293,7 @@ if [[ "$zlib" = "shipped" ]]; then
ZLIB="\$(top_builddir)/zlib/libzlib.la"
AM_CONDITIONAL([ENABLE_SHIPPED_ZLIB], true)
ZLIBINCL="-I\$(top_srcdir)/zlib"
elif [[ "$zlib" = "system" ]]; then
elif [[ "$zlib" = "system" ]] || [[ "$zlib" = "detect" ]]; then
ZLIB="" # AC_CHECK_LIB will add -lz to @LIBS@ automatically
AM_CONDITIONAL([ENABLE_SHIPPED_ZLIB], false)
ZLIBINCL=""