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 | ||
10 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) | |
11 | AC_CANONICAL_SYSTEM | |
12 | AC_ARG_PROGRAM | |
13 | AC_PROG_CC | |
14 | AC_SUBST(CFLAGS) | |
15 | AC_SUBST(HDEFINES) | |
16 | AR=${AR-ar} | |
17 | AC_SUBST(AR) | |
18 | AC_PROG_RANLIB | |
19 | ||
20 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
21 | if test "x$cross_compiling" = "xno"; then | |
22 | CC_FOR_BUILD='$(CC)' | |
23 | else | |
24 | CC_FOR_BUILD=gcc | |
25 | fi | |
26 | AC_SUBST(CC_FOR_BUILD) | |
27 | ||
28 | # If a cpu ever has more than one simulator to choose from, use | |
29 | # --enable-sim=... to choose. | |
30 | AC_ARG_ENABLE(sim, | |
31 | [ --enable-sim ], | |
32 | [case "${enableval}" in | |
33 | yes | no) ;; | |
34 | *) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;; | |
35 | esac]) | |
36 | ||
37 | # WHEN ADDING ENTRIES TO THIS MATRIX: | |
38 | ||
39 | # Make sure that the left side always has two dashes. Otherwise you | |
40 | # can get spurious matches. Even for unambiguous cases, do this as a | |
41 | # convention, else the table becomes a real mess to understand and | |
42 | # maintain. | |
43 | ||
44 | if test "${enable_sim}" != no; then | |
45 | testsuite=no | |
46 | common=no | |
47 | igen=no | |
48 | case "${target}" in | |
49 | arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*) | |
50 | AC_CONFIG_SUBDIRS(arm) | |
51 | testsuite=yes | |
52 | common=yes | |
53 | ;; | |
54 | d10v-*-*) | |
55 | AC_CONFIG_SUBDIRS(d10v) | |
56 | ;; | |
57 | frv-*-*) | |
58 | AC_CONFIG_SUBDIRS(frv) | |
59 | testsuite=yes | |
60 | common=yes | |
61 | ;; | |
62 | h8300*-*-*) | |
63 | AC_CONFIG_SUBDIRS(h8300) | |
64 | testsuite=yes | |
65 | common=yes | |
66 | ;; | |
67 | m32r-*-*) | |
68 | AC_CONFIG_SUBDIRS(m32r) | |
69 | testsuite=yes | |
70 | common=yes | |
71 | ;; | |
72 | m68hc11-*-*|m6811-*-*) | |
73 | AC_CONFIG_SUBDIRS(m68hc11) | |
74 | testsuite=yes | |
75 | common=yes | |
76 | ;; | |
77 | mcore-*-*) | |
78 | AC_CONFIG_SUBDIRS(mcore) | |
79 | testsuite=yes | |
80 | common=yes | |
81 | ;; | |
82 | mips*-*-*) | |
83 | AC_CONFIG_SUBDIRS(mips) | |
84 | testsuite=yes | |
85 | igen=yes | |
86 | ;; | |
87 | mn10300*-*-*) | |
88 | AC_CONFIG_SUBDIRS(mn10300) | |
89 | igen=yes | |
90 | ;; | |
91 | sh*-*-*) | |
92 | AC_CONFIG_SUBDIRS(sh) | |
93 | testsuite=yes | |
94 | common=yes | |
95 | ;; | |
96 | powerpc*-*-* ) | |
97 | AC_CONFIG_SUBDIRS(ppc) | |
98 | common=yes | |
99 | ;; | |
100 | v850*-*-* ) | |
101 | AC_CONFIG_SUBDIRS(v850) | |
102 | common=yes | |
103 | ;; | |
104 | sparc*-*-*) | |
105 | AC_CONFIG_SUBDIRS(erc32) | |
106 | ;; | |
107 | esac | |
108 | if test "$testsuite" = yes; then | |
109 | AC_CONFIG_SUBDIRS(testsuite) | |
110 | fi | |
111 | if test "$common" = yes; then | |
112 | AC_CONFIG_SUBDIRS(common) | |
113 | fi | |
114 | if test "$igen" = yes; then | |
115 | AC_CONFIG_SUBDIRS(igen) | |
116 | fi | |
117 | fi | |
118 | ||
119 | AC_OUTPUT(Makefile) | |
120 | ||
121 | exit 0 |