summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-02-15 08:20:04 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-02-15 08:20:04 +0000
commitc76e736e8cc6cf151803e3e41593b562ab945b8b (patch)
treea7a20c9286c7bf2f0ae7bbfc664a7fe2222ad593
parent5ad5b475cc0211e3d48232660a9f1548ac2aadb5 (diff)
build system update
git-svn-id: svn://tug.org/texlive/trunk@17035 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/ChangeLog5
-rw-r--r--Build/source/m4/kpse-kpathsea-flags.m436
2 files changed, 34 insertions, 7 deletions
diff --git a/Build/source/ChangeLog b/Build/source/ChangeLog
index ecb2ae4178c..145a72fda28 100644
--- a/Build/source/ChangeLog
+++ b/Build/source/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * m4/kpse-kpathsea-flags.m4: Detect if libkpathsea was compiled
+ without debugging support and add '-DNODEBUG' if necessary.
+
2010-02-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* m4/kpse-warnings.m4: Redefine compiler warning levels to
diff --git a/Build/source/m4/kpse-kpathsea-flags.m4 b/Build/source/m4/kpse-kpathsea-flags.m4
index cd988a6a1aa..a005cbfd2d5 100644
--- a/Build/source/m4/kpse-kpathsea-flags.m4
+++ b/Build/source/m4/kpse-kpathsea-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, 2010 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -7,24 +7,46 @@
# serial 0
-# KPSE_KPATHSEA_FLAGS
-# -------------------
+# KPSE_KPATHSEA_FLAGS([OPTIONS])
+# ------------------------------
# Provide the configure options '--with-system-kpathsea' (if in the TL tree),
# '--with-kpathsea-includes', and '--with-kpathsea-libdir'.
+# Options:
+# no-debug - add '-DNO_DEBUG' to KPATHSEA_INCLUDES even if not needed
#
# Set the make variables KPATHSEA_INCLUDES and KPATHSEA_LIBS to the CPPFLAGS and
# LIBS required for the `-lkpathsea' library in texk/kpathsea/ of the TL tree.
AC_DEFUN([KPSE_KPATHSEA_FLAGS],
-[_KPSE_LIB_FLAGS([kpathsea], [kpathsea], [lt],
- [-IBLD/texk -ISRC/texk], [BLD/texk/kpathsea/libkpathsea.la], [],
- [${top_srcdir}/../kpathsea/*.[ch]],
- [${top_builddir}/../kpathsea/paths.h])
+[AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl
+_KPSE_LIB_FLAGS([kpathsea], [kpathsea], [lt],
+ [-IBLD/texk -ISRC/texk], [BLD/texk/kpathsea/libkpathsea.la], [],
+ [${top_srcdir}/../kpathsea/*.[ch]],
+ [${top_builddir}/../kpathsea/paths.h])
+m4_if(m4_index([ $1 ], [ no-debug ]), [-1],
+ [_KPSE_CHECK_KPSE_DEBUG],
+ [KPATHSEA_INCLUDES="$KPATHSEA_INCLUDES -DNO_DEBUG"])
]) # KPSE_KPATHSEA_FLAGS
# KPSE_KPATHSEA_OPTIONS([WITH-SYSTEM])
# ------------------------------------
AC_DEFUN([KPSE_KPATHSEA_OPTIONS], [_KPSE_LIB_OPTIONS([kpathsea], [$1])])
+# _KPSE_CHECK_KPSE_DEBUG
+# ----------------------
+# Internal subroutine to check if libkpathsea supports debugging.
+m4_define([_KPSE_CHECK_KPSE_DEBUG],
+[AC_CACHE_CHECK([if libkpathsea supports debugging],
+ [kpse_cv_kpse_debug],
+ [KPSE_ADD_FLAGS([kpathsea])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
+ [[FILE *f = fopen("f", "r")]])],
+ [kpse_cv_kpse_debug=yes],
+ [kpse_cv_kpse_debug=no])
+ KPSE_RESTORE_FLAGS])
+AS_IF([test "x$kpse_cv_kpse_debug" != xyes],
+ [KPATHSEA_INCLUDES="$KPATHSEA_INCLUDES -DNO_DEBUG"])[]dnl
+]) # _KPSE_CHECK_KPSE_DEBUG
+
# KPSE_KPATHSEA_SYSTEM_FLAGS
# --------------------------
AC_DEFUN([KPSE_KPATHSEA_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([kpathsea], [kpathsea])])