diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-08 18:07:02 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-08 18:07:02 +0000 |
commit | b6de8f6a08cdd38b4ba5170b3e0d9b4075903fe1 (patch) | |
tree | a953e2c7e5decd1af9e5579d4dd7568877afb2e3 /sim/w65/configure.in | |
parent | 247d4fb1aff17f1dda36ee0e9fc796d586d13d5c (diff) | |
download | gdb-b6de8f6a08cdd38b4ba5170b3e0d9b4075903fe1.zip gdb-b6de8f6a08cdd38b4ba5170b3e0d9b4075903fe1.tar.gz gdb-b6de8f6a08cdd38b4ba5170b3e0d9b4075903fe1.tar.bz2 |
* 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.
Diffstat (limited to 'sim/w65/configure.in')
-rwxr-xr-x | sim/w65/configure.in | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/sim/w65/configure.in b/sim/w65/configure.in index 6fcf14e..5965cd3 100755 --- a/sim/w65/configure.in +++ b/sim/w65/configure.in @@ -1,30 +1,42 @@ -# This file is a shell script that supplies the information necessary -# to tailor a template configure script into the configure script -# appropriate for this directory. For more information, check any -# existing configure script. +dnl Process this file with autoconf to produce a configure script. +AC_PREREQ(2.3)dnl +AC_INIT(Makefile.in) -srctrigger=gencode.c -srcname="w65sim" +AC_CONFIG_HEADER(config.h:config.in) -# per-host: +AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..) +AC_CANONICAL_SYSTEM +AC_ARG_PROGRAM . ${srcdir}/../../bfd/configure.host -# Set up to make a link between the host's include file and "sysdep.h". -files="../../bfd/hosts/${my_host}.h" - -links="sysdep.h" - -if [ ! -f ${srcdir}/${files} ] ; then - files=../../bfd/hosts/std-host.h - echo "[${srcname} has no specific support for host ${host} -- using std-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 - -host_makefile_frag= -if [ -f ${srcdir}/../../bfd/config/${my_host}.mh ] ; then - host_makefile_frag=../../bfd/config/${my_host}.mh +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 -# per-target: - - +AC_OUTPUT(Makefile, +[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) |