mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
* 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.
This commit is contained in:
parent
247d4fb1af
commit
b6de8f6a08
@ -27,6 +27,8 @@ Things-to-keep:
|
||||
|
||||
ChangeLog
|
||||
Makefile.in
|
||||
acconfig.h
|
||||
config.in
|
||||
configure.in
|
||||
interp.c
|
||||
gencode.c
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Sep 8 14:03:32 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* 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.
|
||||
|
||||
Thu Aug 3 10:45:37 1995 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* Update all FSF addresses except those in COPYING* files.
|
||||
|
@ -17,12 +17,15 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
srcdir = .
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
prefix = /usr/local
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
program_transform_name =
|
||||
exec_prefix = $(prefix)
|
||||
host_alias = @host_alias@
|
||||
target_alias = @target_alias@
|
||||
program_transform_name = @program_transform_name@
|
||||
bindir = $(exec_prefix)/bin
|
||||
libdir = $(exec_prefix)/lib
|
||||
tooldir = $(exec_prefix)/$(target_alias)
|
||||
@ -44,25 +47,26 @@ docdir = $(datadir)/doc
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
|
||||
INSTALL = `cd $(srcdir)/../..;pwd`/install.sh -c
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
INSTALL_DATA = $(INSTALL)
|
||||
INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
|
||||
INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
|
||||
|
||||
AR = ar
|
||||
AR = @AR@
|
||||
AR_FLAGS = qv
|
||||
CFLAGS = -g
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
MAKEINFO = makeinfo
|
||||
TEXI2DVI = texi2dvi
|
||||
RANLIB = ranlib
|
||||
RANLIB = @RANLIB@
|
||||
BISONFLAGS = -d
|
||||
TEXI2ROFF=texi2roff
|
||||
MAKEOVERRIDES=
|
||||
CC_FOR_BUILD = $(CC)
|
||||
NM_FOR_TARGET = nm
|
||||
NM = $(NM_FOR_TARGET)
|
||||
SYMLINK = ln -s
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
|
||||
HDEFINES = @HDEFINES@
|
||||
TDEFINES =
|
||||
|
||||
# Comment these out if using lex.
|
||||
# Distribution version
|
||||
@ -72,9 +76,6 @@ SYMLINK = ln -s
|
||||
# Where to find texinfo.tex to format docn with TeX
|
||||
TEXIDIR = $(srcdir)/../texinfo
|
||||
|
||||
#CC=gcc -Wall
|
||||
CC=cc
|
||||
|
||||
# These should all be the same program too.
|
||||
RUN_PROG=run
|
||||
SIM_LIB=libsim.a
|
||||
@ -99,28 +100,9 @@ ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
|
||||
.c.o:
|
||||
$(CC) -c $(ALL_CFLAGS) $<
|
||||
|
||||
#
|
||||
## Random definitions
|
||||
# Hopefully all these may be flushed once we get configuration down pat.
|
||||
|
||||
# alloca only needed for systems which don't have it and when cc != gcc.
|
||||
# ALLOCA = alloca.o
|
||||
|
||||
# nm tries to malloc enough space for the string table. The old GNU malloc
|
||||
# rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
|
||||
# fail unnecessarily. I've also seen some Unix malloc's fail, even when
|
||||
# there is enough memory. So use the new GNU malloc.
|
||||
# MALLOC = gmalloc.o
|
||||
# Use this if the system malloc is good enough.
|
||||
MALLOC =
|
||||
|
||||
# Use the GNU getopt unless you have problems with it.
|
||||
# The IRIS version could probably benefit from being assembled with
|
||||
# libmalloc rather than the ordinary malloc.
|
||||
LIBIBERTY = ../../libiberty/libiberty.a
|
||||
|
||||
BFD = ../../bfd/libbfd.a
|
||||
OPCODES = ../../opcodes/libopcodes.a
|
||||
|
||||
RUNTEST = runtest
|
||||
RUNTESTFLAGS =
|
||||
@ -155,17 +137,16 @@ optable:gencode
|
||||
./gencode -a >$(srcdir)/../../opcodes/w65-opc.h
|
||||
|
||||
gencode:gencode.c
|
||||
$(CC) -o gencode $<
|
||||
$(CC_FOR_BUILD) -o gencode $<
|
||||
|
||||
case.o:case.c
|
||||
run.o:run.c
|
||||
interp.o:interp.c
|
||||
run.o:run.c config.h
|
||||
interp.o:interp.c config.h
|
||||
|
||||
|
||||
######################################################################
|
||||
|
||||
mostlyclean:
|
||||
-rm -f *.o *~ \#* core binutils.?? binutils.??? case.c
|
||||
-rm -f *.o *~ \#* core binutils.?? binutils.??? case.c config.log
|
||||
|
||||
clean: mostlyclean
|
||||
-rm -f $(PROGS) *.o *.a
|
||||
@ -173,7 +154,7 @@ clean: mostlyclean
|
||||
distclean:
|
||||
-rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
|
||||
binutils.?? binutils.??s binutils.aux binutils.log binutils.toc gencode run
|
||||
-rm -f $(PROGS) underscore.c
|
||||
-rm -f $(PROGS) config.h stamp-h
|
||||
|
||||
realclean: clean distclean
|
||||
-rm -f $(DISTSTUFF) TAGS
|
||||
@ -242,8 +223,15 @@ make:
|
||||
echo >>Makefile ; \
|
||||
sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
|
||||
$(SHELL) ./config.status
|
||||
Makefile: Makefile.in config.status
|
||||
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
config.h: stamp-h ; @true
|
||||
stamp-h: config.in config.status
|
||||
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
|
||||
|
||||
config.status: configure
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
### Local Variables: ***
|
||||
### mode:fundamental ***
|
||||
|
2
sim/w65/acconfig.h
Normal file
2
sim/w65/acconfig.h
Normal file
@ -0,0 +1,2 @@
|
||||
/* Whether printf must be declared even if <stdio.h> is included. */
|
||||
#undef NEED_DECLARATION_PRINTF
|
13
sim/w65/config.in
Normal file
13
sim/w65/config.in
Normal file
@ -0,0 +1,13 @@
|
||||
/* config.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Whether printf must be declared even if <stdio.h> is included. */
|
||||
#undef NEED_DECLARATION_PRINTF
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
1073
sim/w65/configure
vendored
Executable file
1073
sim/w65/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
AC_PROG_CC
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(HDEFINES)
|
||||
AR=${AR-ar}
|
||||
AC_SUBST(AR)
|
||||
AC_PROG_RANLIB
|
||||
|
||||
links="sysdep.h"
|
||||
# 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)
|
||||
|
||||
if [ ! -f ${srcdir}/${files} ] ; then
|
||||
files=../../bfd/hosts/std-host.h
|
||||
echo "[${srcname} has no specific support for host ${host} -- using std-host]"
|
||||
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
|
||||
|
||||
host_makefile_frag=
|
||||
if [ -f ${srcdir}/../../bfd/config/${my_host}.mh ] ; then
|
||||
host_makefile_frag=../../bfd/config/${my_host}.mh
|
||||
fi
|
||||
|
||||
# per-target:
|
||||
|
||||
|
||||
AC_OUTPUT(Makefile,
|
||||
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
|
||||
|
@ -18,9 +18,19 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include "sysdep.h"
|
||||
#include <sys/times.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include "bfd.h"
|
||||
#include "remote-sim.h"
|
||||
|
@ -21,9 +21,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Steve Chamberlain
|
||||
sac@cygnus.com */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include "getopt.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
|
||||
#ifdef NEED_DECLARATION_PRINTF
|
||||
extern int printf ();
|
||||
#endif
|
||||
|
||||
void usage();
|
||||
extern int optind;
|
||||
|
Loading…
Reference in New Issue
Block a user