aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-16 07:47:17 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-16 07:47:17 +0100
commit779a116ff3a4de2333ce647b32a253a80cbfc2a5 (patch)
treed134265a5e453426c7b687133b95cc8c44e222a9 /m4
parente92c2a87808ec922b6bc90d5d5002ca77318f697 (diff)
downloadnx-libs-779a116ff3a4de2333ce647b32a253a80cbfc2a5.tar.gz
nx-libs-779a116ff3a4de2333ce647b32a253a80cbfc2a5.tar.bz2
nx-libs-779a116ff3a4de2333ce647b32a253a80cbfc2a5.zip
Support building with legacy zlib versions that do not ship a pkg-config file.
Diffstat (limited to 'm4')
-rw-r--r--m4/nx-macros.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/m4/nx-macros.m4 b/m4/nx-macros.m4
index b40f628b0..1c0e1ea7a 100644
--- a/m4/nx-macros.m4
+++ b/m4/nx-macros.m4
@@ -424,3 +424,21 @@ else
the JPEG shared library and header files are installed.])
fi
]) # LIBJPEG_FALLBACK_CHECK
+
+AC_DEFUN([ZLIB_FALLBACK_CHECK],[
+AC_MSG_CHECKING([for zlib shared libary file and headers])
+AC_CHECK_LIB([z], [inflateEnd],
+ [have_zlib_lib=yes], [have_zlib_lib=no])
+AC_CHECK_HEADERS([zlib.h],
+ [have_zlib_headers=yes], [have_zlib_headers=no])
+
+if test x"$have_zlib_lib" = "xyes" && test x"$have_zlib_headers" = "xyes"; then
+ AC_MSG_RESULT([yes])
+ Z_CFLAGS=""
+ Z_LIBS="-lz"
+else
+ AC_MSG_RESULT([no])
+ AC_MSG_FAILURE([Could not find zlib on your system, make sure
+the zlib shared library and header files are installed.])
+fi
+]) # ZLIB_FALLBACK_CHECK