Commit | Line | Data |
---|---|---|
2934d1c9 MH |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_PREREQ(2.5)dnl | |
3 | AC_INIT(Makefile.in) | |
4 | ||
5 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..) | |
6 | AC_CANONICAL_SYSTEM | |
7 | AC_ARG_PROGRAM | |
8 | AC_PROG_CC | |
9 | AC_PROG_INSTALL | |
10 | AC_C_BIGENDIAN | |
11 | ||
1eaaf305 MM |
12 | # Put a plausible default for CC_FOR_BUILD in Makefile. |
13 | AC_C_CROSS | |
14 | if test "x$cross_compiling" = "xno"; then | |
15 | CC_FOR_BUILD='$(CC)' | |
16 | else | |
17 | CC_FOR_BUILD=gcc | |
18 | fi | |
19 | ||
2934d1c9 MH |
20 | . ${srcdir}/../../bfd/configure.host |
21 | ||
7eebfc62 MM |
22 | AC_ARG_ENABLE(sim-cflags, |
23 | [ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator], | |
24 | [case "${enableval}" in | |
25 | yes) sim_cflags="-O2";; | |
a49a15ad | 26 | trace) AC_MSG_ERROR("Please use --enable-sim-debug instead."); sim_cflags="";; |
7eebfc62 MM |
27 | no) sim_cflags="";; |
28 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
29 | esac | |
30 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then | |
31 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
32 | fi],[sim_cflags=""])dnl | |
33 | ||
a49a15ad MM |
34 | AC_ARG_ENABLE(sim-debug, |
35 | [ --enable-sim-debug=opts Enable debugging flags], | |
36 | [case "${enableval}" in | |
37 | yes) sim_debug="-DDEBUG=7";; | |
38 | no) sim_debug="-DDEBUG=0";; | |
39 | *) sim_debug="-DDEBUG='(${enableval})'";; | |
40 | esac | |
41 | if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then | |
42 | echo "Setting sim debug = $sim_debug" 6>&1 | |
43 | fi],[sim_cflags=""])dnl | |
44 | ||
1eaaf305 | 45 | AC_SUBST(CC_FOR_BUILD) |
2934d1c9 MH |
46 | AC_SUBST(CFLAGS) |
47 | AC_SUBST(HDEFINES) | |
48 | AR=${AR-ar} | |
49 | AC_SUBST(AR) | |
50 | AC_PROG_RANLIB | |
7eebfc62 | 51 | AC_SUBST(sim_cflags) |
a49a15ad | 52 | AC_SUBST(sim_debug) |
2934d1c9 MH |
53 | |
54 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
55 | AC_C_CROSS | |
56 | if test "x$cross_compiling" = "xno"; then | |
57 | CC_FOR_BUILD='$(CC)' | |
58 | else | |
59 | CC_FOR_BUILD=gcc | |
60 | fi | |
61 | AC_SUBST(CC_FOR_BUILD) | |
62 | ||
63 | AC_OUTPUT(Makefile) |