summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2008-03-04 15:40:50 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2008-03-04 15:40:50 +0000
commit972561d9678987af1cd222c8697ad3d4651867a7 (patch)
tree599cf642f06bfda2a7766f2cee6819de5f3e6c3b /Build
parent621311703ee3ada314ee131fa479786e3ee0c88c (diff)
more autotools updates, add large file support
git-svn-id: svn://tug.org/texlive/trunk@6846 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfmx/ChangeLog12
-rw-r--r--Build/source/texk/dvipdfmx/Makefile.am1
-rw-r--r--Build/source/texk/dvipdfmx/acinclude.m4164
-rw-r--r--Build/source/texk/dvipdfmx/configure.in37
-rw-r--r--Build/source/texk/dvipdfmx/m4/maw-kpse.m457
-rw-r--r--Build/source/texk/dvipdfmx/m4/maw-libs.m4151
-rw-r--r--Build/source/texk/dvipdfmx/m4/maw-time.m434
-rw-r--r--Build/source/texk/kpathsea/ChangeLog4
-rw-r--r--Build/source/texk/kpathsea/common.ac3
-rw-r--r--Build/source/texk/kpathsea/configure.in12
-rw-r--r--Build/source/texk/make/ChangeLog4
-rw-r--r--Build/source/texk/make/config.mk9
-rw-r--r--Build/source/texk/xdvipdfmx/ChangeLog9
-rw-r--r--Build/source/texk/xdvipdfmx/Makefile.am1
-rw-r--r--Build/source/texk/xdvipdfmx/acinclude.m4307
-rw-r--r--Build/source/texk/xdvipdfmx/configure.in44
-rw-r--r--Build/source/texk/xdvipdfmx/m4/maw-kpse.m457
-rw-r--r--Build/source/texk/xdvipdfmx/m4/maw-libs.m4151
-rw-r--r--Build/source/texk/xdvipdfmx/m4/maw-macos.m425
-rw-r--r--Build/source/texk/xdvipdfmx/m4/maw-time.m434
20 files changed, 581 insertions, 535 deletions
diff --git a/Build/source/texk/dvipdfmx/ChangeLog b/Build/source/texk/dvipdfmx/ChangeLog
index 7bdaaaad65e..dc03e8027a8 100644
--- a/Build/source/texk/dvipdfmx/ChangeLog
+++ b/Build/source/texk/dvipdfmx/ChangeLog
@@ -1,5 +1,17 @@
$Header: /home/cvsroot/dvipdfmx/ChangeLog,v 1.141 2006/12/11 13:01:38 chofchof Exp $
+ChangeLog: Changes for dvipdfmx (teTeX / TeX live)
+==================================================
+
+2008-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: added `ACLOCAL_AMFLAGS -I m4'
+ * configure.in: moved macro definitions ...
+ * m4/maw-time.m4 (new): ... to here
+ * acinclude.m4 (removed): moved macro definitions ...
+ * m4/maw-kpse.m4, maw-libs.m4 (both new): ... to here; these
+ files are the same as in ../xdvipdfmx.
+
ChangeLog: Changes for dvipdfmx
===============================
diff --git a/Build/source/texk/dvipdfmx/Makefile.am b/Build/source/texk/dvipdfmx/Makefile.am
index 3da2d71a61f..b5f38ebe6b3 100644
--- a/Build/source/texk/dvipdfmx/Makefile.am
+++ b/Build/source/texk/dvipdfmx/Makefile.am
@@ -1 +1,2 @@
SUBDIRS = data src
+ACLOCAL_AMFLAGS = -I m4
diff --git a/Build/source/texk/dvipdfmx/acinclude.m4 b/Build/source/texk/dvipdfmx/acinclude.m4
deleted file mode 100644
index dda2fdce662..00000000000
--- a/Build/source/texk/dvipdfmx/acinclude.m4
+++ /dev/null
@@ -1,164 +0,0 @@
-
-#
-# Check for kpathsea
-#
-AC_DEFUN([AC_CHECK_KPSE_SUPPORT], [
- AC_MSG_CHECKING([whether you have kpathsea headers and they know about the required file formats])
- AC_TRY_COMPILE(
- [
-#include <stdio.h>
-#include <kpathsea/kpathsea.h>
- ], [
-kpse_tex_ps_header_format;
-kpse_type1_format;
-kpse_vf_format;
-kpse_ofm_format;
-kpse_ovf_format;
-kpse_truetype_format;
- ],
- [ AC_MSG_RESULT(yes)
- AC_CHECK_LIB(kpathsea, xbasename,
- [],
- [ AC_MSG_ERROR([
-This version of dvipdfmx requires xbasename() in kpathsea library.
- ]) ]
- )
- ],
- [ AC_MSG_RESULT(no);
- AC_MSG_ERROR([
-This version of dvipdfmx requires that kpathsea and its headers be installed.
-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 "tex-file.h"
- ]) ]
- )
-])
-
-
-#
-# Check for enc, cmap, sfd formats
-#
-AC_DEFUN([AC_CHECK_KPSE_TDS_VERSION], [
- AC_MSG_CHECKING([whether kpathsea library supports TDS version 1.1 installation])
- AC_TRY_COMPILE(
- [
-#include <stdio.h>
-#include <kpathsea/kpathsea.h>
-#include <kpathsea/tex-file.h>
- ], [
-kpse_enc_format;
-kpse_cmap_format;
-kpse_sfd_format;
-kpse_opentype_format;
- ],
- [ AC_MSG_RESULT(yes);
- AC_DEFINE([__TDS_VERSION__], 0x200406L, [Define if your libkpathsea supports enc formats])
- AM_CONDITIONAL(TDS_VERSION_11, true)
- ],
- [ AC_MSG_RESULT(no);
- AC_DEFINE([__TDS_VERSION__], 0x200302L, [Define if your libkpathsea supports enc formats])
- AM_CONDITIONAL(TDS_VERSION_11, false)
- ]
- )
-])
-
-
-#
-# Check for zlib
-#
-AC_DEFUN([AC_HAS_ZLIB], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- AC_ARG_WITH(zlib,
- [ --with-zlib=DIR use zlib include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
-fi
- ]
- )
- AC_MSG_CHECKING([for zlib header files])
- AC_TRY_COMPILE(
- [
-#include <zlib.h>
- ], [
-z_stream p;
- ],
- [ AC_MSG_RESULT(yes)
- AC_CHECK_LIB(z, compress, [
- AC_DEFINE(HAVE_ZLIB, 1, [Define if you have zlib and its headers])
- LIBS="$LIBS -lz"
- AC_CHECK_LIB(z, compress2, [
- AC_DEFINE(HAVE_ZLIB_COMPRESS2, 1, [Define if your zlib has the compress2 function])
- ])
- ])
- ],
- [CPPFLAGS=$_cppflags LDFLAGS=$_ldflags
- AC_MSG_RESULT(no)]
- )
-])
-
-#
-# Check for libpng
-#
-AC_DEFUN([AC_HAS_LIBPNG], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- AC_ARG_WITH(png,
- [ --with-png=DIR use png include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
-fi
- ]
- )
- AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow, LIBS="$LIBS -lm"))
- AC_MSG_CHECKING([for png header files])
- AC_TRY_COMPILE(
- [
-#include <png.h>
- ], [
-png_infop p;
- ],
- [ AC_MSG_RESULT(yes)
- AC_CHECK_LIB(png, png_get_image_width,
- [ AC_DEFINE(HAVE_LIBPNG, 1, [Define if you have libpng])
- LIBS="$LIBS -lpng" ], , -lz
- )
- ],
- [CPPFLAGS=$_cppflags LDFLAGS=$_ldflags
- AC_MSG_RESULT(no) ]
- )
-])
-
-#
-# Check for libpaper
-#
-AC_DEFUN([AC_HAS_LIBPAPER], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- AC_ARG_WITH(paper,
- [ --with-paper=DIR use paper include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
-fi
- ]
- )
- AC_MSG_CHECKING([for paper header files])
- AC_TRY_COMPILE(
- [
-#include <paper.h>
- ], [
-struct paper *p;
- ],
- [ AC_MSG_RESULT(yes)
- AC_CHECK_LIB(paper, paperpswidth, [
- AC_DEFINE(HAVE_LIBPAPER, 1, [Define if you have libpaper])
- LIBS="$LIBS -lpaper"
- ])
- ],
- [ AC_MSG_RESULT(no) ]
- )
-])
diff --git a/Build/source/texk/dvipdfmx/configure.in b/Build/source/texk/dvipdfmx/configure.in
index eab9d3951a1..66a5d53363a 100644
--- a/Build/source/texk/dvipdfmx/configure.in
+++ b/Build/source/texk/dvipdfmx/configure.in
@@ -4,21 +4,6 @@ AM_INIT_AUTOMAKE(dvipdfmx, 20061211)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
-# Timezone tests written by MAW for pdfdoc.c.
-#
-AC_DEFUN([AC_EXT_TIMEZONE],
-[AC_MSG_CHECKING([whether time.h defines timezone as an external variable])
-AC_TRY_LINK([#include <time.h>], [ -timezone; ],
- [AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_TIMEZONE], [], [external timezone variable])],
- [AC_MSG_RESULT(no)])])
-AC_DEFUN([AC_TZ_HAS_TM_GMTOFF],
-[AC_MSG_CHECKING([whether struct tz has tm_gmtoff as a member])
-AC_TRY_COMPILE([#include <time.h>], [struct tm *tp; tp->tm_gmtoff],
- [AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_TM_GMTOFF], [], [struct tz has tm_gmtoff])],
- [AC_MSG_RESULT(no)])])
-
dnl Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
@@ -26,6 +11,9 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+
# Building inside teTeX or TeX Live?
AC_ARG_ENABLE(tetex-build, [ --enable-tetex-build build as part of a teTeX installation])
@@ -80,10 +68,10 @@ with -L pointing to the directory containing libkpathsea.a.
)
dnl Check kpathsea support for required formats and funcs.
- AC_CHECK_KPSE_SUPPORT
+ MAW_CHECK_KPSE_SUPPORT([dvipdfmx])
dnl Check for TDS version kpathsea library supports.
- AC_CHECK_KPSE_TDS_VERSION
+ MAW_CHECK_KPSE_TDS_VERSION
fi
@@ -97,8 +85,8 @@ AC_FUNC_MEMCMP
AC_CHECK_FUNCS(open close system getenv mkstemp basename)
dnl Checks for typedefs, structures, and compiler characteristics.
-AC_EXT_TIMEZONE
-AC_TZ_HAS_TM_GMTOFF
+MAW_EXT_TIMEZONE
+MAW_TZ_HAS_TM_GMTOFF
AC_C_CONST
AC_C_INLINE
@@ -131,7 +119,7 @@ if test "x$enable_tetex_build" = xyes; then
# You must define HAVE_ZLIB_COMPRESS2 to enable '-z' option for controlling
# zlib compression level, but zlib.ac included above does not do this test.
# We assume zlib always has compress2() here although that's not always true.
- AC_DEFINE(HAVE_ZLIB_COMPRESS2, 1, [Define if your zlib has the compress2 function])
+ AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1)
# tetex/tex live build; this always has kpathsea, xbasename, etc.,
# as we're building from current sources. Do this stuff at the end so
@@ -140,9 +128,9 @@ if test "x$enable_tetex_build" = xyes; then
LIBS="-lkpathsea -lm $LIBS"
AC_MSG_NOTICE([tetex build enabled, LIBS now: $LIBS])
else
- AC_HAS_LIBPAPER
- AC_HAS_ZLIB
- AC_HAS_LIBPNG
+ MAW_HAS_LIBPAPER
+ MAW_HAS_ZLIB
+ MAW_HAS_LIBPNG
dnl these variables are defined in the tetex case and used in src/Makefile.am.
dnl just let them be empty.
@@ -155,5 +143,6 @@ dnl just let them be empty.
AC_SUBST(dvipdfmx_LDFLAGS)
fi
-AC_OUTPUT(Makefile data/Makefile src/Makefile)
+AC_CONFIG_FILES([Makefile data/Makefile src/Makefile])
+AC_OUTPUT
diff --git a/Build/source/texk/dvipdfmx/m4/maw-kpse.m4 b/Build/source/texk/dvipdfmx/m4/maw-kpse.m4
new file mode 100644
index 00000000000..b2d9aac4e63
--- /dev/null
+++ b/Build/source/texk/dvipdfmx/m4/maw-kpse.m4
@@ -0,0 +1,57 @@
+# maw-kpse.m4 - kpathsea features
+# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
+# Kettering University
+#
+# 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 1
+
+# MAW_CHECK_KPSE_SUPPORT(PACKAGE-NAME)
+# ------------------------------------
+# Check for kpathsea features
+AC_DEFUN([MAW_CHECK_KPSE_SUPPORT],
+[AC_MSG_CHECKING([whether you have kpathsea headers and they know about the required file formats])
+ AC_TRY_COMPILE(
+ [#include <stdio.h>
+#include <kpathsea/kpathsea.h>],
+ [kpse_tex_ps_header_format;
+ kpse_type1_format;
+ kpse_vf_format;
+ kpse_ofm_format;
+ kpse_ovf_format;
+ kpse_truetype_format;],
+ [AC_MSG_RESULT(yes)
+ AC_CHECK_LIB([kpathsea], [xbasename],
+ [],
+ [AC_MSG_ERROR([This version of $1 requires xbasename() in kpathsea library.])])],
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([This version of $1 requires that kpathsea and its headers be installed.
+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 "tex-file.h"])])
+])# MAW_CHECK_KPSE_SUPPORT
+
+# MAW_CHECK_KPSE_TDS_VERSION
+# --------------------------
+# Check for enc, cmap, sfd formats
+AC_DEFUN([MAW_CHECK_KPSE_TDS_VERSION],
+[AC_MSG_CHECKING([whether kpathsea library supports TDS version 1.1 installation])
+ AC_TRY_COMPILE(
+ [#include <stdio.h>
+#include <kpathsea/kpathsea.h>
+#include <kpathsea/tex-file.h>],
+ [kpse_enc_format;
+ kpse_cmap_format;
+ kpse_sfd_format;
+ kpse_opentype_format;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([__TDS_VERSION__], [0x200406L], [Define if your libkpathsea supports enc formats])
+ AM_CONDITIONAL([TDS_VERSION_11], [true])],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE([__TDS_VERSION__], [0x200302L], [Define if your libkpathsea supports enc formats])
+ AM_CONDITIONAL([TDS_VERSION_11], [false])])
+])# MAW_CHECK_KPSE_TDS_VERSION
+
diff --git a/Build/source/texk/dvipdfmx/m4/maw-libs.m4 b/Build/source/texk/dvipdfmx/m4/maw-libs.m4
new file mode 100644
index 00000000000..85222d14904
--- /dev/null
+++ b/Build/source/texk/dvipdfmx/m4/maw-libs.m4
@@ -0,0 +1,151 @@
+# maw-libs.m4 - various libraries
+# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
+# Kettering University
+#
+# 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 1
+
+# MAW_HAS_ZLIB
+# ------------
+# Check for zlib
+AC_DEFUN([MAW_HAS_ZLIB],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ AC_ARG_WITH([zlib],
+ [AS_HELP_STRING([--with-zlib=DIR], [use zlib include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for zlib header files])
+ AC_TRY_COMPILE(
+ [#include <zlib.h>],
+ [z_stream p;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS([compress], [z],
+ [AC_DEFINE([HAVE_ZLIB], 1, [Define if you have zlib and its headers])
+ AC_CHECK_LIB([z], [compress2],
+ [AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1, [Define if your zlib has the compress2 function])])])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_ZLIB
+
+# MAW_HAS_LIBPNG
+# --------------
+# Check for libpng
+AC_DEFUN([MAW_HAS_LIBPNG],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ AC_ARG_WITH([png],
+ [AS_HELP_STRING([--with-png=DIR], [use png include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_SEARCH_LIBS([pow], [m])
+ AC_MSG_CHECKING([for png header files])
+ AC_TRY_COMPILE(
+ [#include <png.h>],
+ [png_infop p;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS(png_get_image_width, png,
+ [AC_DEFINE([HAVE_LIBPNG], 1, [Define if you have libpng])],
+ [], [-lz])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_LIBPNG
+
+# MAW_HAS_LIBPAPER
+# ----------------
+# Check for libpaper
+AC_DEFUN([MAW_HAS_LIBPAPER],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ AC_ARG_WITH([paper],
+ [AS_HELP_STRING([--with-paper=DIR], [use paper include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for paper header files])
+ AC_TRY_COMPILE(
+ [#include <paper.h>],
+ [struct paper *p;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS([paperpswidth], [paper],
+ [AC_DEFINE(HAVE_LIBPAPER, 1, [Define if you have libpaper])])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_LIBPAPER
+
+# MAW_HAS_LIBFONTCONFIG
+# ---------------------
+# Check for libfontconfig
+AC_DEFUN([MAW_HAS_LIBFONTCONFIG],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ have_libfontconfig=no
+ AC_ARG_WITH([fontconfig],
+ [AS_HELP_STRING([--with-fontconfig=DIR],[use fontconfig include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ FONTCONFIGLDFLAGS="-L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for fontconfig header files])
+ AC_TRY_COMPILE(
+ [#include <fontconfig/fontconfig.h>],
+ [FcObjectSet *os;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS([FcInit], [fontconfig],
+ [AC_DEFINE([HAVE_LIBFONTCONFIG], 1, [Define if you have libfontconfig])
+ have_libfontconfig=yes])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_LIBFONTCONFIG
+
+# MAW_CHECK_LIBFREETYPE(PACKAGE-NAME)
+# -----------------------------------
+# Check for libfreetype, fail with error if not found
+AC_DEFUN([MAW_CHECK_LIBFREETYPE],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ using_installed_freetype=yes
+ AC_ARG_WITH(ft2lib,
+ [AS_HELP_STRING([--with-ft2lib=LIB], [use freetype2 library LIB])],
+ [if test x"$withval" != x; then
+ LIBS="$LIBS $withval"
+ using_installed_freetype=no
+ fi])
+ AC_ARG_WITH([ft2include],
+ [AS_HELP_STRING([--with-ft2include=DIR], [use freetype2 include files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval"
+ fi])
+ AC_ARG_WITH([freetype2],
+ [AS_HELP_STRING([--with-freetype2=DIR], [use installed freetype2 include & lib files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include/freetype2"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for freetype2 header files and library])
+ AC_TRY_COMPILE(
+ [#include "ft2build.h"
+#include FT_FREETYPE_H],
+ [FT_Face face;],
+ [AC_MSG_RESULT(yes)
+ if test x"$using_installed_freetype" = xyes; then
+ AC_SEARCH_LIBS([FT_Init_FreeType], [freetype],
+ [AC_DEFINE([HAVE_LIBFREETYPE], 1, [Define if you have libfreetype])])
+ else
+ AC_DEFINE([HAVE_LIBFREETYPE], 1)
+ fi],
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([This version of $1 requires that FreeType2 and its headers be available.
+You can use the --with-freetype2 option to indicate the location of the installed
+freetype2, or --with-ft2lib and --with-ft2include to point to the libfreetype.a
+library and the FreeType2 include files.])])
+])# MAW_CHECK_LIBFREETYPE
+
diff --git a/Build/source/texk/dvipdfmx/m4/maw-time.m4 b/Build/source/texk/dvipdfmx/m4/maw-time.m4
new file mode 100644
index 00000000000..69a6b191353
--- /dev/null
+++ b/Build/source/texk/dvipdfmx/m4/maw-time.m4
@@ -0,0 +1,34 @@
+# maw-time.m4 - timezone tests
+# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
+# Kettering University
+#
+# 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 1
+
+# MAW_EXT_TIMEZONE
+# ----------------
+AC_DEFUN([MAW_EXT_TIMEZONE],
+[AC_MSG_CHECKING([whether time.h defines timezone as an external variable])
+ AC_TRY_LINK(
+ [#include <time.h>],
+ [-timezone;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TIMEZONE, [], [external timezone variable])],
+ [AC_MSG_RESULT(no)])
+])# MAW_EXT_TIMEZONE
+
+# MAW_TZ_HAS_TM_GMTOFF
+# --------------------
+AC_DEFUN([MAW_TZ_HAS_TM_GMTOFF],
+[AC_MSG_CHECKING([whether struct tz has tm_gmtoff as a member])
+ AC_TRY_COMPILE(
+ [#include <time.h>],
+ [struct tm *tp; tp->tm_gmtoff],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TM_GMTOFF, [], [struct tz has tm_gmtoff])],
+ [AC_MSG_RESULT(no)])
+])# MAW_TZ_HAS_TM_GMTOFF
+
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 195dcef9919..b6a52a6ade2 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * common.ac: add AC_SYS_LARGEFILE and AC_FUNC_FSEEKO.
+
2008-03-02 Karl Berry <karl@tug.org>
* cnf.c (read_all_cnf): change warning text when texmf.cnf is not
diff --git a/Build/source/texk/kpathsea/common.ac b/Build/source/texk/kpathsea/common.ac
index f2e73b6f7e9..793715a7384 100644
--- a/Build/source/texk/kpathsea/common.ac
+++ b/Build/source/texk/kpathsea/common.ac
@@ -14,6 +14,9 @@ sinclude(../libtool.m4)
AC_PROG_LIBTOOL
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_FUNC_CLOSEDIR_VOID
diff --git a/Build/source/texk/kpathsea/configure.in b/Build/source/texk/kpathsea/configure.in
index 212419e66a2..424748cb73f 100644
--- a/Build/source/texk/kpathsea/configure.in
+++ b/Build/source/texk/kpathsea/configure.in
@@ -35,17 +35,7 @@ AH_TOP([/* c-auto.h: defines for kpathsea, as determined by configure.
#define KPATHSEA_C_AUTO_H
/* kpathsea: the version string. */
-#define KPSEVERSION "REPLACE-WITH-KPSEVERSION"
-
-/* kpathsea/configure.in tests for these functions with
- kb_AC_KLIBTOOL_REPLACE_FUNCS, and naturally Autoheader doesn't know
- about that macro. Since the shared library stuff is all preliminary
- anyway, I decided not to change Autoheader, but rather to hack them
- in here. */
-#undef HAVE_PUTENV
-#undef HAVE_STRCASECMP
-#undef HAVE_STRTOL
-#undef HAVE_STRSTR])
+#define KPSEVERSION "REPLACE-WITH-KPSEVERSION"])
AH_BOTTOM([#endif /* !KPATHSEA_C_AUTO_H */])
KPSE_CONFIG_FILES([Makefile])
diff --git a/Build/source/texk/make/ChangeLog b/Build/source/texk/make/ChangeLog
index a43b78ac026..7ad5be9ad2c 100644
--- a/Build/source/texk/make/ChangeLog
+++ b/Build/source/texk/make/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * config.mk: update maintainer rules.
+
2008-02-29 Peter Breitenlohner <peb@mppmu.mpg.de>
* config.mk: update and reactivate maintainer rules.
diff --git a/Build/source/texk/make/config.mk b/Build/source/texk/make/config.mk
index 0cec93b225b..88c41f61645 100644
--- a/Build/source/texk/make/config.mk
+++ b/Build/source/texk/make/config.mk
@@ -16,15 +16,20 @@
@MAINT@ cd $(top_srcdir) && aclocal -I ../m4
@MAINT@ date >$(top_srcdir)/stamp-aclocal
@MAINT@
-@MAINT@$(top_srcdir)/configure: $(configure_in) $(aclocal_m4)
+@MAINT@$(top_srcdir)/stamp-configure: $(configure_in) $(aclocal_m4)
@MAINT@ cd $(top_srcdir) && autoconf
+@MAINT@ date >$(top_srcdir)/stamp-configure
+@MAINT@# For the case that configure is missing
+@MAINT@$(top_srcdir)/configure:
+@MAINT@ cd $(top_srcdir) && autoconf
+@MAINT@ date >$(top_srcdir)/stamp-configure
@MAINT@
@MAINT@$(top_srcdir)/c-auto.in: $(top_srcdir)/stamp-auto.in
@MAINT@$(top_srcdir)/stamp-auto.in: $(configure_in) $(aclocal_m4)
@MAINT@ cd $(top_srcdir) && autoheader
@MAINT@ date >$(top_srcdir)/stamp-auto.in
-config.status: $(top_srcdir)/configure
+config.status: $(top_srcdir)/stamp-configure $(top_srcdir)/configure
$(SHELL) $@ --recheck
# FIXME: Shouldn't this be $(top_builddir)/config.status
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog
index e7fc048fd51..8b799e07c62 100644
--- a/Build/source/texk/xdvipdfmx/ChangeLog
+++ b/Build/source/texk/xdvipdfmx/ChangeLog
@@ -3,6 +3,15 @@ $Header: /home/cvsroot/dvipdfmx/ChangeLog,v 1.141 2006/12/11 13:01:38 chofchof E
ChangeLog: Changes for xdvipdfmx (teTeX / TeX live)
===================================================
+2008-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: added `ACLOCAL_AMFLAGS -I m4'
+ * configure.in: moved macro definitions ...
+ * m4/maw-time.m4 (new): ... to here
+ * acinclude.m4 (removed): moved macro definitions ...
+ * m4/maw-kpse.m4, maw-libs.m4, maw-macos.m4 (all new): ... to
+ here; these files are the same as in ../dvipdfmx.
+
2008-02-21 Peter Breitenlohner <peb@mppmu.mpg.de>
Allow maintainer mode to regenerate files.
diff --git a/Build/source/texk/xdvipdfmx/Makefile.am b/Build/source/texk/xdvipdfmx/Makefile.am
index b1348f9416a..4e989542e83 100644
--- a/Build/source/texk/xdvipdfmx/Makefile.am
+++ b/Build/source/texk/xdvipdfmx/Makefile.am
@@ -2,3 +2,4 @@
# skip the data subdir; we rely on dvipdfmx to provide those files
SUBDIRS = src
+ACLOCAL_AMFLAGS = -I m4
diff --git a/Build/source/texk/xdvipdfmx/acinclude.m4 b/Build/source/texk/xdvipdfmx/acinclude.m4
deleted file mode 100644
index 52cf0d57384..00000000000
--- a/Build/source/texk/xdvipdfmx/acinclude.m4
+++ /dev/null
@@ -1,307 +0,0 @@
-
-#
-# Check for kpathsea
-#
-AC_DEFUN([AC_CHECK_KPSE_SUPPORT], [
- AC_MSG_CHECKING([whether you have kpathsea headers and they know about the required file formats])
- AC_TRY_COMPILE(
- [
-#include <stdio.h>
-#include <kpathsea/kpathsea.h>
- ], [
-kpse_tex_ps_header_format;
-kpse_type1_format;
-kpse_vf_format;
-kpse_ofm_format;
-kpse_ovf_format;
-kpse_truetype_format;
- ],
- [
- AC_MSG_RESULT(yes)
- AC_CHECK_LIB(kpathsea, xbasename,
- [],
- [ AC_MSG_ERROR([
-This version of dvipdfmx requires xbasename() in kpathsea library.
- ]) ]
- )
- ],
- [
- AC_MSG_RESULT(no);
- AC_MSG_ERROR([
-This version of dvipdfmx requires that kpathsea and its headers be installed.
-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 "tex-file.h"
- ]) ]
- )
-])
-
-
-#
-# Check for enc, cmap, sfd formats
-#
-AC_DEFUN([AC_CHECK_KPSE_TDS_VERSION], [
- AC_MSG_CHECKING([whether kpathsea library supports TDS version 1.1 installation])
- AC_TRY_COMPILE(
- [
-#include <stdio.h>
-#include <kpathsea/kpathsea.h>
-#include <kpathsea/tex-file.h>
- ], [
-kpse_enc_format;
-kpse_cmap_format;
-kpse_sfd_format;
-kpse_opentype_format;
- ],
- [
- AC_MSG_RESULT(yes);
- AC_DEFINE([__TDS_VERSION__], 0x200406L, [Define if your libkpathsea supports enc formats])
- AM_CONDITIONAL(TDS_VERSION_11, true)
- ],
- [
- AC_MSG_RESULT(no);
- AC_DEFINE([__TDS_VERSION__], 0x200302L, [Define if your libkpathsea supports enc formats])
- AM_CONDITIONAL(TDS_VERSION_11, false)
- ]
- )
-])
-
-
-#
-# Check for zlib
-#
-AC_DEFUN([AC_HAS_ZLIB], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- AC_ARG_WITH(zlib,
- [ --with-zlib=DIR use zlib include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
-fi
- ]
- )
- AC_MSG_CHECKING([for zlib header files])
- AC_TRY_COMPILE(
- [
-#include <zlib.h>
- ], [
-z_stream p;
- ],
- [
- AC_MSG_RESULT(yes)
- AC_CHECK_LIB(z, compress, [
- AC_DEFINE(HAVE_ZLIB, 1, [Define if you have zlib and its headers])
- LIBS="$LIBS -lz"
- AC_CHECK_LIB(z, compress2, [
- AC_DEFINE(HAVE_ZLIB_COMPRESS2, 1, [Define if your zlib has the compress2 function])
- ])
- ])
- ],
- [
- CPPFLAGS=$_cppflags
- LDDFLAGS=$_ldflags
- AC_MSG_RESULT(no)
- ]
- )
-])
-
-#
-# Check for libpng
-#
-AC_DEFUN([AC_HAS_LIBPNG], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- AC_ARG_WITH(png,
- [ --with-png=DIR use png include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
-fi
- ]
- )
- AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow, LIBS="$LIBS -lm"))
- AC_MSG_CHECKING([for png header files])
- AC_TRY_COMPILE(
- [
-#include <png.h>
- ], [
-png_infop p;
- ],
- [
- AC_MSG_RESULT(yes)
- AC_CHECK_LIB(png, png_get_image_width,
- [ AC_DEFINE(HAVE_LIBPNG, 1, [Define if you have libpng])
- LIBS="$LIBS -lpng" ], , -lz
- )
- ],
- [
- CPPFLAGS=$_cppflags
- LDDFLAGS=$_ldflags
- AC_MSG_RESULT(no)
- ]
- )
-])
-
-#
-# Check for libpaper
-#
-AC_DEFUN([AC_HAS_LIBPAPER], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- AC_ARG_WITH(paper,
- [ --with-paper=DIR use paper include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
-fi
- ]
- )
- AC_MSG_CHECKING([for paper header files])
- AC_TRY_COMPILE(
- [
-#include <paper.h>
- ], [
-struct paper *p;
- ],
- [
- AC_MSG_RESULT(yes)
- AC_CHECK_LIB(paper, paperpswidth, [
- AC_DEFINE(HAVE_LIBPAPER, 1, [Define if you have libpaper])
- LIBS="$LIBS -lpaper"
- ])
- ],
- [
- CPPFLAGS=$_cppflags
- LDDFLAGS=$_ldflags
- AC_MSG_RESULT(no)
- ]
- )
-])
-
-#
-# Check for libfontconfig
-#
-AC_DEFUN([AC_HAS_LIBFONTCONFIG], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- have_libfontconfig=no
- AC_ARG_WITH(fontconfig,
- [ --with-fontconfig=DIR use fontconfig include/library files from DIR],
- [
-if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
- FONTCONFIGLDFLAGS="-L$withval/lib"
-fi
- ]
- )
- AC_MSG_CHECKING([for fontconfig header files])
- AC_TRY_COMPILE(
- [
-#include <fontconfig/fontconfig.h>
- ], [
-FcObjectSet *os;
- ],
- [
- AC_MSG_RESULT(yes)
- AC_CHECK_LIB(fontconfig, FcInit, [
- AC_DEFINE(HAVE_LIBFONTCONFIG, 1, [Define if you have libfontconfig])
- LIBS="$LIBS -lfontconfig"
- have_libfontconfig=yes
- ])
- ],
- [
- CPPFLAGS=$_cppflags
- LDDFLAGS=$_ldflags
- AC_MSG_RESULT(no)
- ]
- )
-])
-
-#
-# Check for libfreetype, fail with error if not found
-#
-AC_DEFUN([AC_CHECK_LIBFREETYPE], [
- _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
- using_installed_freetype=yes
- AC_ARG_WITH(ft2lib,
- [ --with-ft2lib=LIB use freetype2 library LIB],
- [
- if test x"$withval" != x; then
- LIBS="$LIBS $withval"
- using_installed_freetype=no
- fi
- ]
- )
- AC_ARG_WITH(ft2include,
- [ --with-ft2include=DIR use freetype2 include files from DIR],
- [
- if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval"
- fi
- ]
- )
- AC_ARG_WITH(freetype2,
- [ --with-freetype2=DIR use installed freetype2 include & lib files from DIR],
- [
- if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include/freetype2"
- LDFLAGS="$LDFLAGS -L$withval/lib"
- fi
- ]
- )
- AC_MSG_CHECKING([for freetype2 header files and library])
- AC_TRY_COMPILE(
- [
-#include "ft2build.h"
-#include FT_FREETYPE_H
- ],
- [
-FT_Face face;
- ],
- [
- AC_MSG_RESULT(yes)
- if test x"$using_installed_freetype" = xyes; then
- AC_CHECK_LIB(freetype, FT_Init_FreeType, [
- AC_DEFINE(HAVE_LIBFREETYPE, 1, [Define if you have libfreetype])
- LIBS="$LIBS -lfreetype"
- ])
- else
- AC_DEFINE(HAVE_LIBFREETYPE, 1, [Define if you have libfreetype])
- fi
- ],
- [
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([
-This version of xdvipdfmx requires that FreeType2 and its headers be available.
-You can use the --with-freetype2 option to indicate the location of the installed
-freetype2, or --with-ft2lib and --with-ft2include to point to the libfreetype.a
-library and the FreeType2 include files.])
- ]
- )
-])
-
-#
-# Check for ApplicationServices
-#
-AC_DEFUN([AC_HAS_APP_SERVICES], [
- AC_MSG_CHECKING([for Mac OS X ApplicationServices framework])
- AC_TRY_COMPILE(
- [
-#include <ApplicationServices/ApplicationServices.h>
- ], [
-ATSFontRef fontRef;
- ],
- [
- have_app_services=yes
- AC_DEFINE(HAVE_APP_SERVICES, 1, [Define if you have Mac OS X ApplicationServices])
- LIBS="$LIBS -framework ApplicationServices"
- ],
- [
- have_app_services=no
- ]
- )
- AC_MSG_RESULT($have_app_services)
-])
-
diff --git a/Build/source/texk/xdvipdfmx/configure.in b/Build/source/texk/xdvipdfmx/configure.in
index 41e4a263241..301cf9ddca0 100644
--- a/Build/source/texk/xdvipdfmx/configure.in
+++ b/Build/source/texk/xdvipdfmx/configure.in
@@ -4,28 +4,17 @@ AM_INIT_AUTOMAKE(xdvipdfmx, 0.5)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
-# Timezone tests written by MAW for pdfdoc.c.
-#
-AC_DEFUN([AC_EXT_TIMEZONE],
-[AC_MSG_CHECKING([whether time.h defines timezone as an external variable])
-AC_TRY_LINK([#include <time.h>], [ -timezone; ],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_TIMEZONE, [], [external timezone variable])],
- [AC_MSG_RESULT(no)])])
-AC_DEFUN([AC_TZ_HAS_TM_GMTOFF],
-[AC_MSG_CHECKING([whether struct tz has tm_gmtoff as a member])
-AC_TRY_COMPILE([#include <time.h>], [struct tm *tp; tp->tm_gmtoff],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_TM_GMTOFF, [], [struct tz has tm_gmtoff])],
- [AC_MSG_RESULT(no)])])
-
dnl Checks for programs.
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+
# Building inside teTeX or TeX Live?
AC_ARG_ENABLE(tetex-build, [ --enable-tetex-build build as part of a teTeX installation])
@@ -80,13 +69,13 @@ with -L pointing to the directory containing libkpathsea.a.
)
dnl Check kpathsea support for required formats and funcs.
- AC_CHECK_KPSE_SUPPORT
+ MAW_CHECK_KPSE_SUPPORT([xdvipdfmx])
dnl Check for TDS version kpathsea library supports.
- AC_CHECK_KPSE_TDS_VERSION
+ MAW_CHECK_KPSE_TDS_VERSION
dnl Check for libfreetype, required for xdvipdfmx features
- AC_CHECK_LIBFREETYPE
+ MAW_CHECK_LIBFREETYPE([xdvipdfmx])
fi
dnl Checks for header files.
@@ -99,8 +88,8 @@ AC_FUNC_MEMCMP
AC_CHECK_FUNCS(open close system getenv mkstemp basename)
dnl Checks for typedefs, structures, and compiler characteristics.
-AC_EXT_TIMEZONE
-AC_TZ_HAS_TM_GMTOFF
+MAW_EXT_TIMEZONE
+MAW_TZ_HAS_TM_GMTOFF
AC_C_CONST
AC_C_INLINE
@@ -117,8 +106,8 @@ AC_CHECK_SIZEOF(long)
dnl Check for additonal libraries.
-AC_HAS_LIBFONTCONFIG
-AC_HAS_APP_SERVICES
+MAW_HAS_LIBFONTCONFIG
+CHO_HAS_APP_SERVICES
if test "x$enable_tetex_build" = xyes; then
# Get these common libraries from the sources, too.
@@ -141,7 +130,7 @@ if test "x$enable_tetex_build" = xyes; then
# You must define HAVE_ZLIB_COMPRESS2 to enable '-z' option for controlling
# zlib compression level, but zlib.ac included above does not do this test.
# We assume zlib always has compress2() here although that's not always true.
- AC_DEFINE(HAVE_ZLIB_COMPRESS2, 1, [Define if your zlib has the compress2 function])
+ AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1)
# for tetex/tex live build we may need to define XETEX and XETEX_MAC
if test "x$have_app_services" = xyes; then
@@ -160,9 +149,9 @@ if test "x$enable_tetex_build" = xyes; then
AC_SUBST(xdvipdfmx_LDFLAGS)
AC_MSG_NOTICE([tetex build enabled, LIBS now: $LIBS])
else
- AC_HAS_LIBPAPER
- AC_HAS_ZLIB
- AC_HAS_LIBPNG
+ MAW_HAS_LIBPAPER
+ MAW_HAS_ZLIB
+ MAW_HAS_LIBPNG
dnl these variables are defined in the tetex case and used in src/Makefile.am.
dnl just let them be empty.
@@ -179,5 +168,6 @@ dnl just let them be empty.
AC_SUBST(xdvipdfmx_LDFLAGS)
fi
-AC_OUTPUT(Makefile data/Makefile src/Makefile)
+AC_CONFIG_FILES([Makefile data/Makefile src/Makefile])
+AC_OUTPUT
diff --git a/Build/source/texk/xdvipdfmx/m4/maw-kpse.m4 b/Build/source/texk/xdvipdfmx/m4/maw-kpse.m4
new file mode 100644
index 00000000000..b2d9aac4e63
--- /dev/null
+++ b/Build/source/texk/xdvipdfmx/m4/maw-kpse.m4
@@ -0,0 +1,57 @@
+# maw-kpse.m4 - kpathsea features
+# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
+# Kettering University
+#
+# 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 1
+
+# MAW_CHECK_KPSE_SUPPORT(PACKAGE-NAME)
+# ------------------------------------
+# Check for kpathsea features
+AC_DEFUN([MAW_CHECK_KPSE_SUPPORT],
+[AC_MSG_CHECKING([whether you have kpathsea headers and they know about the required file formats])
+ AC_TRY_COMPILE(
+ [#include <stdio.h>
+#include <kpathsea/kpathsea.h>],
+ [kpse_tex_ps_header_format;
+ kpse_type1_format;
+ kpse_vf_format;
+ kpse_ofm_format;
+ kpse_ovf_format;
+ kpse_truetype_format;],
+ [AC_MSG_RESULT(yes)
+ AC_CHECK_LIB([kpathsea], [xbasename],
+ [],
+ [AC_MSG_ERROR([This version of $1 requires xbasename() in kpathsea library.])])],
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([This version of $1 requires that kpathsea and its headers be installed.
+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 "tex-file.h"])])
+])# MAW_CHECK_KPSE_SUPPORT
+
+# MAW_CHECK_KPSE_TDS_VERSION
+# --------------------------
+# Check for enc, cmap, sfd formats
+AC_DEFUN([MAW_CHECK_KPSE_TDS_VERSION],
+[AC_MSG_CHECKING([whether kpathsea library supports TDS version 1.1 installation])
+ AC_TRY_COMPILE(
+ [#include <stdio.h>
+#include <kpathsea/kpathsea.h>
+#include <kpathsea/tex-file.h>],
+ [kpse_enc_format;
+ kpse_cmap_format;
+ kpse_sfd_format;
+ kpse_opentype_format;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([__TDS_VERSION__], [0x200406L], [Define if your libkpathsea supports enc formats])
+ AM_CONDITIONAL([TDS_VERSION_11], [true])],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE([__TDS_VERSION__], [0x200302L], [Define if your libkpathsea supports enc formats])
+ AM_CONDITIONAL([TDS_VERSION_11], [false])])
+])# MAW_CHECK_KPSE_TDS_VERSION
+
diff --git a/Build/source/texk/xdvipdfmx/m4/maw-libs.m4 b/Build/source/texk/xdvipdfmx/m4/maw-libs.m4
new file mode 100644
index 00000000000..85222d14904
--- /dev/null
+++ b/Build/source/texk/xdvipdfmx/m4/maw-libs.m4
@@ -0,0 +1,151 @@
+# maw-libs.m4 - various libraries
+# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
+# Kettering University
+#
+# 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 1
+
+# MAW_HAS_ZLIB
+# ------------
+# Check for zlib
+AC_DEFUN([MAW_HAS_ZLIB],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ AC_ARG_WITH([zlib],
+ [AS_HELP_STRING([--with-zlib=DIR], [use zlib include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for zlib header files])
+ AC_TRY_COMPILE(
+ [#include <zlib.h>],
+ [z_stream p;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS([compress], [z],
+ [AC_DEFINE([HAVE_ZLIB], 1, [Define if you have zlib and its headers])
+ AC_CHECK_LIB([z], [compress2],
+ [AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1, [Define if your zlib has the compress2 function])])])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_ZLIB
+
+# MAW_HAS_LIBPNG
+# --------------
+# Check for libpng
+AC_DEFUN([MAW_HAS_LIBPNG],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ AC_ARG_WITH([png],
+ [AS_HELP_STRING([--with-png=DIR], [use png include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_SEARCH_LIBS([pow], [m])
+ AC_MSG_CHECKING([for png header files])
+ AC_TRY_COMPILE(
+ [#include <png.h>],
+ [png_infop p;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS(png_get_image_width, png,
+ [AC_DEFINE([HAVE_LIBPNG], 1, [Define if you have libpng])],
+ [], [-lz])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_LIBPNG
+
+# MAW_HAS_LIBPAPER
+# ----------------
+# Check for libpaper
+AC_DEFUN([MAW_HAS_LIBPAPER],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ AC_ARG_WITH([paper],
+ [AS_HELP_STRING([--with-paper=DIR], [use paper include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for paper header files])
+ AC_TRY_COMPILE(
+ [#include <paper.h>],
+ [struct paper *p;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS([paperpswidth], [paper],
+ [AC_DEFINE(HAVE_LIBPAPER, 1, [Define if you have libpaper])])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_LIBPAPER
+
+# MAW_HAS_LIBFONTCONFIG
+# ---------------------
+# Check for libfontconfig
+AC_DEFUN([MAW_HAS_LIBFONTCONFIG],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ have_libfontconfig=no
+ AC_ARG_WITH([fontconfig],
+ [AS_HELP_STRING([--with-fontconfig=DIR],[use fontconfig include/library files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ FONTCONFIGLDFLAGS="-L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for fontconfig header files])
+ AC_TRY_COMPILE(
+ [#include <fontconfig/fontconfig.h>],
+ [FcObjectSet *os;],
+ [AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS([FcInit], [fontconfig],
+ [AC_DEFINE([HAVE_LIBFONTCONFIG], 1, [Define if you have libfontconfig])
+ have_libfontconfig=yes])],
+ [CPPFLAGS=$_cppflags
+ LDDFLAGS=$_ldflags
+ AC_MSG_RESULT(no)])
+])# MAW_HAS_LIBFONTCONFIG
+
+# MAW_CHECK_LIBFREETYPE(PACKAGE-NAME)
+# -----------------------------------
+# Check for libfreetype, fail with error if not found
+AC_DEFUN([MAW_CHECK_LIBFREETYPE],
+[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+ using_installed_freetype=yes
+ AC_ARG_WITH(ft2lib,
+ [AS_HELP_STRING([--with-ft2lib=LIB], [use freetype2 library LIB])],
+ [if test x"$withval" != x; then
+ LIBS="$LIBS $withval"
+ using_installed_freetype=no
+ fi])
+ AC_ARG_WITH([ft2include],
+ [AS_HELP_STRING([--with-ft2include=DIR], [use freetype2 include files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval"
+ fi])
+ AC_ARG_WITH([freetype2],
+ [AS_HELP_STRING([--with-freetype2=DIR], [use installed freetype2 include & lib files from DIR])],
+ [if test -d "$withval"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include/freetype2"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi])
+ AC_MSG_CHECKING([for freetype2 header files and library])
+ AC_TRY_COMPILE(
+ [#include "ft2build.h"
+#include FT_FREETYPE_H],
+ [FT_Face face;],
+ [AC_MSG_RESULT(yes)
+ if test x"$using_installed_freetype" = xyes; then
+ AC_SEARCH_LIBS([FT_Init_FreeType], [freetype],
+ [AC_DEFINE([HAVE_LIBFREETYPE], 1, [Define if you have libfreetype])])
+ else
+ AC_DEFINE([HAVE_LIBFREETYPE], 1)
+ fi],
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([This version of $1 requires that FreeType2 and its headers be available.
+You can use the --with-freetype2 option to indicate the location of the installed
+freetype2, or --with-ft2lib and --with-ft2include to point to the libfreetype.a
+library and the FreeType2 include files.])])
+])# MAW_CHECK_LIBFREETYPE
+
diff --git a/Build/source/texk/xdvipdfmx/m4/maw-macos.m4 b/Build/source/texk/xdvipdfmx/m4/maw-macos.m4
new file mode 100644
index 00000000000..1a4a18f2b98
--- /dev/null
+++ b/Build/source/texk/xdvipdfmx/m4/maw-macos.m4
@@ -0,0 +1,25 @@
+# maw-macos.m4 - Mac OS X ApplicationServices framework
+# Copyright (C) 2005 - 2008 Jin-Hwan Cho <chofchof@ktug.or.kr>
+# Some Affiliation ?????????????
+#
+# 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 1
+
+# CHO_HAS_APP_SERVICES
+# --------------------
+# Check for ApplicationServices
+AC_DEFUN([CHO_HAS_APP_SERVICES],
+[AC_MSG_CHECKING([for Mac OS X ApplicationServices framework])
+ AC_TRY_COMPILE(
+ [#include <ApplicationServices/ApplicationServices.h>],
+ [ATSFontRef fontRef;],
+ [have_app_services=yes
+ AC_DEFINE([HAVE_APP_SERVICES], 1, [Define if you have Mac OS X ApplicationServices])
+ LIBS="$LIBS -framework ApplicationServices"],
+ [have_app_services=no])
+ AC_MSG_RESULT([$have_app_services])
+])# CHO_HAS_APP_SERVICES
+
diff --git a/Build/source/texk/xdvipdfmx/m4/maw-time.m4 b/Build/source/texk/xdvipdfmx/m4/maw-time.m4
new file mode 100644
index 00000000000..69a6b191353
--- /dev/null
+++ b/Build/source/texk/xdvipdfmx/m4/maw-time.m4
@@ -0,0 +1,34 @@
+# maw-time.m4 - timezone tests
+# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu>
+# Kettering University
+#
+# 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 1
+
+# MAW_EXT_TIMEZONE
+# ----------------
+AC_DEFUN([MAW_EXT_TIMEZONE],
+[AC_MSG_CHECKING([whether time.h defines timezone as an external variable])
+ AC_TRY_LINK(
+ [#include <time.h>],
+ [-timezone;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TIMEZONE, [], [external timezone variable])],
+ [AC_MSG_RESULT(no)])
+])# MAW_EXT_TIMEZONE
+
+# MAW_TZ_HAS_TM_GMTOFF
+# --------------------
+AC_DEFUN([MAW_TZ_HAS_TM_GMTOFF],
+[AC_MSG_CHECKING([whether struct tz has tm_gmtoff as a member])
+ AC_TRY_COMPILE(
+ [#include <time.h>],
+ [struct tm *tp; tp->tm_gmtoff],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TM_GMTOFF, [], [struct tz has tm_gmtoff])],
+ [AC_MSG_RESULT(no)])
+])# MAW_TZ_HAS_TM_GMTOFF
+