]>
Commit | Line | Data |
---|---|---|
b7026657 | 1 | dnl Process this file with autoconf to produce a configure script. |
b7026657 | 2 | AC_INIT(Makefile.in) |
136da8cd | 3 | AC_CONFIG_MACRO_DIRS([.. ../config]) |
b7026657 AC |
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 | |
5e25901f | 13 | AC_PROG_CPP |
b7026657 | 14 | AC_SUBST(CFLAGS) |
b7026657 AC |
15 | AR=${AR-ar} |
16 | AC_SUBST(AR) | |
17 | AC_PROG_RANLIB | |
18 | ||
19 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
5c887dd5 JB |
20 | if test -z "$CC_FOR_BUILD"; then |
21 | if test "x$cross_compiling" = "xno"; then | |
22 | CC_FOR_BUILD='$(CC)' | |
23 | else | |
24 | CC_FOR_BUILD=gcc | |
25 | fi | |
b7026657 AC |
26 | fi |
27 | AC_SUBST(CC_FOR_BUILD) | |
4b164edf AS |
28 | CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} |
29 | AC_SUBST(CFLAGS_FOR_BUILD) | |
b7026657 AC |
30 | |
31 | # If a cpu ever has more than one simulator to choose from, use | |
32 | # --enable-sim=... to choose. | |
33 | AC_ARG_ENABLE(sim, | |
8d0978fb | 34 | [AS_HELP_STRING([--enable-sim], [Enable the GNU simulator])], |
b7026657 AC |
35 | [case "${enableval}" in |
36 | yes | no) ;; | |
37 | *) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim option) ;; | |
38 | esac]) | |
39 | ||
119da465 MF |
40 | m4_define([SIM_ARCH], [ |
41 | sim_arch=$1 | |
42 | AC_CONFIG_SUBDIRS($1) | |
43 | ]) | |
b7026657 | 44 | if test "${enable_sim}" != no; then |
bb3eddb5 MF |
45 | sinclude(configure.tgt) |
46 | if test "$sim_igen" = yes; then | |
47 | AC_CONFIG_SUBDIRS(igen) | |
48 | fi | |
b7026657 AC |
49 | fi |
50 | ||
bb3eddb5 MF |
51 | AC_CONFIG_FILES([Makefile testsuite/Makefile]) |
52 | AC_OUTPUT |