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) | |
26 | ||
27 | # If a cpu ever has more than one simulator to choose from, use | |
28 | # --enable-sim=... to choose. | |
29 | AC_ARG_ENABLE(sim, | |
30 | [ --enable-sim ], | |
31 | [case "${enableval}" in | |
32 | yes | no) ;; | |
33 | *) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;; | |
34 | esac]) | |
35 | ||
36 | # WHEN ADDING ENTRIES TO THIS MATRIX: | |
37 | ||
38 | # Make sure that the left side always has two dashes. Otherwise you | |
39 | # can get spurious matches. Even for unambiguous cases, do this as a | |
40 | # convention, else the table becomes a real mess to understand and | |
41 | # maintain. | |
42 | ||
43 | if test "${enable_sim}" != no; then | |
44 | testsuite=no | |
45 | common=no | |
46 | igen=no | |
47 | case "${target}" in | |
48 | arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*) | |
49 | AC_CONFIG_SUBDIRS(arm) | |
50 | testsuite=yes | |
51 | common=yes | |
52 | ;; | |
f6bcefef HPN |
53 | cris-*-* | crisv32-*-*) |
54 | AC_CONFIG_SUBDIRS(cris) | |
55 | testsuite=yes | |
56 | common=yes | |
57 | ;; | |
b7026657 AC |
58 | d10v-*-*) |
59 | AC_CONFIG_SUBDIRS(d10v) | |
60 | ;; | |
61 | frv-*-*) | |
62 | AC_CONFIG_SUBDIRS(frv) | |
63 | testsuite=yes | |
64 | common=yes | |
65 | ;; | |
66 | h8300*-*-*) | |
67 | AC_CONFIG_SUBDIRS(h8300) | |
68 | testsuite=yes | |
edece237 CV |
69 | common=yes |
70 | ;; | |
71 | iq2000-*-*) | |
72 | AC_CONFIG_SUBDIRS(iq2000) | |
73 | testsuite=yes | |
b7026657 AC |
74 | common=yes |
75 | ;; | |
76 | m32r-*-*) | |
77 | AC_CONFIG_SUBDIRS(m32r) | |
78 | testsuite=yes | |
79 | common=yes | |
80 | ;; | |
81 | m68hc11-*-*|m6811-*-*) | |
82 | AC_CONFIG_SUBDIRS(m68hc11) | |
83 | testsuite=yes | |
84 | common=yes | |
85 | ;; | |
86 | mcore-*-*) | |
87 | AC_CONFIG_SUBDIRS(mcore) | |
88 | testsuite=yes | |
89 | common=yes | |
90 | ;; | |
91 | mips*-*-*) | |
92 | AC_CONFIG_SUBDIRS(mips) | |
93 | testsuite=yes | |
4ac6917f | 94 | common=yes |
b7026657 AC |
95 | igen=yes |
96 | ;; | |
97 | mn10300*-*-*) | |
98 | AC_CONFIG_SUBDIRS(mn10300) | |
4ac6917f | 99 | common=yes |
b7026657 AC |
100 | igen=yes |
101 | ;; | |
102 | sh*-*-*) | |
103 | AC_CONFIG_SUBDIRS(sh) | |
104 | testsuite=yes | |
105 | common=yes | |
106 | ;; | |
107 | powerpc*-*-* ) | |
108 | AC_CONFIG_SUBDIRS(ppc) | |
109 | common=yes | |
110 | ;; | |
111 | v850*-*-* ) | |
112 | AC_CONFIG_SUBDIRS(v850) | |
113 | common=yes | |
114 | ;; | |
b7026657 AC |
115 | esac |
116 | if test "$testsuite" = yes; then | |
117 | AC_CONFIG_SUBDIRS(testsuite) | |
118 | fi | |
119 | if test "$common" = yes; then | |
120 | AC_CONFIG_SUBDIRS(common) | |
121 | fi | |
122 | if test "$igen" = yes; then | |
123 | AC_CONFIG_SUBDIRS(igen) | |
124 | fi | |
125 | fi | |
126 | ||
127 | AC_OUTPUT(Makefile) | |
128 | ||
129 | exit 0 |