diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-20 14:45:40 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-20 14:45:40 +0200 |
commit | 48f4ff6583f09a12d539072e1337c40c92161ee3 (patch) | |
tree | b6039e51bd940ebf438324251f8774b57de0e63f | |
parent | 154a7f7603dca24ee56d66f3ca6b2b2757f29cd9 (diff) | |
download | rpm-48f4ff6583f09a12d539072e1337c40c92161ee3.tar.gz rpm-48f4ff6583f09a12d539072e1337c40c92161ee3.tar.bz2 rpm-48f4ff6583f09a12d539072e1337c40c92161ee3.zip |
Make zlib conditional.
-rw-r--r-- | configure.ac | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index b76865286..9296aad96 100644 --- a/configure.ac +++ b/configure.ac @@ -280,19 +280,17 @@ addlib() { WITH_ZLIB_INCLUDE= WITH_ZLIB_LIB= -if test -z "${WITH_ZLIB_LIB}" ; then - for zlib in z gz ; do - AC_CHECK_LIB(${zlib}, gzread, - [WITH_ZLIB_LIB="-l${zlib}"; break], - [if test ${zlib} = gz; then - AC_MSG_ERROR([sorry rpm requires libz.a or libgz.a (from the zlib package)]) - fi] - ) - done +AC_CHECK_HEADERS([zlib.h],[ + AS_IF([test -z "${WITH_ZLIB_LIB}"],[ + for zlib in z gz ; do + AC_CHECK_LIB(${zlib}, gzread, + [WITH_ZLIB_LIB="-l${zlib}"; break]) + done dnl zlib-1.0.4 has not gzseek - AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])]) -fi + AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])]) + ]) +]) AC_SUBST(WITH_ZLIB_INCLUDE) AC_SUBST(WITH_ZLIB_LIB) @@ -555,7 +553,7 @@ AC_CHECK_HEADERS(netinet/in_systm.h) AC_CHECK_HEADERS(machine/types.h) AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h) AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/param.h sys/vmount.h) -AC_CHECK_HEADERS(libio.h zlib.h) +AC_CHECK_HEADERS(libio.h) AC_CHECK_HEADERS(err.h mcheck.h) AC_CHECK_HEADERS(pthread.h) |