summaryrefslogtreecommitdiff
path: root/lib/zlib/zlib.m4
blob: 32d747c3884238de55a84da4f01f956f6209a5d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
AC_DEFUN([AC_ZLIB],[
AC_CHECK_HEADERS(zlib.h)

AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion)

AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [
	AC_TRY_COMPILE([
		#include <zlib.h>
		],[
		#if (ZLIB_VERNUM >= 0x1230)
		#else
		#error "ZLIB_VERNUM < 0x1230"
		#endif
		],[
		samba_cv_zlib_1_2_3=yes
		],[
		samba_cv_zlib_1_2_3=no
		])
])

if test x"$ac_cv_header_zlib_h" = x"yes" -a \
	x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \
	x"$samba_cv_zlib_1_2_3" = x"yes"; then
	$1
else
	$2
fi
])