blob: dd6b4fbf03d05207fc9a7d05e58ad1d3290027a2 (
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
35
36
37
38
39
40
|
# Public macros for the TeX Live (TL) tree.
# Copyright (C) 2009, 2010 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 0
# KPSE_ENABLE_LT_HACK
# -------------------
# Provide the configure option '--enable-libtool-hack'.
AC_DEFUN([KPSE_ENABLE_LT_HACK],
[AC_ARG_ENABLE([libtool-hack],
AS_HELP_STRING([--enable-libtool-hack],
[ignore libtool dependency_libs]))[]dnl
]) # KPSE_ENABLE_LT_HACK
# KPSE_LT_HACK()
# --------------
# Try to ignore libtool dependency_libs when possible, e.g., on systems
# using ELF shared libraries.
AC_DEFUN([KPSE_LT_HACK],
[AC_REQUIRE([KPSE_ENABLE_LT_HACK])[]dnl
AC_PROVIDE_IFELSE([LT_INIT], ,
[m4_fatal([$0: requires libtool])])[]dnl
AC_PROVIDE_IFELSE([LT_OUTPUT],
[m4_fatal([$0: too late])])[]dnl
_LT_CONFIG_SAVE_COMMANDS([## $0: Prevent libtool from linking dependency_libs
if test "x$enable_libtool_hack" = xyes; then
sed '/# Convert "-framework/i \
## $0: ignore dependency_libs\
test "X$installed" = Xyes && dependency_libs=\
' "$ofile" >"$cfgfile"
mv "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
fi], [enable_libtool_hack='$enable_libtool_hack'])
]) # KPSE_LT_HACK
|