diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-19 13:59:30 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-19 13:59:30 +0000 |
commit | 0b7b2c69ec83497d9accab064da0f4ad07662d42 (patch) | |
tree | e8f22a2acecbf3035850f56beb1c8161c53cdf2d /Build/source/texk/dvipdfm | |
parent | ee507bbd1fc483c58acb33cca25509a4dd81df9b (diff) |
prepare for new build system
git-svn-id: svn://tug.org/texlive/trunk@12429 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm')
-rw-r--r-- | Build/source/texk/dvipdfm/Makefile.in.orig | 81 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm/ac/withenable.ac | 3 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm/acinclude.m4.orig | 105 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm/configure.in.orig | 58 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm/m4/maw-time.m4 | 34 |
5 files changed, 281 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm/Makefile.in.orig b/Build/source/texk/dvipdfm/Makefile.in.orig new file mode 100644 index 00000000000..a75ca83d585 --- /dev/null +++ b/Build/source/texk/dvipdfm/Makefile.in.orig @@ -0,0 +1,81 @@ +# @configure_input@ + +kpse_include ../make/paths.mk +kpse_include ../make/common.mk +kpse_include ../make/programs.mk + +ZLIBDIR=../../libs/zlib +ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR) +ZLIBDEP = @ZLIBDEP@ +LDZLIB = @LDZLIB@ + +LIBPNGDIR=../../libs/libpng +LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR) +LIBPNGDEP = @LIBPNGDEP@ +LDLIBPNG = @LDLIBPNG@ + +LD_ALL_LIBS = $(LDLIBPNG) $(LDZLIB) +ALL_LIBS_DEP = $(ZLIBDEP) $(LIBPNGDEP) + +program = dvipdfm +programs = $(program) ebb +default all: $(programs) + +prog_cflags = @LIBPNGCPPFLAGS@ @ZLIBCPPFLAGS@ + +objects=pdfdev.o pdfdoc.o dvi.o mfileio.o mem.o jpeg.o numbers.o pdfobj.o \ + pdfparse.o pdfspecial.o tfm.o type1.o dvipdfm.o epdf.o vf.o \ + t1crypt.o pkfont.o tpic.o thumbnail.o pngimage.o htex.o \ + mpost.o psimage.o psspecial.o colorsp.o encodings.o @TTF_OPT@ ttf.o +eobjects=ebb.o jpeg.o pdfobj.o mem.o mfileio.o numbers.o pdfparse.o \ + pngimage.o + +$(program): $(objects) $(kpathsea) $(ALL_LIBS_DEP) + $(kpathsea_link) $(objects) $(LD_ALL_LIBS) $(LOADLIBES) + +ebb: $(eobjects) $(kpathsea) $(ALL_LIBS_DEP) + $(kpathsea_link) $(eobjects) $(LD_ALL_LIBS) $(LOADLIBES) + +$(LIBPNGDIR)/libpng.a: + cd $(LIBPNGDIR); $(MAKE) + +$(ZLIBDIR)/libz.a: + cd $(ZLIBDIR); $(MAKE) + +kpse_include ../make/tkpathsea.mk + +install: install-exec install-data +uninstall: uninstall-exec uninstall-data + +distclean:: + $(RM) config.h + +install-exec: + $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir) + $(INSTALL_LIBTOOL_PROG) $(program) $(bindir) +# don't install ebb; we use the compatible version in dvipdfmx. +# but i guess we may as well keep building it for now. --karl, 23may08. +# $(INSTALL_LIBTOOL_PROG) ebb $(bindir) + $(INSTALL_SCRIPT) $(srcdir)/dvipdft $(bindir) + +uninstall-exec: + cd $(bindir); rm -f $(programs) + +install-data: + $(SHELL) $(top_srcdir)/../mkinstalldirs $(man1dir) + $(INSTALL_DATA) $(srcdir)/$(program).1 $(man1dir)/$(program).$(manext) + $(INSTALL_DATA) $(srcdir)/dvipdft.1 $(man1dir)/dvipdft.$(manext) + $(INSTALL_DATA) $(srcdir)/ebb.1 $(man1dir)/ebb.$(manext) + +uninstall-data: + rm -f $(man1dir)/dvilj.$(manext) + rm -f $(man1dir)/dvipdft.$(manext) + rm -f $(man1dir)/ebb.$(manext) + +kpse_include ../make/config.mk + +info dvi check: + +kpse_include ../make/clean.mk +kpse_include ../make/rdepend.mk +kpse_include depend.mk diff --git a/Build/source/texk/dvipdfm/ac/withenable.ac b/Build/source/texk/dvipdfm/ac/withenable.ac new file mode 100644 index 00000000000..ecfa3e417c5 --- /dev/null +++ b/Build/source/texk/dvipdfm/ac/withenable.ac @@ -0,0 +1,3 @@ +## texk/dvipdfm/ac/withenable.ac +## configure options and TL libraries required for dvipdfm +KPSE_WITH_PROG([dvipdfm], [kpathsea libpng]) diff --git a/Build/source/texk/dvipdfm/acinclude.m4.orig b/Build/source/texk/dvipdfm/acinclude.m4.orig new file mode 100644 index 00000000000..879c18301f2 --- /dev/null +++ b/Build/source/texk/dvipdfm/acinclude.m4.orig @@ -0,0 +1,105 @@ +# +# Local tests written by MAW +# +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], 1, [define if <time.h> has timezone as an external variable])], + [AC_MSG_RESULT(no)])]) +AC_DEFUN([AC_HAVE_BASENAME], + [AC_MSG_CHECKING([whether basename is in either libgen.h or string.h]) + AC_TRY_COMPILE([#include <libgen.h> +#include <string.h>], [extern char basename(void)], + [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BASENAME)])]) +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], 1, [define if struct tm has tm_gmtoff as a member])], + [AC_MSG_RESULT(no)])]) +# +AC_DEFUN([AC_HAS_KPSE_FORMATS], + [AC_MSG_CHECKING([whether you have kpathsea headers and they whether they know about the required file formats]) + AC_TRY_COMPILE([#include <stdio.h> +#include <kpathsea/tex-file.h>], + [kpse_tex_ps_header_format; + kpse_type1_format;kpse_vf_format], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_KPSE_FORMATS], 1, [define if kpathsea supports type1 and vf formats])], + [AC_MSG_RESULT(no); +AC_MSG_ERROR([PS_HEADER and/or VF formats not found in Kpathsea header files. + +This version of dvipdfm 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" + +])])]) +# +AC_DEFUN([AC_HAS_OMEGA_FORMATS], + [AC_MSG_CHECKING([whether your kpathsea supports Omega OFM file formats]) + AC_TRY_COMPILE([#include <stdio.h> +#include <kpathsea/tex-file.h>], + [kpse_ofm_format], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_OMEGA_FORMATS], 1, [Define if kpathsea understands Omega (OFM/OVF) formats])], + [AC_MSG_RESULT(no)])]) +AC_DEFUN([AC_HAS_TTF_FORMATS], + [AC_MSG_CHECKING([whether your kpathsea supports Truetype (TTF) file formats]) + AC_TRY_COMPILE([#include <stdio.h> +#include <kpathsea/tex-file.h>], + [kpse_truetype_format], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_TTF_FORMATS], 1 ,[define if kpathsea understands TrueType (TTF) formats]) + TTF_OPT=''], + [AC_MSG_RESULT(no)])]) +# +# 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)], [ + AC_MSG_RESULT(no)])]) +# +# End of local tests +# diff --git a/Build/source/texk/dvipdfm/configure.in.orig b/Build/source/texk/dvipdfm/configure.in.orig new file mode 100644 index 00000000000..26fef88d265 --- /dev/null +++ b/Build/source/texk/dvipdfm/configure.in.orig @@ -0,0 +1,58 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(dvipdfm.c) + +define([_version_],"0.13.2d") + +VERSION=_version_ +AC_SUBST(VERSION) +AC_DEFINE(VERSION, _version_, [package version]) +AC_DEFINE(PACKAGE, "dvipdfm", [package name]) + +AC_CONFIG_HEADERS([c-auto.h:c-auto.in], [date >stamp-auto]) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + +sinclude(../kpathsea/withenable.ac) +sinclude(../../libs/zlib/withenable.ac) +sinclude(../../libs/libpng/withenable.ac) +sinclude(../../libs/zlib/zlib.ac) +sinclude(../../libs/libpng/libpng.ac) + +AC_DEFINE([HAVE_KPATHSEA], 1, [define if you have kpathsea]) +AC_DEFINE([HAVE_XBASENAME], 1, [define if you have xbasename() in your libkpathsea instead of basename()]) +AC_DEFINE([HAVE_ZLIB], 1, [define if you have zlib and its headers]) +AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1, [define if your zlib has the compress2 function]) +AC_DEFINE([HAVE_KPSE_FORMATS], 1, [define if kpathsea supports type1 and vf formats]) +AC_DEFINE([HAVE_OMEGA_FORMATS], 1, [Define if kpathsea understands Omega (OFM/OVF) formats]) +AC_DEFINE([HAVE_TTF_FORMATS], 1, [define if kpathsea understands TrueType (TTF) formats]) +AC_DEFINE([HAVE_LIBPNG], 1, [define if you have libpng]) +TTF_OPT='' +AC_SUBST(TTF_OPT) + +# TEXMF='${datadir}/texmf' +# AC_SUBST(TEXMF) + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_EXT_TIMEZONE +AC_TZ_HAS_TM_GMTOFF + +AC_C_CONST +AC_TYPE_SIZE_T +AC_STRUCT_TM + +dnl Checks for library functions. +AC_FUNC_MEMCMP +AC_CHECK_FUNCS(strspn system) +AC_CHECK_LIB(m, main) + +KPSE_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/Build/source/texk/dvipdfm/m4/maw-time.m4 b/Build/source/texk/dvipdfm/m4/maw-time.m4 new file mode 100644 index 00000000000..91a6c005ddd --- /dev/null +++ b/Build/source/texk/dvipdfm/m4/maw-time.m4 @@ -0,0 +1,34 @@ +# maw-time.m4 - timezone tests +# Copyright (C) 1998 - 2009 Mark A. Wicks <mwicks@kettering.edu> +# Kettering University +# +# 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 2 + +# MAW_EXT_TIMEZONE +# ---------------- +AC_DEFUN([MAW_EXT_TIMEZONE], +[AC_MSG_CHECKING([whether time.h defines timezone as an external variable]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], + [[-timezone;]])], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_TIMEZONE], 1, + [Define if <time.h> has timezone as an external variable.])], + [AC_MSG_RESULT([no])]) +])# MAW_EXT_TIMEZONE + +# MAW_TM_HAS_TM_GMTOFF +# -------------------- +AC_DEFUN([MAW_TM_HAS_TM_GMTOFF], +[AC_MSG_CHECKING([whether struct tm has tm_gmtoff as a member]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], + [[struct tm *tp; tp->tm_gmtoff;]])], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_TM_GMTOFF], 1, + [Define if struct tm has tm_gmtoff as a member.])], + [AC_MSG_RESULT([no])]) +])# MAW_TM_HAS_TM_GMTOFF + |