]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/configure.ac
Enable maintainer mode for sim
[thirdparty/binutils-gdb.git] / sim / configure.ac
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.
4 AC_INIT([sim], [0],
5 [https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim],
6 [], [https://sourceware.org/gdb/wiki/Sim/])
7
8 AC_CANONICAL_SYSTEM
9
10 AM_MAINTAINER_MODE
11 AM_INIT_AUTOMAKE
12
13 AC_PROG_CC
14 AC_PROG_INSTALL
15 AC_CHECK_TOOL(AR, ar)
16 AC_CHECK_TOOL(RANLIB, ranlib, :)
17
18 AC_ARG_PROGRAM
19 AC_PROG_CC
20 AC_PROG_CPP
21 AC_SUBST(CFLAGS)
22 AR=${AR-ar}
23 AC_SUBST(AR)
24 AC_PROG_RANLIB
25
26 # Put a plausible default for CC_FOR_BUILD in Makefile.
27 if test -z "$CC_FOR_BUILD"; then
28 if test "x$cross_compiling" = "xno"; then
29 CC_FOR_BUILD='$(CC)'
30 else
31 CC_FOR_BUILD=gcc
32 fi
33 fi
34 AC_SUBST(CC_FOR_BUILD)
35 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
36 AC_SUBST(CFLAGS_FOR_BUILD)
37
38 # If a cpu ever has more than one simulator to choose from, use
39 # --enable-sim=... to choose.
40 AC_ARG_ENABLE(sim,
41 [AS_HELP_STRING([--enable-sim], [Enable the GNU simulator])],
42 [case "${enableval}" in
43 yes | no) ;;
44 *) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;;
45 esac])
46
47 dnl WHEN ADDING ENTRIES TO THIS MATRIX:
48 dnl Make sure that the left side always has two dashes. Otherwise you can get
49 dnl spurious matches. Even for unambiguous cases, do this as a convention, else
50 dnl the table becomes a real mess to understand and maintain.
51 if test "${enable_sim}" != no; then
52 sim_igen=no
53 case "${target}" in
54 aarch64*-*-*)
55 AC_CONFIG_SUBDIRS(aarch64)
56 ;;
57 arm*-*-*)
58 AC_CONFIG_SUBDIRS(arm)
59 ;;
60 avr*-*-*)
61 AC_CONFIG_SUBDIRS(avr)
62 ;;
63 bfin-*-*)
64 AC_CONFIG_SUBDIRS(bfin)
65 ;;
66 bpf-*-*)
67 AC_CONFIG_SUBDIRS(bpf)
68 ;;
69 cr16*-*-*)
70 AC_CONFIG_SUBDIRS(cr16)
71 ;;
72 cris-*-* | crisv32-*-*)
73 AC_CONFIG_SUBDIRS(cris)
74 ;;
75 d10v-*-*)
76 AC_CONFIG_SUBDIRS(d10v)
77 ;;
78 frv-*-*)
79 AC_CONFIG_SUBDIRS(frv)
80 ;;
81 h8300*-*-*)
82 AC_CONFIG_SUBDIRS(h8300)
83 ;;
84 iq2000-*-*)
85 AC_CONFIG_SUBDIRS(iq2000)
86 ;;
87 lm32-*-*)
88 AC_CONFIG_SUBDIRS(lm32)
89 ;;
90 m32c-*-*)
91 AC_CONFIG_SUBDIRS(m32c)
92 ;;
93 m32r-*-*)
94 AC_CONFIG_SUBDIRS(m32r)
95 ;;
96 m68hc11-*-*|m6811-*-*)
97 AC_CONFIG_SUBDIRS(m68hc11)
98 ;;
99 mcore-*-*)
100 AC_CONFIG_SUBDIRS(mcore)
101 ;;
102 microblaze-*-*)
103 AC_CONFIG_SUBDIRS(microblaze)
104 ;;
105 mips*-*-*)
106 AC_CONFIG_SUBDIRS(mips)
107 sim_igen=yes
108 ;;
109 mn10300*-*-*)
110 AC_CONFIG_SUBDIRS(mn10300)
111 sim_igen=yes
112 ;;
113 moxie-*-*)
114 AC_CONFIG_SUBDIRS(moxie)
115 ;;
116 msp430*-*-*)
117 AC_CONFIG_SUBDIRS(msp430)
118 ;;
119 or1k-*-* | or1knd-*-*)
120 AC_CONFIG_SUBDIRS(or1k)
121 ;;
122 pru*-*-*)
123 AC_CONFIG_SUBDIRS(pru)
124 ;;
125 riscv*-*-*)
126 AC_CONFIG_SUBDIRS(riscv)
127 ;;
128 rl78-*-*)
129 AC_CONFIG_SUBDIRS(rl78)
130 ;;
131 rx-*-*)
132 AC_CONFIG_SUBDIRS(rx)
133 ;;
134 sh*-*-*)
135 AC_CONFIG_SUBDIRS(sh)
136 ;;
137 sparc-*-rtems*|sparc-*-elf*)
138 AC_CONFIG_SUBDIRS(erc32)
139 ;;
140 powerpc*-*-*)
141 AC_CONFIG_SUBDIRS(ppc)
142 ;;
143 ft32-*-*)
144 AC_CONFIG_SUBDIRS(ft32)
145 ;;
146 v850*-*-*)
147 AC_CONFIG_SUBDIRS(v850)
148 sim_igen=yes
149 ;;
150 esac
151 if test "$sim_igen" = yes; then
152 AC_CONFIG_SUBDIRS(igen)
153 fi
154 fi
155
156 AC_CONFIG_FILES([Makefile])
157 AC_OUTPUT