old-cross-binutils/sim/w65/configure.in
Ian Lance Taylor b6de8f6a08 * configure.in: Convert to use autoconf.
* configure: New file, built by autoconf.
	* acconfig.h: New file.
	* config.in: New file, built by autoheader.
	* Makefile.in: Various changes for new configure script.  Also:
	(INSTALL): Go up two levels, not one.
	(ALLOCA, MALLOC, OPCODES): Remove.
	(gencode): Use $(CC_FOR_BUILD).
	(case.o): Remove.
	(run.o, interp.o): Depend upon config.h.
	* interp.c: Include "config.h".  Don't include "sysdep.h".
	Include <stdlib.h>, <time.h>, and <unistd.h> if they exist.
	* run.c: Include "config.h".  Don't include "sysdep.h".  Include
	<stdlib.h> if it exists.  Include "getopt.h".  Declare printf if
	necessary.
1995-09-08 18:07:02 +00:00

42 lines
1,023 B
Text
Executable file

dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.3)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
. ${srcdir}/../../bfd/configure.host
AC_PROG_CC
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.
AC_C_CROSS
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
else
CC_FOR_BUILD=gcc
fi
AC_SUBST(CC_FOR_BUILD)
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])