1995-08-23 21:06:36 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.3)dnl
|
|
|
|
AC_INIT(Makefile.in)
|
|
|
|
|
1995-11-02 20:21:35 +00:00
|
|
|
AC_ARG_ENABLE(sim-cflags,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_cflags="-O2 -fomit-frame-pointer";;
|
|
|
|
no) sim_cflags="";;
|
1995-11-03 03:39:27 +00:00
|
|
|
*) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
1995-11-02 20:21:35 +00:00
|
|
|
esac],[sim_cflags=""])dnl
|
|
|
|
|
1995-11-08 18:57:06 +00:00
|
|
|
AC_ARG_ENABLE(sim-warnings,
|
1995-11-09 02:35:15 +00:00
|
|
|
[ --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],
|
1995-11-08 18:57:06 +00:00
|
|
|
[case "${enableval}" in
|
1995-11-09 02:35:15 +00:00
|
|
|
yes) sim_warnings="-Wall -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations";;
|
1995-11-08 18:57:06 +00:00
|
|
|
no) sim_warnings="-w";;
|
|
|
|
*) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
|
|
|
esac],[sim_warnings=""])dnl
|
|
|
|
|
1995-11-02 20:21:35 +00:00
|
|
|
AC_ARG_ENABLE(sim-config,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-config=file Override default config file],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_config="std-config.h";;
|
|
|
|
no) sim_config="std-config.h";;
|
|
|
|
*) sim_config="${enableval}";;
|
|
|
|
esac],[sim_config="std-config.h]")dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-opcode,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-opcode=which Override default opcode lookup.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_opcode="ppc-opcode-simple";;
|
|
|
|
no) sim_opcode="ppc-opcode-simple";;
|
|
|
|
*) sim_opcode="ppc-opcode-${enableval}";;
|
|
|
|
esac],[sim_opcode="ppc-opcode-simple"])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-switch,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-switch Use a switch instead of a table for instruction call.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_switch="-s";;
|
|
|
|
*) sim_switch="";;
|
|
|
|
esac],[sim_switch=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-duplicate,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-duplicate Expand (duplicate) semantic functions.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_dup="-e";;
|
|
|
|
*) sim_dup="";;
|
|
|
|
esac],[sim_dup=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-filter,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-filter=rule Specify filter rules.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_filter="";;
|
|
|
|
*) sim_filter="-f $enableval";;
|
|
|
|
esac],[sim_filter="-f 64"])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-icache,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-icache=size Specify instruction cache size.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_icache="-r 1024";;
|
|
|
|
*) sim_icache="";;
|
|
|
|
esac],[sim_icache=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-inline,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-inline=inlines Specify which functions should be inlined.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[sim_inline=""
|
|
|
|
case "$enableval" in
|
1995-11-03 03:55:44 +00:00
|
|
|
no) sim_inline="";;
|
|
|
|
0) sim_inline="-DDEFAULT_INLINE=0";;
|
|
|
|
yes | 2) sim_inline="-DDEFAULT_INLINE=2";;
|
|
|
|
1) sim_inline="-DDEFAULT_INLINE=1";;
|
1995-11-02 20:21:35 +00:00
|
|
|
*) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
|
|
|
|
new_flag=""
|
|
|
|
case "$x" in
|
|
|
|
*_INLINE=*) new_flag="-D$x";;
|
|
|
|
*_INLINE) new_flag="-D$x=2";;
|
|
|
|
*=*) new_flag=`sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
|
|
|
|
*) new_flag="-D$x""_INLINE=2";;
|
|
|
|
esac
|
|
|
|
if x"$sim_inline" = x""; then
|
|
|
|
sim_inline="$new_flag"
|
|
|
|
else
|
|
|
|
sim_inline="$flags $new_flag"
|
|
|
|
fi
|
|
|
|
done;;
|
|
|
|
esac],[sim_inline=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-bswap,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_bswap="-DWITH_BSWAP=1";;
|
|
|
|
no) sim_bswap="-DWITH_BSWAP=0";;
|
|
|
|
*) sim_bswap="";;
|
|
|
|
esac],[sim_bswap=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-endian,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-endian=endian Specify target byte endian orientation.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) case "$target" in
|
|
|
|
*powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
|
|
|
|
*powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
|
|
|
|
*) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
|
|
|
|
esac;;
|
|
|
|
no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
|
|
|
|
b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
|
|
|
|
l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
|
|
|
|
*) sim_endian="";;
|
|
|
|
esac],[sim_endian=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-hostendian,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-hostendain=end Specify host byte endian orientation.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
|
|
|
|
b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
|
|
|
|
l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
|
|
|
|
*) sim_hostendian="";;
|
|
|
|
esac],[sim_hostendian=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-smp,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-smp=n Specify number of processors to configure for.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_smp="-DWITH_SMP=2";;
|
|
|
|
no) sim_smp="-DWITH_SMP=0";;
|
|
|
|
*) sim_smp="-DWITH_SMP=$enableval";;
|
|
|
|
esac],[sim_smp=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-bitsize,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-bitsize=n Specify target bitsize (32 or 64).],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_bitsize="";;
|
|
|
|
no) sim_bitsize="";;
|
|
|
|
*) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
|
|
|
|
esac],[sim_bitsize=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-hostbitsize,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-hostbitsize=n Specify host bitsize (32 or 64).],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_hostbitsize="";;
|
|
|
|
no) sim_hostbitsize="";;
|
|
|
|
*) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
|
|
|
|
esac],[sim_hostbitsize=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-env,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-env=env Specify target environment (operating, virtual, user).],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
|
|
|
|
virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
|
|
|
|
user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
|
|
|
|
*) sim_env="";;
|
|
|
|
esac],[sim_env=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-timebase,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-timebase Specify whether the PPC timebase is supported.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_timebase="-DWITH_TIME_BASE=1";;
|
|
|
|
no) sim_timebase="-DWITH_TIME_BASE=0";;
|
|
|
|
*) sim_timebase="";;
|
|
|
|
esac],[sim_timebase=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-alignment,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-alignment=align Specify strict or nonstrict alignment.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
|
|
|
|
no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NOSTRICT_ALIGNMENT";;
|
|
|
|
*) sim_alignment="-DWITH_ALIGNMENT=$enableval";;
|
|
|
|
esac],[sim_alignment=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-trace,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-trace Specify whether tracing is supported.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_trace="-DWITH_TRACE=1";;
|
|
|
|
no) sim_trace="-DWITH_TRACE=0";;
|
|
|
|
*) sim_trace="";;
|
|
|
|
esac],[sim_trace=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-assert,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-assert Specify whether to perform random assertions.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_assert="-DWITH_ASSERT=1";;
|
|
|
|
no) sim_assert="-DWITH_ASSERT=0";;
|
|
|
|
*) sim_assert="";;
|
|
|
|
esac],[sim_assert=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-float,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-float Specify whether to use host floating point or simulate.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
|
|
|
|
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
|
|
|
|
*) sim_float="";;
|
|
|
|
esac],[sim_float=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-monitor,
|
1995-11-08 18:57:06 +00:00
|
|
|
[ --enable-sim-monitor=mon Specify whether to enable monitoring events.],
|
1995-11-02 20:21:35 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_mon="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
|
|
|
|
no) sim_mon="-DWITH_MON=0";;
|
|
|
|
instruction) sim_mon="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
|
|
|
|
memory) sim_mon="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
|
|
|
|
*) sim_mon="-DWITH_MON='$enableval'";;
|
|
|
|
esac],[sim_float=""])dnl
|
|
|
|
|
1995-11-08 18:57:06 +00:00
|
|
|
AC_ARG_ENABLE(sim-function-unit,
|
|
|
|
[ --enable-sim-function-unit Specify whether detailed functional unit support is built.],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_func="-DWITH_FUNCTION_UNIT=1";;
|
|
|
|
no) sim_func="-DWITH_FUNCTION_UNIT=0";;
|
|
|
|
*) sim_func="";;
|
|
|
|
esac],[sim_func=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-model,
|
|
|
|
[ --enable-sim-model=which Specify PowerPC to model.],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_model="";;
|
|
|
|
no) sim_model="";;
|
|
|
|
*) sim_model="-DWITH_PPC_MODEL=${enableval}";;
|
|
|
|
esac],[sim_model=""])dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sim-default-model,
|
|
|
|
[ --enable-sim-default-model=which Specify default PowerPC to model.],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) sim_default_model="";;
|
|
|
|
no) sim_default_model="";;
|
|
|
|
*) sim_default_model="-DWITH_DEFAULT_PPC_MODEL=${enableval}";;
|
|
|
|
esac],[sim_model=""])dnl
|
|
|
|
|
1995-09-08 23:56:38 +00:00
|
|
|
AC_CONFIG_HEADER(config.h:config.in)
|
|
|
|
|
1995-08-23 21:06:36 +00:00
|
|
|
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
AC_ARG_PROGRAM
|
|
|
|
|
|
|
|
. ${srcdir}/../../bfd/configure.host
|
|
|
|
|
1995-09-08 23:56:38 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(HDEFINES)
|
|
|
|
AR=${AR-ar}
|
|
|
|
AC_SUBST(AR)
|
|
|
|
AC_PROG_RANLIB
|
1995-11-02 20:21:35 +00:00
|
|
|
AC_SUBST(sim_cflags)
|
1995-11-08 18:57:06 +00:00
|
|
|
AC_SUBST(sim_warnings)
|
1995-11-02 20:21:35 +00:00
|
|
|
AC_SUBST(sim_config)
|
|
|
|
AC_SUBST(sim_opcode)
|
|
|
|
AC_SUBST(sim_switch)
|
|
|
|
AC_SUBST(sim_dup)
|
|
|
|
AC_SUBST(sim_filter)
|
|
|
|
AC_SUBST(sim_icache)
|
|
|
|
AC_SUBST(sim_inline)
|
|
|
|
AC_SUBST(sim_bswap)
|
|
|
|
AC_SUBST(sim_endian)
|
|
|
|
AC_SUBST(sim_hostendian)
|
|
|
|
AC_SUBST(sim_smp)
|
|
|
|
AC_SUBST(sim_bitsize)
|
|
|
|
AC_SUBST(sim_hostbitsize)
|
|
|
|
AC_SUBST(sim_env)
|
|
|
|
AC_SUBST(sim_timebase)
|
|
|
|
AC_SUBST(sim_alignment)
|
|
|
|
AC_SUBST(sim_float)
|
|
|
|
AC_SUBST(sim_trace)
|
|
|
|
AC_SUBST(sim_assert)
|
|
|
|
AC_SUBST(sim_monitor)
|
1995-11-08 18:57:06 +00:00
|
|
|
AC_SUBST(sim_func)
|
|
|
|
AC_SUBST(sim_model)
|
|
|
|
AC_SUBST(sim_default_model)
|
1995-11-02 20:21:35 +00:00
|
|
|
|
|
|
|
AC_CHECK_FUNCS(getrusage)
|
1995-09-08 23:56:38 +00:00
|
|
|
|
|
|
|
# Put a plausible default for CC_FOR_BUILD in Makefile.
|
|
|
|
AC_C_CROSS
|
|
|
|
if test "x$cross_compiling" = "xno"; then
|
|
|
|
CC_FOR_BUILD='$(CC)'
|
1995-08-23 21:06:36 +00:00
|
|
|
else
|
1995-09-08 23:56:38 +00:00
|
|
|
CC_FOR_BUILD=gcc
|
1995-08-23 21:06:36 +00:00
|
|
|
fi
|
1995-09-08 23:56:38 +00:00
|
|
|
AC_SUBST(CC_FOR_BUILD)
|
1995-08-23 21:06:36 +00:00
|
|
|
|
1995-11-02 20:21:35 +00:00
|
|
|
AC_CHECK_HEADERS(string.h strings.h stdlib.h time.h sys/times.h unistd.h sys/resource.h)
|
1995-08-23 21:06:36 +00:00
|
|
|
|
1995-09-08 23:56:38 +00:00
|
|
|
AC_OUTPUT(Makefile,
|
|
|
|
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
|