summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-01-23 17:13:33 +1100
committerDarren Tucker <dtucker@zip.com.au>2004-01-23 17:13:33 +1100
commit2dcd2393f4cddec66019608d71243d987a471277 (patch)
tree73d2589876a0c9f012d2fd6a7506b3e75fb87107 /configure.ac
parent84938141d4efb3b00496f1e819192ee3377dad70 (diff)
- (dtucker) [configure.ac] Bug #788: Test for zlib.h presence and for
zlib >= 1.1.4. Partly from jbasney at ncsa.uiuc.edu. ok djm@
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5b094ba6..c98332ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.185 2004/01/22 01:05:35 dtucker Exp $
+# $Id: configure.ac,v 1.186 2004/01/23 06:13:33 dtucker Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@@ -588,6 +588,26 @@ AC_ARG_WITH(zlib,
)
AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
+AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
+AC_MSG_CHECKING(for zlib 1.1.4 or greater)
+AC_TRY_RUN([
+#include <zlib.h>
+int main()
+{
+ int a, b, c, v;
+ if (sscanf(ZLIB_VERSION, "%d.%d.%d", &a, &b, &c) != 3)
+ exit(1);
+ v = a*1000000 + b*1000 + c;
+ if (v >= 1001004)
+ exit(0);
+ exit(2);
+}
+ ],
+ AC_MSG_RESULT(yes),
+ [ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([*** zlib too old - check config.log ***]) ]
+)
+
dnl UnixWare 2.x
AC_CHECK_FUNC(strcasecmp,