From 6d3e07f2836417276f91dd94eac5785655b29d78 Mon Sep 17 00:00:00 2001 From: Sergey Kvachonok Date: Thu, 23 Sep 2010 12:01:04 +0300 Subject: [PATCH] Add configure cross-compiler check. --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 62047ec..e6dd9a8 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,17 @@ AC_ARG_VAR([CROSS_COMPILE], [Cross compiler prefix for building firmware, ] [e.g. CROSS_COMPILE=mipsel-openwrt-linux-.]) +AS_VAR_IF([firmware], [true], + [ + AS_VAR_IF([CROSS_COMPILE], [], + [AC_MSG_ERROR([CROSS_COMPILE prefix is not set, set to cross-prefix- use --disable-firmware])]) + AC_CHECK_PROG([CROSS_GCC], [${CROSS_COMPILE}gcc], [yes], [no]) + AS_VAR_IF([CROSS_GCC], [no], + [AC_MSG_ERROR([No cross compiler, check CROSS_COMPILE value])]) + ], + [CROSS_COMPILE="dummy-"] +) + # Checks for programs. AC_PROG_CC AC_PROG_CXX