summaryrefslogtreecommitdiffstats
path: root/aclocal/check-tool.m4
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-04-09 16:18:09 +1000
committerChris Johns <chrisj@rtems.org>2018-04-10 08:22:07 +1000
commit9f6f0261c172bee5463bb6724809e8486c9197ea (patch)
tree6db934629ca44390fa656fbb303b528dc2f7732f /aclocal/check-tool.m4
parentbsp/genmcf548x: Fix IRQ support (diff)
downloadrtems-9f6f0261c172bee5463bb6724809e8486c9197ea.tar.bz2
Generate an error if no valid gcc is found when configure runs.
Close #3385.
Diffstat (limited to '')
-rw-r--r--aclocal/check-tool.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/aclocal/check-tool.m4 b/aclocal/check-tool.m4
new file mode 100644
index 0000000000..210b1c06d2
--- /dev/null
+++ b/aclocal/check-tool.m4
@@ -0,0 +1,9 @@
+## Check for a cross tool, similar to AC_CHECK_TOOL, but do not fall back to
+## the un-prefixed version of PROG-TO-CHECK-FOR.
+dnl RTEMS_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([RTEMS_CHECK_TOOL],
+[
+ AS_IF([test "x$target_alias" != "x$host_alias"],
+ [rtems_tool_prefix=$target_alias-])
+ AC_CHECK_PROG($1, ${rtems_tool_prefix}$2, ${rtems_tool_prefix}$2, $3, $4)
+])