summaryrefslogtreecommitdiff
path: root/Build/source/m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-09-09 08:31:11 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-09-09 08:31:11 +0000
commit8ebb0079ddc9941c4bce2f9cb38fd1cd6957ebae (patch)
tree19f11e56c0c2b60f0455a08165bcec6c9f005cb1 /Build/source/m4
parent4fd3c95ff0083729460b52ee6594e137b882186e (diff)
Added a preliminary texlive.info
Various minor build fixes git-svn-id: svn://tug.org/texlive/trunk@31604 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r--Build/source/m4/ChangeLog5
-rw-r--r--Build/source/m4/kpse-zlib-flags.m424
2 files changed, 24 insertions, 5 deletions
diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog
index 8230257245a..cf95c4adc0e 100644
--- a/Build/source/m4/ChangeLog
+++ b/Build/source/m4/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpse-zlib-flags.m4 (KPSE_ZLIB_FLAGS): Test if <<zlib.h> defines
+ 'z_const' and accordingly define either ZLIB_CONST or z_const.
+
2013-08-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* cho-libs.m4: Moved ...
diff --git a/Build/source/m4/kpse-zlib-flags.m4 b/Build/source/m4/kpse-zlib-flags.m4
index d442e941ff0..e95eb868762 100644
--- a/Build/source/m4/kpse-zlib-flags.m4
+++ b/Build/source/m4/kpse-zlib-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -12,12 +12,26 @@
# Provide the configure options '--with-system-zlib' (if in the TL tree),
# '--with-zlib-includes', and '--with-zlib-libdir'.
#
+# Also test if <<zlib.h> defines 'z_const' and define ZLIB_CONST or z_const.
+#
# Set the make variables ZLIB_INCLUDES and ZLIB_LIBS to the CPPFLAGS and
# LIBS required for the `-lz' library in libs/zlib/ of the TL tree.
-AC_DEFUN([KPSE_ZLIB_FLAGS],
-[_KPSE_LIB_FLAGS([zlib], [z], [],
- [-IBLD/libs/zlib/include], [BLD/libs/zlib/libz.a], [],
- [], [${top_builddir}/../../libs/zlib/include/zconf.h])[]dnl
+AC_DEFUN([KPSE_ZLIB_FLAGS], [dnl
+AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl
+_KPSE_LIB_FLAGS([zlib], [z], [],
+ [-IBLD/libs/zlib/include], [BLD/libs/zlib/libz.a], [],
+ [], [${top_builddir}/../../libs/zlib/include/zconf.h])[]dnl
+AC_CACHE_CHECK([if <zlib.h> defines 'z_const'],
+ [kpse_cv_have_decl_z_const],
+ [KPSE_ADD_FLAGS([zlib])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <zlib.h>]],
+ [[z_const char * foo();]])],
+ [kpse_cv_have_decl_z_const=yes],
+ [kpse_cv_have_decl_z_const=no])
+ KPSE_RESTORE_FLAGS])
+AS_CASE([$kpse_cv_have_decl_z_const],
+ [yes], [AC_DEFINE([ZLIB_CONST], [1], [Define to 1 if <zlib.h> declares 'z_const'.])],
+ [AC_DEFINE([z_const], [], [Define as empty if not declared in <zlib.h>.])])
]) # KPSE_ZLIB_FLAGS
# KPSE_ZLIB_OPTIONS([WITH-SYSTEM])