File powerpc-utils.bug-1040076_test-for-zlib-presence-at-configuration-time.patch of Package powerpc-utils
From 7539330a301ff9ac7d6fd5e1cf974bb9999100b2 Mon Sep 17 00:00:00 2001
From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date: Fri, 19 May 2017 16:02:51 -0400
Subject: [PATCH] Test for zlib presence at configuration time
The nvram utility links with zlib and compilation will fail if zlib.h or
libz.so are not present. Check and warn at configuration time.
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
Index: powerpc-utils-1.3.3/configure.ac
===================================================================
--- powerpc-utils-1.3.3.orig/configure.ac
+++ powerpc-utils-1.3.3/configure.ac
@@ -37,6 +37,11 @@ AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_CHECK_FUNCS([memset strchr strcspn strdup strerror strrchr strstr strtol strtoul strtoull gettimeofday])
+# check for zlib
+AC_CHECK_HEADER(zlib.h,
+ [AC_CHECK_LIB(z, inflate, [], [AC_MSG_FAILURE([zlib library is required for compilation])])],
+ [AC_MSG_FAILURE([zlib.h is required for compiliation])])
+
# check for librtas
AC_ARG_WITH([librtas],
[AS_HELP_STRING([--without-librtas],