autoconfiscation

This commit is contained in:
Ken Raeburn 1995-07-05 09:32:47 +00:00
parent e63c594dd0
commit 8c69366021
6 changed files with 1234 additions and 94 deletions

View file

@ -1,3 +1,17 @@
Wed Jul 5 04:16:35 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
Autoconfiscation:
* configure.in, Makefile.in, doc/Makefile.in: Switch from Cygnus
configure to autoconf ways of processing --enable arguments,
setting up symlinks, incorporating makefile fragments, printing
messages at configuration time, setting variables in Makefile.
Deleted some unused variables. Check for ranlib via autoconf.
For now, configure script removes doc/config.status.
* configure: New file.
* dep-in.sed: Use @SRCDIR@ instead of @srcdir@, so Makefile.in
line doesn't get broken by configure.
* doc/configure.in: Removed.
Tue Jul 4 12:22:21 1995 Ian Lance Taylor <ian@cygnus.com>
* archive.c (_bfd_construct_extended_name_table): If

View file

@ -18,11 +18,12 @@
# 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@
prefix = /usr/local
prefix = @prefix@
exec_prefix = $(prefix)
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
@ -44,16 +45,15 @@ docdir = doc
SHELL = /bin/sh
INSTALL = `cd $(srcdir)/..; pwd`/install.sh -c
INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
AR = ar
AR_FLAGS = rc
CFLAGS = -g
BISON = bison
MAKEINFO = makeinfo
RANLIB = ranlib
RANLIB = @RANLIB@
CC_FOR_BUILD = $(CC)
@ -63,7 +63,6 @@ DEP = mkdep
SUBDIRS = doc
TARGETLIB = libbfd.a
# bfd.h goes here, for now
@ -224,12 +223,17 @@ OPTIONAL_BACKENDS = \
cisco-core.o
# These are defined by configure.in:
# WORDSIZE=32
# BFD_BACKENDS = $(BFD32_BACKENDS)
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
BFD_BACKENDS = @bfd_backends@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
all:
#### host and target dependent Makefile fragments come in here.
# @target_makefile_frag@
# @host_makefile_frag@
###
FLAGS_TO_PASS = \
@ -476,7 +480,7 @@ install:
$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS); \
fi
Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
Makefile: Makefile.in configure.in @frags@
$(SHELL) config.status
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
@ -496,7 +500,7 @@ dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
-e 's!@BFD_H@!$(BFD_H)!' \
-e 's!@INCDIR@!$(INCDIR)!' \
-e 's!@srcdir@!$(srcdir)!'
-e 's!@SRCDIR@!$(srcdir)!'
dep: .dep
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile

