aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/configure.in
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1996-04-30 22:50:22 +0000
committerMichael Meissner <gnu@the-meissners.org>1996-04-30 22:50:22 +0000
commita72d2509c244deddaf9fd89562a9a90f9c424d20 (patch)
treee695fbc67fa448f60dd4bc2bee35ad384cfc9fa1 /sim/ppc/configure.in
parent2f14f78103f9df18316dc8aa2d6973501451b06e (diff)
downloadgdb-a72d2509c244deddaf9fd89562a9a90f9c424d20.zip
gdb-a72d2509c244deddaf9fd89562a9a90f9c424d20.tar.gz
gdb-a72d2509c244deddaf9fd89562a9a90f9c424d20.tar.bz2
Work in a cross compile environment
Diffstat (limited to 'sim/ppc/configure.in')
-rw-r--r--sim/ppc/configure.in36
1 files changed, 22 insertions, 14 deletions
diff --git a/sim/ppc/configure.in b/sim/ppc/configure.in
index 0a51bdc..daa48b1 100644
--- a/sim/ppc/configure.in
+++ b/sim/ppc/configure.in
@@ -2,6 +2,16 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.3)dnl
AC_INIT(Makefile.in)
+AC_PROG_CC
+
+# Put a plausible default for CC_FOR_BUILD in Makefile.
+AC_C_CROSS
+if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+else
+ CC_FOR_BUILD=gcc
+fi
+
AC_ARG_ENABLE(sim-cflags,
[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator],
[case "${enableval}" in
@@ -194,7 +204,17 @@ AC_ARG_ENABLE(sim-hostendian,
esac
if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
echo "Setting hostendian flags = $sim_hostendian" 6>&1
-fi],[sim_hostendian=""])dnl
+fi],[
+if test "x$cross_compiling" = "xno"; then
+ AC_C_BIGENDIAN
+ if test $ac_cv_c_bigendian = yes; then
+ sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
+ else
+ sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
+ fi
+else
+ sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
+fi])dnl
AC_ARG_ENABLE(sim-smp,
[ --enable-sim-smp=n Specify number of processors to configure for.],
@@ -383,7 +403,7 @@ AC_ARG_PROGRAM
AC_CONFIG_HEADER(config.h:config.in)
-AC_PROG_CC
+AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CFLAGS)
AC_SUBST(HDEFINES)
AR=${AR-ar}
@@ -420,18 +440,6 @@ AC_SUBST(sim_stdio)
AC_CHECK_FUNCS(getrusage)
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-AC_C_CROSS
-if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
-else
- CC_FOR_BUILD=gcc
-fi
-AC_SUBST(CC_FOR_BUILD)
-
-AC_C_BIGENDIAN
-AC_SUBST(WORDS_BIGENDIAN)
-
AC_CHECK_HEADERS(string.h strings.h stdlib.h time.h sys/mount.h sys/types.h sys/time.h sys/times.h unistd.h sys/resource.h)
AC_HEADER_DIRENT