1 dnl Process this file with autoconf to produce a configure script.
2 dnl NB: The version here is not used. If gdb ever changes from generating its
3 dnl version at build time to autoconf time (like bfd et al do), we can switch.
5 [https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim],
6 [], [https://sourceware.org/gdb/wiki/Sim/])
8 dnl Probably should unify PKGVERSION with PACKAGE_* settings from AC_INIT.
10 AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
11 dnl PACKAGE_BUGREPORT is provided by AC_INIT.
12 ACX_BUGURL([$PACKAGE_BUGREPORT])
13 AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
15 AC_CONFIG_HEADERS([config.h])
23 # If a cpu ever has more than one simulator to choose from, use
24 # --enable-sim=... to choose.
26 [AS_HELP_STRING([--enable-sim], [Enable the GNU simulator])],
27 [case "${enableval}" in
29 *) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;;
32 AC_ARG_ENABLE([example-sims],
33 [AC_HELP_STRING([--enable-example-sims],
34 [enable example GNU simulators])])
36 AC_ARG_ENABLE(targets,
37 [ --enable-targets alternative target configurations],
38 [case "${enableval}" in
39 yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
41 no) enable_targets= ;;
42 *) enable_targets=$enableval ;;
45 dnl Used to keep track of which target (if any) is the default one. This is
46 dnl used when installing files to see if they need to be suffixed.
48 AC_SUBST(SIM_PRIMARY_TARGET)
50 m4_define([SIM_TARGET], [
53 if test "${targ}" = "${target}"; then
62 dnl WHEN ADDING ENTRIES TO THIS MATRIX:
63 dnl Make sure that the left side always has two dashes. Otherwise you can get
64 dnl spurious matches. Even for unambiguous cases, do this as a convention, else
65 dnl the table becomes a real mess to understand and maintain.
66 if test "${enable_sim}" != no; then
68 for targ in `echo $target $enable_targets | sed 's/,/ /g'`
70 SIM_TARGET([aarch64*-*-*], [aarch64])
71 SIM_TARGET([arm*-*-*], [arm])
72 SIM_TARGET([avr*-*-*], [avr])
73 SIM_TARGET([bfin-*-*], [bfin])
74 SIM_TARGET([bpf-*-*], [bpf])
75 SIM_TARGET([cr16*-*-*], [cr16])
76 SIM_TARGET([cris-*-* | crisv32-*-*], [cris])
77 SIM_TARGET([d10v-*-*], [d10v])
78 SIM_TARGET([frv-*-*], [frv])
79 SIM_TARGET([h8300*-*-*], [h8300])
80 SIM_TARGET([iq2000-*-*], [iq2000])
81 SIM_TARGET([lm32-*-*], [lm32])
82 SIM_TARGET([m32c-*-*], [m32c])
83 SIM_TARGET([m32r-*-*], [m32r])
84 SIM_TARGET([m68hc11-*-*|m6811-*-*], [m68hc11])
85 SIM_TARGET([mcore-*-*], [mcore])
86 SIM_TARGET([microblaze-*-*], [microblaze])
87 SIM_TARGET([mips*-*-*], [mips], [sim_igen=yes])
88 SIM_TARGET([mn10300*-*-*], [mn10300], [sim_igen=yes])
89 SIM_TARGET([moxie-*-*], [moxie])
90 SIM_TARGET([msp430*-*-*], [msp430])
91 SIM_TARGET([or1k-*-* | or1knd-*-*], [or1k])
92 SIM_TARGET([pru*-*-*], [pru])
93 SIM_TARGET([riscv*-*-*], [riscv])
94 SIM_TARGET([rl78-*-*], [rl78])
95 SIM_TARGET([rx-*-*], [rx])
96 SIM_TARGET([sh*-*-*], [sh])
97 SIM_TARGET([sparc-*-rtems*|sparc-*-elf*], [erc32])
98 SIM_TARGET([powerpc*-*-*], [ppc])
99 SIM_TARGET([ft32-*-*], [ft32])
100 SIM_TARGET([v850*-*-*], [v850], [sim_igen=yes])
103 if test "x${enable_example_sims}" = xyes; then
104 AC_CONFIG_SUBDIRS(example-synacor)
107 AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"])
109 dnl Standard (and optional) simulator options.
110 dnl Eventually all simulators will support these.
111 SIM_AC_OPTION_ALIGNMENT
114 SIM_AC_OPTION_ENVIRONMENT
115 SIM_AC_OPTION_PROFILE
119 AC_CONFIG_FILES([Makefile])