1116
bfd/configure vendored Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,42 +1,63 @@
# 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.
AC_PREREQ(2.3)
AC_INIT(libbfd.c)
AC_ARG_ENABLE(64-bit-bfd,
[ 64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
[case "{$enableval}" in
yes) want64=true ;;
no) want64=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
esac],[want64=false])dnl
AC_ARG_ENABLE(targets,
[ targets alternative target configurations besides the primary],
[case "${enableval}" in
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
AC_CONFIG_AUX_DIR(`cd $srcdir/..;pwd`)
AC_CANONICAL_SYSTEM
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
AC_ARG_PROGRAM
configdirs="doc"
srctrigger=libbfd.c
srcname="BFD"
target_dependent=true
host64=false
target64=false
want64=false
# per-host:
# host stuff:
. ${srcdir}/configure.host
AC_PROG_RANLIB
# Set up to make a link between the host's include file and "sysdep.h".
files="hosts/${my_host}.h"
links="sysdep.h"
files=hosts/${my_host}.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(BFD has no specific support for host ${host} -- using std-host)
fi
host_makefile_frag=
if [ -f ${srcdir}/config/${my_host}.mh ] ; then
host_makefile_frag=config/${my_host}.mh
fi
AC_LINK_FILES($files, sysdep.h)
# per-target:
if test -f ${srcdir}/config/${my_host}.mh ; then
host_makefile_frag=$srcdir/config/${my_host}.mh
else
host_makefile_frag=/dev/null
fi
AC_SUBST_FILE(host_makefile_frag)
# target stuff:
# Canonicalize the secondary target names.
if [ -n "$enable_targets" ]; then
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
result=`$configsub $targ 2>/dev/null`
if [ -n "$result" ]; then
if test -n "$result" ; then
canon_targets="$canon_targets $result"
else
# Allow targets that config.sub doesn't recognize, like "all".
@ -51,17 +72,17 @@ for targ in $target $canon_targets
do
bfd_target=`${config_shell} $srcdir/config.bfd $targ`
if [ "x$bfd_target" = "xall" ]; then
if test "x$bfd_target" = "xall" ; then
all_targets=true
else
if [ ! -f ${srcdir}/config/${bfd_target}.mt ] ; then
echo '***' No file ${srcdir}/config/${bfd_target}.mt 1>&2
echo '***' BFD does not support target ${bfd_target} 1>&2
echo '***' Look in bfd/config.bfd for supported targets 1>&2
if test ! -f ${srcdir}/config/${bfd_target}.mt ; then
AC_MSG_ERROR(*** No file ${srcdir}/config/${bfd_target}.mt.
*** BFD does not support target ${bfd_target}.
*** Look in bfd/config.bfd for supported targets.)
exit 1
fi
if [ "x$targ" = "x$target" ]; then
if test "x$targ" = "x$target" ; then
target_makefile_frag=${srcdir}/config/${bfd_target}.mt
else
target_extra_frags="$target_extra_frags ${srcdir}/config/${bfd_target}.mt"
@ -69,20 +90,12 @@ do
fi
done
# We don't do any links based on the target system, just makefile config.
# post-target:
rm -f Makefile.tmp Makefile.2
mv Makefile Makefile.tmp
case ${enable_64_bit_bfd} in
yes) want64=true ;;
no | "") want64=false ;;
*)
echo "*** bad value \"${enable_64_bit_bfd}\" for 64-bit-bfd flag; ignored" 1>&2
;;
esac
frags=$target_makefile_frag
if test $host_makefile_frag != /dev/null ; then
frags="$frags $host_makefile_frag"
fi
AC_SUBST_FILE(target_makefile_frag)
AC_SUBST(frags)
# This processing still needs to be done if we're to decide properly whether
# 64-bit support needs to be compiled in. Currently, it will be included if
@ -91,6 +104,7 @@ esac
# no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
# used.
changequote(,)dnl
# The default vector in the primary target.
DEFAULT_VECTOR=`sed -n '
s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p
@ -126,6 +140,7 @@ for i in $SELECT_ARCHITECTURES ; do
esac
done
SELECT_ARCHITECTURES="$f"
changequote([,])dnl
# Target backend .o files.
tb=
@ -137,7 +152,11 @@ do
# with the two vector lists in targets.c.
a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;;
a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o stab-syms.o" ;;
armpe_vec) tb="$tb pe-arm.o cofflink.o " ;;
armpei_vec) tb="$tb pei-arm.o cofflink.o " ;;
aout0_big_vec) tb="$tb aout0.o aout32.o stab-syms.o" ;;
aout_arm_big_vec) tb="$tb aout-arm.o aout32.o stab-syms.o" ;;
aout_arm_little_vec) tb="$tb aout-arm.o aout32.o stab-syms.o" ;;
aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
apollocoff_vec) tb="$tb coff-apollo.o" ;;
@ -182,6 +201,8 @@ do
i386dynix_vec) tb="$tb i386dynix.o aout32.o stab-syms.o" ;;
i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;;
i386msdos_vec) tb="$tb i386msdos.o" ;;
i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;;
i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;;
i386linux_vec) tb="$tb i386linux.o aout32.o stab-syms.o" ;;
i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o stab-syms.o" ;;
i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o stab-syms.o" ;;
@ -224,9 +245,10 @@ do
we32kcoff_vec) tb="$tb coff-we32k.o" ;;
z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;;
w65_vec) tb="$tb coff-w65.o reloc16.o" ;;
versados_vec) tb="$tb versados.o" ;;
"") ;;
*) echo "*** unknown target vector $vec" 1>&2; exit 1 ;;
*) AC_MSG_ERROR(*** unknown target vector $vec) ;;
esac
done
@ -255,7 +277,7 @@ ta="$f"
bfd_backends="$tb"
bfd_machines="$ta"
if [ x${all_targets} = xtrue ]; then
if test x${all_targets} = xtrue ; then
bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
else # all_targets is true
@ -277,19 +299,18 @@ case ${host64}-${target64}-${want64} in
;;
esac
echo WORDSIZE=${wordsize} >> Makefile.2
echo ALL_BACKENDS=${all_backends} >> Makefile.2
echo BFD_BACKENDS=${bfd_backends} >> Makefile.2
echo BFD_MACHINES=${bfd_machines} >> Makefile.2
AC_SUBST(wordsize)
AC_SUBST(all_backends)
AC_SUBST(bfd_backends)
AC_SUBST(bfd_machines)
test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR"
tdefaults="TDEFAULTS ="
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
echo "${tdefaults}" >> Makefile.2
AC_SUBST(tdefaults)
cat Makefile.tmp >> Makefile.2
rm -f Makefile.tmp
mv Makefile.2 Makefile
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile)

View file

@ -17,11 +17,12 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#
srcdir = .
VPATH = @srcdir@
srcdir = @srcdir@
prefix = /usr/local
prefix = @prefix@
exec_prefix = $(prefix)
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
@ -43,16 +44,12 @@ docdir = $(datadir)/doc
MKDOC=./chew
SHELL = /bin/sh
INSTALL = install -c
INSTALL = `cd $(srcdir)/../..;pwd`/install.sh -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
AR = ar
AR_FLAGS = qv
BISON = bison
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
RANLIB = ranlib
CFLAGS = -g
CC_FOR_BUILD = $(CC)
@ -63,13 +60,11 @@ CC_FOR_BUILD = $(CC)
.c.o:
$(CC) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $<
# main GDB source directory
DOCFILES = aoutx.texi archive.texi archures.texi \
bfd.texi cache.texi coffcode.texi \
core.texi elf.texi elfcode.texi format.texi libbfd.texi \
opncls.texi reloc.texi section.texi \
syms.texi targets.texi init.texi ctor.texi
syms.texi targets.texi init.texi hash.texi linker.texi
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
@ -77,7 +72,7 @@ PROTOS = archive.p archures.p bfd.p \
section.p syms.p targets.p \
format.p core.p init.p
IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip ctor.ip coffcode.ip
IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
# between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
@ -89,7 +84,8 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
$(srcdir)/../elfcode.h $(srcdir)/../format.c \
$(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
$(srcdir)/../reloc.c $(srcdir)/../section.c \
$(srcdir)/../syms.c $(srcdir)/../targets.c
$(srcdir)/../syms.c $(srcdir)/../targets.c \
$(srcdir)/../hash.c $(srcdir)/../linker.c
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../core.c \
@ -101,7 +97,7 @@ SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
$(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
$(srcdir)/../init.c $(srcdir)/../ctor.c
$(srcdir)/../init.c
STAGESTUFF = $(DOCFILES) *.info*
@ -183,15 +179,16 @@ targets.texi: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
init.texi: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.texi
ctor.texi: $(MKDOC) $(srcdir)/../ctor.c $(srcdir)/doc.str
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../ctor.c >ctor.texi
hash.texi: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.texi
linker.texi: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.texi
libbfd.h: $(srcdir)/../libbfd-in.h \
$(srcdir)/../init.c \
$(srcdir)/../libbfd.c \
$(srcdir)/../cache.c \
$(srcdir)/../ctor.c \
$(srcdir)/../reloc.c \
$(srcdir)/../cpu-h8300.c \
$(srcdir)/../cpu-i960.c \
@ -202,7 +199,6 @@ libbfd.h: $(srcdir)/../libbfd-in.h \
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../ctor.c >>libbfd.h
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cpu-h8300.c >>libbfd.h
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cpu-i960.c >>libbfd.h
@ -304,6 +300,6 @@ de-stage3: force
force:
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
$(SHELL) ./config.status
Makefile: $(srcdir)/Makefile.in
cd .. && $(SHELL) ./config.status

View file

@ -1,11 +0,0 @@
# 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.
srctrigger=bfd.texinfo
srcname="BFD doc"
# per-host:
# per-target: