Add moxie simulator
[external/binutils.git] / sim / configure.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_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 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
27 AC_SUBST(CFLAGS_FOR_BUILD)
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=yes
48    igen=no
49    case "${target}" in
50        arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*)
51            AC_CONFIG_SUBDIRS(arm)
52            testsuite=yes
53            ;;
54        avr*-*-*)
55            AC_CONFIG_SUBDIRS(avr)
56            ;;
57        cr16*-*-*)
58            AC_CONFIG_SUBDIRS(cr16)
59            testsuite=yes
60            ;;
61        cris-*-* | crisv32-*-*)
62            AC_CONFIG_SUBDIRS(cris)
63            testsuite=yes
64            ;;
65        d10v-*-*)
66            AC_CONFIG_SUBDIRS(d10v)
67            ;;
68        frv-*-*)
69            AC_CONFIG_SUBDIRS(frv)
70            testsuite=yes
71            ;;
72        h8300*-*-*)
73            AC_CONFIG_SUBDIRS(h8300)
74            testsuite=yes
75            ;;
76        iq2000-*-*)
77            AC_CONFIG_SUBDIRS(iq2000)
78            testsuite=yes
79            ;;
80        m32c-*-*)
81            AC_CONFIG_SUBDIRS(m32c)
82            ;;
83        m32r-*-*)
84            AC_CONFIG_SUBDIRS(m32r)
85            testsuite=yes
86            ;;
87        m68hc11-*-*|m6811-*-*)
88            AC_CONFIG_SUBDIRS(m68hc11)
89            testsuite=yes
90            ;;
91        mcore-*-*)
92            AC_CONFIG_SUBDIRS(mcore)
93            testsuite=yes
94            ;;
95        mips*-*-*)
96            AC_CONFIG_SUBDIRS(mips)
97            testsuite=yes
98            igen=yes
99            ;;
100        mn10300*-*-*)
101            AC_CONFIG_SUBDIRS(mn10300)
102            igen=yes
103            ;;
104        moxie-*-*)
105            AC_CONFIG_SUBDIRS(moxie)
106            testsuite=yes
107            ;;
108        sh64*-*-*)
109            AC_CONFIG_SUBDIRS(sh64)
110            testsuite=yes
111            ;;
112        sh*-*-*)
113            AC_CONFIG_SUBDIRS(sh)
114            testsuite=yes
115            ;;
116        sparc-*-rtems*|sparc-*-elf*)
117            AC_CONFIG_SUBDIRS(erc32)
118            testsuite=yes
119            ;;
120        powerpc*-*-* )
121            AC_CONFIG_SUBDIRS(ppc)
122            ;;
123        v850*-*-* )
124            AC_CONFIG_SUBDIRS(v850)
125            igen=yes
126            testsuite=yes
127            ;;
128        *)
129            # No simulator subdir, so the subdir "common" isn't needed.
130            common=no
131            ;;
132    esac
133    if test "$testsuite" = yes; then
134       AC_CONFIG_SUBDIRS(testsuite)
135    fi
136    if test "$common" = yes; then
137       AC_CONFIG_SUBDIRS(common)
138    fi
139    if test "$igen" = yes; then
140       AC_CONFIG_SUBDIRS(igen)
141    fi
142 fi
143
144 AC_OUTPUT(Makefile)
145
146 exit 0