Whamcloud - gitweb
LU-11946 build: no zlib check during configure --enable-dist 94/35194/2
authorOlaf Faaland <faaland1@llnl.gov>
Mon, 6 May 2019 18:31:21 +0000 (11:31 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Jun 2019 03:56:41 +0000 (03:56 +0000)
If the zlib libraries are not found, the error is fatal, and prevents
the sources from being packaged.

This check is unnecessary when sources are being packaged, so this patch
disables the test when configure is run with --enable-dist.

Lustre-change: https://review.whamcloud.com/34811
Lustre-commit: e9d9a0eeb0ff71b207e9d0095fce16af74f842b6

Change-Id: Ie262b17b63c0edc8e8bfbd0c1a466ec37d05622c
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35194
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4

index 6038d8b..1b5175d 100644 (file)
@@ -3427,12 +3427,14 @@ AC_CHECK_HEADERS([blkid/blkid.h])
 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
 
 # lustre/utils/lfs.c
-AC_CHECK_LIB([z], [crc32], [
-            AC_CHECK_HEADER([zlib.h], [], [
-                            AC_MSG_ERROR([zlib.h not found.])])
-            ], [
-            AC_MSG_ERROR([
-zlib library not found. Please install zlib development package.])
+AS_IF([test "$enable_dist" = "no"], [
+               AC_CHECK_LIB([z], [crc32], [
+                                AC_CHECK_HEADER([zlib.h], [], [
+                                                AC_MSG_ERROR([zlib.h not found.])])
+                                ], [
+                                AC_MSG_ERROR([
+               zlib library not found. Please install zlib development package.])
+               ])
 ])
 
 SELINUX=""