Commit | Line | Data |
---|---|---|
c906108c SS |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | sinclude(../common/aclocal.m4) | |
3 | AC_PREREQ(2.5)dnl | |
4 | AC_INIT(Makefile.in) | |
5 | ||
6 | AC_CONFIG_HEADER(config.h:config.in) | |
7 | ||
8 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..) | |
9 | AC_CANONICAL_SYSTEM | |
10 | AC_ARG_PROGRAM | |
11 | AC_PROG_CC | |
12 | AC_PROG_INSTALL | |
13 | ||
14 | . ${srcdir}/../../bfd/configure.host | |
15 | ||
16 | AC_SUBST(CFLAGS) | |
17 | AC_SUBST(HDEFINES) | |
18 | AR=${AR-ar} | |
19 | AC_SUBST(AR) | |
20 | AC_PROG_RANLIB | |
21 | ||
22 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
23 | if test "x$cross_compiling" = "xno"; then | |
24 | CC_FOR_BUILD='$(CC)' | |
25 | else | |
26 | CC_FOR_BUILD=gcc | |
27 | fi | |
28 | AC_SUBST(CC_FOR_BUILD) | |
29 | ||
30 | dnl We don't use gettext, but bfd does. So we do the appropriate checks | |
31 | dnl to see if there are intl libraries we should link against. | |
32 | ALL_LINGUAS= | |
33 | CY_GNU_GETTEXT | |
34 | ||
35 | AC_CHECK_HEADERS(stdlib.h time.h unistd.h) | |
36 | ||
37 | AC_MSG_CHECKING([whether printf must be declared]) | |
38 | AC_CACHE_VAL(sim_cv_decl_needed_printf, | |
39 | [AC_TRY_COMPILE([#include <stdio.h>], | |
40 | [int (*pfn) = (int (*)) printf], | |
41 | sim_cv_decl_needed_printf=no, sim_cv_decl_needed_printf=yes)]) | |
42 | AC_MSG_RESULT($sim_cv_decl_needed_printf) | |
43 | if test $sim_cv_decl_needed_printf = yes; then | |
44 | AC_DEFINE(NEED_DECLARATION_PRINTF) | |
45 | fi | |
46 | ||
47 | AC_OUTPUT(Makefile, | |
48 | [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) |