aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/configure
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1996-09-04 18:50:13 +0000
committerMichael Meissner <gnu@the-meissners.org>1996-09-04 18:50:13 +0000
commit1eaaf3050ed63a769b480ba2e5ef08396567eb71 (patch)
tree1b7efe8c4991a559e01639057b35b1af189224b0 /sim/d10v/configure
parent7eebfc6296f0830a435a21be0ab37a076c8566bd (diff)
downloadgdb-1eaaf3050ed63a769b480ba2e5ef08396567eb71.zip
gdb-1eaaf3050ed63a769b480ba2e5ef08396567eb71.tar.gz
gdb-1eaaf3050ed63a769b480ba2e5ef08396567eb71.tar.bz2
First cut at dealing with canadian crosses; make -t in debugger set d10v_debug if DEBUG
Diffstat (limited to 'sim/d10v/configure')
-rwxr-xr-xsim/d10v/configure40
1 files changed, 37 insertions, 3 deletions
diff --git a/sim/d10v/configure b/sim/d10v/configure
index 1b8ca99..9da9be6 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -932,6 +932,39 @@ EOF
fi
+# Put a plausible default for CC_FOR_BUILD in Makefile.
+# If we cannot run a trivial program, we must be cross compiling.
+echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_cross=yes
+else
+cat > conftest.$ac_ext <<EOF
+#line 946 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+{ (eval echo configure:950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+ ac_cv_c_cross=no
+else
+ ac_cv_c_cross=yes
+fi
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_cross" 1>&6
+cross_compiling=$ac_cv_c_cross
+
+if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+else
+ CC_FOR_BUILD=gcc
+fi
+
. ${srcdir}/../../bfd/configure.host
# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
@@ -952,6 +985,7 @@ fi
+
AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
@@ -994,11 +1028,11 @@ else
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 998 "configure"
+#line 1032 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-{ (eval echo configure:1002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:1036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_cross=no
else
@@ -1165,11 +1199,11 @@ s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
s%@HDEFINES@%$HDEFINES%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@sim_cflags@%$sim_cflags%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
CEOF
EOF