aboutsummaryrefslogtreecommitdiff
path: root/sim/configure.ac
blob: 982cbc0b6b99a101c73aa6239ddc7b4c842c0bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
dnl Process this file with autoconf to produce a configure script.
m4_include([../config/override.m4])
AC_INIT(Makefile.in)

AC_PROG_CC
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)

AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_CPP
AC_SUBST(CFLAGS)
AR=${AR-ar}
AC_SUBST(AR)
AC_PROG_RANLIB

# Put a plausible default for CC_FOR_BUILD in Makefile.
if test -z "$CC_FOR_BUILD"; then
  if test "x$cross_compiling" = "xno"; then
    CC_FOR_BUILD='$(CC)'
  else
    CC_FOR_BUILD=gcc
  fi
fi
AC_SUBST(CC_FOR_BUILD)
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
AC_SUBST(CFLAGS_FOR_BUILD)

# If a cpu ever has more than one simulator to choose from, use
# --enable-sim=... to choose.
AC_ARG_ENABLE(sim,
[AS_HELP_STRING([--enable-sim], [Enable the GNU simulator])],
[case "${enableval}" in
yes | no) ;;
*)	AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;;
esac])

m4_define([SIM_ARCH], [
  sim_arch=$1
  AC_CONFIG_SUBDIRS($1)
])
if test "${enable_sim}" != no; then
  sinclude(configure.tgt)
  if test "$sim_igen" = yes; then
    AC_CONFIG_SUBDIRS(igen)
  fi
fi

AC_CONFIG_FILES([Makefile testsuite/Makefile])
AC_OUTPUT