Line 3... |
Line 3... |
dnl
|
dnl
|
dnl report bugs to jrydberg@phx.pp.se
|
dnl report bugs to jrydberg@phx.pp.se
|
dnl
|
dnl
|
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
AC_INIT(cpu/or32/execute.c)
|
AC_INIT
|
AC_CANONICAL_SYSTEM
|
AC_CONFIG_SRCDIR([cpu/or32/execute.c])
|
|
AC_CANONICAL_TARGET([])
|
AM_INIT_AUTOMAKE(or1ksim, 1.3)
|
AM_INIT_AUTOMAKE(or1ksim, 1.3)
|
AM_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADERS([config.h])
|
|
|
AC_REVISION([for or1ksim-1.2, version 2.14, from autoconf version] AC_ACVERSION)
|
AC_REVISION([for or1ksim-1.2, version 2.14, from autoconf version] AC_ACVERSION)
|
SIMVERSION=1.2
|
SIMVERSION=1.2
|
|
|
dnl make sure we are using a recent autoconf version
|
dnl make sure we are using a recent autoconf version
|
AC_PREREQ(2.10)
|
AC_PREREQ(2.59)
|
AC_CANONICAL_HOST
|
|
|
|
dnl yuck
|
dnl yuck
|
case "$target_cpu" in
|
case "$target_cpu" in
|
or32*) CPU_ARCH=or32;
|
or32*) CPU_ARCH=or32;
|
ARCH_ISA=OR32;;
|
ARCH_ISA=OR32;;
|
Line 61... |
Line 61... |
termcap.h termios.h termio.h sys/file.h locale.h\
|
termcap.h termios.h termio.h sys/file.h locale.h\
|
net/ethernet.h sys/ethernet.h malloc.h inttypes.h)
|
net/ethernet.h sys/ethernet.h malloc.h inttypes.h)
|
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
|
|
dnl check for "long long" (added by Erez)
|
dnl check for "long long" (added by Erez)
|
AC_TRY_COMPILE(,[long long ll; unsigned long long ull;],AC_DEFINE(CC_HAS_LONG_LONG))
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long ll; unsigned long long ull;]])],[AC_DEFINE(CC_HAS_LONG_LONG, 1, "Whether the compiler supports 'long long'.")],[])
|
|
|
dnl check for {u,}int{8,16,32}_t in inttypes.h
|
dnl check for {u,}int{8,16,32}_t in inttypes.h
|
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t],,, [#include ])
|
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t],,, [#include ])
|
AC_CHECK_TYPES([int8_t, int16_t, int32_t],,, [#include ])
|
AC_CHECK_TYPES([int8_t, int16_t, int32_t],,, [#include ])
|
|
|
Line 130... |
Line 130... |
;;
|
;;
|
*)
|
*)
|
AC_MSG_ERROR("excecution must one of simple/complex/dynamic")
|
AC_MSG_ERROR("excecution must one of simple/complex/dynamic")
|
;;
|
;;
|
esac
|
esac
|
|
],
|
|
[
|
|
AC_MSG_RESULT(complex)
|
])
|
])
|
|
|
eth_phy="0"
|
eth_phy="0"
|
AC_MSG_CHECKING(whether to enable ethernet phy emulation)
|
AC_MSG_CHECKING(whether to enable ethernet phy emulation)
|
AC_ARG_ENABLE(ethphy,
|
AC_ARG_ENABLE(ethphy,
|
Line 177... |
Line 180... |
yes) set_arith_flag="1" ;;
|
yes) set_arith_flag="1" ;;
|
esac
|
esac
|
])
|
])
|
AC_MSG_RESULT(${enable_arith_flag-no})
|
AC_MSG_RESULT(${enable_arith_flag-no})
|
|
|
AC_DEFINE_UNQUOTED(RAW_RANGE_STATS, $raw_range_stats)
|
AC_DEFINE_UNQUOTED(RAW_RANGE_STATS, $raw_range_stats, [ Specifies, whether we should do register accesses over time analysis. Simple execution must be enabled!])
|
AC_DEFINE_UNQUOTED(SET_OV_FLAG, $set_ov_flag)
|
AC_DEFINE_UNQUOTED(SET_OV_FLAG, $set_ov_flag, [ Whether instructions set overflow flag])
|
AC_DEFINE_UNQUOTED(ARITH_SET_FLAG, $set_arith_flag)
|
AC_DEFINE_UNQUOTED(ARITH_SET_FLAG, $set_arith_flag, [Whether arithmethic instructions set flag on zero])
|
AC_DEFINE_UNQUOTED(HAVE_ETH_PHY, $eth_phy)
|
AC_DEFINE_UNQUOTED(HAVE_ETH_PHY, $eth_phy, [Whether we have ethernet PHY support])
|
AC_DEFINE_UNQUOTED(SIMPLE_EXECUTION, $execution == 0)
|
AC_DEFINE_UNQUOTED(SIMPLE_EXECUTION, $execution == 0, [Whether we are building with simple execution module])
|
AC_DEFINE_UNQUOTED(COMPLEX_EXECUTION, $execution == 1)
|
AC_DEFINE_UNQUOTED(COMPLEX_EXECUTION, $execution == 1, [Whether we are building with complex execution module])
|
AC_DEFINE_UNQUOTED(DYNAMIC_EXECUTION, $execution == 2)
|
AC_DEFINE_UNQUOTED(DYNAMIC_EXECUTION, $execution == 2, [Whether we are building with dynamic execution module])
|
AM_CONDITIONAL(GENERATE_NEEDED, test x$execution = x1)
|
AM_CONDITIONAL(GENERATE_NEEDED, test x$execution = x1)
|
AM_CONDITIONAL(DYNAMIC_EXECUTION, test x$execution = x2)
|
AM_CONDITIONAL(DYNAMIC_EXECUTION, test x$execution = x2)
|
|
|
|
|
test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
|
test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
|
Line 209... |
Line 212... |
AC_SUBST(host)
|
AC_SUBST(host)
|
|
|
AC_SUBST(SUMVERSION)
|
AC_SUBST(SUMVERSION)
|
AC_SUBST(TERMCAP_LIB)
|
AC_SUBST(TERMCAP_LIB)
|
|
|
AC_DEFINE(HAS_EXECUTION)
|
AC_DEFINE(HAS_EXECUTION, 1, [ Some shared files require to know, whether we have execution functions defined.])
|
AC_DEFINE(HAS_DEBUG)
|
AC_DEFINE(HAS_DEBUG, 1, [ Some shared files require to know, whether we have debug functions.])
|
|
|
dnl yuck
|
dnl yuck
|
INCLUDES="$INCLUDES -I\${top_srcdir} -I\${top_srcdir}/cpu/common \
|
INCLUDES="$INCLUDES -I\${top_srcdir} -I\${top_srcdir}/cpu/common \
|
-I\${top_srcdir}/cpu/or1k -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
|
-I\${top_srcdir}/cpu/or1k -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
|
-I\${top_srcdir}/bpb -I\${top_srcdir}/peripheral -I\${top_srcdir}/tick \
|
-I\${top_srcdir}/bpb -I\${top_srcdir}/peripheral -I\${top_srcdir}/tick \
|
-I\${top_srcdir}/peripheral/channels -I\${top_srcdir}/pm -I\${top_srcdir}/pic \
|
-I\${top_srcdir}/peripheral/channels -I\${top_srcdir}/pm -I\${top_srcdir}/pic \
|
-I\${top_srcdir}/debug -I\${top_srcdir}/vapi -I\${top_srcdir}/support \
|
-I\${top_srcdir}/debug -I\${top_srcdir}/vapi -I\${top_srcdir}/support \
|
-I\${top_srcdir}/cuc -I\${top_srcdir}/port"
|
-I\${top_srcdir}/cuc -I\${top_srcdir}/port"
|
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
|
|
AC_OUTPUT([Makefile bpb/Makefile cache/Makefile cpu/Makefile
|
AC_CONFIG_FILES([Makefile bpb/Makefile cache/Makefile cpu/Makefile
|
cpu/common/Makefile cpu/or32/Makefile cuc/Makefile
|
cpu/common/Makefile cpu/or32/Makefile cuc/Makefile
|
cpu/or1k/Makefile cpu/dlx/Makefile debug/Makefile
|
cpu/or1k/Makefile cpu/dlx/Makefile debug/Makefile
|
support/Makefile mmu/Makefile peripheral/Makefile tick/Makefile
|
support/Makefile mmu/Makefile peripheral/Makefile tick/Makefile
|
peripheral/channels/Makefile
|
peripheral/channels/Makefile
|
pm/Makefile pic/Makefile vapi/Makefile port/Makefile],
|
pm/Makefile pic/Makefile vapi/Makefile port/Makefile])
|
[
|
AC_CONFIG_COMMANDS([default],[[
|
# Makefile uses this timestamp file to record whether config.h is up to date.
|
# Makefile uses this timestamp file to record whether config.h is up to date.
|
echo > stamp-h
|
echo > stamp-h
|
])
|
]],[[]])
|
|
AC_OUTPUT
|