summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2012-08-18 03:30:17 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2012-08-18 03:30:17 +0000
commit6452b64454d4e3a7c9fb387ab533c0ed7dda21c0 (patch)
tree66b71ea470e2f29267aae0396959f158137872e1 /Build
parent2fbe395806506e14d688b23cdef2f115eb88e3d0 (diff)
Adapt build scripts
git-svn-id: svn://tug.org/texlive/trunk@27449 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfmx/Makefile.am30
-rw-r--r--Build/source/texk/dvipdfmx/configure.ac94
-rw-r--r--Build/source/texk/dvipdfmx/configure.in150
-rw-r--r--Build/source/texk/dvipdfmx/data/Makefile.am8
-rw-r--r--Build/source/texk/dvipdfmx/m4/cho-kpse.m456
-rw-r--r--Build/source/texk/dvipdfmx/m4/cho-libs.m4150
-rw-r--r--Build/source/texk/dvipdfmx/m4/maw-time.m434
-rw-r--r--Build/source/texk/dvipdfmx/man/Makefile.am13
-rw-r--r--Build/source/texk/dvipdfmx/src/Makefile.am120
9 files changed, 213 insertions, 442 deletions
diff --git a/Build/source/texk/dvipdfmx/Makefile.am b/Build/source/texk/dvipdfmx/Makefile.am
index 313d39cf382..f4b3c0d3d18 100644
--- a/Build/source/texk/dvipdfmx/Makefile.am
+++ b/Build/source/texk/dvipdfmx/Makefile.am
@@ -1,6 +1,26 @@
-SUBDIRS = data src man
-ACLOCAL_AMFLAGS = -I m4
+## Makefile.am for the TeX Live subdirectory texk/xdvipdfmx/
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+ACLOCAL_AMFLAGS = -I ../../m4
+
+SUBDIRS = src man data
+
+all-local: config.force
+
+config.force: $(ZLIB_DEPEND) $(LIBPNG_DEPEND) $(KPATHSEA_DEPEND)
+ echo timestamp >config.force
+ $(SHELL) ./config.status --recheck
+
+DISTCLEANFILES = config.force
+
+EXTRA_DIST = \
+ BUGS \
+ ChangeLog.TL \
+ data
+
+# in case of an SVN repository
+dist-hook:
+ rm -rf `find $(distdir) -name .svn`
-# to regenerate autofiles, run
-# aclocal -I m4 && autoconf && autoheader && automake
-# tested with autoconf 2.62 and automake 1.10.1. --karl, 21apr08.
diff --git a/Build/source/texk/dvipdfmx/configure.ac b/Build/source/texk/dvipdfmx/configure.ac
new file mode 100644
index 00000000000..4a16b05200a
--- /dev/null
+++ b/Build/source/texk/dvipdfmx/configure.ac
@@ -0,0 +1,94 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright (C) 2009-2012 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+m4_include([version.ac])[] dnl define dvipdfmx_version
+AC_INIT([dvipdfmx], dvipdfmx_version, [tex-k@tug.org])
+AC_PREREQ([2.65])
+AC_CONFIG_SRCDIR([src/dvipdfmx.c])
+AC_CONFIG_AUX_DIR([../../build-aux])
+AC_CONFIG_MACRO_DIR([../../m4])
+
+dnl Common code for all programs using libkpathsea.
+KPSE_COMMON([dvipdfmx])
+
+AC_CONFIG_HEADERS([config.h])
+
+KPSE_LT_HACK
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([unistd.h stdint.h inttypes.h sys/types.h sys/wait.h])
+
+dnl Checks for library functions.
+AC_FUNC_MEMCMP
+AC_CHECK_FUNCS([open close getenv mkstemp basename])
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_STRUCT_TM
+AC_STRUCT_TIMEZONE
+AC_C_BIGENDIAN
+AC_TYPE_UINT32_T
+
+AC_CHECK_DECL([timezone],
+ [AC_DEFINE([HAVE_TIMEZONE], 1,
+ [Define if <time.h> has timezone as an external variable.])],
+ [],
+ [[#include <time.h>]])
+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>]])
+
+AC_CHECK_SIZEOF([char])
+AC_CHECK_SIZEOF([short])
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+
+AC_SEARCH_LIBS([pow], [m])
+
+KPSE_KPATHSEA_FLAGS
+KPSE_ZLIB_FLAGS
+KPSE_LIBPNG_FLAGS
+
+if test "x$enable_build" != xno || test -f config.force; then
+
+KPSE_ADD_FLAGS([kpathsea])
+AC_CHECK_HEADER([kpathsea/version.h], [],
+ [AC_MSG_ERROR([Sorry, kpathsea too old])])
+
+KPSE_ADD_FLAGS([zlib])
+CHO_CHECK_ZLIB
+
+KPSE_ADD_FLAGS([libpng])
+CHO_CHECK_LIBPNG
+
+KPSE_RESTORE_FLAGS
+
+echo timestamp >config.force
+fi
+
+dnl Check for additional libraries.
+
+if test "x$enable_texlive_build" != xyes || test ! -d $srcdir/../kpathsea; then
+ CHO_CHECK_LIBPAPER
+fi
+
+AC_DEFINE([__TDS_VERSION__], [0x200406L],
+ [Define to 0x200406L if your libkpathsea supports enc formats.])
+
+KPSE_CHECK_WIN32
+AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno])
+
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ data/Makefile
+ man/Makefile
+ ])
+
+AC_OUTPUT
diff --git a/Build/source/texk/dvipdfmx/configure.in b/Build/source/texk/dvipdfmx/configure.in
deleted file mode 100644
index 14a814ecf00..00000000000
--- a/Build/source/texk/dvipdfmx/configure.in
+++ /dev/null
@@ -1,150 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(src/dvipdfmx.c)
-AM_INIT_AUTOMAKE(dvipdfmx, 20120420)
-AM_CONFIG_HEADER(config.h)
-AM_MAINTAINER_MODE
-
-dnl Checks for programs.
-AC_PROG_CC
-AM_PROG_CC_C_O
-AM_PROG_CC_C_O
-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])
-
-
-dnl Check for kpathsea library. (required)
-if test "x$enable_tetex_build" = xyes; then
- # In teTeX and TeX Live, LDFLAGS is passed by texk/Makefile and
- # reserved for the user. Therefore we need another variable for the
- # loader flags to find the local kpathsea. We use dvipdfmx_LDFLAGS
- # since Automake already sets that up in the link command.
- dvipdfmx_LDFLAGS=
- AC_SUBST(dvipdfmx_LDFLAGS)
-
- if test ! -d $srcdir/../../texk/kpathsea; then
- AC_MSG_ERROR([
-=========================================
-
-You specified --enable-tetex-build, but I can't find the kpathsea
-directory. I expected it to be in $srcdir/../../texk/kpathsea.
-
-=========================================])
- fi
- CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk"
- dvipdfmx_LDFLAGS="-L\$(top_builddir)/../../texk/kpathsea/.libs"
-
- AM_CONDITIONAL(TDS_VERSION_11, true)
- AC_DEFINE([__TDS_VERSION__], 0x200406L)
-else
- dnl Don't bother going further if we don't have kpse installed.
- AC_ARG_WITH(kpathsea,
- [ --with-kpathsea=DIR use kpathsea include/library files from DIR], [
- if test -d "$withval"; then
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
- fi
- ], [
- if test -d "$prefix"; then
- CPPFLAGS="$CPPFLAGS -I$prefix/include"
- LDFLAGS="$LDFLAGS -L$prefix/lib"
- else
- CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include"
- LDFLAGS="$LDFLAGS -L$ac_default_prefix/lib"
- fi
- ])
-
- AC_CHECK_LIB(kpathsea, kpse_find_file, [LIBS="-lkpathsea $LIBS"],
- AC_MSG_ERROR([kpathsea library not found
-This version of dvipdfmx requires the kpathsea library and its headers. If
-you know where it is you might try setting the LDFLAGS environment variable
-with -L pointing to the directory containing libkpathsea.a.
- ])
- )
-
- dnl Check kpathsea support for required formats and funcs.
- CHO_CHECK_KPSE_SUPPORT([dvipdfmx])
-
- dnl Check for TDS version kpathsea library supports.
- CHO_CHECK_KPSE_TDS_VERSION
-fi
-
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(unistd.h)
-AC_CHECK_HEADERS(stdint.h inttypes.h sys/types.h sys/wait.h)
-
-dnl Checks for library functions.
-AC_FUNC_MEMCMP
-AC_CHECK_FUNCS(open close getenv mkstemp basename)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-MAW_EXT_TIMEZONE
-MAW_TZ_HAS_TM_GMTOFF
-
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_STRUCT_TM
-AC_STRUCT_TIMEZONE
-AC_C_BIGENDIAN
-AC_TYPE_UINT32_T
-
-AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-
-
-dnl Check for additional libraries.
-if test "x$enable_tetex_build" = xyes; then
- # Get these common libraries from the sources, too.
- # Seems like it would be simpler to treat kpathsea this way too, but
- # we're just starting from what lcdf-typetools did.
- sinclude(../../libs/zlib/withenable.ac)
- sinclude(../../libs/zlib/zlib.ac)
-
- sinclude(../../libs/libpng/withenable.ac)
- sinclude(../../libs/libpng/libpng.ac)
-
- # yes, we have zlib and png.
- AC_DEFINE(HAVE_ZLIB)
- AC_DEFINE(HAVE_LIBPNG)
-
- # 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)
-
- # tetex/tex live build; this always has kpathsea, xbasename, etc.,
- # as we're building from current sources. Do this stuff at the end so
- # other configure tests don't try to link with kpathsea (which doesn't
- # exist at configure time).
- LIBS="-lkpathsea -lm $LIBS"
- AC_MSG_NOTICE([tetex build enabled, LIBS now: $LIBS])
-else
- CHO_HAS_LIBPAPER
- CHO_HAS_ZLIB
- CHO_HAS_LIBPNG
-
-dnl these variables are defined in the tetex case and used in src/Makefile.am.
-dnl just let them be empty.
- AC_SUBST(LIBPNGCPPFLAGS)
- AC_SUBST(LDLIBPNG)
- AC_SUBST(LIBPNGDEP)
- AC_SUBST(ZLIBCPPFLAGS)
- AC_SUBST(LDZLIB)
- AC_SUBST(ZLIBDEP)
- AC_SUBST(dvipdfmx_LDFLAGS)
-fi
-
-AC_CONFIG_FILES([Makefile data/Makefile man/Makefile src/Makefile])
-AC_OUTPUT
-
diff --git a/Build/source/texk/dvipdfmx/data/Makefile.am b/Build/source/texk/dvipdfmx/data/Makefile.am
index ac25e3869d6..0391e31015f 100644
--- a/Build/source/texk/dvipdfmx/data/Makefile.am
+++ b/Build/source/texk/dvipdfmx/data/Makefile.am
@@ -1,16 +1,16 @@
-configdatadir = $(datadir)/texmf/dvipdfmx
+configdatadir = $(datarootdir)/texmf/dvipdfmx
dist_configdata_DATA = \
$(srcdir)/dvipdfmx.cfg
-glyphlistdatadir = $(datadir)/texmf/fonts/map/glyphlist
+glyphlistdatadir = $(datarootdir)/texmf-dist/fonts/map/glyphlist
dist_glyphlistdata_DATA = \
$(srcdir)/glyphlist.txt \
$(srcdir)/pdfglyphlist.txt
-mapdatadir = $(datadir)/texmf/fonts/map/dvipdfmx
+mapdatadir = $(datarootdir)/texmf/fonts/map/dvipdfmx
dist_mapdata_DATA = \
$(srcdir)/cid-x.map
-cmapdatadir = $(datadir)/texmf/fonts/cmap/dvipdfmx
+cmapdatadir = $(datarootdir)/texmf/fonts/cmap/dvipdfmx
dist_cmapdata_DATA = \
$(srcdir)/EUC-UCS2
diff --git a/Build/source/texk/dvipdfmx/m4/cho-kpse.m4 b/Build/source/texk/dvipdfmx/m4/cho-kpse.m4
deleted file mode 100644
index 9668fa21d85..00000000000
--- a/Build/source/texk/dvipdfmx/m4/cho-kpse.m4
+++ /dev/null
@@ -1,56 +0,0 @@
-# cho-kpse.m4 - kpathsea features
-# Copyright (C) 1998 - 2008 Jin-Hwan Cho <chofchof@ktug.or.kr>
-#
-# 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_CHECK_KPSE_SUPPORT(PACKAGE-NAME)
-# ------------------------------------
-# Check for kpathsea features
-AC_DEFUN([CHO_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"])])
-])# CHO_CHECK_KPSE_SUPPORT
-
-# CHO_CHECK_KPSE_TDS_VERSION
-# --------------------------
-# Check for enc, cmap, sfd formats
-AC_DEFUN([CHO_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])])
-])# CHO_CHECK_KPSE_TDS_VERSION
-
diff --git a/Build/source/texk/dvipdfmx/m4/cho-libs.m4 b/Build/source/texk/dvipdfmx/m4/cho-libs.m4
deleted file mode 100644
index 3687a0bb9f5..00000000000
--- a/Build/source/texk/dvipdfmx/m4/cho-libs.m4
+++ /dev/null
@@ -1,150 +0,0 @@
-# cho-libs.m4 - various libraries
-# Copyright (C) 1998 - 2008 Jin-Hwan Cho <chofchof@ktug.or.kr>
-#
-# 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_ZLIB
-# ------------
-# Check for zlib
-AC_DEFUN([CHO_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)])
-])# CHO_HAS_ZLIB
-
-# CHO_HAS_LIBPNG
-# --------------
-# Check for libpng
-AC_DEFUN([CHO_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)])
-])# CHO_HAS_LIBPNG
-
-# CHO_HAS_LIBPAPER
-# ----------------
-# Check for libpaper
-AC_DEFUN([CHO_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)])
-])# CHO_HAS_LIBPAPER
-
-# CHO_HAS_LIBFONTCONFIG
-# ---------------------
-# Check for libfontconfig
-AC_DEFUN([CHO_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)])
-])# CHO_HAS_LIBFONTCONFIG
-
-# CHO_CHECK_LIBFREETYPE(PACKAGE-NAME)
-# -----------------------------------
-# Check for libfreetype, fail with error if not found
-AC_DEFUN([CHO_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.])])
-])# CHO_CHECK_LIBFREETYPE
-
diff --git a/Build/source/texk/dvipdfmx/m4/maw-time.m4 b/Build/source/texk/dvipdfmx/m4/maw-time.m4
deleted file mode 100644
index 69a6b191353..00000000000
--- a/Build/source/texk/dvipdfmx/m4/maw-time.m4
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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/dvipdfmx/man/Makefile.am b/Build/source/texk/dvipdfmx/man/Makefile.am
index 6de89890d41..53f9e6db7c4 100644
--- a/Build/source/texk/dvipdfmx/man/Makefile.am
+++ b/Build/source/texk/dvipdfmx/man/Makefile.am
@@ -1 +1,12 @@
-dist_man_MANS = extractbb.1
+# Note: dvipdft.1 used here needs to be updated
+# and dvipdfm.1 be replaced by dvipdfmx.1 with a link to dvipdfm.1
+dist_man1_MANS = dvipdfm.1 dvipdft.1
+man1_MANS = extractbb.1
+man1_links = extractbb:ebb
+
+include $(srcdir)/../../am/man1_links.am
+
+install-data-hook: install-man1-links
+
+uninstall-hook: uninstall-man1-links
+
diff --git a/Build/source/texk/dvipdfmx/src/Makefile.am b/Build/source/texk/dvipdfmx/src/Makefile.am
index e47e0fb4e60..466b4e98d57 100644
--- a/Build/source/texk/dvipdfmx/src/Makefile.am
+++ b/Build/source/texk/dvipdfmx/src/Makefile.am
@@ -1,43 +1,79 @@
+## Makefile.am for the TeX Live subdirectory texk/dvipdfmx/src/
+##
+## Copyright (C) 2009, 2011 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+AM_CFLAGS = $(WARNING_CFLAGS)
+
bin_PROGRAMS = dvipdfmx
-dvipdfmx_SOURCES = agl.c bmpimage.c cff.c cff_dict.c cid.c cidtype0.c cidtype2.c \
-cmap.c cmap_read.c cmap_write.c cs_type2.c \
-dpxconf.c dpxcrypt.c dpxfile.c dpxutil.c \
-dvi.c dvipdfmx.c epdf.c error.c fontmap.c jpegimage.c mem.c mfileio.c mpost.c \
-numbers.c otl_conf.c otl_opt.c pdfcolor.c pdfdev.c pdfdoc.c pdfdraw.c pdfencoding.c \
-pdfencrypt.c pdffont.c pdfnames.c pdfobj.c pdfparse.c pdfresource.c pdfximage.c \
-pkfont.c pngimage.c pst.c pst_obj.c sfnt.c \
-spc_color.c spc_dvips.c spc_html.c spc_misc.c spc_pdfm.c spc_tpic.c spc_util.c specials.c \
-subfont.c tfm.c \
-tt_aux.c tt_cmap.c tt_glyf.c tt_gsub.c tt_post.c tt_table.c truetype.c \
-type0.c t1_char.c t1_load.c type1.c type1c.c \
-unicode.c vf.c xbb.c \
-agl.h bmpimage.h cff.h cff_dict.h cff_limits.h cff_stdstr.h cff_types.h \
-cid.h cid_basefont.h cid_p.h cidtype0.h cidtype2.h cmap.h cmap_p.h cmap_read.h cmap_write.h \
-cs_type2.h dpxconf.h dpxcrypt.h dpxutil.h dpxfile.h dvi.h dvicodes.h dvipdfmx.h epdf.h error.h fontmap.h \
-jpegimage.h mem.h mfileio.h mpost.h numbers.h otl_conf.h otl_opt.h pdfcolor.h pdfdev.h \
-pdfdoc.h pdfdraw.h pdfencoding.h pdfencrypt.h pdffont.h pdflimits.h pdfnames.h pdfobj.h \
-pdfparse.h pdfresource.h pdfximage.h pkfont.h pngimage.h pst.h pst_obj.h sfnt.h \
-spc_color.h spc_dvips.h spc_html.h spc_misc.h spc_pdfm.h spc_tpic.h spc_util.h specials.h \
-subfont.h system.h tfm.h \
-tt_aux.h tt_cmap.h tt_glyf.h tt_gsub.h tt_post.h tt_table.h truetype.h \
-type0.h t1_char.h t1_load.h type1.h type1c.h \
-unicode.h vf.h xbb.h
-
-LIBPNGDIR=$(top_builddir)/../../libs/libpng
-LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR)
-LIBPNGDEP = @LIBPNGDEP@
-LDLIBPNG = @LDLIBPNG@
-
-ZLIBDIR=$(top_builddir)/../../libs/zlib
-ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR)
-ZLIBDEP = @ZLIBDEP@
-LDZLIB = @LDZLIB@
-
-dvipdfmx_CPPFLAGS = @LIBPNGCPPFLAGS@ @ZLIBCPPFLAGS@
-dvipdfmx_LDADD = $(LDADD) $(LDLIBPNG) $(LDZLIB)
-dvipdfmx_DEPENDENCIES = $(ZLIBDEP) $(LIBPNGDEP)
-dvipdfmx_LDFLAGS = @dvipdfmx_LDFLAGS@
-
-install-exec-hook:
- cd $(DESTDIR)$(bindir) && rm -f ebb && $(LN_S) dvipdfmx ebb
- cd $(DESTDIR)$(bindir) && rm -f extractbb && $(LN_S) dvipdfmx extractbb
+if WIN32
+noinst_PROGRAMS = call_dvipdfmx
+else !WIN32
+dist_bin_SCRIPTS = dvipdft
+endif !WIN32
+
+dvipdfmx_SOURCES = \
+ agl.c bmpimage.c cff.c cff_dict.c cid.c cidtype0.c cidtype2.c \
+ cmap.c cmap_read.c cmap_write.c cs_type2.c \
+ dpxconf.c dpxcrypt.c dpxfile.c dpxutil.c \
+ dvi.c dvipdfmx.c epdf.c error.c fontmap.c jpegimage.c mem.c mfileio.c mpost.c \
+ numbers.c otl_conf.c otl_opt.c pdfcolor.c pdfdev.c pdfdoc.c pdfdraw.c pdfencoding.c \
+ pdfencrypt.c pdffont.c pdfnames.c pdfobj.c pdfparse.c pdfresource.c pdfximage.c \
+ pkfont.c pngimage.c pst.c pst_obj.c sfnt.c \
+ spc_color.c spc_dvips.c spc_html.c spc_misc.c spc_pdfm.c spc_tpic.c spc_util.c specials.c \
+ subfont.c tfm.c \
+ tt_aux.c tt_cmap.c tt_glyf.c tt_gsub.c tt_post.c tt_table.c truetype.c \
+ type0.c t1_char.c t1_load.c type1.c type1c.c \
+ unicode.c vf.c xbb.c \
+ agl.h bmpimage.h cff.h cff_dict.h cff_limits.h cff_stdstr.h cff_types.h \
+ cid.h cid_basefont.h cid_p.h cidtype0.h cidtype2.h cmap.h cmap_p.h cmap_read.h cmap_write.h \
+ cs_type2.h dpxconf.h dpxcrypt.h dpxutil.h dpxfile.h dvi.h dvicodes.h dvipdfmx.h epdf.h error.h fontmap.h \
+ jpegimage.h mem.h mfileio.h mpost.h numbers.h otl_conf.h otl_opt.h pdfcolor.h pdfdev.h \
+ pdfdoc.h pdfdraw.h pdfencoding.h pdfencrypt.h pdffont.h pdflimits.h pdfnames.h pdfobj.h \
+ pdfparse.h pdfresource.h pdfximage.h pkfont.h pngimage.h pst.h pst_obj.h sfnt.h \
+ spc_color.h spc_dvips.h spc_html.h spc_misc.h spc_pdfm.h spc_tpic.h spc_util.h specials.h \
+ subfont.h system.h tfm.h \
+ tt_aux.h tt_cmap.h tt_glyf.h tt_gsub.h tt_post.h tt_table.h truetype.h \
+ type0.h t1_char.h t1_load.h type1.h type1c.h \
+ unicode.h vf.h xbb.h
+
+dvipdfmx_CPPFLAGS = $(KPATHSEA_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES)
+
+dvipdfmx_DEPENDENCIES = $(ZLIB_DEPEND) $(LIBPNG_DEPEND) $(KPATHSEA_DEPEND)
+
+dvipdfmx_LDADD = $(KPATHSEA_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS)
+
+call_dvipdfmx_SOURCES = $(srcdir)/../texlive/w32_wrapper/callexe.c
+
+call_dvipdfmx_CPPFLAGS = -DEXEPROG=\"dvipdfmx.exe\"
+
+bin_links = \
+ dvipdfmx$(EXEEXT):dvipdfm \
+ dvipdfmx$(EXEEXT):ebb \
+ dvipdfmx$(EXEEXT):extractbb
+
+include $(srcdir)/../../am/bin_links.am
+
+## Rebuild libkpathsea
+@KPATHSEA_RULE@
+## Rebuild libpng
+@LIBPNG_RULE@
+## Rebuild libz
+@ZLIB_RULE@
+
+EXTRA_DIST = asl_charset.h mk_agl_standard_c.pl
+
+install-exec-hook: install-bin-links
+if WIN32
+ $(INSTALL_PROGRAM) call_dvipdfmx$(EXEEXT) $(DESTDIR)$(bindir)/dvipdfm$(EXEEXT)
+ $(INSTALL_PROGRAM) call_dvipdfmx$(EXEEXT) $(DESTDIR)$(bindir)/ebb$(EXEEXT)
+ $(INSTALL_PROGRAM) call_dvipdfmx$(EXEEXT) $(DESTDIR)$(bindir)/extractbb$(EXEEXT)
+endif WIN32
+
+uninstall-hook: uninstall-bin-links
+if WIN32
+ rm -f $(DESTDIR)$(bindir)/dvipdfm$(EXEEXT)
+ rm -f $(DESTDIR)$(bindir)/ebb$(EXEEXT)
+ rm -f $(DESTDIR)$(bindir)/extractbb$(EXEEXT)
+endif WIN32
+