]>
Commit | Line | Data |
---|---|---|
1ffd292b | 1 | dnl Process this file with autoconf to produce a configure script. |
78c09e4a | 2 | AC_PREREQ(2.5)dnl |
1ffd292b | 3 | AC_INIT(Makefile.in) |
b0c9f026 | 4 | |
ed086b0a | 5 | AC_PROG_CC |
78c09e4a | 6 | AC_PROG_INSTALL |
ed086b0a FF |
7 | AC_CHECK_TOOL(AR, ar) |
8 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
9 | ||
1ffd292b C |
10 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) |
11 | AC_CANONICAL_SYSTEM | |
12 | AC_ARG_PROGRAM | |
6f07ee29 MM |
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 | AC_C_CROSS | |
22 | if test "x$cross_compiling" = "xno"; then | |
23 | CC_FOR_BUILD='$(CC)' | |
24 | else | |
25 | CC_FOR_BUILD=gcc | |
26 | fi | |
27 | AC_SUBST(CC_FOR_BUILD) | |
b0c9f026 | 28 | |
e218c1be MM |
29 | # The PowerPC simulator uses the GCC extension long long as well as |
30 | # ANSI prototypes, so don't enable it for random host compilers | |
31 | # unless asked to. | |
32 | ||
f50dc105 MM |
33 | AC_ARG_ENABLE(sim-powerpc, |
34 | [ --enable-sim-powerpc ], | |
35 | [case "${enableval}" in | |
36 | yes) powerpc_sim=yes ;; | |
37 | no) powerpc_sim=no ;; | |
38 | *) AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;; | |
39 | esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi]) | |
40 | ||
b0c9f026 SC |
41 | # WHEN ADDING ENTRIES TO THIS MATRIX: |
42 | # Make sure that the left side always has two dashes. Otherwise you | |
43 | # can get spurious matches. Even for unambiguous cases, do this as a | |
44 | # convention, else the table becomes a real mess to understand and maintain. | |
45 | ||
46 | case "${target}" in | |
d32033ad | 47 | arm*-*-*) sim_target=arm ;; |
1ffd292b | 48 | h8300*-*-*) sim_target=h8300 ;; |
47dba87a | 49 | h8500-*-*) sim_target=h8500 ;; |
595a6ec3 | 50 | mips*-*-*) sim_target=mips ;; |
6c19c2ef | 51 | sh*-*-*) sim_target=sh ;; |
5ea7fa7a MM |
52 | powerpc*-*-eabi* | powerpc*-*-solaris* | powerpc*-*-sysv4* | powerpc*-*-elf* ) |
53 | if test x"$powerpc_sim" = x"yes"; then sim_target=ppc; fi ;; | |
6c19c2ef | 54 | w65-*-*) sim_target=w65 ;; |
1ffd292b | 55 | z8k*-*-*) sim_target=z8k ;; |
d4663715 RS |
56 | sparc*-*-*) case "${host}" in # don't build for non Unix systems |
57 | *-*-go32) sim_target=none ;; | |
58 | *-*-winnt) sim_target=none ;; | |
59 | *-*-cygwin32) sim_target=none ;; | |
aac160d2 ILT |
60 | *) |
61 | # The SPARC simulator can only be compiled | |
62 | # by gcc. Highly bogus, but just skip | |
63 | # building it for now. | |
64 | if test "${GCC}" = "yes"; then | |
65 | sim_target=erc32 | |
66 | else | |
67 | sim_target=non | |
68 | fi | |
69 | ;; | |
d4663715 | 70 | esac ;; |
47dba87a | 71 | *) sim_target=none ;; |
b0c9f026 SC |
72 | esac |
73 | ||
74 | configdirs=${sim_target} | |
1ffd292b | 75 | AC_CONFIG_SUBDIRS($configdirs) |
b0c9f026 | 76 | |
1ffd292b | 77 | AC_OUTPUT(Makefile) |
23de525f PS |
78 | |
79 | exit 0 |