summaryrefslogtreecommitdiff
path: root/Build/source/m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-25 09:40:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-25 09:40:23 +0000
commitb1694b996be79022b025714fcb6c142724f222d1 (patch)
tree408e0dcc2f16bd77389ac76f585c8fec15bfbcb6 /Build/source/m4
parent7a6aebddcdcee697b010d2b6d0db9b7b43e826b5 (diff)
m4: Clean up Autoconf macros
git-svn-id: svn://tug.org/texlive/trunk@33282 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r--Build/source/m4/ChangeLog6
-rw-r--r--Build/source/m4/kpse-cairo-flags.m428
-rw-r--r--Build/source/m4/kpse-cross.m439
-rw-r--r--Build/source/m4/kpse-pixman-flags.m430
-rw-r--r--Build/source/m4/kpse-poppler-flags.m422
-rw-r--r--Build/source/m4/kpse-potrace-flags.m416
-rw-r--r--Build/source/m4/kpse-win32.m46
-rw-r--r--Build/source/m4/kpse-zziplib-flags.m430
8 files changed, 78 insertions, 99 deletions
diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog
index 7cea39fe751..abb16301077 100644
--- a/Build/source/m4/ChangeLog
+++ b/Build/source/m4/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpse-cairo-flags.m4, kpse-cross.m4, kpse-pixman-flags.m4,
+ kpse-poppler-flags.m4, kpse-potrace-flags.m4, kpse-win32.m4,
+ kpse-zziplib-flags.m4: Clean up.
+
2014-03-21 Peter Breitenlohner <peb@mppmu.mpg.de>
* kpse-setup.m4: Disable LuaJITTeX for known unsupported systems.
diff --git a/Build/source/m4/kpse-cairo-flags.m4 b/Build/source/m4/kpse-cairo-flags.m4
index f9c38f2e588..8e093e8643c 100644
--- a/Build/source/m4/kpse-cairo-flags.m4
+++ b/Build/source/m4/kpse-cairo-flags.m4
@@ -1,35 +1,35 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2012, 2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org>
#
# 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.
# KPSE_CAIRO_FLAGS
-# ---------------
+# ----------------
# Provide the configure options '--with-system-pixman' (if in the TL tree).
#
# Set the make variables CAIRO_INCLUDES and CAIRO_LIBS to the CPPFLAGS and
# LIBS required for the `-lcairo' library in libs/cairo/ of the TL tree.
-AC_DEFUN([KPSE_CAIRO_FLAGS],
-[_KPSE_LIB_FLAGS([cairo], [cairo], [],
- [-IBLD/libs/cairo/cairo], [BLD/libs/cairo/libcairo.a], [],
- [], [${top_builddir}/../../libs/cairo/cairo/cairo.h])[]dnl
+AC_DEFUN([KPSE_CAIRO_FLAGS], [dnl
+_KPSE_LIB_FLAGS([cairo], [cairo], [],
+ [-IBLD/libs/cairo/cairo], [BLD/libs/cairo/libcairo.a], [],
+ [], [${top_builddir}/../../libs/cairo/cairo/cairo.h])[]dnl
]) # KPSE_CAIRO_FLAGS
# KPSE_CAIRO_OPTIONS([WITH-SYSTEM])
-# --------------------------------
-AC_DEFUN([KPSE_CAIRO_OPTIONS],
-[m4_ifval([$1],
- [AC_ARG_WITH([system-cairo],
- AS_HELP_STRING([--with-system-cairo],
+# ---------------------------------
+AC_DEFUN([KPSE_CAIRO_OPTIONS], [dnl
+m4_ifval([$1],
+ [AC_ARG_WITH([system-cairo],
+ AS_HELP_STRING([--with-system-cairo],
[use installed cairo headers and library (requires pkg-config)]))])[]dnl
]) # KPSE_CAIRO_OPTIONS
# KPSE_CAIRO_SYSTEM_FLAGS
-# ----------------------
-AC_DEFUN([KPSE_CAIRO_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+# -----------------------
+AC_DEFUN([KPSE_CAIRO_SYSTEM_FLAGS], [dnl
+AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
if $PKG_CONFIG cairo --atleast-version=1.12; then
CAIRO_INCLUDES=`$PKG_CONFIG cairo --cflags`
CAIRO_LIBS=`$PKG_CONFIG cairo --libs`
diff --git a/Build/source/m4/kpse-cross.m4 b/Build/source/m4/kpse-cross.m4
index 3f020060297..9396b899337 100644
--- a/Build/source/m4/kpse-cross.m4
+++ b/Build/source/m4/kpse-cross.m4
@@ -1,12 +1,10 @@
# Private macros for the kpathsea library.
-# Copyright (C) 1995 - 2009 Karl Berry <tex-live@tug.org>
+# Copyright (C) 1995-2014 Karl Berry <tex-live@tug.org>
#
# 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 3
-
# KPSE_CROSS_PATH_PROG(RESULT, CROSS_PROG, NORMAL_PROG)
# -----------------------------------------------------
# Find a program when cross-compiling, or use a default when not.
@@ -16,35 +14,12 @@
# Example: KPSE_CROSS_PATH_PROG([TANGLE], [tangle], [./tangle]) sets
# 'TANGLE' to the program 'tangle' found in PATH when cross-compiling,
# and to './tangle' if not.
-AC_DEFUN([KPSE_CROSS_PATH_PROG],
- [if test "x$cross_compiling" = xyes; then
+AC_DEFUN([KPSE_CROSS_PATH_PROG], [dnl
+AS_IF([test "x$cross_compiling" = xyes], [dnl
AC_PATH_PROG([$1], [$2])
-if test -z "${$1}"; then
- AC_MSG_ERROR([$2 was not found but is required when cross-compiling.
- Install $2 or set \$$1 to the full pathname.])
-fi
-else
- $1=$3
-fi
+AS_IF([test -z "${$1}"],
+ [AC_MSG_ERROR([$2 was not found but is required when cross-compiling.
+ Install $2 or set \$$1 to the full pathname.])])],
+[$1=$3])
]) # KPSE_CROSS_PATH_PROG
-# KPSE_CROSS_BUILD_VAR(STEM, PROG)
-# --------------------------------
-# Set BUILD$1 to $2 when cross-compiling, to $($1) if not.
-# Example: KPSE_CROSS_BUILD_VAR([CC], [cc]) sets 'BUILDCC' to 'cc'
-# if cross-compiling, and to '$(CC)' if not.
-AC_DEFUN([KPSE_CROSS_BUILD_VAR],
- [if test "x$cross_compiling" = xyes; then
- if test -z "${BUILD$1}"; then
- BUILD$1='$2'
- fi
- AC_MSG_RESULT([setting \$BUILD$1 to ${BUILD$1}])
-else
- if test -n "${BUILD$1}"; then
- AC_MSG_WARN([\$BUILD$1 set but not cross-compiling.])
- fi
- BUILD$1='$($1)'
-fi
-AC_SUBST([BUILD$1])
-]) # KPSE_CROSS_BUILD_VAR
-
diff --git a/Build/source/m4/kpse-pixman-flags.m4 b/Build/source/m4/kpse-pixman-flags.m4
index 08889fe3367..b184e1db253 100644
--- a/Build/source/m4/kpse-pixman-flags.m4
+++ b/Build/source/m4/kpse-pixman-flags.m4
@@ -1,35 +1,35 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2012, 2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org>
#
# 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.
# KPSE_PIXMAN_FLAGS
-# ---------------
+# -----------------
# Provide the configure options '--with-system-pixman' (if in the TL tree).
#
# Set the make variables PIXMAN_INCLUDES and PIXMAN_LIBS to the CPPFLAGS and
# LIBS required for the `-lpixman-1' library in libs/pixman/ of the TL tree.
-AC_DEFUN([KPSE_PIXMAN_FLAGS],
-[_KPSE_LIB_FLAGS([pixman], [pixman], [],
- [-IBLD/libs/pixman/include], [BLD/libs/pixman/libpixman.a], [],
- [], [${top_builddir}/../../libs/pixman/include/pixman.h])[]dnl
+AC_DEFUN([KPSE_PIXMAN_FLAGS], [dnl
+_KPSE_LIB_FLAGS([pixman], [pixman], [],
+ [-IBLD/libs/pixman/include], [BLD/libs/pixman/libpixman.a], [],
+ [], [${top_builddir}/../../libs/pixman/include/pixman.h])[]dnl
]) # KPSE_PIXMAN_FLAGS
# KPSE_PIXMAN_OPTIONS([WITH-SYSTEM])
-# --------------------------------
-AC_DEFUN([KPSE_PIXMAN_OPTIONS],
-[m4_ifval([$1],
- [AC_ARG_WITH([system-pixman],
- AS_HELP_STRING([--with-system-pixman],
- [use installed pixman headers and library (requires pkg-config)]))])[]dnl
+# ----------------------------------
+AC_DEFUN([KPSE_PIXMAN_OPTIONS], [dnl
+m4_ifval([$1],
+ [AC_ARG_WITH([system-pixman],
+ AS_HELP_STRING([--with-system-pixman],
+ [use installed pixman headers and library (requires pkg-config)]))])[]dnl
]) # KPSE_PIXMAN_OPTIONS
# KPSE_PIXMAN_SYSTEM_FLAGS
-# ----------------------
-AC_DEFUN([KPSE_PIXMAN_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+# ------------------------
+AC_DEFUN([KPSE_PIXMAN_SYSTEM_FLAGS], [dnl
+AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
if $PKG_CONFIG pixman-1 --atleast-version=0.18; then
PIXMAN_INCLUDES=`$PKG_CONFIG pixman-1 --cflags`
PIXMAN_LIBS=`$PKG_CONFIG pixman-1 --libs`
diff --git a/Build/source/m4/kpse-poppler-flags.m4 b/Build/source/m4/kpse-poppler-flags.m4
index 6345f9f3146..d2f67719e42 100644
--- a/Build/source/m4/kpse-poppler-flags.m4
+++ b/Build/source/m4/kpse-poppler-flags.m4
@@ -1,12 +1,12 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2011-2014 Peter Breitenlohner <tex-live@tug.org>
#
# 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.
# KPSE_POPPLER_FLAGS
-# ---------------
+# ------------------
# Provide the configure option '--with-system-poppler' (if in the TL tree).
#
# Set the make variables POPPLER_INCLUDES and POPPLER_LIBS to the CPPFLAGS and
@@ -21,18 +21,18 @@ test "x$kpse_cv_have_win32" = xno || POPPLER_LIBS="$POPPLER_LIBS -lgdi32"
]) # KPSE_POPPLER_FLAGS
# KPSE_POPPLER_OPTIONS([WITH-SYSTEM])
-# --------------------------------
-AC_DEFUN([KPSE_POPPLER_OPTIONS],
-[m4_ifval([$1],
- [AC_ARG_WITH([system-poppler],
- AS_HELP_STRING([--with-system-poppler],
- [use installed poppler headers and library (requires pkg-config)]))])[]dnl
+# -----------------------------------
+AC_DEFUN([KPSE_POPPLER_OPTIONS], [dnl
+m4_ifval([$1],
+ [AC_ARG_WITH([system-poppler],
+ AS_HELP_STRING([--with-system-poppler],
+ [use installed poppler headers and library (requires pkg-config)]))])[]dnl
]) # KPSE_POPPLER_OPTIONS
# KPSE_POPPLER_SYSTEM_FLAGS
-# ----------------------
-AC_DEFUN([KPSE_POPPLER_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+# -------------------------
+AC_DEFUN([KPSE_POPPLER_SYSTEM_FLAGS], [dnl
+AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
if $PKG_CONFIG poppler --atleast-version=0.18; then
POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
diff --git a/Build/source/m4/kpse-potrace-flags.m4 b/Build/source/m4/kpse-potrace-flags.m4
index f88936996d2..161a90613d3 100644
--- a/Build/source/m4/kpse-potrace-flags.m4
+++ b/Build/source/m4/kpse-potrace-flags.m4
@@ -1,27 +1,27 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2013, 2014 Peter Breitenlohner <tex-live@tug.org>
#
# 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.
# KPSE_POTRACE_FLAGS
-# ---------------
+# ------------------
# Provide the configure options '--with-system-potrace' (if in the TL tree),
# '--with-potrace-includes', and '--with-potrace-libdir'.
#
# Set the make variables POTRACE_INCLUDES and POTRACE_LIBS to the CPPFLAGS and
# LIBS required for the `-lpotrace' library in libs/potrace/ of the TL tree.
-AC_DEFUN([KPSE_POTRACE_FLAGS],
-[_KPSE_LIB_FLAGS([potrace], [potrace], [],
- [-IBLD/libs/potrace/include], [BLD/libs/potrace/libpotrace.a], [],
- [], [${top_builddir}/../../libs/potrace/include/potracelib.h])[]dnl
+AC_DEFUN([KPSE_POTRACE_FLAGS], [dnl
+_KPSE_LIB_FLAGS([potrace], [potrace], [],
+ [-IBLD/libs/potrace/include], [BLD/libs/potrace/libpotrace.a], [],
+ [], [${top_builddir}/../../libs/potrace/include/potracelib.h])[]dnl
]) # KPSE_POTRACE_FLAGS
# KPSE_POTRACE_OPTIONS([WITH-SYSTEM])
-# --------------------------------
+# -----------------------------------
AC_DEFUN([KPSE_POTRACE_OPTIONS], [_KPSE_LIB_OPTIONS([potrace], [$1])])
# KPSE_POTRACE_SYSTEM_FLAGS
-# ----------------------
+# -------------------------
AC_DEFUN([KPSE_POTRACE_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([potrace], [potrace])])
diff --git a/Build/source/m4/kpse-win32.m4 b/Build/source/m4/kpse-win32.m4
index 199e942b3b8..4f1ac085149 100644
--- a/Build/source/m4/kpse-win32.m4
+++ b/Build/source/m4/kpse-win32.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,7 @@ AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno])
]) # KPSE_COND_WIN32
# KPSE_COND_MINGW32
-# ---------------
+# -----------------
# Define the conditionals WIN32 and MINGW32.
AC_DEFUN([KPSE_COND_MINGW32], [dnl
AC_REQUIRE([KPSE_COND_WIN32])[]dnl
@@ -39,7 +39,7 @@ AM_CONDITIONAL([MINGW32], [test "x$kpse_cv_have_win32" = xmingw32])
]) # KPSE_COND_MINGW32
# KPSE_COND_WIN32_WRAP
-# ---------------
+# --------------------
# Define the conditionals WIN32 and WIN32_WRAP.
AC_DEFUN([KPSE_COND_WIN32_WRAP], [dnl
AC_REQUIRE([KPSE_COND_WIN32])[]dnl
diff --git a/Build/source/m4/kpse-zziplib-flags.m4 b/Build/source/m4/kpse-zziplib-flags.m4
index 064908f19f9..e2197defb40 100644
--- a/Build/source/m4/kpse-zziplib-flags.m4
+++ b/Build/source/m4/kpse-zziplib-flags.m4
@@ -1,40 +1,38 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2010-2014 Peter Breitenlohner <tex-live@tug.org>
#
# 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 0
-
# KPSE_ZZIPLIB_FLAGS
-# -----------------
+# ------------------
# Provide the configure options '--with-system-zziplib' (if in the TL tree),
# '--with-zziplib-includes', and '--with-zziplib-libdir'.
#
# Set the make variables ZZIPLIB_INCLUDES and ZZIPLIB_LIBS to the CPPFLAGS and
# LIBS required for the `-lpng' library in libs/zziplib/ of the TL tree.
-AC_DEFUN([KPSE_ZZIPLIB_FLAGS],
-[AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
+AC_DEFUN([KPSE_ZZIPLIB_FLAGS], [dnl
+AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
_KPSE_LIB_FLAGS([zziplib], [zzip], [],
[-IBLD/libs/zziplib/include], [BLD/libs/zziplib/libzzip.a], [],
[], [${top_builddir}/../../libs/zziplib/include/zzip/zzip.h])[]dnl
]) # KPSE_ZZIPLIB_FLAGS
# KPSE_ZZIPLIB_OPTIONS([WITH-SYSTEM])
-# ----------------------------------
-AC_DEFUN([KPSE_ZZIPLIB_OPTIONS],
-[m4_ifval([$1],
- [AC_ARG_WITH([system-zziplib],
- AS_HELP_STRING([--with-system-zziplib],
- [use installed zziplib headers and library
- (requires pkg-config)]))])[]dnl
+# -----------------------------------
+AC_DEFUN([KPSE_ZZIPLIB_OPTIONS], [dnl
+m4_ifval([$1],
+ [AC_ARG_WITH([system-zziplib],
+ AS_HELP_STRING([--with-system-zziplib],
+ [use installed zziplib headers and library
+ (requires pkg-config)]))])[]dnl
]) # KPSE_ZZIPLIB_OPTIONS
# KPSE_ZZIPLIB_SYSTEM_FLAGS
-# ------------------------
-AC_DEFUN([KPSE_ZZIPLIB_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+# -------------------------
+AC_DEFUN([KPSE_ZZIPLIB_SYSTEM_FLAGS], [dnl
+AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
if $PKG_CONFIG zziplib --atleast-version=0.12; then
ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags`
ZZIPLIB_LIBS=`$PKG_CONFIG zziplib --libs`