1995-09-07 17:20:53 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script
|
|
|
|
dnl
|
1997-07-29 01:34:09 +00:00
|
|
|
AC_PREREG(2.5)
|
1995-09-07 17:20:53 +00:00
|
|
|
AC_INIT(ldmain.c)
|
|
|
|
|
* Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, from old aclocal.m4.
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
shared library handling; now handled by libtool. Replace
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
* configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
* acconfig.h: Mention PACKAGE and VERSION.
* stamp-h.in: New file.
* ldver.c (ld_program_vresion): Set ld_program_version from
VERSION.
* ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
* Makefile.in: Now built with automake.
* aclocal.m4: Now built with aclocal.
* configure, config.in: Rebuild.
1997-08-09 04:54:28 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
1998-11-09 21:51:51 +00:00
|
|
|
AM_INIT_AUTOMAKE(ld, 2.9.4)
|
* Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, from old aclocal.m4.
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
shared library handling; now handled by libtool. Replace
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
* configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
* acconfig.h: Mention PACKAGE and VERSION.
* stamp-h.in: New file.
* ldver.c (ld_program_vresion): Set ld_program_version from
VERSION.
* ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
* Makefile.in: Now built with automake.
* aclocal.m4: Now built with aclocal.
* configure, config.in: Rebuild.
1997-08-09 04:54:28 +00:00
|
|
|
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
AC_ARG_ENABLE(targets,
|
|
|
|
[ --enable-targets alternative target configurations],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
|
|
|
|
;;
|
|
|
|
no) enable_targets= ;;
|
|
|
|
*) enable_targets=$enableval ;;
|
|
|
|
esac])dnl
|
1997-07-29 01:34:09 +00:00
|
|
|
AC_ARG_ENABLE(64-bit-bfd,
|
|
|
|
[ --enable-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
|
1995-09-07 17:20:53 +00:00
|
|
|
|
* Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, from old aclocal.m4.
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
shared library handling; now handled by libtool. Replace
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
* configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
* acconfig.h: Mention PACKAGE and VERSION.
* stamp-h.in: New file.
* ldver.c (ld_program_vresion): Set ld_program_version from
VERSION.
* ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
* Makefile.in: Now built with automake.
* aclocal.m4: Now built with aclocal.
* configure, config.in: Rebuild.
1997-08-09 04:54:28 +00:00
|
|
|
AM_CONFIG_HEADER(config.h:config.in)
|
1995-09-07 17:20:53 +00:00
|
|
|
|
|
|
|
if test -z "$target" ; then
|
|
|
|
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
|
|
|
|
fi
|
|
|
|
if test -z "$host" ; then
|
|
|
|
AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
|
|
|
|
fi
|
1991-09-01 03:42:05 +00:00
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
# host-specific stuff:
|
1991-09-01 03:42:05 +00:00
|
|
|
|
1996-02-15 21:32:43 +00:00
|
|
|
AC_PROG_CC
|
* Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, from old aclocal.m4.
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
shared library handling; now handled by libtool. Replace
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
* configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
* acconfig.h: Mention PACKAGE and VERSION.
* stamp-h.in: New file.
* ldver.c (ld_program_vresion): Set ld_program_version from
VERSION.
* ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
* Makefile.in: Now built with automake.
* aclocal.m4: Now built with aclocal.
* configure, config.in: Rebuild.
1997-08-09 04:54:28 +00:00
|
|
|
AM_PROG_INSTALL
|
1998-04-22 06:58:37 +00:00
|
|
|
|
|
|
|
ALL_LINGUAS=
|
|
|
|
CY_GNU_GETTEXT
|
|
|
|
|
* Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, from old aclocal.m4.
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
shared library handling; now handled by libtool. Replace
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
* configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
* acconfig.h: Mention PACKAGE and VERSION.
* stamp-h.in: New file.
* ldver.c (ld_program_vresion): Set ld_program_version from
VERSION.
* ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
* Makefile.in: Now built with automake.
* aclocal.m4: Now built with aclocal.
* configure, config.in: Rebuild.
1997-08-09 04:54:28 +00:00
|
|
|
AM_EXEEXT
|
|
|
|
|
|
|
|
AC_PROG_YACC
|
1998-04-22 06:58:37 +00:00
|
|
|
AM_PROG_LEX
|
* Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, from old aclocal.m4.
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
shared library handling; now handled by libtool. Replace
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
* configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
* acconfig.h: Mention PACKAGE and VERSION.
* stamp-h.in: New file.
* ldver.c (ld_program_vresion): Set ld_program_version from
VERSION.
* ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
* Makefile.in: Now built with automake.
* aclocal.m4: Now built with aclocal.
* configure, config.in: Rebuild.
1997-08-09 04:54:28 +00:00
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
1996-02-15 21:32:43 +00:00
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
. ${srcdir}/configure.host
|
1991-09-01 03:42:05 +00:00
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
AC_SUBST(HDEFINES)
|
|
|
|
AC_SUBST(HOSTING_CRT0)
|
|
|
|
AC_SUBST(HOSTING_LIBS)
|
|
|
|
AC_SUBST(NATIVE_LIB_DIRS)
|
* ldfile.c (ldfile_open_command): Don't try .ld extension.
It wasn't documented (or likely used) and wastes time.
(try_open): If EXTEN is empty, don't try it.
* ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
with normal function declarations.
* Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
Move *.sc-sh to scripttempl/*.sc.
* {emultempl,emulparams,scripttempl}/README: New files.
* sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
removed, replaced with generic.em.
* h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
h8[35]00hms.s[ch]. Change their contents to omit the "hms".
* *.em (*_get_script): Return script name instead of script contents.
* ldlang.c (lang_process): Change caller.
* ldlex.l, ldgram.y: Recognize -m option.
Check for input files after *all* options in grammar.
* ldmain.c (main): Check for -m options. Add default directory
for -m.
* mkscript.c: File removed.
* genscripts.sh: Take two more parameters, tooldirlib and libdir,
to add to the default LIB_PATH.
Look for input files in the new subdirectories.
Create the scripts in emulations subdirectory and don't filter
them through mkscript.
* configure.in: Make the emulations subdirectory.
* Makefile.in: Account for all of the above changes.
Remove unused .SUFFIXES. Get libgcc.a path with gcc
-print-libgcc-file-name instead of $(libdir)/libgcc.a.
Put CFLAGS last in the compilation rules.
Add -I../bfd to INCLUDES so sysdep.h is found.
* ldfile.c (try_open): If opening without the extension fails,
try with the extension even if -v or -V was given.
had_script is imported (from ldgram.y), not exported.
1993-06-17 20:55:43 +00:00
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
|
|
|
|
AC_CHECK_FUNCS(sbrk)
|
1996-02-07 19:03:38 +00:00
|
|
|
AC_HEADER_DIRENT
|
1992-09-09 18:59:11 +00:00
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
BFD_BINARY_FOPEN
|
1991-09-01 03:42:05 +00:00
|
|
|
|
1997-07-29 01:34:09 +00:00
|
|
|
BFD_NEED_DECLARATION(strstr)
|
1996-02-07 19:03:38 +00:00
|
|
|
BFD_NEED_DECLARATION(free)
|
1997-07-29 01:34:09 +00:00
|
|
|
BFD_NEED_DECLARATION(sbrk)
|
|
|
|
BFD_NEED_DECLARATION(getenv)
|
1996-02-07 19:03:38 +00:00
|
|
|
|
1995-09-07 17:20:53 +00:00
|
|
|
# target-specific stuff:
|
1991-09-01 03:42:05 +00:00
|
|
|
|
1996-02-14 23:54:05 +00:00
|
|
|
all_targets=
|
1995-09-07 17:20:53 +00:00
|
|
|
EMUL=
|
|
|
|
all_emuls=
|
1998-11-09 21:51:51 +00:00
|
|
|
all_emul_extras=
|
1998-04-03 18:30:15 +00:00
|
|
|
|
|
|
|
dnl We need to get an arbitrary number of tdir definitions into
|
|
|
|
dnl Makefile. We can't do it using AC_SUBST, because autoconf does
|
|
|
|
dnl not permit literal newlines in an AC_SUBST variables. So we use a
|
|
|
|
dnl file.
|
|
|
|
rm -f tdirs
|
1993-10-19 19:55:52 +00:00
|
|
|
|
1996-02-14 23:54:05 +00:00
|
|
|
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
|
1993-10-19 19:55:52 +00:00
|
|
|
do
|
1996-02-14 23:54:05 +00:00
|
|
|
if test "$targ_alias" = "all"; then
|
|
|
|
all_targets=true
|
|
|
|
else
|
|
|
|
# Canonicalize the secondary target names.
|
1997-07-29 01:34:09 +00:00
|
|
|
result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
|
1996-02-14 23:54:05 +00:00
|
|
|
if test -n "$result"; then
|
|
|
|
targ=$result
|
1993-10-19 19:55:52 +00:00
|
|
|
else
|
1996-02-14 23:54:05 +00:00
|
|
|
targ=$targ_alias
|
|
|
|
fi
|
1993-06-07 19:57:26 +00:00
|
|
|
|
1996-02-14 23:54:05 +00:00
|
|
|
. ${srcdir}/configure.tgt
|
1995-09-07 17:20:53 +00:00
|
|
|
|
1996-02-14 23:54:05 +00:00
|
|
|
if test "$targ" = "$target"; then
|
|
|
|
EMUL=$targ_emul
|
1993-10-19 19:55:52 +00:00
|
|
|
fi
|
|
|
|
|
1996-02-14 23:54:05 +00:00
|
|
|
for i in $targ_emul $targ_extra_emuls; do
|
|
|
|
case " $all_emuls " in
|
|
|
|
*" e${i}.o "*) ;;
|
|
|
|
*)
|
|
|
|
all_emuls="$all_emuls e${i}.o"
|
|
|
|
eval result=\$tdir_$i
|
|
|
|
test -z "$result" && result=$targ_alias
|
1998-04-03 18:30:15 +00:00
|
|
|
echo tdir_$i=$result >> tdirs
|
1996-02-14 23:54:05 +00:00
|
|
|
;;
|
1993-10-19 19:55:52 +00:00
|
|
|
esac
|
|
|
|
done
|
1998-11-09 21:51:51 +00:00
|
|
|
|
|
|
|
for i in $targ_extra_ofiles; do
|
|
|
|
case " $all_emul_extras " in
|
|
|
|
*" ${i} "*) ;;
|
|
|
|
*)
|
|
|
|
all_emul_extras="$all_emul_extras ${i}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
1996-02-14 23:54:05 +00:00
|
|
|
fi
|
|
|
|
done
|
1993-10-19 19:55:52 +00:00
|
|
|
|
1996-02-14 23:54:05 +00:00
|
|
|
AC_SUBST(EMUL)
|
1998-04-03 18:30:15 +00:00
|
|
|
|
|
|
|
TDIRS=tdirs
|
|
|
|
AC_SUBST_FILE(TDIRS)
|
1993-10-19 19:55:52 +00:00
|
|
|
|
1997-07-29 01:34:09 +00:00
|
|
|
dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
|
|
|
|
dnl target, and in those cases we should also build the 64 bit
|
|
|
|
dnl emulations.
|
1996-02-14 23:54:05 +00:00
|
|
|
if test x${all_targets} = xtrue; then
|
1997-07-29 01:34:09 +00:00
|
|
|
if test x${want64} = xtrue; then
|
|
|
|
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
|
|
|
|
else
|
|
|
|
EMULATION_OFILES='$(ALL_EMULATIONS)'
|
|
|
|
fi
|
Thu Dec 10 11:12:28 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* Makefile.am (ALL_EMULATIONS): Remove pe-dll.o and deffilep.o.
(ALL_EMUL_EXTRA_OFILES): New variable. Put them here instead.
* configure.in: Set EMUL_EXTRA_OFILES to $(ALL_EMUL_EXTRA_OFILES)
if configuring with all targets.
* configure, Makefile.in, aclocal.m4: Rebuild.
* emultempl/pe.em (pe_enable_stdcall_fixup): Make static.
(pe_dll_do_default_excludes): Removed, unused.
(pe_def_file, pe_dll_export_everything, pe_dll_kill_ats,
pe_dll_stdcall_aliases): Don't initialize them, this file may be
compiled more than once.
* pe-dll.c (pe_def_file, pe_dll_export_everything,
pe_dll_do_default_excludes, pe_dll_kill_ats,
pe_dll_stdcall_aliases): Define and initialize them here instead.
(generate_reloc): Fix allocation of reloc_addresses array to use
bfd_vma instead of unsigned long. Fix element size in qsort call.
(reloc_sort): Compare pointers to bfd_vma instead of unsigned
long.
1998-12-10 16:16:08 +00:00
|
|
|
EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
|
1996-02-14 23:54:05 +00:00
|
|
|
else
|
|
|
|
EMULATION_OFILES=$all_emuls
|
1998-11-09 21:51:51 +00:00
|
|
|
EMUL_EXTRA_OFILES=$all_emul_extras
|
1996-02-14 23:54:05 +00:00
|
|
|
fi
|
1995-09-07 17:20:53 +00:00
|
|
|
AC_SUBST(EMULATION_OFILES)
|
1998-11-09 21:51:51 +00:00
|
|
|
AC_SUBST(EMUL_EXTRA_OFILES)
|
* ldfile.c (ldfile_open_command): Don't try .ld extension.
It wasn't documented (or likely used) and wastes time.
(try_open): If EXTEN is empty, don't try it.
* ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
with normal function declarations.
* Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
Move *.sc-sh to scripttempl/*.sc.
* {emultempl,emulparams,scripttempl}/README: New files.
* sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
removed, replaced with generic.em.
* h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
h8[35]00hms.s[ch]. Change their contents to omit the "hms".
* *.em (*_get_script): Return script name instead of script contents.
* ldlang.c (lang_process): Change caller.
* ldlex.l, ldgram.y: Recognize -m option.
Check for input files after *all* options in grammar.
* ldmain.c (main): Check for -m options. Add default directory
for -m.
* mkscript.c: File removed.
* genscripts.sh: Take two more parameters, tooldirlib and libdir,
to add to the default LIB_PATH.
Look for input files in the new subdirectories.
Create the scripts in emulations subdirectory and don't filter
them through mkscript.
* configure.in: Make the emulations subdirectory.
* Makefile.in: Account for all of the above changes.
Remove unused .SUFFIXES. Get libgcc.a path with gcc
-print-libgcc-file-name instead of $(libdir)/libgcc.a.
Put CFLAGS last in the compilation rules.
Add -I../bfd to INCLUDES so sysdep.h is found.
* ldfile.c (try_open): If opening without the extension fails,
try with the extension even if -v or -V was given.
had_script is imported (from ldgram.y), not exported.
1993-06-17 20:55:43 +00:00
|
|
|
|
1998-04-22 06:58:37 +00:00
|
|
|
if test x${enable_static} = xno; then
|
|
|
|
TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
|
|
|
|
else
|
|
|
|
TESTBFDLIB="../bfd/.libs/libbfd.a"
|
|
|
|
fi
|
|
|
|
AC_SUBST(TESTBFDLIB)
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
|
|
|
|
[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
|