Move zlib check later on in the script to avoid a strange shell problem

on SLES11.
This commit is contained in:
Todd C. Miller
2010-07-15 09:49:32 -04:00
parent 77d3b8d09d
commit 3ea95dae3d
2 changed files with 491 additions and 665 deletions

1136
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1263,23 +1263,18 @@ AC_ARG_ENABLE(env_debug,
AC_ARG_ENABLE(zlib,
[AS_HELP_STRING([--enable-zlib[[=PATH]]], [Whether to enable or disable zlib])],
[ case "$enableval" in
[ case "$enable_zlib" in
yes) AC_DEFINE(HAVE_ZLIB_H)
ZLIB="-lz"
;;
no) ;;
*) AC_DEFINE(HAVE_ZLIB_H)
CPPFLAGS="${CPPFLAGS} -I${enableval}/include"
SUDO_APPEND_LIBPATH(ZLIB, [$enableval/lib])
CPPFLAGS="${CPPFLAGS} -I${enable_zlib}/include"
SUDO_APPEND_LIBPATH(ZLIB, [$enable_zlib/lib])
ZLIB="${ZLIB} -lz"
;;
esac
])
if test X"$enable_zlib" = X""; then
AC_CHECK_LIB(z, gzdopen, [
AC_CHECK_HEADERS(zlib.h, [ZLIB="-lz"])
])
fi
AC_ARG_ENABLE(warnings,
[AS_HELP_STRING([--enable-warnings], [Whether to enable compiler warnings])],
@@ -2031,6 +2026,15 @@ AC_CHECK_FUNCS(getprogname, , [
AC_MSG_RESULT($sudo_cv___progname)
])
dnl
dnl If zlib not explictly enabled, check for it here
dnl
if test X"$enable_zlib" = X""; then
AC_CHECK_LIB(z, gzdopen, [
AC_CHECK_HEADERS(zlib.h, [ZLIB="-lz"])
])
fi
dnl
dnl Check for strsignal() or sys_siglist
dnl