summaryrefslogtreecommitdiff
path: root/Build/source/m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-04-20 18:13:48 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-04-20 18:13:48 +0000
commite5786f530f9555469c01435f86039b06aa53feba (patch)
treec868e8d32282422d7d445b729db95c3fcdafb6d0 /Build/source/m4
parentebaa1768b43c8606d923d2e861b5286b74207b3e (diff)
new build system: build icu libs and xetex plus misc updates
git-svn-id: svn://tug.org/texlive/trunk@12759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r--Build/source/m4/README33
-rw-r--r--Build/source/m4/cho-kpse.m46
-rw-r--r--Build/source/m4/cho-libs.m43
-rw-r--r--Build/source/m4/kpse-common.m416
-rw-r--r--Build/source/m4/kpse-cxx-hack.m41
-rw-r--r--Build/source/m4/kpse-fontconfig-flags.m449
-rw-r--r--Build/source/m4/kpse-icu-flags.m421
-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.m44
-rw-r--r--Build/source/m4/kpse-web2c.m48
11 files changed, 119 insertions, 26 deletions
diff --git a/Build/source/m4/README b/Build/source/m4/README
index 310caf5fca2..ee5af011a98 100644
--- a/Build/source/m4/README
+++ b/Build/source/m4/README
@@ -1,28 +1,31 @@
+Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+You may freely use, modify and/or distribute this file.
+
This directory is the central repository for Autoconf macros needed to build
the teTeX / TeX Live (TL) tree.
-(1) `Public' macros such as libtool.m4 used to build the libraries and
+(1) Public macros such as libtool.m4 used to build the libraries and
programs in the TL subdirectories libs/*/, utils/*/, and texk/*/ that are
-owned by the TL tree (i.e., either not maintained independently or with a
-proxy Makefile.am using an unmodified source tree and bypassing the original
-build system).
+owned by the TL tree, i.e., either not maintained independently or with a
+proxy Makefile.am using an (almost) unmodified source tree and bypassing the
+original build system.
Note: the files libtool.m4 and ../build-aux/ltmain.sh must match.
-(2) `Private' macros for the TL infrastructure, used in directories owned
-by the TL tree.
+(2) `Public' macros for the TL build system and for the TL libraries in the
+subdirectories libs/*/ and texk/kpathsea/, used to configure programs and
+other libraries requiring these TL libraries. The macros are designed with
+the aim that programs maintained independently can be built as part of the
+TL tree or without TL (using installed versions of the required libraries),
+ideally using the same unmodified sources.
+
+(3) `Private' macros for the TL infrastructure, only used in directories
+owned by the TL tree.
-kpse-pkgs.m4: defines lists of subdirectories libs/LIB/, utils/PROG/, and
- tex/PROG/ with libraries and programs that can be built as part of
+kpse-pkgs.m4: defines lists of subdirectories libs/Lib/, utils/Util/, and
+ tex/Prog/ with libraries and programs that can be built as part of
the TL tree.
kpse-setup.m4: macros that recurse through these lists to provide configure
options. They depend on configure fragments */*/ac/withenable.ac
defining the dependencies between these libraries and programs.
-(3) `Public' macros for the TL libraries in the subdirectories libs/*/ and
-texk/kpathsea/, used to configure programs and other libraries requiring
-these TL libraries. The macros are designed with the aim that programs
-maintained independently can be built as part of the TL tree or without TL
-(using installed versions of the required libraries), ideally using the same
-unmodified sources.
-
diff --git a/Build/source/m4/cho-kpse.m4 b/Build/source/m4/cho-kpse.m4
index 6c6014d9e45..34ea0ff1e37 100644
--- a/Build/source/m4/cho-kpse.m4
+++ b/Build/source/m4/cho-kpse.m4
@@ -15,7 +15,8 @@
# of these truetype was introduced last (Dec 1997).
AC_DEFUN([CHO_CHECK_KPSE_SUPPORT],
[KPSE_CHECK_KPSE_FORMAT([truetype], ,
- [AC_MSG_ERROR([Required file formats not found in Kpathsea header files.
+ [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
@@ -25,7 +26,8 @@ the file "kpathsea/kpathsea.h"
])])
KPSE_CHECK_XBASENAME([],
- [AC_MSG_ERROR([This version of $1 requires xbasename in libkpathsea.])])
+ [KPSE_MSG_ERROR([$1],
+ [This version of $1 requires xbasename in libkpathsea.])])
]) # CHO_CHECK_KPSE_SUPPORT
# CHO_CHECK_KPSE_TDS_VERSION
diff --git a/Build/source/m4/cho-libs.m4 b/Build/source/m4/cho-libs.m4
index 426f44660fa..fa3d6f812f2 100644
--- a/Build/source/m4/cho-libs.m4
+++ b/Build/source/m4/cho-libs.m4
@@ -107,7 +107,8 @@ 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.])])],
- [AC_MSG_ERROR([This version of $1 requires that FreeType2 and its headers be available.
+ [KPSE_MSG_ERROR([$1],
+ [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 86ab1decc8c..05386a7b70d 100644
--- a/Build/source/m4/kpse-common.m4
+++ b/Build/source/m4/kpse-common.m4
@@ -259,3 +259,19 @@ AC_DEFUN([KPSE_ADD_FLAGS],
CPPFLAGS="$CPPFLAGS $[]AS_TR_CPP($1)_INCLUDES"
LIBS="$[]AS_TR_CPP($1)_LIBS $LIBS"
]) # KPSE_ADD_FLAGS
+
+# 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
diff --git a/Build/source/m4/kpse-cxx-hack.m4 b/Build/source/m4/kpse-cxx-hack.m4
index 40a06b29385..e8fbd8533a4 100644
--- a/Build/source/m4/kpse-cxx-hack.m4
+++ b/Build/source/m4/kpse-cxx-hack.m4
@@ -29,7 +29,6 @@ AC_DEFUN([KPSE_ENABLE_CXX_HACK],
AC_DEFUN([KPSE_CXX_HACK],
[AC_REQUIRE([AC_PROG_CXX])[]dnl
AC_REQUIRE([KPSE_ENABLE_CXX_HACK])[]dnl
-cpp_link_hack=false
if test "x$GXX:$enable_cxx_runtime_hack" = xyes:yes; then
_KPSE_CXX_HACK
fi
diff --git a/Build/source/m4/kpse-fontconfig-flags.m4 b/Build/source/m4/kpse-fontconfig-flags.m4
new file mode 100644
index 00000000000..40a95bf9d25
--- /dev/null
+++ b/Build/source/m4/kpse-fontconfig-flags.m4
@@ -0,0 +1,49 @@
+# Public macros for the teTeX / TeX Live (TL) tree.
+# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 0
+
+# KPSE_FONTCONFIG_FLAGS
+# ---------------------
+# Provide the configure option '--with-fontconfig' and check for
+# installed fontconfig headers and library.
+# Check or set the cache variables kpse_cv_have_fontconfig,
+# kpse_cv_fontconfig_includes, and kpse_cv_fontconfig_libs.
+# If found set the make variables FONTCONFIG_INCLUDES and FONTCONFIG_LIBS
+# to the CPPFLAGS and LIBS required for the installed '-lfontconfig'
+# library and define HAVE_LIBFONTCONFIG.
+AC_DEFUN([KPSE_FONTCONFIG_FLAGS],
+[AC_ARG_WITH([fontconfig],
+ AS_HELP_STRING([--with-fontconfig=DIR],
+ [use fontconfig include/library files from DIR]))[]dnl
+AC_CACHE_CHECK([for installed fontconfig headers and library],
+ [kpse_cv_have_fontconfig],
+[kpse_save_CPPFLAGS=$CPPFLAGS
+kpse_save_LIBS=$LIBS
+if test "x$with_fontconfig" != x && test -d "$with_fontconfig"; then
+ kpse_cv_fontconfig_includes="-I$with_fontconfig/include"
+ kpse_cv_fontconfig_libs="-L$with_fontconfig/lib -lfontconfig"
+else
+ kpse_cv_fontconfig_includes=
+ kpse_cv_fontconfig_libs='-lfontconfig'
+fi
+CPPFLAGS="$with_fontconfig $CPPFLAGS"
+LIBS="$kpse_cv_fontconfig_libs $LIBS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <fontconfig/fontconfig.h>]],
+ [[FcObjectSet *os; FcInit();]])],
+ [kpse_cv_have_fontconfig=yes],
+ [kpse_cv_have_fontconfig=no])
+CPPFLAGS=$kpse_save_CPPFLAGS
+LIBS=$kpse_save_LIBS])
+if test "x$kpse_cv_have_fontconfig" = xyes; then
+ FONTCONFIG_INCLUDES=$kpse_cv_fontconfig_includes
+ FONTCONFIG_LIBS=$kpse_cv_fontconfig_libs
+ AC_DEFINE([HAVE_LIBFONTCONFIG], 1, [Define if you have libfontconfig.])
+fi
+AC_SUBST([FONTCONFIG_INCLUDES])
+AC_SUBST([FONTCONFIG_LIBS])
+]) # KPSE_FONTCONFIG_FLAGS
diff --git a/Build/source/m4/kpse-icu-flags.m4 b/Build/source/m4/kpse-icu-flags.m4
new file mode 100644
index 00000000000..261937388a6
--- /dev/null
+++ b/Build/source/m4/kpse-icu-flags.m4
@@ -0,0 +1,21 @@
+# Public macros for the teTeX / TeX Live (TL) tree.
+# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# 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.
+AC_DEFUN([KPSE_ICU_FLAGS],
+[_KPSE_LIB_FLAGS([icu], [sicuxxx], [],
+ [-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],
+ [tree], [],
+ [${top_builddir}/../../libs/icu/icu-build/common/unicode/platform.h])[]dnl
+]) # KPSE_ICU_FLAGS
diff --git a/Build/source/m4/kpse-macos-framework.m4 b/Build/source/m4/kpse-macos-framework.m4
index 476220b7157..d76413d96a9 100644
--- a/Build/source/m4/kpse-macos-framework.m4
+++ b/Build/source/m4/kpse-macos-framework.m4
@@ -10,6 +10,8 @@
# KPSE_CHECK_FRAMEWORK(FRAMEWORK, BODY)
# -------------------------------------
+# Check for mthe Mac OS X framework FRAMEWORK (using BODY) and if found,
+# set kpse_cv_have_FRAMEWORK to yes and define HAVE_FRAMEWORK.
AC_DEFUN([KPSE_CHECK_FRAMEWORK],
[AC_CACHE_CHECK([for Mac OS X $1 framework],
[kpse_cv_have_$1],
diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4
index 328ece77abd..27ac4c7a7db 100644
--- a/Build/source/m4/kpse-pkgs.m4
+++ b/Build/source/m4/kpse-pkgs.m4
@@ -20,6 +20,7 @@
# Each library must precede required other libraries (if any).
AC_DEFUN([KPSE_LIBS_PKGS],
[m4_define([kpse_libs_pkgs], [
+icu
teckit
graphite
xpdf
@@ -70,7 +71,6 @@ vlna
AC_DEFUN([KPSE_TEXK_PKGS],
[m4_define([kpse_texk_pkgs], [
web2c
-one
afm2pl
bibtex8
cjkutils
diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4
index 8eeb4a22a87..48097c1f9ea 100644
--- a/Build/source/m4/kpse-setup.m4
+++ b/Build/source/m4/kpse-setup.m4
@@ -13,12 +13,12 @@
# Sinclude all withenable.ac files providing:
# configure options --with-system-LIB, --with-LIB-includes, and --with-LIB-libdir
# for libraries
-# configure option --without-PKG for programs
+# configure option --disable-PKG or --enable-PKG for programs
+# additional program specific configure options (if any)
# library dependencies for programs and libraries
AC_DEFUN([KPSE_SETUP],
[m4_define([kpse_TL], [$1])[]dnl
m4_define([kpse_indent_26], [28])[]dnl
-m4_define([kpse_indent_28], [30])[]dnl
AC_ARG_ENABLE([all-pkgs],
AS_HELP_STRING([--disable-all-pkgs],
[do not build packages unless explicitly enabled]))[]dnl
diff --git a/Build/source/m4/kpse-web2c.m4 b/Build/source/m4/kpse-web2c.m4
index 831d60b0404..57d80bd9c32 100644
--- a/Build/source/m4/kpse-web2c.m4
+++ b/Build/source/m4/kpse-web2c.m4
@@ -20,7 +20,7 @@ m4_define([KPSE_WITH_MKTEX],
AS_HELP_STRING([--]m4_if($2, [yes], [dis], [en])[able-$1-default],
m4_if($2, [yes],
[do not ])[run $1 if $3 missing],
- kpse_indent_28))[]dnl
+ kpse_indent_26+2))[]dnl
AS_CASE([$enable_$1_default], [yes|no], ,
[enable_$1_default=$2])[]dnl
]) # KPSE_WITH_MKTEX
@@ -44,11 +44,11 @@ m4_define([KPSE_WITH_XTEX],
AS_HELP_STRING([--]m4_if($2, [yes], [dis], [en])[able-$1],
m4_if($2, [yes],
[do not ])[compile and install $4],
- kpse_indent_28))[]dnl
+ kpse_indent_26+2))[]dnl
AS_CASE([$enable_$1], [yes|no], ,
[enable_$1=$2])[]dnl
m4_ifval([$5], [
-test "x$enable_$1" = xno || {
+test "x$enable_web2c:$enable_$1" = xyes:yes && {
AC_FOREACH([Kpse_Lib], [$5], [ need_[]AS_TR_SH(Kpse_Lib)=yes
])}
])[]dnl m4_ifval
@@ -69,7 +69,7 @@ m4_define([KPSE_WITH_MFWIN],
[AC_ARG_ENABLE([$1win],
AS_HELP_STRING([--enable-$1win],
[include $3 window support],
- kpse_indent_28))[]dnl
+ kpse_indent_26+2))[]dnl
]) # KPSE_WITH_MFWIN
# KPSE_MFWIN_DEFINE(WINDOW, DEFINE, TEXT)