aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/.Sanitize1
-rw-r--r--sim/ChangeLog40
-rw-r--r--sim/Makefile.in100
-rwxr-xr-xsim/configure846
-rw-r--r--sim/configure.in39
-rw-r--r--sim/h8300/.Sanitize1
-rw-r--r--sim/h8300/ChangeLog5
-rw-r--r--sim/h8300/Makefile.in135
-rw-r--r--sim/h8300/configure.in36
-rw-r--r--sim/sh/.Sanitize1
-rw-r--r--sim/sh/ChangeLog5
-rw-r--r--sim/sh/Makefile.in93
-rw-r--r--sim/sh/configure.in42
13 files changed, 1115 insertions, 229 deletions
diff --git a/sim/.Sanitize b/sim/.Sanitize
index 329fa26..73c9a37 100644
--- a/sim/.Sanitize
+++ b/sim/.Sanitize
@@ -26,6 +26,7 @@ Things-to-keep:
ChangeLog
Makefile.in
arm
+configure
configure.in
h8300
h8500
diff --git a/sim/ChangeLog b/sim/ChangeLog
index c95aa58..fcd3f03 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,43 @@
+Wed Jul 5 14:32:54 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in, configure.in: converted to autoconf.
+ * configure: New file, generated with autconf 2.4.
+
+Wed May 24 14:48:46 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in: Support ARM.
+ * configure.in: Ditto.
+
+Sun Jan 15 16:53:47 1995 Steve Chamberlain <sac@splat>
+
+ * Makefile.in: Support W65.
+ * configure.in: Ditto.
+
+Sun Mar 13 09:27:50 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in: Add TAGS target.
+
+Mon Sep 13 12:47:15 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * Makefile.in (all-z8k, install-z8k, clean-z8k, all-h8300,
+ install-h8300, clean-h8300, all-h8500, install-h8500,
+ clean-h8500, all-sh, install-sh, clean-sh): do not echo
+ recursion lines.
+
+Wed Jun 30 14:12:05 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
+
+ * Makefile.in: remove endian.h trace from h8500
+
+Sun Jun 13 13:08:58 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * Makefile.in: Add distclean, realclean, and mostlyclean targets.
+
+Fri May 21 11:21:16 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: make all of the all-* target (except all-nothing)
+ depend on endian.h, so that if we're not building a simulator, we
+ don't built endian
+
Fri May 21 10:55:06 1993 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (check, installcheck): Added dummy targets.
diff --git a/sim/Makefile.in b/sim/Makefile.in
index ebfc1e8..77a4003 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -1,5 +1,5 @@
# Makefile template for Configure for the sim library.
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1995 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This file is part of BFD, the Binary File Descriptor library.
@@ -18,14 +18,19 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-srcdir = .
+VPATH = @srcdir@
+srcdir = @srcdir@
srcroot = $(srcdir)/..
-prefix = /usr/local
-program_transform_name =
-exec_prefix = $(prefix)
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+program_transform_name = @program_transform_name@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
+tooldir = $(libdir)/$(target_alias)
datadir = $(prefix)/lib
mandir = $(prefix)/man
@@ -40,18 +45,17 @@ man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
-oldincludedir =
-docdir = doc
+docdir = $(datadir)/doc
SHELL = /bin/sh
+# FIXME: Use autoconf's AC_PROG_INSTALL
INSTALL = $${srcroot}/../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_FLAGS = rc
CFLAGS = -g
@@ -59,19 +63,22 @@ BISON = bison
MAKEINFO = makeinfo
RANLIB = ranlib
+SUBDIRS = @subdirs@
+
+.NOEXPORT:
MAKEOVERRIDES=
+
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
DEP = mkdep
-SUBDIRS = " this is set by configire, don't change this "
-
ALL=all-nothing
CLEAN=clean-nothing
DO_INSTALL=install-nothing
-#### host and target dependent Makefile fragments come in here.
+#### Makefile fragments come in here.
+# @target_makefile_frag@
###
FLAGS_TO_PASS = \
@@ -89,12 +96,8 @@ FLAGS_TO_PASS = \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"BISON=$(BISON)"
-
-STAGESTUFF = $(TARGETLIB) $(OFILES)
-
-
all: $(ALL)
-
+
clean: $(CLEAN)
install: $(DO_INSTALL)
@@ -102,7 +105,7 @@ install: $(DO_INSTALL)
mostlyclean: clean
distclean realclean: clean
- rm -f Makefile config.status
+ rm -f Makefile config.cache config.log config.status
info:
install-info:
@@ -236,12 +239,73 @@ clean-sh: force
true ; \
fi
+TAGS:
+
###
+### w65
+
+all-w65: force
+ @if [ -f ./w65/Makefile ] ; then \
+ rootme=`pwd` ; export rootme ; \
+ ( cd ./w65 ; $(MAKE) $(FLAGS_TO_PASS) all) ; \
+ else \
+ true ; \
+ fi
+
+install-w65: force
+ @if [ -f ./w65/Makefile ] ; then \
+ rootme=`pwd` ; export rootme ; \
+ srcroot=`cd $(srcdir); pwd`; export srcroot; \
+ ( cd ./w65 ; $(MAKE) $(FLAGS_TO_PASS) install) ; \
+ else \
+ true ; \
+ fi
+
+clean-w65: force
+ @if [ -f ./w65/Makefile ] ; then \
+ rootme=`pwd` ; export rootme ; \
+ ( cd ./w65 ; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
+ else \
+ true ; \
+ fi
+
+
+### arm
+
+all-arm: force
+ @if [ -f ./arm/Makefile ] ; then \
+ rootme=`pwd` ; export rootme ; \
+ ( cd ./arm ; $(MAKE) $(FLAGS_TO_PASS) all) ; \
+ else \
+ true ; \
+ fi
+
+install-arm: force
+ @if [ -f ./arm/Makefile ] ; then \
+ rootme=`pwd` ; export rootme ; \
+ srcroot=`cd $(srcdir); pwd`; export srcroot; \
+ ( cd ./arm ; $(MAKE) $(FLAGS_TO_PASS) install) ; \
+ else \
+ true ; \
+ fi
+
+clean-arm: force
+ @if [ -f ./arm/Makefile ] ; then \
+ rootme=`pwd` ; export rootme ; \
+ ( cd ./arm ; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
+ else \
+ true ; \
+ fi
+
+
force:
# with the gnu make, this is done automatically.
-Makefile: $(srcdir)/Makefile.in $(target_makefile_frag)
+Makefile: Makefile.in config.status @frags@
$(SHELL) ./config.status
+
+config.status: configure
+ $(SHELL) ./config.status --recheck
diff --git a/sim/configure b/sim/configure
new file mode 100755
index 0000000..4ad651e
--- /dev/null
+++ b/sim/configure
@@ -0,0 +1,846 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.4
+# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Initialize some other variables.
+subdirs=
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -build | --build | --buil | --bui | --bu | --b)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=PREFIX install architecture-dependent files in PREFIX
+ [same as prefix]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+--enable and --with options recognized:$ac_help
+EOF
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.4"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=Makefile.in
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
+ ac_dir=`cd $ac_dir; pwd`
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`$ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`$ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`$ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`$ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $.
+ echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+
+# WHEN ADDING ENTRIES TO THIS MATRIX:
+# Make sure that the left side always has two dashes. Otherwise you
+# can get spurious matches. Even for unambiguous cases, do this as a
+# convention, else the table becomes a real mess to understand and maintain.
+
+case "${target}" in
+ arm*-*-*) sim_target=arm ;;
+ h8300*-*-*) sim_target=h8300 ;;
+ h8500-*-*) sim_target=h8500 ;;
+ sh*-*-*) sim_target=sh ;;
+ w65-*-*) sim_target=w65 ;;
+ z8k*-*-*) sim_target=z8k ;;
+ *) sim_target=none ;;
+esac
+
+configdirs=${sim_target}
+subdirs="$configdirs"
+
+
+if test ! -f ${srcdir}/${sim_target}/${sim_target}.mt ; then
+ target_makefile_frag=/dev/null
+else
+ target_makefile_frag=${srcdir}/${sim_target}/${sim_target}.mt
+fi
+
+frags=
+if test $target_makefile_frag != /dev/null; then
+ frags="$frags $target_makefile_frag"
+fi
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.4"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@subdirs@%$subdirs%g
+/@target_makefile_frag@/r $target_makefile_frag
+s%@target_makefile_frag@%%g
+s%@frags@%$frags%g
+
+CEOF
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust relative srcdir, etc. for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+fi; done
+rm -f conftest.subs
+
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case "$ac_arg" in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ for ac_config_dir in $configdirs; do
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ if test ! -d $srcdir/$ac_config_dir; then
+ continue
+ fi
+
+ echo configuring in $ac_config_dir
+
+ case "$srcdir" in
+ .) ;;
+ *)
+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+ else
+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+
+ ac_popdir=`pwd`
+ cd $ac_config_dir
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ /*) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+ *) # Relative path.
+ ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure; then
+ ac_sub_configure=$ac_sub_srcdir/configure
+ elif test -f $ac_sub_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+
+ # Make the cache file name correct relative to the subdirectory.
+ # A "../" for each directory in /$ac_config_dir.
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+ case "$cache_file" in
+ /*) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file="$ac_dots$cache_file" ;;
+ esac
+
+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ # The eval makes quoting arguments work.
+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ then :
+ else
+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+ fi
+ fi
+
+ cd $ac_popdir
+ done
+fi
+
diff --git a/sim/configure.in b/sim/configure.in
index f4047fd..3885b23 100644
--- a/sim/configure.in
+++ b/sim/configure.in
@@ -1,17 +1,10 @@
-# 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)
-configdirs="arm h8300 z8k h8500 sh w65"
-srctrigger=Makefile.in
-srcname="sim"
-target_dependent=true
-
-# per-host:
-
-
-# per-target:
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
# WHEN ADDING ENTRIES TO THIS MATRIX:
# Make sure that the left side always has two dashes. Otherwise you
@@ -19,21 +12,29 @@ target_dependent=true
# convention, else the table becomes a real mess to understand and maintain.
case "${target}" in
- h8300*-*-*) sim_target=h8300 ;;
arm*-*-*) sim_target=arm ;;
+ h8300*-*-*) sim_target=h8300 ;;
h8500-*-*) sim_target=h8500 ;;
- z8k*-*-*) sim_target=z8k ;;
sh*-*-*) sim_target=sh ;;
w65-*-*) sim_target=w65 ;;
+ z8k*-*-*) sim_target=z8k ;;
*) sim_target=none ;;
esac
configdirs=${sim_target}
+AC_CONFIG_SUBDIRS($configdirs)
-if [ ! -f ${srcdir}/${sim_target}/${sim_target}.mt ] ; then
-target_makefile_frag=
+if test ! -f ${srcdir}/${sim_target}/${sim_target}.mt ; then
+ target_makefile_frag=/dev/null
else
-target_makefile_frag=${sim_target}/${sim_target}.mt
+ target_makefile_frag=${srcdir}/${sim_target}/${sim_target}.mt
+fi
+
+frags=
+if test $target_makefile_frag != /dev/null; then
+ frags="$frags $target_makefile_frag"
fi
-# post-target:
+AC_SUBST_FILE(target_makefile_frag)
+AC_SUBST(frags)
+AC_OUTPUT(Makefile)
diff --git a/sim/h8300/.Sanitize b/sim/h8300/.Sanitize
index 290ed54..ed04ffa 100644
--- a/sim/h8300/.Sanitize
+++ b/sim/h8300/.Sanitize
@@ -27,6 +27,7 @@ Things-to-keep:
ChangeLog
Makefile.in
+configure
configure.in
h8300.mt
compile.c
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 83536fa..52057f4 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 5 14:32:54 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in, configure.in: converted to autoconf.
+ * configure: New file, generated with autconf 2.4.
+
Fri Jun 30 16:50:24 1995 Stan Shebs <shebs@andros.cygnus.com>
* compile.c (sim_do_command): New function.
diff --git a/sim/h8300/Makefile.in b/sim/h8300/Makefile.in
index 0e48037..8020a34 100644
--- a/sim/h8300/Makefile.in
+++ b/sim/h8300/Makefile.in
@@ -1,5 +1,5 @@
-# Makefile template for Configure for the h8300sim library.
-# Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+# Makefile template for Configure for the h8300 sim library.
+# Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
@@ -16,13 +16,19 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-srcdir = .
+VPATH = @srcdir@
+srcdir = @srcdir@
+srcroot = $(srcdir)/../..
-prefix = /usr/local
+prefix = @prefix@
+exec_prefix = @exec_prefix@
-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 = $(libdir)/$(target_alias)
datadir = $(prefix)/lib
mandir = $(prefix)/man
@@ -37,80 +43,52 @@ man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
-oldincludedir =
-docdir = $(srcdir)/doc
+docdir = $(datadir)/doc
SHELL = /bin/sh
-INSTALL = install -c
+# FIXME: use autoconf's AC_PROG_INSTALL
+INSTALL = $(srcroot)/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_FLAGS = qc
+AR_FLAGS = rc
CFLAGS = -g
BISON = bison
MAKEINFO = makeinfo
RANLIB = ranlib
+.NOEXPORT:
+MAKEOVERRIDES=
+
INCDIR = $(srcdir)/../../include
-CSEARCH = -I. -I$(srcdir) -I$(INCDIR) -I$(srcdir)/../../bfd
+CSEARCH = -I. -I$(srcdir) -I$(INCDIR) -I../../bfd -I$(srcdir)/../../bfd -I$(srcdir)/../../gdb
DEP = mkdep
-#### host, target, and site specific Makefile frags come in here.
-
-all: run
-
-run: code.o run.o perifs.o
- $(CC) -o run code.o perifs.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a
-
-code.c:p1.c p2.c p3.c
- cat $(VPATH)/p1.c p2.c $(VPATH)/p3.c | cb >code.c
- indent code.c
-
-p2.c:writecode
- ./writecode >p2.c
-
-
-writecode:writecode.c
- $(CC) -o writecode -g $(CSEARCH) $(srcdir)/writecode.c
+#### Makefile fragments come in here.
+# @host_makefile_frag@
+###
-run.o: run.c
-perifs.o: perifs.c
+all: run
-#### host and target dependent Makefile fragments come in here.
-###
+run: compile.o run.o
+ $(CC) -o run compile.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a
-FLAGS_TO_PASS = \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "BISON=$(BISON)"
+compile.o:compile.c
+run.o:run.c
.c.o:
$(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
-
-
-.NOEXPORT:
-
check:
info:
clean-info:
install-info:
-# HDEPFILES comes from the host config; TDEPFILES from the target config.
-
-
-
tags etags: TAGS
TAGS: force
@@ -119,52 +97,36 @@ TAGS: force
clean:
rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
-clobber realclean: clean
- rm -f libbfd.a TAGS
-
-# Mark everything as depending on config.status, since the timestamp on
-# sysdep.h might actually move backwards if we reconfig and relink it
-# to a different hosts/h-xxx.h file. This will force a recompile anyway.
-RECONFIG = config.status
-
-
-
-# This target should be invoked before building a new release.
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#
-roll:
- @V=`cat VERSION` ; \
- MAJ=`sed 's/\..*//' VERSION` ; \
- MIN=`sed 's/.*\.//' VERSION` ; \
- V=$$MAJ.`expr $$MIN + 1` ; \
- rm -f VERSION ; \
- echo $$V >VERSION ; \
- echo Version $$V
+distclean mostlyclean realclean: clean
+ rm -f TAGS
+ rm -f config.log config.cache config.status
# Dummy target to force execution of dependent targets.
#
force:
+# Copy the files into directories where they will be run.
install:
- -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
- if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
- -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
- if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
- -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
- -n=`t='$(program_transform_name)'; echo run | sed -e "" $$t`; \
- $(INSTALL_PROGRAM) run $(bindir)/$$n; \
- $(M_INSTALL)
-
-
-
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
+ srcroot=`cd $(srcroot); pwd`; export srcroot; \
+ $(INSTALL_XFORM) run $(bindir)/run ; \
+ n=`t='$(program_transform_name)'; echo run | sed -e "" $$t`; \
+ if [ -d $(tooldir) ] ; then \
+ if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
+ rm -f $(tooldir)/bin/run; \
+ ln $(bindir)/$$n $(tooldir)/bin/run \
+ || $(INSTALL_PROGRAM) run $(tooldir)/bin/run; \
+ else true; fi
+
+
+Makefile: Makefile.in config.status @frags
$(SHELL) ./config.status
+config.status: configure
+ $(SHELL) ./config.status --recheck
+
dep: $(CFILES)
mkdep $(CFLAGS) $?
-
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -172,4 +134,3 @@ dep: $(CFILES)
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
diff --git a/sim/h8300/configure.in b/sim/h8300/configure.in
index b43f90e..b7a9592 100644
--- a/sim/h8300/configure.in
+++ b/sim/h8300/configure.in
@@ -1,28 +1,32 @@
-# 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=writecode.c
-srcname="h8300sim"
-
-# 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
+if test ! -f ${srcdir}/${files} ; then
files=../../bfd/hosts/std-host.h
- echo "[${srcname} has no specific support for host ${host} -- using std-host]"
+ AC_MSG_WARN(h8300sim has no specific support for host ${host} -- using std-host)
fi
+AC_LINK_FILES($files, sysdep.h)
-host_makefile_frag=
-if [ -f ${srcdir}/../../bfd/config/${my_host}.mh ] ; then
+if test -f ${srcdir}/../../bfd/config/${my_host}.mh; then
host_makefile_frag=../../bfd/config/${my_host}.mh
+else
+ host_makefile_frag=/dev/null
+fi
+
+frags=
+if test $host_makefile_frag != /dev/null; then
+ frags="$frags $host_makefile_frag"
fi
+AC_SUBST_FILE(host_makefile_frag)
+AC_SUBST(frags)
-# per-target:
+AC_OUTPUT(Makefile)
diff --git a/sim/sh/.Sanitize b/sim/sh/.Sanitize
index 3ad8665..518da8b 100644
--- a/sim/sh/.Sanitize
+++ b/sim/sh/.Sanitize
@@ -27,6 +27,7 @@ Things-to-keep:
ChangeLog
Makefile.in
+configure
configure.in
interp.c
gencode.c
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 924f9dd..c5742b4 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 5 14:32:54 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in, configure.in: converted to autoconf.
+ * configure: New file, generated with autconf 2.4.
+
Fri Jun 30 16:51:38 1995 Stan Shebs <shebs@andros.cygnus.com>
* interp.c (sim_open): If argument supplied, interpret as
diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in
index 5295aa2..cb27cd9 100644
--- a/sim/sh/Makefile.in
+++ b/sim/sh/Makefile.in
@@ -1,5 +1,5 @@
-# Makefile template for Configure for the h8300sim library.
-# Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+# Makefile template for Configure for the SH sim library.
+# Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
@@ -16,14 +16,16 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-srcdir = .
-srcroot = $(srcdir)/../../
+VPATH = @srcdir@
+srcdir = @srcdir@
+srcroot = $(srcdir)/../..
+prefix = @prefix@
+exec_prefix = @exec_prefix@
-prefix = /usr/local
-
-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 = $(libdir)/$(target_alias)
@@ -41,42 +43,44 @@ man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
-oldincludedir =
-docdir = $(srcdir)/doc
+docdir = $(datadir)/doc
SHELL = /bin/sh
-
-
+# FIXME: use autoconf's AC_PROG_INSTALL
INSTALL = $(srcroot)/install.sh -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
-
-
-CC_FOR_BUILD = cc
AR = ar
-AR_FLAGS = qc
+AR_FLAGS = rc
CFLAGS = -g
BISON = bison
MAKEINFO = makeinfo
RANLIB = ranlib
+
+.NOEXPORT
+MAKEOVERRIDES=
+
+CC_FOR_BUILD = cc
X=xstuff.o
XL=-lX11
X=
XL=
+
INCDIR = $(srcdir)/../../include
CSEARCH = -I. -I$(srcdir) -I../../include \
-I../../bfd -I$(INCDIR) -I$(srcdir)/../../bfd -I$(srcdir)/../../gdb -I$(srcdir)/../../newlib/libc/sys/sh
DEP = mkdep
-#### host, target, and site specific Makefile frags come in here.
+#### Makefile fragments come in here.
+# @host_makefile_frag@
+###
all: run libsim.a
-
run: interp.o $(X) run.o table.o
$(CC) $(CFLAGS) -o run $(X) interp.o table.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a $(XL)
@@ -98,40 +102,15 @@ table.c:gencode
gencode:gencode.c
$(CC_FOR_BUILD) -o gencode $(srcdir)/gencode.c
-
-#### host and target dependent Makefile fragments come in here.
-###
-
-FLAGS_TO_PASS = \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "BISON=$(BISON)"
-
.c.o:
$(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
-
-
-.NOEXPORT:
-
check:
info:
clean-info:
install-info:
-# HDEPFILES comes from the host config; TDEPFILES from the target config.
-
-
-
tags etags: TAGS
TAGS: force
@@ -140,28 +119,9 @@ TAGS: force
clean:
rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
-clobber realclean: clean
+distclean mostlyclean realclean: clean
rm -f libbfd.a TAGS
-# Mark everything as depending on config.status, since the timestamp on
-# sysdep.h might actually move backwards if we reconfig and relink it
-# to a different hosts/h-xxx.h file. This will force a recompile anyway.
-RECONFIG = config.status
-
-
-
-# This target should be invoked before building a new release.
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#
-roll:
- @V=`cat VERSION` ; \
- MAJ=`sed 's/\..*//' VERSION` ; \
- MIN=`sed 's/.*\.//' VERSION` ; \
- V=$$MAJ.`expr $$MIN + 1` ; \
- rm -f VERSION ; \
- echo $$V >VERSION ; \
- echo Version $$V
-
# Dummy target to force execution of dependent targets.
#
force:
@@ -182,13 +142,15 @@ install-man: run.1
$(INSTALL_XFORM1) $(srcdir)/run.1 $(man1dir)/run.1
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
+Makefile: Makefile.in config.status @frags@
$(SHELL) ./config.status
+config.status: configure
+ $(SHELL) ./config.status --recheck
+
dep: $(CFILES)
mkdep $(CFLAGS) $?
-
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -196,4 +158,3 @@ dep: $(CFILES)
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
diff --git a/sim/sh/configure.in b/sim/sh/configure.in
index 32afd98..fc7ffb5 100644
--- a/sim/sh/configure.in
+++ b/sim/sh/configure.in
@@ -1,36 +1,32 @@
-# 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=interp.c
-srcname="shsim"
-
-# 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
+if test ! -f ${srcdir}/${files} ; then
files=../../bfd/hosts/std-host.h
- echo "[${srcname} has no specific support for host ${host} -- using std-host]"
+ AC_MSG_WARN(shsim has no specific support for host ${host} -- using std-host)
fi
+AC_LINK_FILES($files, sysdep.h)
-host_makefile_frag=
-if [ -f ${srcdir}/../../bfd/config/${my_host}.mh ] ; then
+if test -f ${srcdir}/../../bfd/config/${my_host}.mh; then
host_makefile_frag=../../bfd/config/${my_host}.mh
+else
+ host_makefile_frag=/dev/null
fi
-# per-target:
-
-
-case "${target}" in
- sh-*-*) sim_target=sh ;;
- shl-*-*) sim_target=shl ;;
-esac
+frags=
+if test $host_makefile_frag != /dev/null; then
+ frags="$frags $host_makefile_frag"
+fi
+AC_SUBST_FILE(host_makefile_frag)
+AC_SUBST(frags)
-target_makefile_frag=${sim_target}.mt
+AC_OUTPUT(Makefile)