diff options
Diffstat (limited to 'Build/source/m4/kpse-cross.m4')
-rw-r--r-- | Build/source/m4/kpse-cross.m4 | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/Build/source/m4/kpse-cross.m4 b/Build/source/m4/kpse-cross.m4 index 3f020060297..9396b899337 100644 --- a/Build/source/m4/kpse-cross.m4 +++ b/Build/source/m4/kpse-cross.m4 @@ -1,12 +1,10 @@ # Private macros for the kpathsea library. -# Copyright (C) 1995 - 2009 Karl Berry <tex-live@tug.org> +# Copyright (C) 1995-2014 Karl Berry <tex-live@tug.org> # # 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. -# serial 3 - # KPSE_CROSS_PATH_PROG(RESULT, CROSS_PROG, NORMAL_PROG) # ----------------------------------------------------- # Find a program when cross-compiling, or use a default when not. @@ -16,35 +14,12 @@ # 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], - [if test "x$cross_compiling" = xyes; then +AC_DEFUN([KPSE_CROSS_PATH_PROG], [dnl +AS_IF([test "x$cross_compiling" = xyes], [dnl AC_PATH_PROG([$1], [$2]) -if test -z "${$1}"; then - AC_MSG_ERROR([$2 was not found but is required when cross-compiling. - Install $2 or set \$$1 to the full pathname.]) -fi -else - $1=$3 -fi +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 -# KPSE_CROSS_BUILD_VAR(STEM, PROG) -# -------------------------------- -# Set BUILD$1 to $2 when cross-compiling, to $($1) if not. -# Example: KPSE_CROSS_BUILD_VAR([CC], [cc]) sets 'BUILDCC' to 'cc' -# if cross-compiling, and to '$(CC)' if not. -AC_DEFUN([KPSE_CROSS_BUILD_VAR], - [if test "x$cross_compiling" = xyes; then - if test -z "${BUILD$1}"; then - BUILD$1='$2' - fi - AC_MSG_RESULT([setting \$BUILD$1 to ${BUILD$1}]) -else - if test -n "${BUILD$1}"; then - AC_MSG_WARN([\$BUILD$1 set but not cross-compiling.]) - fi - BUILD$1='$($1)' -fi -AC_SUBST([BUILD$1]) -]) # KPSE_CROSS_BUILD_VAR - |