| 1 |
# Public macros for the TeX Live (TL) tree. |
| 2 |
# Copyright (C) 2009, 2010 Peter Breitenlohner <[email protected]> |
| 3 |
# |
| 4 |
# This file is free software; the copyright holder |
| 5 |
# gives unlimited permission to copy and/or distribute it, |
| 6 |
# with or without modifications, as long as this notice is preserved. |
| 7 |
|
| 8 |
# KPSE_ENABLE_LT_HACK |
| 9 |
# ------------------- |
| 10 |
# Provide the configure option '--enable-libtool-hack'. |
| 11 |
AC_DEFUN([KPSE_ENABLE_LT_HACK], |
| 12 |
[AC_ARG_ENABLE([libtool-hack], |
| 13 |
AS_HELP_STRING([--enable-libtool-hack], |
| 14 |
[ignore libtool dependency_libs]))[]dnl |
| 15 |
]) # KPSE_ENABLE_LT_HACK |
| 16 |
|
| 17 |
# KPSE_LT_HACK() |
| 18 |
# -------------- |
| 19 |
# Try to ignore libtool dependency_libs when possible, e.g., on systems |
| 20 |
# using ELF shared libraries. |
| 21 |
AC_DEFUN([KPSE_LT_HACK], |
| 22 |
[AC_REQUIRE([KPSE_ENABLE_LT_HACK])[]dnl |
| 23 |
AC_PROVIDE_IFELSE([LT_INIT], , |
| 24 |
[m4_fatal([$0: requires libtool])])[]dnl |
| 25 |
AC_PROVIDE_IFELSE([LT_OUTPUT], |
| 26 |
[m4_fatal([$0: too late])])[]dnl |
| 27 |
_LT_CONFIG_SAVE_COMMANDS([## $0: Prevent libtool from linking dependency_libs |
| 28 |
if test "x$enable_libtool_hack" = xyes; then |
| 29 |
$SED '/# Convert "-framework/i\ |
| 30 |
## $0: ignore dependency_libs\ |
| 31 |
test "X$installed" = Xyes && dependency_libs=\ |
| 32 |
' "$ofile" >"$cfgfile" |
| 33 |
mv "$cfgfile" "$ofile" || |
| 34 |
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
| 35 |
chmod +x "$ofile" |
| 36 |
fi], [enable_libtool_hack='$enable_libtool_hack']) |
| 37 |
]) # KPSE_LT_HACK |
| 38 |
|