summaryrefslogtreecommitdiff
path: root/Build/source/utils/biber/m4/kpse-tl-platform.m4
blob: f822807f7b4673dc69bfe1092010105576c4f875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Public macros for the TeX Live (TL) tree.
# Copyright (C) 2011 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_TL_PLATFORM
# ----------------
# Determine the TeX Live platform name.
AC_DEFUN([KPSE_TL_PLATFORM],
[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl
AC_REQUIRE([KPSE_CHECK_PERL])[]dnl
AC_ARG_VAR([TL_PLATFORM], [TeX Live platform name [autodetected]])
AC_MSG_CHECKING([for TeX Live platform name])
if test "X$TL_PLATFORM" = X; then
  if test "x$kpse_cv_have_win32" = xno; then
    # we need this variable in the Perl (current).
    export ac_aux_dir
    # we need this variable in the Perl (future).
    export ac_cv_host
    TL_PLATFORM=`$PERL -I"$srcdir" -MTeXLive::TLUtils -e '
      print TeXLive::TLUtils::platform();'`
    if test -z "$TL_PLATFORM"; then
      AC_MSG_ERROR([cannot determine TeX Live platform name])
    fi
  else
    TL_PLATFORM=win32
  fi
fi
AC_MSG_RESULT([$TL_PLATFORM])
]) # KPSE_TL_PLATFORM