| 1 |
# Private macros for the kpathsea library. |
| 2 |
# Copyright (C) 1995-2014 Karl Berry <[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_CROSS_PATH_PROG(RESULT, CROSS_PROG, NORMAL_PROG) |
| 9 |
# ----------------------------------------------------- |
| 10 |
# Find a program when cross-compiling, or use a default when not. |
| 11 |
# RESULT = variable which records the outcome |
| 12 |
# CROSS_PROG = program to look for when cross-compiling |
| 13 |
# NORMAL_PROG = program to use when not cross-compiling |
| 14 |
# Example: KPSE_CROSS_PATH_PROG([TANGLE], [tangle], [./tangle]) sets |
| 15 |
# 'TANGLE' to the program 'tangle' found in PATH when cross-compiling, |
| 16 |
# and to './tangle' if not. |
| 17 |
AC_DEFUN([KPSE_CROSS_PATH_PROG], [dnl |
| 18 |
AS_IF([test "x$cross_compiling" = xyes], [dnl |
| 19 |
AC_PATH_PROG([$1], [$2]) |
| 20 |
AS_IF([test -z "${$1}"], |
| 21 |
[AC_MSG_ERROR([$2 was not found but is required when cross-compiling. |
| 22 |
Install $2 or set \$$1 to the full pathname.])])], |
| 23 |
[$1=$3]) |
| 24 |
]) # KPSE_CROSS_PATH_PROG |
| 25 |
|