diff options
Diffstat (limited to 'Build/source/m4')
-rw-r--r-- | Build/source/m4/cho-kpse.m4 | 47 | ||||
-rw-r--r-- | Build/source/m4/cho-libs.m4 | 114 | ||||
-rw-r--r-- | Build/source/m4/kpse-common.m4 | 26 | ||||
-rw-r--r-- | Build/source/m4/kpse-gd-flags.m4 | 2 | ||||
-rw-r--r-- | Build/source/m4/kpse-kpathsea-flags.m4 | 22 | ||||
-rw-r--r-- | Build/source/m4/kpse-pkgs.m4 | 2 | ||||
-rw-r--r-- | Build/source/m4/kpse-setup.m4 | 2 | ||||
-rw-r--r-- | Build/source/m4/maw-time.m4 | 34 |
8 files changed, 247 insertions, 2 deletions
diff --git a/Build/source/m4/cho-kpse.m4 b/Build/source/m4/cho-kpse.m4 new file mode 100644 index 00000000000..6c6014d9e45 --- /dev/null +++ b/Build/source/m4/cho-kpse.m4 @@ -0,0 +1,47 @@ +# Public macros for the teTeX / TeX Live (TL) tree. +# Copyright (C) 1998 - 2008 Jin-Hwan Cho <chofchof@ktug.or.kr> +# Copyright (C) 2008 - 2009 Peter Breitenlohner <tex-live@tug.org> +# +# 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_KPSE_SUPPORT(PACKAGE-NAME) +# ------------------------------------ +# Check for required file formats and xbasename. +# We need tex-ps_header, type1, vf, ofm, ovf, and truetype; +# of these truetype was introduced last (Dec 1997). +AC_DEFUN([CHO_CHECK_KPSE_SUPPORT], +[KPSE_CHECK_KPSE_FORMAT([truetype], , + [AC_MSG_ERROR([Required file formats not found in Kpathsea header files. + +This version of $1 requires that kpathsea and its headers be available. +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 "kpathsea/kpathsea.h" + +])]) +KPSE_CHECK_XBASENAME([], + [AC_MSG_ERROR([This version of $1 requires xbasename in libkpathsea.])]) +]) # CHO_CHECK_KPSE_SUPPORT + +# CHO_CHECK_KPSE_TDS_VERSION +# -------------------------- +# Check for TDS version 1.1 support. +# We need cmap, enc, opentype, and sfd formats (Dec 2003). +AC_DEFUN([CHO_CHECK_KPSE_TDS_VERSION], +[KPSE_CHECK_KPSE_FORMAT([opentype], + [tds_version_11=yes + AC_DEFINE([__TDS_VERSION__], [0x200406L], + [Define as 0x200406L if your libkpathsea supports enc formats, + or as 0x200302L otherwise.])], + [tds_version_11=no + AC_DEFINE([__TDS_VERSION__], [0x200302L])]) +AC_MSG_CHECKING([whether libkpathsea supports TDS version 1.1 installation]) +AC_MSG_RESULT([$tds_version_11]) +AM_CONDITIONAL([TDS_VERSION_11], [test "x$tds_version_11" = xyes]) +]) # CHO_CHECK_KPSE_TDS_VERSION + diff --git a/Build/source/m4/cho-libs.m4 b/Build/source/m4/cho-libs.m4 new file mode 100644 index 00000000000..426f44660fa --- /dev/null +++ b/Build/source/m4/cho-libs.m4 @@ -0,0 +1,114 @@ +# Public macros for the teTeX / TeX Live (TL) tree. +# Copyright (C) 1998 - 2008 Jin-Hwan Cho <chofchof@ktug.or.kr> +# Copyright (C) 2008 - 2009 Peter Breitenlohner <tex-live@tug.org> +# +# 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 <zlib.h>]], + [[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.h>]], + [[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 <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_CHECK_LIBPAPER + +# CHO_CHECK_LIBFONTCONFIG +# ----------------------- +# Check for libfontconfig +AC_DEFUN([CHO_CHECK_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_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 <ft2build.h> +#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-common.m4 b/Build/source/m4/kpse-common.m4 index ec45662634d..86ab1decc8c 100644 --- a/Build/source/m4/kpse-common.m4 +++ b/Build/source/m4/kpse-common.m4 @@ -233,3 +233,29 @@ if test "$kb_cv_var_program_inv_name" = yes; then `program_invocation_name' and `program_invocation_short_name'.]) fi ]) # KPSE_COMMON + +# KPSE_SAVE_FLAGS +# --------------- +# Save values of CPPFLAGS and LIBS. +AC_DEFUN([KPSE_SAVE_FLAGS], +[kpse_save_CPPFLAGS=$CPPFLAGS +kpse_save_LIBS=$LIBS +]) # KPSE_SAVE_FLAGS + +# KPSE_RESTORE_FLAGS +# ------------------ +# Restore values of CPPFLAGS and LIBS. +AC_DEFUN([KPSE_RESTORE_FLAGS], +[AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl +CPPFLAGS=$kpse_save_CPPFLAGS +LIBS=$kpse_save_LIBS +]) # KPSE_RESTORE_FLAGS + +# KPSE_ADD_FLAGS(LIBDIR) +# ---------------------- +# Add flags for LIBDIR to values of CPPFLAGS and LIBS. +AC_DEFUN([KPSE_ADD_FLAGS], +[AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl +CPPFLAGS="$CPPFLAGS $[]AS_TR_CPP($1)_INCLUDES" +LIBS="$[]AS_TR_CPP($1)_LIBS $LIBS" +]) # KPSE_ADD_FLAGS diff --git a/Build/source/m4/kpse-gd-flags.m4 b/Build/source/m4/kpse-gd-flags.m4 index f865df91e6a..b29ff411be1 100644 --- a/Build/source/m4/kpse-gd-flags.m4 +++ b/Build/source/m4/kpse-gd-flags.m4 @@ -19,7 +19,7 @@ AC_DEFUN([KPSE_GD_FLAGS], _KPSE_LIB_FLAGS([gd], [gd], [$1], [-IBLD/libs/gd], [BLD/libs/gd/libgd.a], [], - [], [${top_builddir}/../../libs/libpng/gd.h])[]dnl + [], [${top_builddir}/../../libs/gd/gd.h])[]dnl ]) # KPSE_GD_FLAGS # KPSE_GD_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-kpathsea-flags.m4 b/Build/source/m4/kpse-kpathsea-flags.m4 index afc3cd3c306..141cf3c80f1 100644 --- a/Build/source/m4/kpse-kpathsea-flags.m4 +++ b/Build/source/m4/kpse-kpathsea-flags.m4 @@ -28,3 +28,25 @@ AC_DEFUN([KPSE_KPATHSEA_FLAGS], AC_DEFUN([KPSE_KPATHSEA_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([kpathsea], [kpathsea])[]dnl ]) # KPSE__SYSTEM_FLAGS + +# KPSE_CHECK_KPSE_FORMAT(FORMAT, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ---------------------------------------------------------------- +# Check whether kpathsea declares the kpse_FORMAT_format. +AC_DEFUN([KPSE_CHECK_KPSE_FORMAT], +[AC_CACHE_CHECK([whether kpathsea declares the kpse_$1_format], + [kpse_cv_have_$1_format], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]], + [[kpse_$1_format]])], + [kpse_cv_have_$1_format=yes], + [kpse_cv_have_$1_format=no])]) +AS_IF([test "x$kpse_cv_have_$1_format" = xyes], [$2], [$3])[]dnl +]) # KPSE_CHECK_KPSE_FORMAT + +# KPSE_CHECK_XBASENAME([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# -------------------------------------------------------------- +# Check whether kpathsea declares xbasename(). +AC_DEFUN([KPSE_CHECK_XBASENAME], +[AC_CHECK_DECL([xbasename], [$1], [$2], + [[#include <kpathsea/kpathsea.h>]]) +]) # KPSE_CHECK_XBASENAME diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4 index a1477ba2ff8..e3050dc219a 100644 --- a/Build/source/m4/kpse-pkgs.m4 +++ b/Build/source/m4/kpse-pkgs.m4 @@ -82,6 +82,7 @@ dvidvi dviljk dvipdfm dvipdfmx +dvipng dvipos dvipsk gsftopk @@ -95,6 +96,7 @@ tex4htk ttf2pk ttfdump xdv2pdf +xdvik xdvipdfmx tetex ])]) # KPSE_TEXK_PKGS diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4 index deb0e6aff39..5a8581effc0 100644 --- a/Build/source/m4/kpse-setup.m4 +++ b/Build/source/m4/kpse-setup.m4 @@ -9,7 +9,7 @@ # KPSE_SETUP(TOP-LEVEL) # --------------------- -# Initialize path prefix kpse_TL to top-level teTeX / TeX live (TL) directory. +# Initialize path prefix kpse_TL to top-level teTeX / TeX Live (TL) directory. # Sinclude all withenable.ac files providing: # configure options --with-system-LIB, --with-LIB-includes, and --with-LIB-libdir # for libraries diff --git a/Build/source/m4/maw-time.m4 b/Build/source/m4/maw-time.m4 new file mode 100644 index 00000000000..5893b5488c9 --- /dev/null +++ b/Build/source/m4/maw-time.m4 @@ -0,0 +1,34 @@ +# Public macros for the teTeX / TeX Live (TL) tree. +# Copyright (C) 1998 - 2008 Mark A. Wicks <mwicks@kettering.edu> +# Kettering University +# Copyright (C) 2008 - 2009 Peter Breitenlohner <tex-live@tug.org> +# +# 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 + +# MAW_EXT_TIMEZONE +# ---------------- +AC_DEFUN([MAW_EXT_TIMEZONE], +[AC_CACHE_CHECK([whether time.h defines timezone as an external variable], + [maw_cv_ext_timezone], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], + [[-timezone;]])], + [maw_cv_ext_timezone=yes], + [maw_cv_ext_timezone=no])]) +AS_IF([test "x$maw_cv_ext_timezone" = xyes], + [AC_DEFINE([HAVE_TIMEZONE], 1, + [Define if <time.h> has timezone as an external variable.])]) +])# MAW_EXT_TIMEZONE + +# MAW_TM_HAS_TM_GMTOFF +# -------------------- +AC_DEFUN([MAW_TM_HAS_TM_GMTOFF], +[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>]]) +])# MAW_TM_HAS_TM_GMTOFF + |