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 | |
47 | common=no | |
48 | igen=no | |
49 | case "${target}" in | |
50 | arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*) | |
51 | AC_CONFIG_SUBDIRS(arm) | |
52 | testsuite=yes | |
53 | common=yes | |
54 | ;; | |
f6bcefef HPN |
55 | cris-*-* | crisv32-*-*) |
56 | AC_CONFIG_SUBDIRS(cris) | |
57 | testsuite=yes | |
58 | common=yes | |
59 | ;; | |
b7026657 AC |
60 | d10v-*-*) |
61 | AC_CONFIG_SUBDIRS(d10v) | |
62 | ;; | |
63 | frv-*-*) | |
64 | AC_CONFIG_SUBDIRS(frv) | |
65 | testsuite=yes | |
66 | common=yes | |
67 | ;; | |
68 | h8300*-*-*) | |
69 | AC_CONFIG_SUBDIRS(h8300) | |
70 | testsuite=yes | |
edece237 CV |
71 | common=yes |
72 | ;; | |
73 | iq2000-*-*) | |
74 | AC_CONFIG_SUBDIRS(iq2000) | |
75 | testsuite=yes | |
b7026657 AC |
76 | common=yes |
77 | ;; | |
d45a4bef JB |
78 | m32c-*-*) |
79 | AC_CONFIG_SUBDIRS(m32c) | |
80 | common=yes | |
81 | ;; | |
b7026657 AC |
82 | m32r-*-*) |
83 | AC_CONFIG_SUBDIRS(m32r) | |
84 | testsuite=yes | |
85 | common=yes | |
86 | ;; | |
87 | m68hc11-*-*|m6811-*-*) | |
88 | AC_CONFIG_SUBDIRS(m68hc11) | |
89 | testsuite=yes | |
90 | common=yes | |
91 | ;; | |
92 | mcore-*-*) | |
93 | AC_CONFIG_SUBDIRS(mcore) | |
94 | testsuite=yes | |
95 | common=yes | |
96 | ;; | |
97 | mips*-*-*) | |
98 | AC_CONFIG_SUBDIRS(mips) | |
99 | testsuite=yes | |
4ac6917f | 100 | common=yes |
b7026657 AC |
101 | igen=yes |
102 | ;; | |
103 | mn10300*-*-*) | |
104 | AC_CONFIG_SUBDIRS(mn10300) | |
4ac6917f | 105 | common=yes |
b7026657 AC |
106 | igen=yes |
107 | ;; | |
21bc7567 CV |
108 | sh64-*-*) |
109 | AC_CONFIG_SUBDIRS(sh64) | |
110 | testsuite=yes | |
111 | common=yes | |
112 | ;; | |
113 | sh-*-*) | |
b7026657 AC |
114 | AC_CONFIG_SUBDIRS(sh) |
115 | testsuite=yes | |
116 | common=yes | |
117 | ;; | |
118 | powerpc*-*-* ) | |
119 | AC_CONFIG_SUBDIRS(ppc) | |
120 | common=yes | |
121 | ;; | |
122 | v850*-*-* ) | |
123 | AC_CONFIG_SUBDIRS(v850) | |
124 | common=yes | |
c3357c64 | 125 | igen=yes |
b7026657 | 126 | ;; |
b7026657 AC |
127 | esac |
128 | if test "$testsuite" = yes; then | |
129 | AC_CONFIG_SUBDIRS(testsuite) | |
130 | fi | |
131 | if test "$common" = yes; then | |
132 | AC_CONFIG_SUBDIRS(common) | |
133 | fi | |
134 | if test "$igen" = yes; then | |
135 | AC_CONFIG_SUBDIRS(igen) | |
136 | fi | |
137 | fi | |
138 | ||
139 | AC_OUTPUT(Makefile) | |
140 | ||
141 | exit 0 |