dnl Process this file with autoconf to produce a configure script.
+sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)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
+dnl We don't use gettext, but bfd does. So we do the appropriate checks
+dnl to see if there are intl libraries we should link against.
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
AC_ARG_ENABLE(sim-alignment,
[ --enable-sim-alignment=align Specify strict or nonstrict alignment.],
fi])dnl
+AC_ARG_ENABLE(sim-decode-mechanism,
+[ --enable-sim-decode-mechanism=which Specify the instruction decode mechanism.],
+[case "${enableval}" in
+ yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-decode-mechanism=file");;
+ array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";;
+ *) AC_MSG_ERROR("File $enableval is not an opcode rules file");
+ sim_decode_mechanism="switch";;
+esac
+if test x"$silent" != x"yes" && test x"$sim_decode_mechanism" != x""; then
+ echo "Setting decode mechanism flags = $sim_decode_mechanism" 6>&1
+fi],[sim_decode_mechanism=""
+if test x"$silent" != x"yes"; then
+ echo "Setting decode mechanism flags = $sim_decode_mechanism"
+fi])dnl
+
+
AC_ARG_ENABLE(sim-default-model,
[ --enable-sim-default-model=which Specify default PowerPC to model.],
[case "${enableval}" in
esac
if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
echo "Setting default-model flags = $sim_default_model" 6>&1
-fi],[sim_model=""])dnl
+fi],[sim_default_model=""])dnl
AC_ARG_ENABLE(sim-duplicate,
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,
AC_ARG_ENABLE(sim-hostendian,
-[ --enable-sim-hostendain=end Specify host byte endian orientation.],
+[ --enable-sim-hostendian=end Specify host byte endian orientation.],
[case "${enableval}" in
no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
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
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
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");;
*) if test -f "${srcdir}/${enableval}"; then
sim_opcode="${enableval}"
- elif test -f "${srcdir}/ppc-opcode-${enableval}"; then
- sim_opcode="ppc-opcode-${enableval}"
+ elif test -f "${srcdir}/dc-${enableval}"; then
+ sim_opcode="dc-${enableval}"
else
AC_MSG_ERROR("File $enableval is not an opcode rules file");
- sim_opcode="ppc-opcode-complex"
+ sim_opcode="dc-complex"
fi;;
esac
if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then
echo "Setting opcode flags = $sim_opcode" 6>&1
-fi],[sim_opcode="ppc-opcode-complex"
+fi],[sim_opcode="dc-complex"
if test x"$silent" != x"yes"; then
echo "Setting opcode flags = $sim_opcode"
fi])dnl
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
dnl Figure out if we are in the new Cygnus tree with a common directory or not
AC_MSG_CHECKING(for common simulator directory)
-if test -e "${srcdir}/../common/callback.c"; then
+if test -f "${srcdir}/../common/callback.c"; then
AC_MSG_RESULT(yes)
sim_callback="callback.o targ-map.o"
sim_targ_vals="targ-vals.h targ-map.c targ-vals.def"
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)
AC_SUBST(sim_opcode)
AC_SUBST(sim_switch)
AC_SUBST(sim_dup)
+AC_SUBST(sim_decode_mechanism)
AC_SUBST(sim_jump)
AC_SUBST(sim_filter)
AC_SUBST(sim_icache)
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])