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