* sparcnbsd-tdep.c: Include "gdb_string.h".
[deliverable/binutils-gdb.git] / sim / configure.in
CommitLineData
c906108c 1dnl Process this file with autoconf to produce a configure script.
c2d11a7d 2AC_PREREQ(2.13)dnl
c906108c
SS
3AC_INIT(Makefile.in)
4
5AC_PROG_CC
6AC_PROG_INSTALL
7AC_CHECK_TOOL(AR, ar)
8AC_CHECK_TOOL(RANLIB, ranlib, :)
9
10AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
11AC_CANONICAL_SYSTEM
12AC_ARG_PROGRAM
13AC_PROG_CC
14AC_SUBST(CFLAGS)
15AC_SUBST(HDEFINES)
16AR=${AR-ar}
17AC_SUBST(AR)
18AC_PROG_RANLIB
19
20# Put a plausible default for CC_FOR_BUILD in Makefile.
c906108c
SS
21if test "x$cross_compiling" = "xno"; then
22 CC_FOR_BUILD='$(CC)'
23else
24 CC_FOR_BUILD=gcc
25fi
26AC_SUBST(CC_FOR_BUILD)
27
28# If a cpu ever has more than one simulator to choose from, use
29# --enable-sim=... to choose.
30AC_ARG_ENABLE(sim,
31[ --enable-sim ],
32[case "${enableval}" in
33yes | no) ;;
34*) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;;
35esac])
36
37# Assume simulator can be built with cc.
38# If the user passes --enable-sim built it regardless of $(CC).
39only_if_gcc=no
40only_if_enabled=no
41extra_subdirs=common
42
43# WHEN ADDING ENTRIES TO THIS MATRIX:
44# Make sure that the left side always has two dashes. Otherwise you
45# can get spurious matches. Even for unambiguous cases, do this as a
46# convention, else the table becomes a real mess to understand and maintain.
47
48case "${target}" in
2acceee2 49 arm*-*-* | thumb*-*-*)
6426a772
JM
50 sim_target=arm
51 extra_subdirs="${extra_subdirs} testsuite"
52 ;;
bcd65766
NC
53 strongarm*-*-*)
54 sim_target=arm
55 extra_subdirs="${extra_subdirs} testsuite"
56 ;;
f1129fb8
NC
57 xscale-*-*)
58 sim_target=arm
59 extra_subdirs="${extra_subdirs} testsuite"
60 ;;
c906108c 61 d10v-*-*) sim_target=d10v ;;
3fbeef0b
AC
62# OBSOLETE d30v-*-*)
63# OBSOLETE sim_target=d30v
64# OBSOLETE only_if_gcc=yes
65# OBSOLETE extra_subdirs="${extra_subdirs} igen"
66# OBSOLETE ;;
7a3085c1 67# OBSOLETE fr30-*-*) sim_target=fr30 ;;
5fe8b0df
MS
68 h8300*-*-*)
69 sim_target=h8300
70 extra_subdirs="${extra_subdirs} testsuite"
71 ;;
c906108c
SS
72 h8500-*-*) sim_target=h8500 ;;
73 i960-*-*) sim_target=i960 ;;
74 m32r-*-*) sim_target=m32r ;;
5d031c16 75 m68hc11-*-*|m6811-*-*) sim_target=m68hc11 ;;
7a292a7a 76 mcore-*-*) sim_target=mcore ;;
c906108c
SS
77 mips*-*-*)
78 # The MIPS simulator can only be compiled by gcc.
79 sim_target=mips
80 only_if_gcc=yes
81 extra_subdirs="${extra_subdirs} igen"
82 ;;
83 mn10300*-*-*)
84 # The mn10300 simulator can only be compiled by gcc.
85 sim_target=mn10300
86 only_if_gcc=yes
87 extra_subdirs="${extra_subdirs} igen"
88 ;;
89 mn10200*-*-*)
90 sim_target=mn10200
91 ;;
92 sh*-*-*) sim_target=sh ;;
457174f6
AC
93 powerpc*-*-eabi* | powerpc*-*-solaris* | powerpc*-*-sysv4* | \
94 powerpc*-*-elf* | powerpc*-*-linux* | powerpc*-*-netbsd* )
c906108c
SS
95 # The PowerPC simulator uses the GCC extension long long as well as
96 # ANSI prototypes, so don't enable it for random host compilers
97 # unless asked to.
98 sim_target=ppc
99 only_if_gcc=yes
100 #extra_subdirs="${extra_subdirs}"
101 ;;
6c29acca
AC
102 tic80-*-*)
103 sim_target=tic80
104 only_if_gcc=yes
105 extra_subdirs="${extra_subdirs} igen"
106 ;;
c906108c
SS
107 v850-*-*)
108 # The V850 simulator can only be compiled by gcc.
109 sim_target=v850
110 extra_subdirs="${extra_subdirs} igen"
111 only_if_gcc=yes
112 ;;
113 v850e-*-*)
114 # The V850 simulator can only be compiled by gcc.
115 sim_target=v850
116 extra_subdirs="${extra_subdirs} igen"
117 only_if_gcc=yes
118 ;;
119 v850ea-*-*)
120 # The V850 simulator can only be compiled by gcc.
121 sim_target=v850
122 extra_subdirs="${extra_subdirs} igen"
123 only_if_gcc=yes
124 ;;
125 w65-*-*)
126 sim_target=w65
127 # The w65 is suffering from gradual decay.
128 only_if_enabled=yes
129 ;;
130 z8k*-*-*) sim_target=z8k ;;
131 sparc64-*-*)
132 only_if_gcc=yes
7a292a7a 133 sim_target=none # Don't build erc32 if sparc64.
c906108c
SS
134 ;;
135 sparclite*-*-* | sparc86x*-*-*)
136 # The SPARC simulator can only be compiled by gcc.
137 only_if_gcc=yes
7a292a7a 138 sim_target=erc32
c906108c
SS
139 ;;
140 sparc*-*-*)
141 # The SPARC simulator can only be compiled by gcc.
142 only_if_gcc=yes
7a292a7a
SS
143 # Unfortunately erc32 won't build on many hosts, so only enable
144 # it if the user really really wants it.
145 only_if_enabled=yes
146 sim_target=erc32
c906108c
SS
147 ;;
148 *) sim_target=none ;;
149esac
150
151
c906108c
SS
152# Is there a testsuite directory for the target?
153testdir=`echo ${target} | sed -e 's/-.*-/-/'`
154if test -r ${srcdir}/testsuite/${testdir}/configure ; then
155 extra_subdirs="${extra_subdirs} testsuite"
156fi
157
158
159case "${enable_sim}" in
160no) sim_target=none ;;
161yes)
162 if test ${only_if_gcc} = yes ; then
163 if test "${GCC}" != yes ; then
164 echo "Can't enable simulator since not compiling with GCC."
165 sim_target=none
166 fi
167 fi
168 ;;
169*)
170 if test ${only_if_enabled} = yes ; then
171 sim_target=none
172 else
173 if test ${only_if_gcc} = yes ; then
174 if test "${GCC}" != yes ; then
175 sim_target=none
176 fi
177 fi
178 fi
179 ;;
180esac
181
182if test x"${sim_target}" != xnone ; then
183 configdirs="${extra_subdirs} ${sim_target}"
184 AC_CONFIG_SUBDIRS($configdirs)
185fi
186
187AC_OUTPUT(Makefile)
188
189exit 0
This page took 0.25006 seconds and 4 git commands to generate.