summaryrefslogtreecommitdiffstats
path: root/libgloss/m68k/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/m68k/configure.in')
-rw-r--r--libgloss/m68k/configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/libgloss/m68k/configure.in b/libgloss/m68k/configure.in
index 65fe68d35..2ac56f5d5 100644
--- a/libgloss/m68k/configure.in
+++ b/libgloss/m68k/configure.in
@@ -45,6 +45,23 @@ AC_SUBST(LD)
AC_PROG_RANLIB
LIB_AM_PROG_AS
+AC_MSG_CHECKING([target cpu family])
+DO=m68k
+dnl Temporarily modify LDFLAGS so that link tests will succeed without
+dnl a C library. Note that we may not have a C librabry yet and that
+dnl autoconf automatically adds script to check whether we can create
+dnl an executable or not.
+dnl
+saved_LDFLAGS="$LDFLAGS"
+LDFLAGS="-nostdlib -e main"
+AC_PREPROC_IFELSE([#ifndef __mcoldfire__
+ #error we are not coldfire
+ #endif],
+ DO="cf",)
+LDFLAGS=$saved_LDFLAGS
+AC_MSG_RESULT($DO)
+AC_SUBST(DO)
+
host_makefile_frag=${srcdir}/../config/default.mh
target_makefile_frag=${srcdir}/../config/default.mt