summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx
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/source/texk/dvipdfmx
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/source/texk/dvipdfmx')
-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
7 files changed, 268 insertions, 188 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
+