From 8b097ba038d2744e45810428bddfaf729c64e789 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 6 Apr 2014 13:03:59 -0700 Subject: build: fix cross compilation check Target is the code-generation target used for cross-compiling toolchain components. Build is the build host, and host is the target host. Because paludis is not generating code for a different target, the proper cross-compilation invocation would set host (and possibly build, although that is merely for completeness rather than as a need). Fix the check for cross-compilation: if the target host does not match the build host, then we are cross-compiling. The use of $build and $host should also invoke AC_CANONICAL_{BUILD,HOST} to ensure that the values are the canonical triples. --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 37339442d..6bca8d1ee 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,8 @@ AC_PREREQ([2.65]) AC_INIT AC_CONFIG_SRCDIR([paludis/paludis.hh]) AC_CONFIG_AUX_DIR(config) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST VERSION_MAJOR=1 VERSION_MINOR=99 @@ -754,8 +756,8 @@ dnl }}} dnl {{{ asciidoc & xmlto AC_MSG_CHECKING([whether we are cross-compiling]) -if test "x$target" != "x" && test "x$host" != "x$target" ; then - AC_MSG_RESULT([yes, host $host target $target]) +if test "x$host" != "x$build" ; then + AC_MSG_RESULT([yes, build $build, host $host]) USE_PREBUILT_DOCUMENTATION=yes else AC_MSG_RESULT([no]) -- cgit v1.2.3