summaryrefslogtreecommitdiff
path: root/Build/source/m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:34:20 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:34:20 +0000
commite4cae97633d68af424aef1494462550cef2dadeb (patch)
tree0e82baf23b3900e995c132775fc75213c0984cf4 /Build/source/m4
parent558303c70cdfd3bc2465cb99c2f8d81a64efcf31 (diff)
towards TL2010: build system
git-svn-id: svn://tug.org/texlive/trunk@15977 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r--Build/source/m4/cho-kpse.m449
-rw-r--r--Build/source/m4/cho-libs.m43
-rw-r--r--Build/source/m4/kpse-common.m444
-rw-r--r--Build/source/m4/kpse-cxx-hack.m44
-rw-r--r--Build/source/m4/kpse-freetype2-flags.m46
-rw-r--r--Build/source/m4/kpse-graphite-flags.m425
-rw-r--r--Build/source/m4/kpse-icu-flags.m475
-rw-r--r--Build/source/m4/kpse-kpathsea-flags.m44
-rw-r--r--Build/source/m4/kpse-macos-framework.m42
-rw-r--r--Build/source/m4/kpse-pkgs.m42
-rw-r--r--Build/source/m4/kpse-setup.m429
-rw-r--r--Build/source/m4/kpse-teckit-flags.m44
-rw-r--r--Build/source/m4/kpse-warnings.m4170
-rw-r--r--Build/source/m4/kpse-web2c.m48
-rw-r--r--Build/source/m4/kpse-xpdf-flags.m42
-rw-r--r--Build/source/m4/maw-time.m434
16 files changed, 244 insertions, 217 deletions
diff --git a/Build/source/m4/cho-kpse.m4 b/Build/source/m4/cho-kpse.m4
deleted file mode 100644
index abecf850bbf..00000000000
--- a/Build/source/m4/cho-kpse.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 1998 - 2008 Jin-Hwan Cho <chofchof@ktug.or.kr>
-# Copyright (C) 2008 - 2009 Peter Breitenlohner <tex-live@tug.org>
-#
-# This file is free software; the copyright holders
-# give unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# CHO_CHECK_KPSE_SUPPORT(PACKAGE-NAME)
-# ------------------------------------
-# Check for required file formats and xbasename.
-# We need tex-ps_header, type1, vf, ofm, ovf, and truetype;
-# of these truetype was introduced last (Dec 1997).
-AC_DEFUN([CHO_CHECK_KPSE_SUPPORT],
-[KPSE_CHECK_KPSE_FORMAT([truetype], ,
- [KPSE_MSG_ERROR([$1],
- [Required file formats not found in Kpathsea header files.
-
-This version of $1 requires that kpathsea and its headers be available.
-If you are sure they are installed and in a standard place, maybe you need a
-newer version of kpathsea? You also might try setting the environment
-variable CPPFLAGS (or CFLAGS) with -I pointing to the directory containing
-the file "kpathsea/kpathsea.h"
-
-])])
-KPSE_CHECK_XBASENAME([],
- [KPSE_MSG_ERROR([$1],
- [This version of $1 requires xbasename in libkpathsea.])])
-]) # CHO_CHECK_KPSE_SUPPORT
-
-# CHO_CHECK_KPSE_TDS_VERSION
-# --------------------------
-# Check for TDS version 1.1 support.
-# We need cmap, enc, opentype, and sfd formats (Dec 2003).
-AC_DEFUN([CHO_CHECK_KPSE_TDS_VERSION],
-[KPSE_CHECK_KPSE_FORMAT([opentype],
- [tds_version_11=yes
- AC_DEFINE([__TDS_VERSION__], [0x200406L],
- [Define as 0x200406L if your libkpathsea supports enc formats,
- or as 0x200302L otherwise.])],
- [tds_version_11=no
- AC_DEFINE([__TDS_VERSION__], [0x200302L])])
-AC_MSG_CHECKING([whether libkpathsea supports TDS version 1.1 installation])
-AC_MSG_RESULT([$tds_version_11])
-AM_CONDITIONAL([TDS_VERSION_11], [test "x$tds_version_11" = xyes])
-]) # CHO_CHECK_KPSE_TDS_VERSION
-
diff --git a/Build/source/m4/cho-libs.m4 b/Build/source/m4/cho-libs.m4
index f6addf6862d..06c0aa49df6 100644
--- a/Build/source/m4/cho-libs.m4
+++ b/Build/source/m4/cho-libs.m4
@@ -97,8 +97,7 @@ AS_IF([test "x$cho_cv_have_freetype" = xyes],
[AC_CHECK_FUNCS([FT_Init_FreeType],
[AC_DEFINE([HAVE_LIBFREETYPE], 1,
[Define if you have libfreetype and its headers.])])],
- [KPSE_MSG_ERROR([$1],
- [This version of $1 requires that FreeType2 and its headers be available.
+ [AC_MSG_ERROR([This version of $1 requires that FreeType2 and its headers be available.
You can use the --with-freetype2-includes and/or --with-freetype2-libdir options
to indicate the location of the installed freetype2 library and headers.])])
])# CHO_CHECK_LIBFREETYPE
diff --git a/Build/source/m4/kpse-common.m4 b/Build/source/m4/kpse-common.m4
index d4da8aa8a82..4246bda6ae5 100644
--- a/Build/source/m4/kpse-common.m4
+++ b/Build/source/m4/kpse-common.m4
@@ -116,17 +116,17 @@ else
AS_TR_CPP($1)[_RULE='# Rebuild lib$2
$(]AS_TR_CPP($1)[_DEPEND):]m4_ifval([$7],
[[ $7]])m4_ifval([$8], [[ $8
- cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS)
+ cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild
$8:]])[
- cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS)']],
+ cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']],
[AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \
-e 's,BLD/,${top_builddir}/../../,g'`]
AS_TR_CPP($1)[_RULE='# Rebuild lib$2
$(]AS_TR_CPP($1)[_DEPEND):]m4_ifval([$7],
[[ $7]])m4_ifval([$8], [[ $8
- cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS)
+ cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild
$8:]])[
- cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS)']])
+ cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']])
m4_if(m4_index([ $3 ], [ tree ]), [-1],
[fi
])[]dnl m4_if
@@ -194,8 +194,8 @@ LIBS=$kpse_save_LIBS
# Add flags for LIBDIR to values of CPPFLAGS and LIBS.
AC_DEFUN([KPSE_ADD_FLAGS],
[AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl
-CPPFLAGS="$CPPFLAGS $[]AS_TR_CPP($1)_INCLUDES"
-LIBS="$[]AS_TR_CPP($1)_LIBS $LIBS"
+eval CPPFLAGS=\"$[]AS_TR_CPP($1)_INCLUDES \$CPPFLAGS\"
+eval LIBS=\"$[]AS_TR_CPP($1)_LIBS \$LIBS\"
]) # KPSE_ADD_FLAGS
# KPSE_COMMON(PACKAGE-NAME, [MORE-AUTOMAKE-OPTIONS])
@@ -208,7 +208,7 @@ AC_DEFUN([KPSE_COMMON],
[dnl Remember PACKAGE-NAME as Kpse_Package (for future messages)
m4_define([Kpse_Package], [$1])
dnl
-AM_INIT_AUTOMAKE([foreign dist-bzip2]m4_ifval([$2], [ $2]))
+AM_INIT_AUTOMAKE([foreign]m4_ifval([$2], [ $2]))
AM_MAINTAINER_MODE
dnl
LT_PREREQ([2.2.6])
@@ -227,7 +227,7 @@ dnl Replacement functions that may be required on ancient broken system.
AC_CHECK_FUNCS([putenv strcasecmp strtol strstr])
dnl
dnl More common functions
-AC_CHECK_FUNCS([bcmp bcopy bzero getcwd getwd index memcmp memcpy rindex strchr strrchr])
+AC_CHECK_FUNCS([bcmp bcopy bzero getcwd getwd index memcmp memcpy mkstemp mktemp rindex strchr strrchr])
dnl
AC_C_CONST
AC_C_INLINE
@@ -254,7 +254,7 @@ AC_CACHE_CHECK([whether program_invocation_name is predefined],
program_invocation_name = "love";]])],
[kb_cv_var_program_inv_name=yes],
[kb_cv_var_program_inv_name=no])])
-if test "$kb_cv_var_program_inv_name" = yes; then
+if test "x$kb_cv_var_program_inv_name" = xyes; then
AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], 1,
[Define to 1 if you are using GNU libc or otherwise have global variables
`program_invocation_name' and `program_invocation_short_name'.])
@@ -264,22 +264,6 @@ dnl Enable flags for compiler warnings
KPSE_COMPILER_WARNINGS
]) # KPSE_COMMON
-# KPSE_MSG_ERROR(PACKAGE, ERROR, [EXIT-STATUS = 1])
-# -------------------------------------------------
-# Same as AC_MSG_ERROR(ERROR, EXIT-STATUS), except when building this
-# package PACKAGE has been disabled.
-#
-# The new (2009) TL build system requires all directories to be configured
-# for the benefit of 'dist*' Make targets. When building PACKAGE has been
-# disabled, configuring that package must not fail because building required
-# libraries from the TL tree has been disabled as a consequence.
-AC_DEFUN([KPSE_MSG_ERROR],
-[AS_IF([test "x$enable_build" = xno],
- [AC_MSG_WARN([building $1 has been disabled and would fail because
-$2])],
- [AC_MSG_ERROR([$2], m4_default([$3], 1))])
-]) # KPSE_MSG_ERROR
-
# KPSE_MSG_WARN(PROBLEM)
# ----------------------
# Same as AC_MSG_WARN, but terminate if `--disable-missing' was given.
@@ -308,3 +292,13 @@ AC_DEFUN([_KPSE_CHECK_PKG_CONFIG],
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl
]) # _KPSE_CHECK_PKG_CONFIG
+# KPSE_CANONICAL_HOST
+# -------------------
+# Require both --host and --build for cross compilations; set kpse_build_alias.
+AC_DEFUN([KPSE_CANONICAL_HOST],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AS_IF([test "x$host_alias" != x && test "x$build_alias" = x],
+ [AC_MSG_ERROR([when cross-compiling you must specify both --host and --build.])])
+eval kpse_build_alias=\${build_alias-$build}
+]) # KPSE_CANONICAL_HOST
+
diff --git a/Build/source/m4/kpse-cxx-hack.m4 b/Build/source/m4/kpse-cxx-hack.m4
index 8c2aed17a77..75a3ac89956 100644
--- a/Build/source/m4/kpse-cxx-hack.m4
+++ b/Build/source/m4/kpse-cxx-hack.m4
@@ -27,8 +27,8 @@ AC_DEFUN([KPSE_ENABLE_CXX_HACK],
# by Libtool when linking progams (but not shared libraries).
#
AC_DEFUN([KPSE_CXX_HACK],
-[AC_REQUIRE([AC_PROG_CXX])[]dnl
-AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_REQUIRE([AC_PROG_CXX])[]dnl
AC_REQUIRE([KPSE_ENABLE_CXX_HACK])[]dnl
if test "x$GXX:$enable_cxx_runtime_hack" = xyes:yes; then
_KPSE_CXX_HACK
diff --git a/Build/source/m4/kpse-freetype2-flags.m4 b/Build/source/m4/kpse-freetype2-flags.m4
index 90b71a45fa4..2e34d78d28e 100644
--- a/Build/source/m4/kpse-freetype2-flags.m4
+++ b/Build/source/m4/kpse-freetype2-flags.m4
@@ -9,7 +9,7 @@
# KPSE_FREETYPE2_FLAGS
# --------------------
-# Provide the configure options '--with-system-freetype2' (if in the TL tree).
+# Provide the configure option '--with-system-freetype2' (if in the TL tree).
#
# Set the make variables FREETYPE2_INCLUDES and FREETYPE2_LIBS to the CPPFLAGS and
# LIBS required for the `-lfreetype' library in libs/freetype2/ of the TL tree.
@@ -19,8 +19,8 @@ AC_REQUIRE([_KPSE_CHECK_FT2_CONFIG])[]dnl
_KPSE_LIB_FLAGS([freetype2], [freetype], [],
[BLD/libs/freetype2],
[BLD/libs/freetype2/libfreetype.a],
- [FREETYPE2_LIBS=`cat $FREETYPE2_INCLUDES/ft-libs`
- FREETYPE2_INCLUDES=`cat $FREETYPE2_INCLUDES/ft-includes`],
+ [FREETYPE2_LIBS="\`cat $FREETYPE2_INCLUDES/ft-libs\`"
+ FREETYPE2_INCLUDES="\`cat $FREETYPE2_INCLUDES/ft-includes\`"],
[], [${top_builddir}/../../libs/freetype2/ft2build.h])[]dnl
]) # KPSE_FREETYPE2_FLAGS
diff --git a/Build/source/m4/kpse-graphite-flags.m4 b/Build/source/m4/kpse-graphite-flags.m4
index 443a1958dfe..cb012ccf265 100644
--- a/Build/source/m4/kpse-graphite-flags.m4
+++ b/Build/source/m4/kpse-graphite-flags.m4
@@ -9,22 +9,35 @@
# KPSE_GRAPHITE_FLAGS
# -------------------
-# Provide the configure options '--with-system-graphite' (if in the TL tree),
-# '--with-graphite-includes', and '--with-graphite-libdir'.
+# Provide the configure option '--with-system-graphite' (if in the TL tree).
#
# Set the make variables GRAPHITE_INCLUDES and GRAPHITE_LIBS to the CPPFLAGS
# and LIBS required for the `-lgraphite' library in libs/graphite/ of the TL tree.
AC_DEFUN([KPSE_GRAPHITE_FLAGS],
[AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
_KPSE_LIB_FLAGS([graphite], [graphite], [],
- [-ISRC/libs/graphite/include], [BLD/libs/graphite/libgraphite.a], [],
- [], [])[]dnl
+ [-IBLD/libs/graphite/include], [BLD/libs/graphite/libgraphite.a], [],
+ [], [${top_builddir}/../../libs/graphite/include/graphite/GrClient.h])[]dnl
]) # KPSE_GRAPHITE_FLAGS
# KPSE_GRAPHITE_OPTIONS([WITH-SYSTEM])
# ------------------------------------
-AC_DEFUN([KPSE_GRAPHITE_OPTIONS], [_KPSE_LIB_OPTIONS([graphite], [$1])])
+AC_DEFUN([KPSE_GRAPHITE_OPTIONS],
+[m4_ifval([$1],
+ [AC_ARG_WITH([system-graphite],
+ AS_HELP_STRING([--with-system-graphite],
+ [use installed silgraphite headers and library
+ (requires pkg-config)]))])[]dnl
+]) # KPSE_GRAPHITE_OPTIONS
# KPSE_GRAPHITE_SYSTEM_FLAGS
# --------------------------
-AC_DEFUN([KPSE_GRAPHITE_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([graphite], [graphite])])
+AC_DEFUN([KPSE_GRAPHITE_SYSTEM_FLAGS],
+[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+if $PKG_CONFIG silgraphite --atleast-version=2.3; then
+ GRAPHITE_INCLUDES="`$PKG_CONFIG silgraphite --cflags`"
+ GRAPHITE_LIBS=`$PKG_CONFIG silgraphite --libs`
+elif test "x$need_graphite:$with_system_graphite" = 'xyes:yes'; then
+ AC_MSG_ERROR([did not find silgraphite 2.3 or better])
+fi
+]) # KPSE_GRAPHITE_SYSTEM_FLAGS
diff --git a/Build/source/m4/kpse-icu-flags.m4 b/Build/source/m4/kpse-icu-flags.m4
index 7377f9a1338..090ba787b57 100644
--- a/Build/source/m4/kpse-icu-flags.m4
+++ b/Build/source/m4/kpse-icu-flags.m4
@@ -7,15 +7,70 @@
# serial 0
-# KPSE_ICU_FLAGS
-# --------------
-# Set the make variables ICU_INCLUDES and ICU_LIBS to
-# the CPPFLAGS and LIBS required for the icu-xetex libraries in
-# libs/icu/ of the TL tree.
+# KPSE_ICU_FLAGS([MORE-ICU-LIBS], [ICU_CONFIG_ARGS])
+# --------------------------------------------------
+# Provide the configure option '--with-system-icu' (if in the TL tree).
+#
+# ICU_CONFIG_ARGS: icu-config arguments for additional icu libraries.
+#
+# Set the make variables ICU_INCLUDES and ICU_LIBS to the CPPFLAGS and
+# LIBS required for the icu libraries in libs/icu/ of the TL tree.
AC_DEFUN([KPSE_ICU_FLAGS],
-[_KPSE_LIB_FLAGS([icu], [sicuxxx], [tree],
- [-IBLD/libs/icu/icu-build/common -ISRC/libs/icu/icu-xetex/common -ISRC/libs/icu/icu-xetex/layout],
- [BLD/libs/icu/icu-build/lib/libsicuuc.a BLD/libs/icu/icu-build/lib/libsicule.a BLD/libs/icu/icu-build/lib/libsicudata.a],
- [],
- [], [${top_builddir}/../../libs/icu/icu-build/common/unicode/platform.h])[]dnl
+[m4_pushdef([kpse_icu_config_args], [$2])[]dnl
+_KPSE_ICU_FLAGS([icuxxx], [], [$1])[]dnl
+m4_popdef([kpse_icu_config_args])[]dnl
]) # KPSE_ICU_FLAGS
+
+# KPSE_ICU_XETEX_FLAGS([MORE-ICU-LIBS])
+# -------------------------------------
+# Set the make variables ICU_INCLUDES and ICU_LIBS to the CPPFLAGS and
+# LIBS required for the icu-xetex libraries in libs/icu/ of the TL tree.
+AC_DEFUN([KPSE_ICU_XETEX_FLAGS],
+[_KPSE_ICU_FLAGS([sicuxxx], [tree], [$1])[]dnl
+]) # KPSE_ICU_XETEX_FLAGS
+
+# _KPSE_ICU_FLAGS(LIBNAME, OPTIONS, [MORE-ICU-LIBS])
+# --------------------------------------------------
+# Internal subroutine.
+#
+# LIBNAME and OPTIONS as for _KPSE_LIB_FLAGS().
+# MORE-ICU-LIBS: icu libraries from the TL in addition to icuuc and icudata.
+m4_define([_KPSE_ICU_FLAGS],
+[_KPSE_LIB_FLAGS([icu], [$1], [$2],
+ [-DU_STATIC_IMPLEMENTATION -IBLD/libs/icu/icu-incl],
+ m4_bpatsubst([$3 icuuc icudata],
+ [icu\([18a-z]*\)],
+ [BLD/libs/icu/icu-build/lib/libsicu\1.a]),
+ [],
+ [], [${top_builddir}/../../libs/icu/icu-incl/unicode/uversion.h])[]dnl
+]) # _KPSE_ICU_FLAGS
+
+# KPSE_ICU_OPTIONS([WITH-SYSTEM])
+# -------------------------------
+AC_DEFUN([KPSE_ICU_OPTIONS],
+[m4_ifval([$1],
+ [AC_ARG_WITH([system-icu],
+ AS_HELP_STRING([--with-system-icu],
+ [use installed ICU headers and libraries (requires icu-config, not for XeTeX)]))])[]dnl
+]) # KPSE_ICU_OPTIONS
+
+# KPSE_ICU_SYSTEM_FLAGS
+# ---------------------
+AC_DEFUN([KPSE_ICU_SYSTEM_FLAGS],
+[AC_REQUIRE([_KPSE_CHECK_ICU_CONFIG])[]dnl
+if $ICU_CONFIG --version >/dev/null 2>&1; then
+ ICU_INCLUDES=`$ICU_CONFIG --cppflags`
+ ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath m4_ifset([kpse_icu_config_args],
+ [kpse_icu_config_args] )--ldflags-libsonly --ldflags-system`
+elif test "x$need_icu:$with_system_icu" = 'xyes:yes'; then
+ AC_MSG_ERROR([did not find icu-config required for system icu libraries])
+fi
+]) # KPSE_ICU_SYSTEM_FLAGS
+
+# _KPSE_CHECK_ICU_CONFIG
+# ----------------------
+# Check for icu-config
+AC_DEFUN([_KPSE_CHECK_ICU_CONFIG],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_CHECK_TOOL([ICU_CONFIG], [icu-config], [false])[]dnl
+]) # _KPSE_CHECK_ICU_CONFIG
diff --git a/Build/source/m4/kpse-kpathsea-flags.m4 b/Build/source/m4/kpse-kpathsea-flags.m4
index 1fde7db3531..cd988a6a1aa 100644
--- a/Build/source/m4/kpse-kpathsea-flags.m4
+++ b/Build/source/m4/kpse-kpathsea-flags.m4
@@ -18,7 +18,7 @@ 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])[]dnl
+ [${top_builddir}/../kpathsea/paths.h])
]) # KPSE_KPATHSEA_FLAGS
# KPSE_KPATHSEA_OPTIONS([WITH-SYSTEM])
@@ -40,7 +40,7 @@ AC_DEFUN([KPSE_CHECK_KPSE_FORMAT],
[[kpse_$1_format]])],
[kpse_cv_have_$1_format=yes],
[kpse_cv_have_$1_format=no])])
-AS_IF([test "x$kpse_cv_have_$1_format" = xyes], [$2], [$3])[]dnl
+AS_IF([test "x$kpse_cv_have_$1_format" = xyes], [$2], [$3])
]) # KPSE_CHECK_KPSE_FORMAT
# KPSE_CHECK_XBASENAME([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
diff --git a/Build/source/m4/kpse-macos-framework.m4 b/Build/source/m4/kpse-macos-framework.m4
index 9013c1fffe4..c4a67839453 100644
--- a/Build/source/m4/kpse-macos-framework.m4
+++ b/Build/source/m4/kpse-macos-framework.m4
@@ -21,5 +21,5 @@ AC_DEFUN([KPSE_CHECK_FRAMEWORK],
[kpse_cv_have_$1=no])])
AS_IF([test "x$kpse_cv_have_$1" = xyes],
[AC_DEFINE([HAVE_]AS_TR_CPP([$1]), 1,
- [Define to 1 if you have the Mac OS X $1 framework.])])[]dnl
+ [Define to 1 if you have the Mac OS X $1 framework.])])
]) # KPSE_CHECK_FRAMEWORK
diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4
index 9d89550fc1f..384d4e54485 100644
--- a/Build/source/m4/kpse-pkgs.m4
+++ b/Build/source/m4/kpse-pkgs.m4
@@ -48,6 +48,7 @@ AC_REQUIRE([KPSE_GD_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_XPDF_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_GRAPHITE_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_TECKIT_SYSTEM_FLAGS])[]dnl
+AC_REQUIRE([KPSE_ICU_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_KPATHSEA_SYSTEM_FLAGS])[]dnl
]) # KPSE_ALL_SYSTEM_FLAGS
@@ -75,6 +76,7 @@ AC_DEFUN([KPSE_TEXK_PKGS],
web2c
afm2pl
bibtex8
+bibtexu
cjkutils
detex
devnag
diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4
index a43d3ebfd28..fee70acb7cf 100644
--- a/Build/source/m4/kpse-setup.m4
+++ b/Build/source/m4/kpse-setup.m4
@@ -153,29 +153,30 @@ AC_FOREACH([Kpse_Lib], [$2], [ need_[]AS_TR_SH(Kpse_Lib)=yes
# Initialize the list of potential system libraries.
m4_define([kpse_syslib_pkgs], [])
-# KPSE_CHECK_LIB(LIB, REQUIRED-FUNCTION..., REQUIRED-HEADER...)
-# -------------------------------------------------------------
+# KPSE_TRY_LIB(LIB, PROLOGUE, BODY)
+# ---------------------------------
# When the user requests to use an installed version of a required library,
# check that the flags derived from --with-LIB-includes and --with-LIB-libdir
-# provide the required functions and headers.
-AC_DEFUN([KPSE_CHECK_LIB],
+# or determined otherwise provide the required functionality.
+AC_DEFUN([KPSE_TRY_LIB],
[if test "x$need_[]AS_TR_SH($1):$with_system_[]AS_TR_SH($1)" = 'xyes:yes'; then
- AC_MSG_NOTICE([checking requested system `$1' library...])
+ AC_MSG_CHECKING([requested system `$1' library])
CPPFLAGS="$AS_TR_CPP($1)_INCLUDES $CPPFLAGS"
LIBS="$AS_TR_CPP($1)_LIBS $LIBS"
- AC_CHECK_FUNCS([$2], , [syslib_status=no])
- AC_CHECK_HEADERS([$3], , [syslib_status=no])
- syslib_used=yes
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],
+ [syslib_used=yes kpse_res=ok],
+ [syslib_status=no kpse_res=failed])
+ AC_MSG_RESULT([$kpse_res])
fi
-]) # KPSE_CHECK_LIB
+]) # KPSE_TRY_LIB
-# KPSE_CHECK_LIBXX(LIB, REQUIRED-FUNCTION..., REQUIRED-HEADER...)
-# -------------------------------------------------------------
+# KPSE_TRY_LIBXX(LIB, PROLOGUE, BODY)
+# -----------------------------------
# As above, but for C++.
-AC_DEFUN([KPSE_CHECK_LIBXX],
+AC_DEFUN([KPSE_TRY_LIBXX],
[AC_REQUIRE([AC_PROG_CXX])[]dnl
AC_LANG_PUSH([C++])[]dnl
-KPSE_CHECK_LIB($@)[]dnl
+KPSE_TRY_LIB($@)[]dnl
AC_LANG_POP([C++])[]dnl
-]) # KPSE_CHECK_LIBXX
+]) # KPSE_TRY_LIBXX
diff --git a/Build/source/m4/kpse-teckit-flags.m4 b/Build/source/m4/kpse-teckit-flags.m4
index cd748a5d5e4..d0e225ac9d2 100644
--- a/Build/source/m4/kpse-teckit-flags.m4
+++ b/Build/source/m4/kpse-teckit-flags.m4
@@ -17,8 +17,8 @@
AC_DEFUN([KPSE_TECKIT_FLAGS],
[AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
_KPSE_LIB_FLAGS([teckit], [TECkit], [],
- [-ISRC/libs/teckit/source/Public-headers], [BLD/libs/teckit/libTECkit.a], [],
- [], [])[]dnl
+ [-IBLD/libs/teckit/teckit], [BLD/libs/teckit/libTECkit.a], [],
+ [], [${top_builddir}/../../libs/teckit/teckit/TECkit_Common.h])[]dnl
]) # KPSE_TECKIT_FLAGS
# KPSE_TECKIT_OPTIONS([WITH-SYSTEM])
diff --git a/Build/source/m4/kpse-warnings.m4 b/Build/source/m4/kpse-warnings.m4
index 406f3dd9a4e..1eab00b5425 100644
--- a/Build/source/m4/kpse-warnings.m4
+++ b/Build/source/m4/kpse-warnings.m4
@@ -15,77 +15,60 @@
# them a Makefile.am must use them, e.g., in AM_CFLAGS or AM_CXXFLAGS.
AC_DEFUN([KPSE_COMPILER_WARNINGS],
[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
-KPSE_WARNING_CFLAGS
-dnl arrange that AC_PROG_CXX uses _KPSE_WARNING_CXXFLAGS.
+dnl arrange that AC_PROG_CC uses _KPSE_WARNING_CFLAGS etc.
+AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_KPSE_WARNING_CFLAGS],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_KPSE_WARNING_CFLAGS])])
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_KPSE_WARNING_CXXFLAGS],
[m4_define([AC_PROG_CXX],
m4_defn([AC_PROG_CXX])[_KPSE_WARNING_CXXFLAGS])])
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_KPSE_WARNING_OBJCFLAGS],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_KPSE_WARNING_OBJCFLAGS])])
]) # KPSE_COMPILER_WARNINGS
-KPSE_WARNING_CFLAGS
-# -----------------
-# Determine and substitute WARNING_CFLAGS for C compiler.
-AC_DEFUN([KPSE_WARNING_CFLAGS],
-[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
-AC_REQUIRE([AC_PROG_CC])[]dnl
-AC_CACHE_CHECK([what warning flags to pass to the C compiler],
- [kpse_cv_warning_cflags],
- [dnl
-if test "x$enable_compiler_warnings" = xno; then
- kpse_cv_warning_cflags=
-elif test "x$GCC" = xyes; then
- kpse_cv_warning_cflags="-Wall -Wunused"
- AS_CASE([`$CC -dumpversion`],
- [3.4.* | 4.*],
- [kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement"])
- AS_CASE([`$CC -dumpversion`],
- [3.@<:@234@:>@.* | 4.*],
- [kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas"])
- if test "x$enable_compiler_warnings" != xmin; then
- kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations"
- if test "x$enable_compiler_warnings" != xyes; then
- kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type"
- kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith"
- kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings"
- AS_CASE([`$CC -dumpversion`],
- [3.4.* | 4.*],
- [kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition"])
- fi
- fi
-else
- : # FIXME: warning flags for non-gcc compilers
-fi])
-WARNING_CFLAGS=$kpse_cv_warning_cflags
-AC_SUBST([WARNING_CFLAGS])
-]) # KPSE_WARNING_CFLAGS
-
-# KPSE_WARNING_CXXFLAGS
-# ---------------------
-# Determine and substitute WARNING_CXXFLAGS for C++ compiler.
-AC_DEFUN([KPSE_WARNING_CXXFLAGS],
-[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
-AC_REQUIRE([AC_PROG_CXX])[]dnl
-_KPSE_WARNING_CXXFLAGS
-]) # KPSE_WARNING_CXXFLAGS
-
# _KPSE_COMPILER_WARNINGS_OPTION
# ------------------------------
# Internal subroutine.
-# Provide configure option `--enable-compiler-warnings=[no|min|yes|max]'
+# Provide configure option `--enable-compiler-warnings=[no|min|yes|max|all]'
# to enable various degrees of compiler warnings.
AC_DEFUN([_KPSE_COMPILER_WARNINGS_OPTION],
[AC_ARG_ENABLE([compiler-warnings],
- AS_HELP_STRING([--enable-compiler-warnings=@<:@no|min|yes|max@:>@],
+ AS_HELP_STRING([--enable-compiler-warnings=@<:@no|min|yes|max|all@:>@],
[Turn on compiler warnings @<:@default: yes if maintainer-mode,
min otherwise@:>@]))[]dnl
AS_CASE([$enable_compiler_warnings],
- [no | min | yes | max], [],
+ [no | min | yes | max | all], [],
[AS_IF([test "x$enable_maintainer_mode" = xyes],
[enable_compiler_warnings=yes],
[enable_compiler_warnings=min])])
]) # _KPSE_COMPILER_WARNINGS_OPTION
+_KPSE_WARNING_CFLAGS
+# ------------------
+# Internal subroutine.
+# Determine and substitute WARNING_CFLAGS for C compiler.
+AC_DEFUN([_KPSE_WARNING_CFLAGS],
+[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
+AC_REQUIRE([AC_PROG_CC])[]dnl
+AC_CACHE_CHECK([what warning flags to pass to the C compiler],
+ [kpse_cv_warning_cflags],
+ [dnl
+if test "x$enable_compiler_warnings" = xno; then
+ kpse_cv_warning_cflags=
+elif test "x$GCC" = xyes; then
+ _KPSE_WARNING_GNU_CFLAGS([CC], [cflags])[]dnl
+else
+ : # FIXME: warning flags for non-GNU C compilers
+fi])
+WARNING_CFLAGS=$kpse_cv_warning_cflags
+AC_SUBST([WARNING_CFLAGS])
+m4_define([_KPSE_WARNING_CFLAGS], [])[]dnl
+]) # _KPSE_WARNING_CFLAGS
+
# _KPSE_WARNING_CXXFLAGS
# ----------------------
# Internal subroutine.
@@ -97,22 +80,83 @@ m4_define([_KPSE_WARNING_CXXFLAGS],
if test "x$enable_compiler_warnings" = xno; then
kpse_cv_warning_cxxflags=
elif test "x$GXX" = xyes; then
- kpse_cv_warning_cxxflags="-Wall -Wunused"
- AS_CASE([`$CXX -dumpversion`],
- [3.@<:@234@:>@.* | 4.*],
- [kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wno-unknown-pragmas"])
- if test "x$enable_compiler_warnings" != xmin; then
- if test "x$enable_compiler_warnings" != xyes; then
- kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wimplicit -Wparentheses -Wreturn-type"
- kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith"
- kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wcast-qual -Wcast-align -Wwrite-strings"
- fi
- fi
+ _KPSE_WARNING_GNU_CXXFLAGS([CXX], [cxxflags])[]dnl
else
- : # FIXME: warning flags for non-g++ compilers
+ : # FIXME: warning flags for non-GNU C++ compilers
fi])
WARNING_CXXFLAGS=$kpse_cv_warning_cxxflags
AC_SUBST([WARNING_CXXFLAGS])
m4_define([_KPSE_WARNING_CXXFLAGS], [])[]dnl
]) # _KPSE_WARNING_CXXFLAGS
+_KPSE_WARNING_OBJCFLAGS
+# ---------------------
+# Internal subroutine.
+# Determine and substitute WARNING_OBJCFLAGS for Objective C compiler.
+AC_DEFUN([_KPSE_WARNING_OBJCFLAGS],
+[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
+AC_REQUIRE([AC_PROG_OBJC])[]dnl
+AC_CACHE_CHECK([what warning flags to pass to the Objective C compiler],
+ [kpse_cv_warning_objcflags],
+ [dnl
+if test "x$enable_compiler_warnings" = xno; then
+ kpse_cv_warning_objcflags=
+elif test "x$GOBJC" = xyes; then
+ _KPSE_WARNING_GNU_CFLAGS([OBJC], [objcflags])[]dnl
+else
+ : # FIXME: warning flags for non-GNU C compilers
+fi])
+WARNING_OBJCFLAGS=$kpse_cv_warning_objcflags
+AC_SUBST([WARNING_OBJCFLAGS])
+m4_define([_KPSE_WARNING_OBJCFLAGS], [])[]dnl
+]) # _KPSE_WARNING_OBJCFLAGS
+
+# _KPSE_WARNING_GNU_CFLAGS(COMPILER, TAG)
+# ---------------------------------------
+# Internal subroutine.
+# Determine warning flags for GNU (Objective) C compiler.
+m4_define([_KPSE_WARNING_GNU_CFLAGS],
+[kpse_cv_warning_$2="-Wall -Wunused"
+AS_CASE([`$[]$1 -dumpversion`],
+ [3.4.* | 4.*],
+ [kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wdeclaration-after-statement"])
+AS_CASE([`$[]$1 -dumpversion`],
+ [3.@<:@234@:>@.* | 4.*],
+ [kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wno-unknown-pragmas"])
+if test "x$enable_compiler_warnings" != xmin; then
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wmissing-prototypes -Wmissing-declarations"
+ if test "x$enable_compiler_warnings" != xyes; then
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wimplicit -Wparentheses -Wreturn-type"
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wswitch -Wtrigraphs -Wpointer-arith"
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wcast-qual -Wcast-align -Wwrite-strings"
+ AS_CASE([`$[]$1 -dumpversion`],
+ [3.4.* | 4.*],
+ [kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wold-style-definition"])
+ if test "x$enable_compiler_warnings" != xmax; then
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wshadow"
+ fi
+ fi
+fi
+]) # _KPSE_WARNING_GNU_CFLAGS
+
+# _KPSE_WARNING_GNU_CXXFLAGS(COMPILER, TAG)
+# -----------------------------------------
+# Internal subroutine.
+# Determine warning flags for GNU (Objective) C++ compiler.
+m4_define([_KPSE_WARNING_GNU_CXXFLAGS],
+[kpse_cv_warning_$2="-Wall -Wunused"
+AS_CASE([`$[]$1 -dumpversion`],
+ [3.@<:@234@:>@.* | 4.*],
+ [kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wno-unknown-pragmas"])
+if test "x$enable_compiler_warnings" != xmin; then
+ if test "x$enable_compiler_warnings" != xyes; then
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wimplicit -Wparentheses -Wreturn-type"
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wswitch -Wtrigraphs -Wpointer-arith"
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wcast-qual -Wcast-align -Wwrite-strings"
+ fi
+ if test "x$enable_compiler_warnings" != xmax; then
+ kpse_cv_warning_$2="$kpse_cv_warning_$2 -Wshadow"
+ fi
+fi
+]) # _KPSE_WARNING_GNU_CXXFLAGS
+
diff --git a/Build/source/m4/kpse-web2c.m4 b/Build/source/m4/kpse-web2c.m4
index b658ddf4ef1..7f73ea92e0c 100644
--- a/Build/source/m4/kpse-web2c.m4
+++ b/Build/source/m4/kpse-web2c.m4
@@ -22,7 +22,7 @@ m4_define([KPSE_WITH_MKTEX],
[do not ])[run $1 if $3 missing],
kpse_indent_26+2))[]dnl
AS_CASE([$enable_$1_default], [yes|no], ,
- [enable_$1_default=$2])[]dnl
+ [enable_$1_default=$2])
]) # KPSE_WITH_MKTEX
# KPSE_MKTEX_DEFINE(PROG, YES-OR-NO, TEXT, STEM)
@@ -33,7 +33,7 @@ m4_define([KPSE_MKTEX_DEFINE],
[AC_DEFINE([MAKE_$4_BY_DEFAULT], 1,
[Define to 1 if you want to run $1 if $3 is missing,
and to 0 if you don't])],
- [AC_DEFINE([MAKE_$4_BY_DEFAULT], 0)])[]dnl
+ [AC_DEFINE([MAKE_$4_BY_DEFAULT], 0)])
]) # KPSE_MKTEX_DEFINE
# KPSE_WITH_XTEX(PROG, BUILD-OR-NO, SYNC-OR-NO, TEXT, REQUIRED-LIBS)
@@ -46,7 +46,7 @@ m4_define([KPSE_WITH_XTEX],
[do not ])[compile and install $4],
kpse_indent_26+2))[]dnl
AS_CASE([$enable_$1], [yes|no], ,
- [enable_$1=$2])[]dnl
+ [enable_$1=$2])
m4_ifval([$5], [
test "x$enable_web2c:$enable_$1" = xyes:yes && {
AC_FOREACH([Kpse_Lib], [$5], [ need_[]AS_TR_SH(Kpse_Lib)=yes
@@ -78,5 +78,5 @@ m4_define([KPSE_WITH_MFWIN],
m4_define([KPSE_MFWIN_DEFINE],
[AS_IF([test "x$enable_$1win" = xyes],
[AC_DEFINE([$2WIN], ,
- [metafont: Define to include $3 window support.])])[]dnl
+ [metafont: Define to include $3 window support.])])
]) # KPSE_MFWIN_DEFINE
diff --git a/Build/source/m4/kpse-xpdf-flags.m4 b/Build/source/m4/kpse-xpdf-flags.m4
index 3591464133c..680c41baad8 100644
--- a/Build/source/m4/kpse-xpdf-flags.m4
+++ b/Build/source/m4/kpse-xpdf-flags.m4
@@ -9,6 +9,8 @@
# KPSE_XPDF_FLAGS
# ---------------
+# Provide the configure option '--with-system-xpdf' (if in the TL tree).
+#
# Set the make variables XPDF_INCLUDES and XPDF_LIBS to the CPPFLAGS and
# LIBS required for the `-lxpdf' library in libs/xpdf/ of the TL tree.
AC_DEFUN([KPSE_XPDF_FLAGS],
diff --git a/Build/source/m4/maw-time.m4 b/Build/source/m4/maw-time.m4
deleted file mode 100644
index faf96e20d36..00000000000
--- a/Build/source/m4/maw-time.m4
+++ /dev/null
@@ -1,34 +0,0 @@
-# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
-# Kettering University
-# Copyright (C) 2008 - 2009 Peter Breitenlohner <tex-live@tug.org>
-#
-# This file is free software; the copyright holders
-# give unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# MAW_EXT_TIMEZONE
-# ----------------
-AC_DEFUN([MAW_EXT_TIMEZONE],
-[AC_CACHE_CHECK([whether time.h defines timezone as an external variable],
- [maw_cv_ext_timezone],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
- [[-timezone;]])],
- [maw_cv_ext_timezone=yes],
- [maw_cv_ext_timezone=no])])
-AS_IF([test "x$maw_cv_ext_timezone" = xyes],
- [AC_DEFINE([HAVE_TIMEZONE], 1,
- [Define if <time.h> has timezone as an external variable.])])
-])# MAW_EXT_TIMEZONE
-
-# MAW_TM_HAS_TM_GMTOFF
-# --------------------
-AC_DEFUN([MAW_TM_HAS_TM_GMTOFF],
-[AC_CHECK_MEMBER([struct tm.tm_gmtoff],
- [AC_DEFINE([HAVE_TM_GMTOFF], 1,
- [Define if struct tm has tm_gmtoff as a member.])], ,
- [[#include <time.h>]])
-])# MAW_TM_HAS_TM_GMTOFF
-