From 1cc0c8d0188da1ffc08a7fa8ce625427f36cecc6 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Thu, 8 Aug 2013 12:45:43 +0000 Subject: build system: M4 macros for dvipdfm-x git-svn-id: svn://tug.org/texlive/trunk@31388 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/m4/ChangeLog | 5 ++ Build/source/m4/cho-libs.m4 | 104 --------------------------------------- Build/source/m4/kpse-libpaper.m4 | 49 ++++++++++++++++++ 3 files changed, 54 insertions(+), 104 deletions(-) delete mode 100644 Build/source/m4/cho-libs.m4 create mode 100644 Build/source/m4/kpse-libpaper.m4 (limited to 'Build/source') diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog index 267e009bae9..8230257245a 100644 --- a/Build/source/m4/ChangeLog +++ b/Build/source/m4/ChangeLog @@ -1,3 +1,8 @@ +2013-08-07 Peter Breitenlohner + + * cho-libs.m4: Moved ... + * kpse-libpaper.m4: ... to here and simplified. + 2013-08-06 Peter Breitenlohner * kpse-pkgs.m4 (KPSE_TEXK_PKGS): Recover dvipdfm-x@31034 diff --git a/Build/source/m4/cho-libs.m4 b/Build/source/m4/cho-libs.m4 deleted file mode 100644 index 06c0aa49df6..00000000000 --- a/Build/source/m4/cho-libs.m4 +++ /dev/null @@ -1,104 +0,0 @@ -# Public macros for the TeX Live (TL) tree. -# Copyright (C) 1998 - 2008 Jin-Hwan Cho -# Copyright (C) 2008 - 2009 Peter Breitenlohner -# -# 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 2 - -# CHO_CHECK_ZLIB -# -------------- -# Check for zlib -AC_DEFUN([CHO_CHECK_ZLIB], -[AC_CACHE_CHECK([for zlib header files and library], - [cho_cv_have_zlib], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[z_stream p;]])], - [cho_cv_have_zlib=yes], - [cho_cv_have_zlib=no])]) -AS_IF([test "x$cho_cv_have_zlib" = xyes], - [AC_CHECK_FUNCS([compress], - [AC_DEFINE([HAVE_ZLIB], 1, - [Define if you have zlib and its headers.]) - AC_CHECK_FUNCS([compress2], - [AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1, - [Define if your zlib has the compress2 function.])])])]) -])# CHO_CHECK_ZLIB - -# CHO_CHECK_LIBPNG -# ---------------- -# Check for libpng -AC_DEFUN([CHO_CHECK_LIBPNG], -[AC_CACHE_CHECK([for libpng header files and library], - [cho_cv_have_png], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[png_infop p;]])], - [cho_cv_have_png=yes], - [cho_cv_have_png=no])]) -AS_IF([test "x$cho_cv_have_png" = xyes], - [AC_CHECK_FUNCS([png_get_image_width], - [AC_DEFINE([HAVE_LIBPNG], 1, - [Define if you have libpng and its headers.])])]) -])# CHO_CHECK_LIBPNG - -# CHO_CHECK_LIBPAPER -# ------------------ -# Check for libpaper -AC_DEFUN([CHO_CHECK_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 ], - [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_CHECK_LIBPAPER - -# CHO_CHECK_LIBFONTCONFIG -# ----------------------- -# Check for libfontconfig -AC_DEFUN([CHO_CHECK_LIBFONTCONFIG], -[AC_CACHE_CHECK([for fontconfig header files and library], - [cho_cv_have_fontconfig], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[FcObjectSet *os;]])], - [cho_cv_have_fontconfig=yes], - [cho_cv_have_fontconfig=no])]) -AS_IF([test "x$cho_cv_have_fontconfig" = xyes], - [AC_CHECK_FUNCS([FcInit], - [AC_DEFINE([HAVE_LIBFONTCONFIG], 1, - [Define if you have libfontconfig and its headers.])])]) -])# CHO_CHECK_LIBFONTCONFIG - -# CHO_CHECK_LIBFREETYPE(PACKAGE-NAME) -# ----------------------------------- -# Check for libfreetype, fail with error if not found -AC_DEFUN([CHO_CHECK_LIBFREETYPE], -[AC_CACHE_CHECK([for freetype2 header files and library], - [cho_cv_have_freetype], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#include FT_FREETYPE_H]], - [[FT_Face face;]])], - [cho_cv_have_freetype=yes], - [cho_cv_have_freetype=no])]) -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. -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-libpaper.m4 b/Build/source/m4/kpse-libpaper.m4 new file mode 100644 index 00000000000..36703b446fc --- /dev/null +++ b/Build/source/m4/kpse-libpaper.m4 @@ -0,0 +1,49 @@ +# Public macros for the TeX Live (TL) tree. +# Copyright (C) 1998-2008 Jin-Hwan Cho +# Copyright (C) 2008-2013 Peter Breitenlohner +# +# 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. + +# KPSE_LIBPAPER +# ------------- +# Provide the configure options '--with-paper-includes', '--with-paper-libdir' +# and check for the ortional libpaper. If found define HAVE_LIBPAPER. +# Set the make variables PAPER_INCLUDES and PAPER_LIBS to the CPPFLAGS and +# LIBS required for the installed (system) library. +AC_DEFUN([KPSE_LIBPAPER], [dnl +AC_REQUIRE([KPSE_SAVE_FLAGS]) +AC_ARG_WITH([paper-includes], + AS_HELP_STRING([--with-paper-includes=DIR], + [paper headers installed in DIR]))[]dnl +AC_ARG_WITH([paper-libdir], + AS_HELP_STRING([--with-paper-libdir=DIR], + [paper library installed in DIR]))[]dnl +AS_CASE([$with_paper_includes], + ["" | yes], [PAPER_INCLUDES=], + [PAPER_INCLUDES="-I$with_paper_includes"]) +AS_CASE([$with_paper_libdir], + ["" | yes], [PAPER_LIBS=], + [PAPER_LIBS="-L$with_paper_libdir"]) +CPPFLAGS="$CPPFLAGS $PAPER_INCLUDES" +LIBS="$LIBS $PAPER_LIBS" +AC_MSG_CHECKING([for paper header files]) +result=no +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct paper *p;]])], + [AC_SEARCH_LIBS([paperpswidth], [paper]) + AS_CASE([$ac_cv_search_paperpswidth], + [no], [:], + ["none required"], [result=yes], + [result=yes + PAPER_LIBS="$PAPER_LIBS $ac_cv_search_paperpswidth"])]) +AS_CASE([$result], + [no], [PAPER_INCLUDES= PAPER_LIBS=], + [AC_DEFINE([HAVE_LIBPAPER], 1, [Define if you have libpaper])]) +AC_MSG_RESULT([$result]) +AC_SUBST([PAPER_INCLUDES]) +AC_SUBST([PAPER_LIBS]) +KPSE_RESTORE_FLAGS +])# KPSE_LIBPAPER + -- cgit v1.2.3