sim: testsuite: integrate common tests into build
[deliverable/binutils-gdb.git] / sim / configure.ac
CommitLineData
b7026657 1dnl Process this file with autoconf to produce a configure script.
6bddc3e8
MF
2dnl NB: The version here is not used. If gdb ever changes from generating its
3dnl version at build time to autoconf time (like bfd et al do), we can switch.
4AC_INIT([sim], [0],
5 [https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim],
6 [], [https://sourceware.org/gdb/wiki/Sim/])
7
c2783492 8SIM_AC_TOOLCHAIN
6bddc3e8 9
8c379db2 10AM_MAINTAINER_MODE
6bddc3e8 11AM_INIT_AUTOMAKE
b7026657 12
b7026657
AC
13# If a cpu ever has more than one simulator to choose from, use
14# --enable-sim=... to choose.
15AC_ARG_ENABLE(sim,
8d0978fb 16[AS_HELP_STRING([--enable-sim], [Enable the GNU simulator])],
b7026657
AC
17[case "${enableval}" in
18yes | no) ;;
19*) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;;
20esac])
21
a0e674c1
MF
22AC_ARG_ENABLE(targets,
23[ --enable-targets alternative target configurations],
24[case "${enableval}" in
25 yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
26 ;;
27 no) enable_targets= ;;
28 *) enable_targets=$enableval ;;
29esac])
30
31dnl Used to keep track of which target (if any) is the default one. This is
32dnl used when installing files to see if they need to be suffixed.
33SIM_PRIMARY_TARGET=
34AC_SUBST(SIM_PRIMARY_TARGET)
35
36m4_define([SIM_TARGET], [
37 case "${targ}" in
38 all|$1)
39 if test "${targ}" = "${target}"; then
40 SIM_PRIMARY_TARGET=$2
41 fi
42 AC_CONFIG_SUBDIRS($2)
43 $3
44 ;;
45 esac
46])
47
3e8bb3e9
MF
48dnl WHEN ADDING ENTRIES TO THIS MATRIX:
49dnl Make sure that the left side always has two dashes. Otherwise you can get
50dnl spurious matches. Even for unambiguous cases, do this as a convention, else
51dnl the table becomes a real mess to understand and maintain.
b7026657 52if test "${enable_sim}" != no; then
3e8bb3e9 53 sim_igen=no
a0e674c1
MF
54 for targ in `echo $target $enable_targets | sed 's/,/ /g'`
55 do
56 SIM_TARGET([aarch64*-*-*], [aarch64])
57 SIM_TARGET([arm*-*-*], [arm])
58 SIM_TARGET([avr*-*-*], [avr])
59 SIM_TARGET([bfin-*-*], [bfin])
60 SIM_TARGET([bpf-*-*], [bpf])
61 SIM_TARGET([cr16*-*-*], [cr16])
62 SIM_TARGET([cris-*-* | crisv32-*-*], [cris])
63 SIM_TARGET([d10v-*-*], [d10v])
64 SIM_TARGET([frv-*-*], [frv])
65 SIM_TARGET([h8300*-*-*], [h8300])
66 SIM_TARGET([iq2000-*-*], [iq2000])
67 SIM_TARGET([lm32-*-*], [lm32])
68 SIM_TARGET([m32c-*-*], [m32c])
69 SIM_TARGET([m32r-*-*], [m32r])
70 SIM_TARGET([m68hc11-*-*|m6811-*-*], [m68hc11])
71 SIM_TARGET([mcore-*-*], [mcore])
72 SIM_TARGET([microblaze-*-*], [microblaze])
73 SIM_TARGET([mips*-*-*], [mips], [sim_igen=yes])
74 SIM_TARGET([mn10300*-*-*], [mn10300], [sim_igen=yes])
75 SIM_TARGET([moxie-*-*], [moxie])
76 SIM_TARGET([msp430*-*-*], [msp430])
77 SIM_TARGET([or1k-*-* | or1knd-*-*], [or1k])
78 SIM_TARGET([pru*-*-*], [pru])
79 SIM_TARGET([riscv*-*-*], [riscv])
80 SIM_TARGET([rl78-*-*], [rl78])
81 SIM_TARGET([rx-*-*], [rx])
82 SIM_TARGET([sh*-*-*], [sh])
83 SIM_TARGET([sparc-*-rtems*|sparc-*-elf*], [erc32])
84 SIM_TARGET([powerpc*-*-*], [ppc])
85 SIM_TARGET([ft32-*-*], [ft32])
86 SIM_TARGET([v850*-*-*], [v850], [sim_igen=yes])
87 done
b7026657 88fi
b6b1c790 89AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"])
b7026657 90
6c57b87f 91AC_CONFIG_FILES([Makefile])
bb3eddb5 92AC_OUTPUT
This page took 1.00069 seconds and 4 git commands to generate.