autoconf: modernize and modularize
[tftp-hpa.git] / autoconf / m4 / pa_cross_compile.m4
blobf08297329323a10774311502ae3920433b3a0731
1 dnl --------------------------------------------------------------------------
2 dnl  PA_CROSS_COMPILE
3 dnl
4 dnl Get the canonical name for the build and host (runtime) systems;
5 dnl then figure out if this is cross-compilation. Specifically, this
6 dnl disables invoking WINE on non-Windows systems which are configured
7 dnl to run WINE automatically.
8 dnl
9 dnl Use PA_CROSS_COMPILE_TOOL if the target system (output of a code-
10 dnl generation tool) is applicable.
11 dnl
12 dnl This doesn't explicitly print any messages as that is automatically
13 dnl done elsewhere.
14 dnl --------------------------------------------------------------------------
15 AC_DEFUN_ONCE([PA_CROSS_COMPILE],
17  AC_BEFORE([$0], [AC_LANG_COMPILER])
18  AC_BEFORE([$0], [AC_LANG])
19  AC_BEFORE([$0], [AC_PROG_CC])
20  AC_BEFORE([$0], [AC_PROG_CPP])
21  AC_BEFORE([$0], [AC_PROG_CXX])
22  AC_BEFORE([$0], [AC_PROG_CXXCPP])
23  AC_BEFORE([$0], [AC_PROG_OBJC])
24  AC_BEFORE([$0], [AC_PROG_OBJCPP])
25  AC_BEFORE([$0], [AC_PROG_OBJCXX])
26  AC_BEFORE([$0], [AC_PROG_OBJCXXCPP])
27  AC_BEFORE([$0], [AC_PROG_F77])
28  AC_BEFORE([$0], [AC_PROG_FC])
29  AC_BEFORE([$0], [AC_PROG_GO])
31  # Disable WINE
32  WINELOADER=/dev/null
33  export WINELOADER
34  WINESERVER=/dev/null
35  export WINESERVER
36  WINEPREFIX=/dev/null
37  export WINEPREFIX
39  AC_CANONICAL_BUILD
40  AC_CANONICAL_HOST