Commit | Line | Data |
---|---|---|
b7026657 AC |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_PREREQ(2.59)dnl | |
3 | AC_INIT(Makefile.in) | |
4 | ||
5 | AC_PROG_CC | |
6 | AC_PROG_INSTALL | |
7 | AC_CHECK_TOOL(AR, ar) | |
8 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
9 | ||
b7026657 AC |
10 | AC_CANONICAL_SYSTEM |
11 | AC_ARG_PROGRAM | |
12 | AC_PROG_CC | |
13 | AC_SUBST(CFLAGS) | |
14 | AC_SUBST(HDEFINES) | |
15 | AR=${AR-ar} | |
16 | AC_SUBST(AR) | |
17 | AC_PROG_RANLIB | |
18 | ||
19 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
20 | if test "x$cross_compiling" = "xno"; then | |
21 | CC_FOR_BUILD='$(CC)' | |
22 | else | |
23 | CC_FOR_BUILD=gcc | |
24 | fi | |
25 | AC_SUBST(CC_FOR_BUILD) | |
4b164edf AS |
26 | CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} |
27 | AC_SUBST(CFLAGS_FOR_BUILD) | |
b7026657 AC |
28 | |
29 | # If a cpu ever has more than one simulator to choose from, use | |
30 | # --enable-sim=... to choose. | |
31 | AC_ARG_ENABLE(sim, | |
32 | [ --enable-sim ], | |
33 | [case "${enableval}" in | |
34 | yes | no) ;; | |
35 | *) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;; | |
36 | esac]) | |
37 | ||
38 | # WHEN ADDING ENTRIES TO THIS MATRIX: | |
39 | ||
40 | # Make sure that the left side always has two dashes. Otherwise you | |
41 | # can get spurious matches. Even for unambiguous cases, do this as a | |
42 | # convention, else the table becomes a real mess to understand and | |
43 | # maintain. | |
44 | ||
45 | if test "${enable_sim}" != no; then | |
46 | testsuite=no | |
c4d800ae | 47 | common=yes |
b7026657 AC |
48 | igen=no |
49 | case "${target}" in | |
50 | arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*) | |
51 | AC_CONFIG_SUBDIRS(arm) | |
52 | testsuite=yes | |
b7026657 | 53 | ;; |
86b90b55 SR |
54 | cr16*-*-*) |
55 | AC_CONFIG_SUBDIRS(cr16) | |
56 | testsuite=yes | |
57 | ;; | |
f6bcefef HPN |
58 | cris-*-* | crisv32-*-*) |
59 | AC_CONFIG_SUBDIRS(cris) | |
60 | testsuite=yes | |
f6bcefef | 61 | ;; |
b7026657 AC |
62 | d10v-*-*) |
63 | AC_CONFIG_SUBDIRS(d10v) | |
64 | ;; | |
65 | frv-*-*) | |
66 | AC_CONFIG_SUBDIRS(frv) | |
67 | testsuite=yes | |
b7026657 AC |
68 | ;; |
69 | h8300*-*-*) | |
70 | AC_CONFIG_SUBDIRS(h8300) | |
71 | testsuite=yes | |
edece237 CV |
72 | ;; |
73 | iq2000-*-*) | |
74 | AC_CONFIG_SUBDIRS(iq2000) | |
75 | testsuite=yes | |
b7026657 | 76 | ;; |
d45a4bef JB |
77 | m32c-*-*) |
78 | AC_CONFIG_SUBDIRS(m32c) | |
d45a4bef | 79 | ;; |
b7026657 AC |
80 | m32r-*-*) |
81 | AC_CONFIG_SUBDIRS(m32r) | |
82 | testsuite=yes | |
b7026657 AC |
83 | ;; |
84 | m68hc11-*-*|m6811-*-*) | |
85 | AC_CONFIG_SUBDIRS(m68hc11) | |
86 | testsuite=yes | |
b7026657 AC |
87 | ;; |
88 | mcore-*-*) | |
89 | AC_CONFIG_SUBDIRS(mcore) | |
90 | testsuite=yes | |
b7026657 AC |
91 | ;; |
92 | mips*-*-*) | |
93 | AC_CONFIG_SUBDIRS(mips) | |
94 | testsuite=yes | |
95 | igen=yes | |
96 | ;; | |
97 | mn10300*-*-*) | |
98 | AC_CONFIG_SUBDIRS(mn10300) | |
99 | igen=yes | |
100 | ;; | |
cecb04b7 | 101 | sh64*-*-*) |
21bc7567 CV |
102 | AC_CONFIG_SUBDIRS(sh64) |
103 | testsuite=yes | |
21bc7567 | 104 | ;; |
cecb04b7 | 105 | sh*-*-*) |
b7026657 AC |
106 | AC_CONFIG_SUBDIRS(sh) |
107 | testsuite=yes | |
b7026657 | 108 | ;; |
ce928021 DJ |
109 | sparc-*-rtems*|sparc-*-elf*) |
110 | AC_CONFIG_SUBDIRS(erc32) | |
111 | testsuite=yes | |
ce928021 | 112 | ;; |
b7026657 AC |
113 | powerpc*-*-* ) |
114 | AC_CONFIG_SUBDIRS(ppc) | |
b7026657 AC |
115 | ;; |
116 | v850*-*-* ) | |
117 | AC_CONFIG_SUBDIRS(v850) | |
c3357c64 | 118 | igen=yes |
c5fbc25b | 119 | testsuite=yes |
b7026657 | 120 | ;; |
c4d800ae HPN |
121 | *) |
122 | # No simulator subdir, so the subdir "common" isn't needed. | |
123 | common=no | |
124 | ;; | |
b7026657 AC |
125 | esac |
126 | if test "$testsuite" = yes; then | |
127 | AC_CONFIG_SUBDIRS(testsuite) | |
128 | fi | |
129 | if test "$common" = yes; then | |
130 | AC_CONFIG_SUBDIRS(common) | |
131 | fi | |
132 | if test "$igen" = yes; then | |
133 | AC_CONFIG_SUBDIRS(igen) | |
134 | fi | |
135 | fi | |
136 | ||
137 | AC_OUTPUT(Makefile) | |
138 | ||
139 | exit 0 |