summaryrefslogtreecommitdiff
path: root/sim/w65/configure.in
blob: e2da7db1919b90a9bf6999b0805a779216461f6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
dnl Process this file with autoconf to produce a configure script.
sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)

AC_CONFIG_HEADER(config.h:config.in)

AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_INSTALL

. ${srcdir}/../../bfd/configure.host

AC_SUBST(CFLAGS)
AC_SUBST(HDEFINES)
AR=${AR-ar}
AC_SUBST(AR)
AC_PROG_RANLIB

# Put a plausible default for CC_FOR_BUILD in Makefile.
if test "x$cross_compiling" = "xno"; then
  CC_FOR_BUILD='$(CC)'
else
  CC_FOR_BUILD=gcc
fi
AC_SUBST(CC_FOR_BUILD)

dnl We don't use gettext, but bfd does.  So we do the appropriate checks
dnl to see if there are intl libraries we should link against.
ALL_LINGUAS=
CY_GNU_GETTEXT

AC_CHECK_HEADERS(stdlib.h time.h unistd.h)

AC_MSG_CHECKING([whether printf must be declared])
AC_CACHE_VAL(sim_cv_decl_needed_printf,
[AC_TRY_COMPILE([#include <stdio.h>],
[int (*pfn) = (int (*)) printf],
sim_cv_decl_needed_printf=no, sim_cv_decl_needed_printf=yes)])
AC_MSG_RESULT($sim_cv_decl_needed_printf)
if test $sim_cv_decl_needed_printf = yes; then
  AC_DEFINE(NEED_DECLARATION_PRINTF)
fi

AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])