* configure.in (sim_fpu_cflags): Add -I../common.
[deliverable/binutils-gdb.git] / sim / ppc / configure.in
index 1072d3e0e6f42dbba7d29ed4e8b7315f05038ffa..1f0693c25b60421f8bb98324f1420e4ae851d19f 100644 (file)
@@ -1,4 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
+sinclude(../common/aclocal.m4)
 AC_PREREQ(2.5)dnl
 AC_INIT(Makefile.in)
 
@@ -6,7 +7,6 @@ AC_PROG_INSTALL
 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
@@ -190,15 +190,23 @@ fi])dnl
 
 
 AC_ARG_ENABLE(sim-float,
-[  --enable-sim-float                  Specify whether to use host floating point or simulate.],
+[  --enable-sim-float                  Specify whether the target has hard, soft, altivec or e500 floating point.],
 [case "${enableval}" in
   yes | hard)  sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
   no | soft)   sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
+  altivec)      sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
+  *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
   *)           AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
 esac
 if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
   echo "Setting float flags = $sim_float" 6>&1
-fi],[sim_float=""])dnl
+fi],[
+case "${target}" in
+  *altivec*) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
+  *spe*|*simd*)        sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
+  *) sim_float=""
+esac
+])dnl
 
 
 AC_ARG_ENABLE(sim-hardware,
@@ -291,7 +299,7 @@ case "$enableval" in
   no)          sim_inline="-DDEFAULT_INLINE=0";;
   0)           sim_inline="-DDEFAULT_INLINE=0";;
   yes | 2)     sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
-  1)           sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
+  1)           sim_inline="-DDEFAULT_INLINE=PSIM_INLINE_LOCALS";;
   *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
        new_flag=""
        case "$x" in
@@ -310,7 +318,7 @@ esac
 if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
   echo "Setting inline flags = $sim_inline" 6>&1
 fi],[if test x"$GCC" != ""; then
-  sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS"
+  sim_inline="-DDEFAULT_INLINE=PSIM_INLINE_LOCALS"
   if test x"$silent" != x"yes"; then
     echo "Setting inline flags = $sim_inline" 6>&1
   fi
@@ -577,7 +585,7 @@ AC_TYPE_UID_T
 
 AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
 
-AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h)
 AC_HEADER_DIRENT
 
 dnl Figure out what type of termio/termios support there is
@@ -689,6 +697,20 @@ else
   sim_targ_vals=""
 fi
 
+AC_MSG_CHECKING(for common simulator directory fpu implementation)
+if test -f "${srcdir}/../common/sim-fpu.c"; then
+  AC_MSG_RESULT(yes)
+  sim_fpu_cflags="-DHAVE_COMMON_FPU -I../common -I${srcdir}/../common"
+  sim_fpu="sim-fpu.o"
+else
+  AC_MSG_RESULT(no)
+  sim_fpu_cflags=
+  sim_fpu=
+fi
+
+dnl Check for exe extension
+AC_EXEEXT
+
 AC_SUBST(CC_FOR_BUILD)
 AC_SUBST(CFLAGS)
 AC_SUBST(HDEFINES)
@@ -737,6 +759,8 @@ AC_SUBST(sim_termio)
 AC_SUBST(sim_devzero)
 AC_SUBST(sim_callback)
 AC_SUBST(sim_targ_vals)
+AC_SUBST(sim_fpu_cflags)
+AC_SUBST(sim_fpu)
 
 AC_OUTPUT(Makefile,
 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.025618 seconds and 4 git commands to generate.