summaryrefslogtreecommitdiff
path: root/Build/source/m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-16 09:43:14 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-16 09:43:14 +0000
commit3ba06bc5a98bfc651ab7ec896205727f7373045d (patch)
treea656831d5fc8b8fc2714314c2908b7bea55a72cc /Build/source/m4
parent900bee30486216b7356a1f3756f00277318c18a7 (diff)
build system update
git-svn-id: svn://tug.org/texlive/trunk@17891 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r--Build/source/m4/kpse-common.m424
-rw-r--r--Build/source/m4/kpse-kpathsea-flags.m48
-rw-r--r--Build/source/m4/kpse-pkgs.m45
-rw-r--r--Build/source/m4/kpse-ptexenc-flags.m414
-rw-r--r--Build/source/m4/kpse-setup.m470
5 files changed, 71 insertions, 50 deletions
diff --git a/Build/source/m4/kpse-common.m4 b/Build/source/m4/kpse-common.m4
index 977b522e7b4..1d9aab30aaf 100644
--- a/Build/source/m4/kpse-common.m4
+++ b/Build/source/m4/kpse-common.m4
@@ -55,6 +55,7 @@ AC_LANG(_AC_LANG)[]dnl
# [REBUILD-SRC-DEPENDENCIES],
# [REBUILD-BLD-DEPENDENCIES])
# -----------------------------------------------
+# For generic libraries in libs/LIBDIR.
# Provide the configure options '--with-system-LIBDIR' (if in the TL tree),
# '--with-LIBDIR-includes', and '--with-LIBDIR-libdir'.
# Options:
@@ -89,6 +90,15 @@ AC_SUBST(AS_TR_CPP($1)[_RULE])[]dnl
m4_provide_if([AM_INIT_AUTOMAKE], [_AM_SUBST_NOTMAKE(AS_TR_CPP($1)[_RULE])])[]dnl
]) # _KPSE_LIB_FLAGS
+# _KPSE_TEXLIB_FLAGS(LIBDIR, LIBNAME, OPTIONS,
+# TL-INCLUDES, TL-LIBS, TL-EXTRA,
+# [REBUILD-SRC-DEPENDENCIES],
+# [REBUILD-BLD-DEPENDENCIES])
+# -----------------------------------------------
+# As above, but for TeX specific libraries in texk/LIBDIR.
+AC_DEFUN([_KPSE_TEXLIB_FLAGS],
+[m4_pushdef([Kpse_TeX_Lib], [])_KPSE_LIB_FLAGS($@)m4_popdef([Kpse_TeX_Lib])])
+
# _KPSE_LIB_FLAGS_TL(LIBDIR, LIBNAME, OPTIONS,
# TL-INCLUDES, TL-LIBS, TL-EXTRA,
# [REBUILD-SRC-DEPENDENCIES],
@@ -110,23 +120,23 @@ else
AS_TR_CPP($1)[_LIBS=`echo '$5' | sed \
-e "s,BLD/,$kpse_BLD/,g"`
$6]
- m4_if(m4_index([ kpathsea ptexenc ], [ $1 ]), [-1],
+ m4_ifdef([Kpse_TeX_Lib],
[AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \
- -e 's,BLD/,${top_builddir}/../../,g'`]
+ -e 's,BLD/texk/,${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) rebuild
+ cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild
$8:]])[
- cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']],
+ cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']],
[AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \
- -e 's,BLD/texk/,${top_builddir}/../,g'`]
+ -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}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild
+ cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild
$8:]])[
- cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']])
+ cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']])
m4_if(m4_index([ $3 ], [ tree ]), [-1],
[fi
])[]dnl m4_if
diff --git a/Build/source/m4/kpse-kpathsea-flags.m4 b/Build/source/m4/kpse-kpathsea-flags.m4
index a005cbfd2d5..7e5ed3273a5 100644
--- a/Build/source/m4/kpse-kpathsea-flags.m4
+++ b/Build/source/m4/kpse-kpathsea-flags.m4
@@ -18,10 +18,10 @@
# LIBS required for the `-lkpathsea' library in texk/kpathsea/ of the TL tree.
AC_DEFUN([KPSE_KPATHSEA_FLAGS],
[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])
+_KPSE_TEXLIB_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"])
diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4
index 2419c02c2f8..099d07cc549 100644
--- a/Build/source/m4/kpse-pkgs.m4
+++ b/Build/source/m4/kpse-pkgs.m4
@@ -51,6 +51,8 @@ kpathsea
# only used at top-level.
AC_DEFUN([KPSE_ALL_SYSTEM_FLAGS],
[AC_REQUIRE([KPSE_LIBS_PREPARE])[]dnl
+AC_REQUIRE([KPSE_KPATHSEA_SYSTEM_FLAGS])[]dnl
+AC_REQUIRE([KPSE_PTEXENC_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_ZLIB_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_LIBPNG_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_T1LIB_SYSTEM_FLAGS])[]dnl
@@ -58,11 +60,10 @@ AC_REQUIRE([KPSE_FREETYPE_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_FREETYPE2_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_GD_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_XPDF_SYSTEM_FLAGS])[]dnl
+AC_REQUIRE([KPSE_ZZIPLIB_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
-AC_REQUIRE([KPSE_ZZIPLIB_SYSTEM_FLAGS])[]dnl
]) # KPSE_ALL_SYSTEM_FLAGS
# KPSE_UTILS_PKGS()
diff --git a/Build/source/m4/kpse-ptexenc-flags.m4 b/Build/source/m4/kpse-ptexenc-flags.m4
index 32b467bdabe..1ecd0703451 100644
--- a/Build/source/m4/kpse-ptexenc-flags.m4
+++ b/Build/source/m4/kpse-ptexenc-flags.m4
@@ -8,23 +8,23 @@
# serial 0
# KPSE_PTEXENC_FLAGS
-# -------------------
+# ------------------
# Provide the configure options '--with-system-ptexenc' (if in the TL tree),
# '--with-ptexenc-includes', and '--with-ptexenc-libdir'.
#
# Set the make variables PTEXENC_INCLUDES and PTEXENC_LIBS to the CPPFLAGS and
# LIBS required for the `-lptexenc' library in texk/ptexenc/ of the TL tree.
AC_DEFUN([KPSE_PTEXENC_FLAGS],
-[_KPSE_LIB_FLAGS([ptexenc], [ptexenc], [tree],
- [-IBLD/texk -ISRC/texk], [BLD/texk/ptexenc/libptexenc.la], [],
- [${top_srcdir}/../ptexenc/*.[ch]],
- [${top_builddir}/../ptexenc/ptexenc.h])[]dnl
+[_KPSE_TEXLIB_FLAGS([ptexenc], [ptexenc], [lt],
+ [-IBLD/texk -ISRC/texk], [BLD/texk/ptexenc/libptexenc.la], [],
+ [${top_srcdir}/../ptexenc/*.[ch]],
+ [${top_builddir}/../ptexenc/ptexenc.h])[]dnl
]) # KPSE_PTEXENC_FLAGS
# KPSE_PTEXENC_OPTIONS([WITH-SYSTEM])
-# ------------------------------------
+# -----------------------------------
AC_DEFUN([KPSE_PTEXENC_OPTIONS], [_KPSE_LIB_OPTIONS([ptexenc], [$1])])
# KPSE_PTEXENC_SYSTEM_FLAGS
-# --------------------------
+# -------------------------
AC_DEFUN([KPSE_PTEXENC_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([ptexenc], [ptexenc])])
diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4
index 25ea1825288..38020cb2794 100644
--- a/Build/source/m4/kpse-setup.m4
+++ b/Build/source/m4/kpse-setup.m4
@@ -115,7 +115,8 @@ AC_FOREACH([Kpse_Lib], [$2], [ need_[]AS_TR_SH(Kpse_Lib)=yes
]) # KPSE_ENABLE_PROG
# KPSE_WITH_LIB(LIB, REQUIRED-LIBS, OPTIONS)
-# ---------------------------------------------------------
+# ------------------------------------------
+# For generic libraries in libs/LIB.
# Unless the option `tree' is specified, provide the configure options
# --with-system-LIB, --with-LIB-includes, and --with-LIB-libdir.
# Define the list of libraries required from the TL tree (if any).
@@ -123,53 +124,62 @@ AC_FOREACH([Kpse_Lib], [$2], [ need_[]AS_TR_SH(Kpse_Lib)=yes
# tree - only use library from the TL tree
#
# At the top-level we build a (reversed) list of potential system libraries.
-AC_DEFUN([KPSE_WITH_LIB],
-[m4_if(m4_index([ $3 ], [ tree ]), [-1],
-[KPSE_]AS_TR_CPP([$1])[_OPTIONS([with-system])[]dnl
-if test "x$with_system_[]AS_TR_SH($1)" = x; then
- if test -f $srcdir/kpse_TL[]m4_if([$1], [kpathsea], [texk], [libs])/$1/configure; then
- AC_MSG_NOTICE([Assuming `$1' headers and library from TL tree])
- with_system_[]AS_TR_SH($1)=no
+AC_DEFUN([KPSE_WITH_LIB], [_KPSE_WITH_LIB([libs], $@)])
+m4_define([kpse_sys_libs_pkgs], [])[]dnl initialize the list.
+
+# KPSE_WITH_TEXLIB(LIB, REQUIRED-LIBS, OPTIONS)
+# ---------------------------------------------
+# As above, but for TeX specific libraries in texk/LIB.
+AC_DEFUN([KPSE_WITH_TEXLIB], [_KPSE_WITH_LIB([texk], $@)])
+m4_define([kpse_sys_texk_pkgs], [])[]dnl initialize the list.
+
+# _KPSE_WITH_LIB(DIR, LIB, REQUIRED-LIBS, OPTIONS)
+# ------------------------------------------------
+# Internal subroutine for KPSE_WITH_LIB and KPSE_WITH_TEXLIB.
+m4_define([_KPSE_WITH_LIB],
+[m4_if(m4_index([ $4 ], [ tree ]), [-1],
+[KPSE_]AS_TR_CPP([$2])[_OPTIONS([with-system])[]dnl
+if test "x$with_system_[]AS_TR_SH($2)" = x; then
+ if test -f $srcdir/kpse_TL[]$1/$2/configure; then
+ AC_MSG_NOTICE([Assuming `$2' headers and library from TL tree])
+ with_system_[]AS_TR_SH($2)=no
else
- AC_MSG_NOTICE([Assuming installed `$1' headers and library])
- with_system_[]AS_TR_SH($1)=yes
+ AC_MSG_NOTICE([Assuming installed `$2' headers and library])
+ with_system_[]AS_TR_SH($2)=yes
fi
- ac_configure_args="$ac_configure_args '--with-system-$1=$with_system_[]AS_TR_SH($1)'"
+ ac_configure_args="$ac_configure_args '--with-system-$2=$with_system_[]AS_TR_SH($2)'"
m4_ifset([kpse_TL], [], dnl top level only
-[elif test "x$with_system_[]AS_TR_SH($1)" = xyes; then
- AC_MSG_NOTICE([Using installed `$1' headers and library])
+[elif test "x$with_system_[]AS_TR_SH($2)" = xyes; then
+ AC_MSG_NOTICE([Using installed `$2' headers and library])
else
- AC_MSG_NOTICE([Using `$1' headers and library from TL tree])
- if test "x$with_system_[]AS_TR_SH($1)" != xno; then
- with_system_[]AS_TR_SH($1)=no
- ac_configure_args="$ac_configure_args '--without-system-$1'"
+ AC_MSG_NOTICE([Using `$2' headers and library from TL tree])
+ if test "x$with_system_[]AS_TR_SH($2)" != xno; then
+ with_system_[]AS_TR_SH($2)=no
+ ac_configure_args="$ac_configure_args '--without-system-$2'"
fi
-m4_define([kpse_syslib_pkgs], [$1]m4_ifval([kpse_syslib_pkgs],
- [ _m4_defn([kpse_syslib_pkgs])]))[]dnl
+m4_define([kpse_sys_$1_pkgs],
+ [$2]m4_ifval([kpse_sys_$1_pkgs], [ _m4_defn([kpse_sys_$1_pkgs])]))[]dnl
])[]dnl m4_ifset
fi
-m4_ifval([$2],
-[if test "x$with_system_[]AS_TR_SH($1)" = xyes; then
-AC_FOREACH([Kpse_Lib], [$2],
+m4_ifval([$3],
+[if test "x$with_system_[]AS_TR_SH($2)" = xyes; then
+AC_FOREACH([Kpse_Lib], [$3],
[ if test "x$with_system_[]AS_TR_SH(Kpse_Lib)" = x; then
AC_MSG_NOTICE([ -> installed `AS_TR_SH(Kpse_Lib)' headers and library])
with_system_[]AS_TR_SH(Kpse_Lib)=yes
ac_configure_args="$ac_configure_args '--with-system-Kpse_Lib'"
elif test "x$with_system_[]AS_TR_SH(Kpse_Lib)" != xyes; then
- AC_MSG_ERROR([Sorry, `--with-system-$1' requires `--with-system-Kpse_Lib'])
+ AC_MSG_ERROR([Sorry, `--with-system-$2' requires `--with-system-Kpse_Lib'])
fi
])fi
])[]dnl m4_ifval
])[]dnl m4_if
-m4_ifval([$2], [
-test "x$need_[]AS_TR_SH($1)" = xyes && {
-AC_FOREACH([Kpse_Lib], [$2], [ need_[]AS_TR_SH(Kpse_Lib)=yes
+m4_ifval([$3], [
+test "x$need_[]AS_TR_SH($2)" = xyes && {
+AC_FOREACH([Kpse_Lib], [$3], [ need_[]AS_TR_SH(Kpse_Lib)=yes
])}
])[]dnl m4_ifval
-]) # KPSE_WITH_LIB
-
-# Initialize the list of potential system libraries.
-m4_define([kpse_syslib_pkgs], [])
+]) # _KPSE_WITH_LIB
# KPSE_TRY_LIB(LIB, PROLOGUE, BODY)
# ---------------------------------