summaryrefslogtreecommitdiff
path: root/Build/source/m4
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-07 23:42:12 +0000
committerKarl Berry <karl@freefriends.org>2017-12-07 23:42:12 +0000
commit916cf4409cf76b9b26df32af9d3e6da3567bdff4 (patch)
treeffa226192a27c085d452d32856b8547e4d1ade54 /Build/source/m4
parent1fed4553e07e0372e12d6a1ac32f29b3c7a2a538 (diff)
try pkg-config as well as icu-config; reautoconf
git-svn-id: svn://tug.org/texlive/trunk@46014 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r--Build/source/m4/ChangeLog5
-rw-r--r--Build/source/m4/kpse-icu-flags.m418
2 files changed, 18 insertions, 5 deletions
diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog
index 63200884121..8843714b101 100644
--- a/Build/source/m4/ChangeLog
+++ b/Build/source/m4/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-08 Norbert Preining <preining@logic.at>
+
+ * kpse-icu-flags.m4 (KPSE_ICU_SYSTEM_FLAGS): also check for PKG_CONFIG.
+ (KPSE_ICU_SYSTEM_FLAGS): try pkg-config if icu-config fails.
+
2017-12-02 Karl Berry <karl@freefriends.org>
* kpse-visibility.m4 (KPSE_COMPILER_VISIBILITY): write debug line.
diff --git a/Build/source/m4/kpse-icu-flags.m4 b/Build/source/m4/kpse-icu-flags.m4
index 337c6b68660..b17eac24e05 100644
--- a/Build/source/m4/kpse-icu-flags.m4
+++ b/Build/source/m4/kpse-icu-flags.m4
@@ -1,5 +1,7 @@
-# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
+# $Id$
+# ICU support for the TeX Live (TL) tree.
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -24,7 +26,8 @@ m4_popdef([kpse_icu_config_args])[]dnl
# Internal subroutine.
#
# LIBNAME and OPTIONS as for _KPSE_LIB_FLAGS().
-# MORE-ICU-LIBS: icu libraries from the TL tree in addition to icuuc and icudata.
+# MORE-ICU-LIBS: icu libraries from the TL tree in addition to icuuc and
+# icudata.
m4_define([_KPSE_ICU_FLAGS], [dnl
_KPSE_LIB_FLAGS([icu], [$1], [$2],
[-DU_STATIC_IMPLEMENTATION -IBLD/libs/icu/include],
@@ -41,19 +44,24 @@ AC_DEFUN([KPSE_ICU_OPTIONS], [dnl
m4_ifval([$1],
[AC_ARG_WITH([system-icu],
AS_HELP_STRING([--with-system-icu],
- [use installed ICU headers and libraries (requires icu-config)]))])[]dnl
+ [use installed ICU headers and libraries (requires pkg-config or icu-config)]))])[]dnl
]) # KPSE_ICU_OPTIONS
# KPSE_ICU_SYSTEM_FLAGS
# ---------------------
AC_DEFUN([KPSE_ICU_SYSTEM_FLAGS], [dnl
AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+echo 'dbg:[_KPSE_ICU_SYSTEM_FLAGS] called.' >&AS_MESSAGE_LOG_FD
AC_CHECK_TOOL([ICU_CONFIG], [icu-config], [false])[]dnl
+AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl
if $ICU_CONFIG --version >/dev/null 2>&1; then
ICU_INCLUDES=`$ICU_CONFIG --cppflags`
ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath m4_ifset([kpse_icu_config_args],
[kpse_icu_config_args ])--ldflags-libsonly --ldflags-system`
+elif $PKG_CONFIG --libs icu-uc icu-io >/dev/null 2>&1; then
+ ICU_INCLUDES=`$PKG_CONFIG --cflags icu-uc icu-io`
+ ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io`
elif test "x$need_icu:$with_system_icu" = xyes:yes; then
- AC_MSG_ERROR([did not find icu-config required for system icu libraries])
+ AC_MSG_ERROR([did not find either pkg-config or icu-config; one is required for system icu library support])
fi
]) # KPSE_ICU_SYSTEM_FLAGS