summaryrefslogtreecommitdiffstats
path: root/testsuites/aclocal/canonical-target-name.m4
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/aclocal/canonical-target-name.m4')
-rw-r--r--testsuites/aclocal/canonical-target-name.m418
1 files changed, 10 insertions, 8 deletions
diff --git a/testsuites/aclocal/canonical-target-name.m4 b/testsuites/aclocal/canonical-target-name.m4
index 5a096f2e20..230583bf8c 100644
--- a/testsuites/aclocal/canonical-target-name.m4
+++ b/testsuites/aclocal/canonical-target-name.m4
@@ -9,17 +9,19 @@ dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
dnl and we have to fix it for rtems ourselves
AC_DEFUN([RTEMS_CANONICAL_TARGET_CPU],
-[
-AC_CANONICAL_HOST
+[AC_REQUIRE([AC_CANONICAL_HOST])
AC_MSG_CHECKING(rtems target cpu)
case "${host}" in
- no_cpu-*rtems*)
- RTEMS_CPU=no_cpu
- ;;
- *)
- RTEMS_CPU=`echo $host | sed 's%^\([[^-]]*\)-\(.*\)$%\1%'`
+*-*-rtems*)
+ RTEMS_CPU="$host_cpu";;
+*)
;;
esac
+AS_IF([test -n "$RTEMS_CPU"],
+[dnl
+AC_MSG_RESULT($RTEMS_CPU)],
+[dnl
+AC_MSG_RESULT([<none>])
+AC_MSG_ERROR([unsupported host $host])])
AC_SUBST(RTEMS_CPU)
-AC_MSG_RESULT($RTEMS_CPU)
])