This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i386-netware-ld target for Netware NLM files with C++ support


Nick Clifton schrieb:

Hello Nick,

thank you for answering.

Meanwhile I have continued development. gcc does now run native on NetWare, meaning it is possible to create netware executables on netware itself. And cross-compiling from win32 and linux to NetWare is also possible.

The linker script has been replaced by a "clean" nlmld.c program that can be connected with gcc by the "--with-ld=/opt/cross/i586-netware/nlmld" configure option when configuring gcc. It would be good if I'd know a way to make the new "nlmld" the default linker for gcc on the netware target to avoid specifiying an absolute path.

I have attached the current state of the patch against binutils-2.13.1
It is a bit lengthy... If you don't want it that way, tell me. Most likely you'd prefer a patch against the current CVS tree and with changes for the netware target separated from changes for the netware host?


I have no problems signing a copyright assignment to the FSF and I plan to continue maintaining the programs developed.

See http://www.herdsoft.com/ti/netware/cross for project homepage.

Bernd

:-)


Hi Bernd,


I've developed a patch to the i386-netware target to allow creation
of NLMs from C++ sources. The work consists of two parts concerning
binutils:
- Extension of the linker scripts for netware
- A shell script to integrate nlmconv into the link process.


Any suggestion on how to integrate the "ld" script approach into the
binutils distribution?


One approach would be to include it as part of the distribution.  You
could add the script to the binutils/ directory and arrange for it to
installed if the target is i386-network.  This assumes that you would
be OK with the script living in the binutils project and that you
would be prepared to sign an FSF copyright assignment for it, and that
you would be willing to act as a maintainer for the script.

A simpler method would be to archive the script on the herd website
and just have a link from the binutils project web page to your web
page.

Cheers
        Nick






--
Herd Software Entwicklung
Bernd Herd
Kettelerstr. 35
68642 Bürstadt
Germany
Tel.: +49-6206-707775, Fax.: +49-6206-707776
http://www.herdsoft.com
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/bfd/acinclude.m4 binutils-2.13.1/bfd/acinclude.m4
--- orig/binutils-2.13.1/bfd/acinclude.m4	Fri May 17 12:34:00 2002
+++ binutils-2.13.1/bfd/acinclude.m4	Tue Apr 29 12:01:03 2003
@@ -4,5 +4,5 @@
 case "${host}" in
 changequote(,)dnl
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-netware)
 changequote([,])dnl
   AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/bfd/aclocal.m4 binutils-2.13.1/bfd/aclocal.m4
--- orig/binutils-2.13.1/bfd/aclocal.m4	Fri May 17 12:34:01 2002
+++ binutils-2.13.1/bfd/aclocal.m4	Tue Apr 29 12:01:03 2003
@@ -16,5 +16,5 @@
 case "${host}" in
 changequote(,)dnl
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-netware)
 changequote([,])dnl
   AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/bfd/configure binutils-2.13.1/bfd/configure
--- orig/binutils-2.13.1/bfd/configure	Thu Nov  7 19:51:57 2002
+++ binutils-2.13.1/bfd/configure	Tue Apr 29 12:05:31 2003
@@ -4803,5 +4803,5 @@
 
 case "${host}" in
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-netware)
   cat >> confdefs.h <<\EOF
 #define USE_BINARY_FOPEN 1
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/ChangeLog binutils-2.13.1/binutils/ChangeLog
--- orig/binutils-2.13.1/binutils/ChangeLog	Thu Nov  7 18:04:36 2002
+++ binutils-2.13.1/binutils/ChangeLog	Tue Apr 29 12:01:03 2003
@@ -1,2 +1,5 @@
+2003-04-15  Bernd Herd <info@herdsoft.com>
+	* binutils/nlmconv.c: Added command line option to treat undefined symbols as errors
+
 2002-11-07  Nick Clifton  <nickc@redhat.com>
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/Makefile.am binutils-2.13.1/binutils/Makefile.am
--- orig/binutils-2.13.1/binutils/Makefile.am	Wed Jul  3 01:48:44 2002
+++ binutils-2.13.1/binutils/Makefile.am	Tue Apr 29 12:01:03 2003
@@ -47,4 +47,5 @@
 
 NLMCONV_PROG=nlmconv
+NLMLD_PROG=nlmld
 DLLTOOL_PROG=dlltool
 WINDRES_PROG=windres
@@ -53,7 +54,7 @@
 SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT) 
 
-PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
+PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_NLMLD@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
 
-bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
+bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_NLMLD@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
 
 ## We need a special rule to install the programs which are built with
@@ -61,8 +62,8 @@
 noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
 
-EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
+EXTRA_PROGRAMS = $(NLMCONV_PROG) $(NLMLD_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
 
 # Stuff that goes in tooldir/ if appropriate.
-TOOL_PROGS = nm-new strip-new ar ranlib dlltool
+TOOL_PROGS = nm-new strip-new ar ranlib dlltool nlmconv nlmld
 
 BASEDIR = $(srcdir)/..
@@ -81,5 +82,5 @@
 HFILES = \
 	arsup.h binemul.h bucomm.h budbg.h budemang.h \
-	coffgrok.h debug.h dlltool.h nlmconv.h \
+	coffgrok.h debug.h dlltool.h nlmconv.h nlmld.h \
 	windres.h winduni.h
 
@@ -91,5 +92,5 @@
 	emul_aix.c emul_vanilla.c filemode.c \
 	ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
-	nlmconv.c nm.c not-ranlib.c not-strip.c \
+	nlmconv.c nlmld.c nm.c not-ranlib.c not-strip.c \
 	objcopy.c objdump.c prdbg.c \
 	rdcoff.c rddbg.c readelf.c rename.c \
@@ -277,4 +278,6 @@
 
 nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
+
+nlmld_SOURCES = nlmld.c
 
 windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/Makefile.in binutils-2.13.1/binutils/Makefile.in
--- orig/binutils-2.13.1/binutils/Makefile.in	Wed Jul  3 01:48:45 2002
+++ binutils-2.13.1/binutils/Makefile.in	Tue Apr 29 12:01:03 2003
@@ -1,5 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -11,4 +12,5 @@
 # PARTICULAR PURPOSE.
 
+@SET_MAKE@
 
 SHELL = @SHELL@
@@ -32,11 +34,7 @@
 includedir = @includedir@
 oldincludedir = /usr/include
-
-DESTDIR =
-
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-
 top_builddir = .
 
@@ -47,9 +45,9 @@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
 transform = @program_transform_name@
-
 NORMAL_INSTALL = :
 PRE_INSTALL = :
@@ -70,4 +68,5 @@
 BUILD_MISC = @BUILD_MISC@
 BUILD_NLMCONV = @BUILD_NLMCONV@
+BUILD_NLMLD = @BUILD_NLMLD@
 BUILD_SRCONV = @BUILD_SRCONV@
 BUILD_WINDRES = @BUILD_WINDRES@
@@ -83,5 +82,4 @@
 EMULATION = @EMULATION@
 EMULATION_VECTOR = @EMULATION_VECTOR@
-EXEEXT = @EXEEXT@
 GCJ = @GCJ@
 GCJFLAGS = @GCJFLAGS@
@@ -98,5 +96,4 @@
 LN_S = @LN_S@
 MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
@@ -118,5 +115,13 @@
 l = @l@
 
+CC_FOR_BUILD = @CC_FOR_BUILD@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+
 INTLLIBS = @INTLLIBS@
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+
+WARN_CFLAGS = @WARN_CFLAGS@
+
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
 
 AUTOMAKE_OPTIONS = cygnus dejagnu
@@ -125,13 +130,5 @@
 
 tooldir = $(exec_prefix)/$(target_alias)
-
-CC_FOR_BUILD = @CC_FOR_BUILD@
-EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
 YFLAGS = -d
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-
-WARN_CFLAGS = @WARN_CFLAGS@
 AM_CFLAGS = $(WARN_CFLAGS)
 
@@ -160,4 +157,5 @@
 
 NLMCONV_PROG = nlmconv
+NLMLD_PROG = nlmld
 DLLTOOL_PROG = dlltool
 WINDRES_PROG = windres
@@ -166,14 +164,14 @@
 SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT) 
 
-PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
+PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_NLMLD@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
 
-bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
+bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_NLMLD@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
 
 noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
 
-EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
+EXTRA_PROGRAMS = $(NLMCONV_PROG) $(NLMLD_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
 
 # Stuff that goes in tooldir/ if appropriate.
-TOOL_PROGS = nm-new strip-new ar ranlib dlltool
+TOOL_PROGS = nm-new strip-new ar ranlib dlltool nlmconv nlmld
 
 BASEDIR = $(srcdir)/..
@@ -193,5 +191,5 @@
 HFILES = \
 	arsup.h binemul.h bucomm.h budbg.h budemang.h \
-	coffgrok.h debug.h dlltool.h nlmconv.h \
+	coffgrok.h debug.h dlltool.h nlmconv.h nlmld.h \
 	windres.h winduni.h
 
@@ -204,5 +202,5 @@
 	emul_aix.c emul_vanilla.c filemode.c \
 	ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
-	nlmconv.c nm.c not-ranlib.c not-strip.c \
+	nlmconv.c nlmld.c nm.c not-ranlib.c not-strip.c \
 	objcopy.c objdump.c prdbg.c \
 	rdcoff.c rddbg.c readelf.c rename.c \
@@ -300,4 +298,6 @@
 nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
 
+nlmld_SOURCES = nlmld.c
+
 windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
 	winduni.c resres.c $(BULIBS)
@@ -316,155 +316,203 @@
 
 
-###
 
+###
 MOSTLYCLEANFILES = sysinfo binutils.log binutils.sum abcdefgh*
 
 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = 
-bin_PROGRAMS =  size$(EXEEXT) objdump$(EXEEXT) ar$(EXEEXT) \
-strings$(EXEEXT) ranlib$(EXEEXT) objcopy$(EXEEXT) @BUILD_NLMCONV@ \
-@BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ addr2line$(EXEEXT) \
-readelf$(EXEEXT) @BUILD_DLLWRAP@ @BUILD_MISC@
-noinst_PROGRAMS =  nm-new$(EXEEXT) strip-new$(EXEEXT) cxxfilt$(EXEEXT)
-PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-nlmconv_OBJECTS =  nlmconv.$(OBJEXT) nlmheader.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-nlmconv_LDADD = $(LDADD)
-nlmconv_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-nlmconv_LDFLAGS = 
-srconv_OBJECTS =  srconv.$(OBJEXT) coffgrok.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-srconv_LDADD = $(LDADD)
-srconv_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-srconv_LDFLAGS = 
-sysdump_OBJECTS =  sysdump.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-sysdump_LDADD = $(LDADD)
-sysdump_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-sysdump_LDFLAGS = 
-coffdump_OBJECTS =  coffdump.$(OBJEXT) coffgrok.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
+CONFIG_CLEAN_FILES = po/Makefile.in
+EXTRA_PROGRAMS = nlmconv$(EXEEXT) nlmld$(EXEEXT) srconv$(EXEEXT) \
+	sysdump$(EXEEXT) coffdump$(EXEEXT) dlltool$(EXEEXT) \
+	windres$(EXEEXT) dllwrap$(EXEEXT)
+bin_PROGRAMS = size$(EXEEXT) objdump$(EXEEXT) ar$(EXEEXT) \
+	strings$(EXEEXT) ranlib$(EXEEXT) objcopy$(EXEEXT) \
+	@BUILD_NLMCONV@ @BUILD_NLMLD@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ \
+	@BUILD_WINDRES@ addr2line$(EXEEXT) readelf$(EXEEXT) \
+	@BUILD_DLLWRAP@ @BUILD_MISC@
+noinst_PROGRAMS = nm-new$(EXEEXT) strip-new$(EXEEXT) cxxfilt$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+
+am_addr2line_OBJECTS = addr2line.$(OBJEXT) budemang.$(OBJEXT) \
+	bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
+addr2line_OBJECTS = $(am_addr2line_OBJECTS)
+addr2line_LDADD = $(LDADD)
+addr2line_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+addr2line_LDFLAGS =
+am_ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \
+	not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) \
+	binemul.$(OBJEXT) emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+ar_OBJECTS = $(am_ar_OBJECTS)
+ar_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+ar_LDFLAGS =
+am_coffdump_OBJECTS = coffdump.$(OBJEXT) coffgrok.$(OBJEXT) \
+	bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
+coffdump_OBJECTS = $(am_coffdump_OBJECTS)
 coffdump_LDADD = $(LDADD)
-coffdump_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-coffdump_LDFLAGS = 
-dlltool_OBJECTS =  dlltool.$(OBJEXT) defparse.$(OBJEXT) deflex.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-dlltool_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-dlltool_LDFLAGS = 
-windres_OBJECTS =  windres.$(OBJEXT) resrc.$(OBJEXT) rescoff.$(OBJEXT) \
-resbin.$(OBJEXT) rcparse.$(OBJEXT) rclex.$(OBJEXT) winduni.$(OBJEXT) \
-resres.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-windres_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-windres_LDFLAGS = 
-dllwrap_OBJECTS =  dllwrap.$(OBJEXT) version.$(OBJEXT)
-dllwrap_DEPENDENCIES =  ../libiberty/libiberty.a
-dllwrap_LDFLAGS = 
-size_OBJECTS =  size.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
+coffdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+coffdump_LDFLAGS =
+am_cxxfilt_OBJECTS =
+cxxfilt_OBJECTS = $(am_cxxfilt_OBJECTS)
+cxxfilt_DEPENDENCIES = cplus-dem.o underscore.o ../libiberty/libiberty.a
+cxxfilt_LDFLAGS =
+am_dlltool_OBJECTS = dlltool.$(OBJEXT) defparse.$(OBJEXT) \
+	deflex.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+	filemode.$(OBJEXT)
+dlltool_OBJECTS = $(am_dlltool_OBJECTS)
+dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+dlltool_LDFLAGS =
+am_dllwrap_OBJECTS = dllwrap.$(OBJEXT) version.$(OBJEXT)
+dllwrap_OBJECTS = $(am_dllwrap_OBJECTS)
+dllwrap_DEPENDENCIES = ../libiberty/libiberty.a
+dllwrap_LDFLAGS =
+am_nlmconv_OBJECTS = nlmconv.$(OBJEXT) nlmheader.$(OBJEXT) \
+	bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
+nlmconv_OBJECTS = $(am_nlmconv_OBJECTS)
+nlmconv_LDADD = $(LDADD)
+nlmconv_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+nlmconv_LDFLAGS =
+am_nlmld_OBJECTS = nlmld.$(OBJEXT)
+nlmld_OBJECTS = $(am_nlmld_OBJECTS)
+nlmld_LDADD = $(LDADD)
+nlmld_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+nlmld_LDFLAGS =
+am_nm_new_OBJECTS = nm.$(OBJEXT) budemang.$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+nm_new_OBJECTS = $(am_nm_new_OBJECTS)
+nm_new_LDADD = $(LDADD)
+nm_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+nm_new_LDFLAGS =
+am_objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
+	rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) \
+	stabs.$(OBJEXT) ieee.$(OBJEXT) rdcoff.$(OBJEXT) \
+	wrstabs.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+	filemode.$(OBJEXT)
+objcopy_OBJECTS = $(am_objcopy_OBJECTS)
+objcopy_LDADD = $(LDADD)
+objcopy_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+objcopy_LDFLAGS =
+am_objdump_OBJECTS = objdump.$(OBJEXT) budemang.$(OBJEXT) \
+	prdbg.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
+	ieee.$(OBJEXT) rdcoff.$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+objdump_OBJECTS = $(am_objdump_OBJECTS)
+objdump_DEPENDENCIES = ../opcodes/libopcodes.la ../bfd/libbfd.la \
+	../libiberty/libiberty.a
+objdump_LDFLAGS =
+am_ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \
+	arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) \
+	binemul.$(OBJEXT) emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+ranlib_OBJECTS = $(am_ranlib_OBJECTS)
+ranlib_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+ranlib_LDFLAGS =
+am_readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \
+	unwind-ia64.$(OBJEXT)
+readelf_OBJECTS = $(am_readelf_OBJECTS)
+readelf_DEPENDENCIES = ../libiberty/libiberty.a
+readelf_LDFLAGS =
+am_size_OBJECTS = size.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+	filemode.$(OBJEXT)
+size_OBJECTS = $(am_size_OBJECTS)
 size_LDADD = $(LDADD)
-size_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-size_LDFLAGS = 
-objdump_OBJECTS =  objdump.$(OBJEXT) budemang.$(OBJEXT) prdbg.$(OBJEXT) \
-rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) ieee.$(OBJEXT) \
-rdcoff.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-objdump_DEPENDENCIES =  ../opcodes/libopcodes.la ../bfd/libbfd.la \
-../libiberty/libiberty.a
-objdump_LDFLAGS = 
-ar_OBJECTS =  arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \
-not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) binemul.$(OBJEXT) \
-emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-ar_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-ar_LDFLAGS = 
-strings_OBJECTS =  strings.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
+size_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+size_LDFLAGS =
+am_srconv_OBJECTS = srconv.$(OBJEXT) coffgrok.$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+srconv_OBJECTS = $(am_srconv_OBJECTS)
+srconv_LDADD = $(LDADD)
+srconv_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+srconv_LDFLAGS =
+am_strings_OBJECTS = strings.$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+strings_OBJECTS = $(am_strings_OBJECTS)
 strings_LDADD = $(LDADD)
-strings_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-strings_LDFLAGS = 
-ranlib_OBJECTS =  ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \
-arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) binemul.$(OBJEXT) \
-emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-ranlib_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-ranlib_LDFLAGS = 
-objcopy_OBJECTS =  objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
-rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
-ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-objcopy_LDADD = $(LDADD)
-objcopy_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-objcopy_LDFLAGS = 
-addr2line_OBJECTS =  addr2line.$(OBJEXT) budemang.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-addr2line_LDADD = $(LDADD)
-addr2line_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-addr2line_LDFLAGS = 
-readelf_OBJECTS =  readelf.$(OBJEXT) version.$(OBJEXT) \
-unwind-ia64.$(OBJEXT)
-readelf_DEPENDENCIES =  ../libiberty/libiberty.a
-readelf_LDFLAGS = 
-nm_new_OBJECTS =  nm.$(OBJEXT) budemang.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-nm_new_LDADD = $(LDADD)
-nm_new_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-nm_new_LDFLAGS = 
-strip_new_OBJECTS =  objcopy.$(OBJEXT) is-strip.$(OBJEXT) \
-rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
-ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
+strings_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+strings_LDFLAGS =
+am_strip_new_OBJECTS = objcopy.$(OBJEXT) is-strip.$(OBJEXT) \
+	rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) \
+	stabs.$(OBJEXT) ieee.$(OBJEXT) rdcoff.$(OBJEXT) \
+	wrstabs.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+	filemode.$(OBJEXT)
+strip_new_OBJECTS = $(am_strip_new_OBJECTS)
 strip_new_LDADD = $(LDADD)
-strip_new_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
-strip_new_LDFLAGS = 
-cxxfilt_OBJECTS = 
-cxxfilt_DEPENDENCIES =  cplus-dem.o underscore.o \
-../libiberty/libiberty.a
-cxxfilt_LDFLAGS = 
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-YLWRAP = $(top_srcdir)/../ylwrap
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON =  README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-NEWS acinclude.m4 aclocal.m4 arlex.c arparse.c config.in configure \
-configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c
-
+strip_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+strip_new_LDFLAGS =
+am_sysdump_OBJECTS = sysdump.$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+sysdump_OBJECTS = $(am_sysdump_OBJECTS)
+sysdump_LDADD = $(LDADD)
+sysdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+sysdump_LDFLAGS =
+am_windres_OBJECTS = windres.$(OBJEXT) resrc.$(OBJEXT) rescoff.$(OBJEXT) \
+	resbin.$(OBJEXT) rcparse.$(OBJEXT) rclex.$(OBJEXT) \
+	winduni.$(OBJEXT) resres.$(OBJEXT) bucomm.$(OBJEXT) \
+	version.$(OBJEXT) filemode.$(OBJEXT)
+windres_OBJECTS = $(am_windres_OBJECTS)
+windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
+windres_LDFLAGS =
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+DEFS = @DEFS@
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+YLWRAP = $(top_srcdir)/ylwrap
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+DIST_SOURCES = $(addr2line_SOURCES) $(ar_SOURCES) $(coffdump_SOURCES) \
+	$(cxxfilt_SOURCES) $(dlltool_SOURCES) $(dllwrap_SOURCES) \
+	$(nlmconv_SOURCES) $(nlmld_SOURCES) $(nm_new_SOURCES) \
+	$(objcopy_SOURCES) $(objdump_SOURCES) $(ranlib_SOURCES) \
+	$(readelf_SOURCES) $(size_SOURCES) $(srconv_SOURCES) \
+	$(strings_SOURCES) $(strip_new_SOURCES) $(sysdump_SOURCES) \
+	$(windres_SOURCES)
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+SOURCES = $(addr2line_SOURCES) $(ar_SOURCES) $(coffdump_SOURCES) $(cxxfilt_SOURCES) $(dlltool_SOURCES) $(dllwrap_SOURCES) $(nlmconv_SOURCES) $(nlmld_SOURCES) $(nm_new_SOURCES) $(objcopy_SOURCES) $(objdump_SOURCES) $(ranlib_SOURCES) $(readelf_SOURCES) $(size_SOURCES) $(srconv_SOURCES) $(strings_SOURCES) $(strip_new_SOURCES) $(sysdump_SOURCES) $(windres_SOURCES)
 
-TAR = tar
-GZIP_ENV = --best
-SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(dllwrap_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(readelf_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) $(cxxfilt_SOURCES)
-OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(dllwrap_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(readelf_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) $(cxxfilt_OBJECTS)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
-all: all-redirect
 .SUFFIXES:
-.SUFFIXES: .S .c .l .lo .o .obj .s .y
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-	cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+.SUFFIXES: .c .l .lo .o .obj .y
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
 
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in  acinclude.m4
-	cd $(srcdir) && $(ACLOCAL)
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --cygnus  Makefile
 
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
 	cd $(srcdir) && $(AUTOCONF)
 
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 config.h: stamp-h
 	@if test ! -f $@; then \
@@ -473,42 +521,36 @@
 	else :; fi
 stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
+	@rm -f stamp-h stamp-hT
+	@echo timestamp > stamp-hT 2> /dev/null
 	cd $(top_builddir) \
 	  && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
 	     $(SHELL) ./config.status
-	@echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+	@mv stamp-hT stamp-h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/./stamp-h.in
 	@if test ! -f $@; then \
-		rm -f $(srcdir)/stamp-h.in; \
-		$(MAKE) $(srcdir)/stamp-h.in; \
+		rm -f $(srcdir)/./stamp-h.in; \
+		$(MAKE) $(srcdir)/./stamp-h.in; \
 	else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
+	@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
 	cd $(top_srcdir) && $(AUTOHEADER)
-	@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-
-clean-hdr:
+	@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
 
 distclean-hdr:
 	-rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
-	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+	cd $(top_builddir) && CONFIG_FILES=$@:po/Make-in CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	$(mkinstalldirs) $(DESTDIR)$(bindir)
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
-	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
 	  else :; fi; \
 	done
@@ -516,141 +558,102 @@
 uninstall-binPROGRAMS:
 	@$(NORMAL_UNINSTALL)
-	list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
 	done
 
-mostlyclean-noinstPROGRAMS:
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 
 clean-noinstPROGRAMS:
 	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.c.o:
-	$(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
-	$(COMPILE) -c `cygpath -w $<`
-
-.s.o:
-	$(COMPILE) -c $<
-
-.S.o:
-	$(COMPILE) -c $<
-
-mostlyclean-compile:
-	-rm -f *.o core *.core
-	-rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
-	-rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
-	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
-	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
-	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-nlmconv$(EXEEXT): $(nlmconv_OBJECTS) $(nlmconv_DEPENDENCIES)
-	@rm -f nlmconv$(EXEEXT)
-	$(LINK) $(nlmconv_LDFLAGS) $(nlmconv_OBJECTS) $(nlmconv_LDADD) $(LIBS)
-
-srconv$(EXEEXT): $(srconv_OBJECTS) $(srconv_DEPENDENCIES)
-	@rm -f srconv$(EXEEXT)
-	$(LINK) $(srconv_LDFLAGS) $(srconv_OBJECTS) $(srconv_LDADD) $(LIBS)
-
-sysdump$(EXEEXT): $(sysdump_OBJECTS) $(sysdump_DEPENDENCIES)
-	@rm -f sysdump$(EXEEXT)
-	$(LINK) $(sysdump_LDFLAGS) $(sysdump_OBJECTS) $(sysdump_LDADD) $(LIBS)
-
-coffdump$(EXEEXT): $(coffdump_OBJECTS) $(coffdump_DEPENDENCIES)
+addr2line$(EXEEXT): $(addr2line_OBJECTS) $(addr2line_DEPENDENCIES) 
+	@rm -f addr2line$(EXEEXT)
+	$(LINK) $(addr2line_LDFLAGS) $(addr2line_OBJECTS) $(addr2line_LDADD) $(LIBS)
+arparse.h: arparse.c
+ar$(EXEEXT): $(ar_OBJECTS) $(ar_DEPENDENCIES) 
+	@rm -f ar$(EXEEXT)
+	$(LINK) $(ar_LDFLAGS) $(ar_OBJECTS) $(ar_LDADD) $(LIBS)
+coffdump$(EXEEXT): $(coffdump_OBJECTS) $(coffdump_DEPENDENCIES) 
 	@rm -f coffdump$(EXEEXT)
 	$(LINK) $(coffdump_LDFLAGS) $(coffdump_OBJECTS) $(coffdump_LDADD) $(LIBS)
-
-dlltool$(EXEEXT): $(dlltool_OBJECTS) $(dlltool_DEPENDENCIES)
+cxxfilt$(EXEEXT): $(cxxfilt_OBJECTS) $(cxxfilt_DEPENDENCIES) 
+	@rm -f cxxfilt$(EXEEXT)
+	$(LINK) $(cxxfilt_LDFLAGS) $(cxxfilt_OBJECTS) $(cxxfilt_LDADD) $(LIBS)
+defparse.h: defparse.c
+dlltool$(EXEEXT): $(dlltool_OBJECTS) $(dlltool_DEPENDENCIES) 
 	@rm -f dlltool$(EXEEXT)
 	$(LINK) $(dlltool_LDFLAGS) $(dlltool_OBJECTS) $(dlltool_LDADD) $(LIBS)
-
-windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES)
-	@rm -f windres$(EXEEXT)
-	$(LINK) $(windres_LDFLAGS) $(windres_OBJECTS) $(windres_LDADD) $(LIBS)
-
-dllwrap$(EXEEXT): $(dllwrap_OBJECTS) $(dllwrap_DEPENDENCIES)
+dllwrap$(EXEEXT): $(dllwrap_OBJECTS) $(dllwrap_DEPENDENCIES) 
 	@rm -f dllwrap$(EXEEXT)
 	$(LINK) $(dllwrap_LDFLAGS) $(dllwrap_OBJECTS) $(dllwrap_LDADD) $(LIBS)
-
-size$(EXEEXT): $(size_OBJECTS) $(size_DEPENDENCIES)
-	@rm -f size$(EXEEXT)
-	$(LINK) $(size_LDFLAGS) $(size_OBJECTS) $(size_LDADD) $(LIBS)
-
-objdump$(EXEEXT): $(objdump_OBJECTS) $(objdump_DEPENDENCIES)
+nlmheader.h: nlmheader.c
+nlmconv$(EXEEXT): $(nlmconv_OBJECTS) $(nlmconv_DEPENDENCIES) 
+	@rm -f nlmconv$(EXEEXT)
+	$(LINK) $(nlmconv_LDFLAGS) $(nlmconv_OBJECTS) $(nlmconv_LDADD) $(LIBS)
+nlmld$(EXEEXT): $(nlmld_OBJECTS) $(nlmld_DEPENDENCIES) 
+	@rm -f nlmld$(EXEEXT)
+	$(LINK) $(nlmld_LDFLAGS) $(nlmld_OBJECTS) $(nlmld_LDADD) $(LIBS)
+nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES) 
+	@rm -f nm-new$(EXEEXT)
+	$(LINK) $(nm_new_LDFLAGS) $(nm_new_OBJECTS) $(nm_new_LDADD) $(LIBS)
+objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES) 
+	@rm -f objcopy$(EXEEXT)
+	$(LINK) $(objcopy_LDFLAGS) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS)
+objdump$(EXEEXT): $(objdump_OBJECTS) $(objdump_DEPENDENCIES) 
 	@rm -f objdump$(EXEEXT)
 	$(LINK) $(objdump_LDFLAGS) $(objdump_OBJECTS) $(objdump_LDADD) $(LIBS)
-
-ar$(EXEEXT): $(ar_OBJECTS) $(ar_DEPENDENCIES)
-	@rm -f ar$(EXEEXT)
-	$(LINK) $(ar_LDFLAGS) $(ar_OBJECTS) $(ar_LDADD) $(LIBS)
-
-strings$(EXEEXT): $(strings_OBJECTS) $(strings_DEPENDENCIES)
+arparse.h: arparse.c
+ranlib$(EXEEXT): $(ranlib_OBJECTS) $(ranlib_DEPENDENCIES) 
+	@rm -f ranlib$(EXEEXT)
+	$(LINK) $(ranlib_LDFLAGS) $(ranlib_OBJECTS) $(ranlib_LDADD) $(LIBS)
+readelf$(EXEEXT): $(readelf_OBJECTS) $(readelf_DEPENDENCIES) 
+	@rm -f readelf$(EXEEXT)
+	$(LINK) $(readelf_LDFLAGS) $(readelf_OBJECTS) $(readelf_LDADD) $(LIBS)
+size$(EXEEXT): $(size_OBJECTS) $(size_DEPENDENCIES) 
+	@rm -f size$(EXEEXT)
+	$(LINK) $(size_LDFLAGS) $(size_OBJECTS) $(size_LDADD) $(LIBS)
+srconv$(EXEEXT): $(srconv_OBJECTS) $(srconv_DEPENDENCIES) 
+	@rm -f srconv$(EXEEXT)
+	$(LINK) $(srconv_LDFLAGS) $(srconv_OBJECTS) $(srconv_LDADD) $(LIBS)
+strings$(EXEEXT): $(strings_OBJECTS) $(strings_DEPENDENCIES) 
 	@rm -f strings$(EXEEXT)
 	$(LINK) $(strings_LDFLAGS) $(strings_OBJECTS) $(strings_LDADD) $(LIBS)
+strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES) 
+	@rm -f strip-new$(EXEEXT)
+	$(LINK) $(strip_new_LDFLAGS) $(strip_new_OBJECTS) $(strip_new_LDADD) $(LIBS)
+sysdump$(EXEEXT): $(sysdump_OBJECTS) $(sysdump_DEPENDENCIES) 
+	@rm -f sysdump$(EXEEXT)
+	$(LINK) $(sysdump_LDFLAGS) $(sysdump_OBJECTS) $(sysdump_LDADD) $(LIBS)
+rcparse.h: rcparse.c
+windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES) 
+	@rm -f windres$(EXEEXT)
+	$(LINK) $(windres_LDFLAGS) $(windres_OBJECTS) $(windres_LDADD) $(LIBS)
 
-ranlib$(EXEEXT): $(ranlib_OBJECTS) $(ranlib_DEPENDENCIES)
-	@rm -f ranlib$(EXEEXT)
-	$(LINK) $(ranlib_LDFLAGS) $(ranlib_OBJECTS) $(ranlib_LDADD) $(LIBS)
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES)
-	@rm -f objcopy$(EXEEXT)
-	$(LINK) $(objcopy_LDFLAGS) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS)
+distclean-compile:
+	-rm -f *.tab.c
 
-addr2line$(EXEEXT): $(addr2line_OBJECTS) $(addr2line_DEPENDENCIES)
-	@rm -f addr2line$(EXEEXT)
-	$(LINK) $(addr2line_LDFLAGS) $(addr2line_OBJECTS) $(addr2line_LDADD) $(LIBS)
+.c.o:
+	$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
 
-readelf$(EXEEXT): $(readelf_OBJECTS) $(readelf_DEPENDENCIES)
-	@rm -f readelf$(EXEEXT)
-	$(LINK) $(readelf_LDFLAGS) $(readelf_OBJECTS) $(readelf_LDADD) $(LIBS)
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
 
-nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES)
-	@rm -f nm-new$(EXEEXT)
-	$(LINK) $(nm_new_LDFLAGS) $(nm_new_OBJECTS) $(nm_new_LDADD) $(LIBS)
+.c.lo:
+	$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
 
-strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES)
-	@rm -f strip-new$(EXEEXT)
-	$(LINK) $(strip_new_LDFLAGS) $(strip_new_OBJECTS) $(strip_new_LDADD) $(LIBS)
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
 
-cxxfilt$(EXEEXT): $(cxxfilt_OBJECTS) $(cxxfilt_DEPENDENCIES)
-	@rm -f cxxfilt$(EXEEXT)
-	$(LINK) $(cxxfilt_LDFLAGS) $(cxxfilt_OBJECTS) $(cxxfilt_LDADD) $(LIBS)
 .l.c:
-	$(SHELL) $(YLWRAP) "$(LEX)" $< $(LEX_OUTPUT_ROOT).c $@ -- $(AM_LFLAGS) $(LFLAGS)
-.y.c:
-	$(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
-arparse.h: arparse.c
-defparse.h: defparse.c
-nlmheader.h: nlmheader.c
-rcparse.h: rcparse.c
+	$(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
 
+.y.c:
+	$(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h -- $(YACCCOMPILE)
+uninstall-info-am:
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -660,10 +663,5 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
+$(RECURSIVE_TARGETS):
 	@set fnord $(MAKEFLAGS); amf=$$2; \
 	dot_seen=no; \
@@ -688,9 +686,14 @@
 	@set fnord $(MAKEFLAGS); amf=$$2; \
 	dot_seen=no; \
-	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
-	  rev="$$subdir $$rev"; \
-	  test "$$subdir" != "." || dot_seen=yes; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
 	done; \
-	test "$$dot_seen" = "no" && rev=". $$rev"; \
+	rev="$$rev ."; \
 	target=`echo $@ | sed s/-recursive//`; \
 	for subdir in $$rev; do \
@@ -711,153 +714,80 @@
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP)
-	list='$(SOURCES) $(HEADERS)'; \
-	unique=`for i in $$list; do echo $$i; done | \
-	  awk '    { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	here=`pwd` && cd $(srcdir) \
-	  && mkid -f$$here/ID $$unique $(LISP)
+	mkid -fID $$unique $(LISP)
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-   if test "$$subdir" = .; then :; else \
+	  if test "$$subdir" = .; then :; else \
 	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-   fi; \
+	  fi; \
 	done; \
-	list='$(SOURCES) $(HEADERS)'; \
-	unique=`for i in $$list; do echo $$i; done | \
-	  awk '    { files[$$0] = 1; } \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
-	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
+	  || etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP)
 
-mostlyclean-tags:
-
-clean-tags:
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
 distclean-tags:
-	-rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-	-rm -rf $(distdir)
-	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
-	mkdir $(distdir)/=build
-	mkdir $(distdir)/=inst
-	dc_install_base=`cd $(distdir)/=inst && pwd`; \
-	cd $(distdir)/=build \
-	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
-	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
-	  && $(MAKE) $(AM_MAKEFLAGS) check \
-	  && $(MAKE) $(AM_MAKEFLAGS) install \
-	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist
-	-rm -rf $(distdir)
-	@banner="$(distdir).tar.gz is ready for distribution"; \
-	dashes=`echo "$$banner" | sed s/./=/g`; \
-	echo "$$dashes"; \
-	echo "$$banner"; \
-	echo "$$dashes"
-dist: distdir
-	-chmod -R a+r $(distdir)
-	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-	-rm -rf $(distdir)
-dist-all: distdir
-	-chmod -R a+r $(distdir)
-	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-	-rm -rf $(distdir)
-distdir: $(DISTFILES)
-	-rm -rf $(distdir)
-	mkdir $(distdir)
-	-chmod 777 $(distdir)
-	@for file in $(DISTFILES); do \
-	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    cp -pr $$d/$$file $(distdir)/$$file; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
-	  fi; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
-	    || exit 1; \
-	    chmod 777 $(distdir)/$$subdir; \
-	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
 RUNTESTFLAGS =
-
 DEJATOOL = $(PACKAGE)
-
-RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
 site.exp: Makefile
 	@echo 'Making a new site.exp file...'
-	@test ! -f site.bak || rm -f site.bak
-	@echo '## these variables are automatically generated by make ##' > $@-t
-	@echo '# Do not edit here.  If you wish to override these values' >> $@-t
-	@echo '# edit the last section' >> $@-t
-	@echo 'set tool $(DEJATOOL)' >> $@-t
-	@echo 'set srcdir $(srcdir)' >> $@-t
-	@echo 'set objdir' `pwd` >> $@-t
-	@echo 'set host_alias $(host_alias)' >> $@-t
-	@echo 'set host_triplet $(host_triplet)' >> $@-t
-	@echo 'set target_alias $(target_alias)' >> $@-t
-	@echo 'set target_triplet $(target_triplet)' >> $@-t
-	@echo 'set build_alias $(build_alias)' >> $@-t
-	@echo 'set build_triplet $(build_triplet)' >> $@-t
-	@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
-	@test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+	@echo '## these variables are automatically generated by make ##' >site.tmp
+	@echo '# Do not edit here.  If you wish to override these values' >>site.tmp
+	@echo '# edit the last section' >>site.tmp
+	@echo 'set tool $(DEJATOOL)' >>site.tmp
+	@echo 'set srcdir $(srcdir)' >>site.tmp
+	@echo "set objdir `pwd`" >>site.tmp
+	@echo 'set build_alias $(build_alias)' >>site.tmp
+	@echo 'set build_triplet $(build_triplet)' >>site.tmp
+	@echo 'set host_alias $(host_alias)' >>site.tmp
+	@echo 'set host_triplet $(host_triplet)' >>site.tmp
+	@echo 'set target_alias $(target_alias)' >>site.tmp
+	@echo 'set target_triplet $(target_triplet)' >>site.tmp
+	@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+	@test ! -f site.exp || \
+	  sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+	@-rm -f site.bak
 	@test ! -f site.exp || mv site.exp site.bak
-	@mv $@-t site.exp
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
+	@mv site.tmp site.exp
 check-am:
 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
 check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am: 
-install-info: install-info-recursive
-all-recursive-am: config.h
-	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+all-am: Makefile $(PROGRAMS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
 
-install-exec-am: install-binPROGRAMS install-exec-local
+install: install-recursive
 install-exec: install-exec-recursive
-
-install-data-am:
 install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-binPROGRAMS
-uninstall: uninstall-recursive
-all-am: Makefile $(PROGRAMS) config.h
-all-redirect: all-recursive-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-	$(mkinstalldirs)  $(DESTDIR)$(bindir)
-
-
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
 	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -867,63 +797,69 @@
 
 distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
 	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
-	-test -z "arlexldeflexlrclexlarparseharparsecdefparsehdefparsecnlmheaderhnlmheadercrcparsehrcparsec" || rm -f arlexl deflexl rclexl arparseh arparsec defparseh defparsec nlmheaderh nlmheaderc rcparseh rcparsec
-mostlyclean-am:  mostlyclean-hdr mostlyclean-binPROGRAMS \
-		mostlyclean-noinstPROGRAMS mostlyclean-compile \
-		mostlyclean-libtool mostlyclean-tags \
-		mostlyclean-generic mostlyclean-local
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "arparse.hdefparse.hnlmheader.harparse.hrcparse.h" || rm -f arparse.h defparse.h nlmheader.h arparse.h rcparse.h
+clean: clean-recursive
 
-mostlyclean: mostlyclean-recursive
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
 
-clean-am:  clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS \
-		clean-compile clean-libtool clean-tags clean-generic \
-		mostlyclean-am
+distclean: distclean-recursive
+	-rm -f config.status config.cache config.log
+distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
 
-clean: clean-recursive
+dvi: dvi-recursive
 
-distclean-am:  distclean-hdr distclean-binPROGRAMS \
-		distclean-noinstPROGRAMS distclean-compile \
-		distclean-libtool distclean-tags distclean-generic \
-		clean-am
-	-rm -f libtool
+dvi-am:
 
-distclean: distclean-recursive
-	-rm -f config.status
+info: info-recursive
 
-maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-binPROGRAMS \
-		maintainer-clean-noinstPROGRAMS \
-		maintainer-clean-compile maintainer-clean-libtool \
-		maintainer-clean-tags maintainer-clean-generic \
-		distclean-am
-	@echo "This command is intended for maintainers to use;"
-	@echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS install-exec-local
+
+install-info:
+
+install-man:
+
+installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-	-rm -f config.status
 
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
-clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info all-recursive-am install-exec-local \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-local
+
+uninstall-am: uninstall-binPROGRAMS
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-DEJAGNU \
+	check-am clean clean-binPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS clean-recursive distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-recursive distclean-tags dvi dvi-am \
+	dvi-recursive info info-am info-recursive install install-am \
+	install-binPROGRAMS install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-local install-exec-recursive install-info \
+	install-info-am install-man install-recursive install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	installdirs-recursive maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-local \
+	mostlyclean-recursive tags tags-recursive uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
 
 po/POTFILES.in: @MAINT@ Makefile
@@ -1296,5 +1232,4 @@
   windres.h winduni.h rcparse.h
 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/configure binutils-2.13.1/binutils/configure
--- orig/binutils-2.13.1/binutils/configure	Thu Nov  7 18:04:37 2002
+++ binutils-2.13.1/binutils/configure	Tue Apr 29 12:01:03 2003
@@ -1646,5 +1646,5 @@
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj) ;;
+      *.$ac_ext | *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
@@ -3268,5 +3268,5 @@
 fi
 
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
@@ -3400,22 +3400,9 @@
 #include <sys/mman.h>
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
@@ -3525,5 +3512,5 @@
 
 EOF
-if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
@@ -3553,15 +3540,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3556: checking for $ac_hdr" >&5
+echo "configure:3543: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3561 "configure"
+#line 3548 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -3593,10 +3580,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3596: checking for $ac_func" >&5
+echo "configure:3583: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3601 "configure"
+#line 3588 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -3621,5 +3608,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -3650,10 +3637,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3653: checking for $ac_func" >&5
+echo "configure:3640: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+#line 3645 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -3678,5 +3665,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -3712,10 +3699,10 @@
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3715: checking for LC_MESSAGES" >&5
+echo "configure:3702: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3720 "configure"
+#line 3707 "configure"
 #include "confdefs.h"
 #include <locale.h>
@@ -3724,5 +3711,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
@@ -3745,5 +3732,5 @@
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3748: checking whether NLS is requested" >&5
+echo "configure:3735: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
@@ -3765,5 +3752,5 @@
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3768: checking whether included gettext is requested" >&5
+echo "configure:3755: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
@@ -3784,15 +3771,15 @@
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3787: checking for libintl.h" >&5
+echo "configure:3774: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3792 "configure"
+#line 3779 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -3811,10 +3798,10 @@
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3814: checking for gettext in libc" >&5
+echo "configure:3801: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3819 "configure"
+#line 3806 "configure"
 #include "confdefs.h"
 #include <libintl.h>
@@ -3823,5 +3810,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
@@ -3839,5 +3826,5 @@
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3842: checking for bindtextdomain in -lintl" >&5
+echo "configure:3829: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -3847,5 +3834,5 @@
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3850 "configure"
+#line 3837 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -3858,5 +3845,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -3874,10 +3861,10 @@
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3877: checking for gettext in libintl" >&5
+echo "configure:3864: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3882 "configure"
+#line 3869 "configure"
 #include "confdefs.h"
 
@@ -3886,5 +3873,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libintl=yes
@@ -3914,5 +3901,5 @@
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3917: checking for $ac_word" >&5
+echo "configure:3904: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3948,10 +3935,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3951: checking for $ac_func" >&5
+echo "configure:3938: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3956 "configure"
+#line 3943 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -3976,5 +3963,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -4003,5 +3990,5 @@
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4006: checking for $ac_word" >&5
+echo "configure:3993: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4039,5 +4026,5 @@
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4042: checking for $ac_word" >&5
+echo "configure:4029: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4071,5 +4058,5 @@
 
 		cat > conftest.$ac_ext <<EOF
-#line 4074 "configure"
+#line 4061 "configure"
 #include "confdefs.h"
 
@@ -4079,5 +4066,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
@@ -4111,5 +4098,5 @@
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4114: checking for $ac_word" >&5
+echo "configure:4101: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4145,5 +4132,5 @@
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4148: checking for $ac_word" >&5
+echo "configure:4135: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4181,5 +4168,5 @@
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4184: checking for $ac_word" >&5
+echo "configure:4171: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4271,5 +4258,5 @@
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4274: checking for catalogs to be installed" >&5
+echo "configure:4261: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
@@ -4299,15 +4286,15 @@
 	 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4302: checking for linux/version.h" >&5
+echo "configure:4289: checking for linux/version.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4307 "configure"
+#line 4294 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -4372,5 +4359,5 @@
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4375: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4362: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
@@ -4397,5 +4384,5 @@
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4400: checking for executable suffix" >&5
+echo "configure:4387: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4407,8 +4394,8 @@
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj) ;;
+      *.$ac_ext | *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
@@ -4450,5 +4437,5 @@
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4453: checking for $ac_word" >&5
+echo "configure:4440: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4489,5 +4476,5 @@
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4492: checking for a BSD compatible install" >&5
+echo "configure:4479: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
@@ -4556,5 +4543,5 @@
 else
   echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4559: checking for build system executable suffix" >&5
+echo "configure:4546: checking for build system executable suffix" >&5
 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4587,19 +4574,19 @@
 
 
-for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
+for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h io.h sys/file.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4594: checking for $ac_hdr" >&5
+echo "configure:4581: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4599 "configure"
+#line 4586 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -4628,10 +4615,10 @@
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4631: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4618: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4636 "configure"
+#line 4623 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
@@ -4649,5 +4636,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
@@ -4672,10 +4659,10 @@
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4675: checking for working alloca.h" >&5
+echo "configure:4662: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4680 "configure"
+#line 4667 "configure"
 #include "confdefs.h"
 #include <alloca.h>
@@ -4684,5 +4671,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
@@ -4705,10 +4692,10 @@
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4708: checking for alloca" >&5
+echo "configure:4695: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4713 "configure"
+#line 4700 "configure"
 #include "confdefs.h"
 
@@ -4738,5 +4725,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
@@ -4770,10 +4757,10 @@
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4773: checking whether alloca needs Cray hooks" >&5
+echo "configure:4760: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4778 "configure"
+#line 4765 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
@@ -4800,10 +4787,10 @@
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4803: checking for $ac_func" >&5
+echo "configure:4790: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4808 "configure"
+#line 4795 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -4828,5 +4815,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -4855,5 +4842,5 @@
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4858: checking stack direction for C alloca" >&5
+echo "configure:4845: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4863,5 +4850,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 4866 "configure"
+#line 4853 "configure"
 #include "confdefs.h"
 find_stack_direction ()
@@ -4882,5 +4869,5 @@
 }
 EOF
-if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
@@ -4906,10 +4893,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4909: checking for $ac_func" >&5
+echo "configure:4896: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4914 "configure"
+#line 4901 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -4934,5 +4921,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -4962,10 +4949,10 @@
 # needs to be defined for it
 echo $ac_n "checking for fopen64""... $ac_c" 1>&6
-echo "configure:4965: checking for fopen64" >&5
+echo "configure:4952: checking for fopen64" >&5
 if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4970 "configure"
+#line 4957 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -4974,5 +4961,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bu_cv_have_fopen64=yes
@@ -4984,5 +4971,5 @@
  CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
  cat > conftest.$ac_ext <<EOF
-#line 4987 "configure"
+#line 4974 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -4991,5 +4978,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE"
@@ -5023,5 +5010,5 @@
 
 echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
-echo "configure:5026: checking for library containing frexp" >&5
+echo "configure:5013: checking for library containing frexp" >&5
 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5030,5 +5017,5 @@
 ac_cv_search_frexp="no"
 cat > conftest.$ac_ext <<EOF
-#line 5033 "configure"
+#line 5020 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5041,5 +5028,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_frexp="none required"
@@ -5052,5 +5039,5 @@
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5055 "configure"
+#line 5042 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5063,5 +5050,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_frexp="-l$i"
@@ -5085,10 +5072,10 @@
 
 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:5088: checking for time_t in time.h" >&5
+echo "configure:5075: checking for time_t in time.h" >&5
 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5093 "configure"
+#line 5080 "configure"
 #include "confdefs.h"
 #include <time.h>
@@ -5097,5 +5084,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bu_cv_decl_time_t_time_h=yes
@@ -5118,10 +5105,10 @@
 
 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5121: checking for time_t in sys/types.h" >&5
+echo "configure:5108: checking for time_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5126 "configure"
+#line 5113 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
@@ -5130,5 +5117,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bu_cv_decl_time_t_types_h=yes
@@ -5153,10 +5140,10 @@
 # by default.
 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
-echo "configure:5156: checking for utime.h" >&5
+echo "configure:5143: checking for utime.h" >&5
 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5161 "configure"
+#line 5148 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
@@ -5169,5 +5156,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bu_cv_header_utime_h=yes
@@ -5190,10 +5177,10 @@
 
 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:5193: checking whether fprintf must be declared" >&5
+echo "configure:5180: checking whether fprintf must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5198 "configure"
+#line 5185 "configure"
 #include "confdefs.h"
 
@@ -5216,5 +5203,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_fprintf=no
@@ -5237,10 +5224,10 @@
 
 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5240: checking whether strstr must be declared" >&5
+echo "configure:5227: checking whether strstr must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5245 "configure"
+#line 5232 "configure"
 #include "confdefs.h"
 
@@ -5263,5 +5250,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strstr=no
@@ -5284,10 +5271,10 @@
 
 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:5287: checking whether sbrk must be declared" >&5
+echo "configure:5274: checking whether sbrk must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5292 "configure"
+#line 5279 "configure"
 #include "confdefs.h"
 
@@ -5310,5 +5297,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_sbrk=no
@@ -5331,10 +5318,10 @@
 
 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5334: checking whether getenv must be declared" >&5
+echo "configure:5321: checking whether getenv must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5339 "configure"
+#line 5326 "configure"
 #include "confdefs.h"
 
@@ -5357,5 +5344,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_getenv=no
@@ -5378,10 +5365,10 @@
 
 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5381: checking whether environ must be declared" >&5
+echo "configure:5368: checking whether environ must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5386 "configure"
+#line 5373 "configure"
 #include "confdefs.h"
 
@@ -5404,5 +5391,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_environ=no
@@ -5427,5 +5414,5 @@
 
 case "${host}" in
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-netware)
   cat >> confdefs.h <<\EOF
 #define USE_BINARY_FOPEN 1
@@ -5452,4 +5439,5 @@
 all_targets=false
 BUILD_NLMCONV=
+BUILD_NLMLD=
 NLMCONV_DEFS=
 BUILD_SRCONV=
@@ -5472,4 +5460,5 @@
 	i[3456]86*-*-netware*) 
 	  BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
+          BUILD_NLMLD='$(NLMLD_PROG)$(EXEEXT)'
 	  NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
 	  ;;
@@ -5561,4 +5550,5 @@
 
 
+
 cat >> confdefs.h <<EOF
 #define TARGET "${target}"
@@ -5798,4 +5788,5 @@
 s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
 s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
+s%@BUILD_NLMLD@%$BUILD_NLMLD%g
 s%@BUILD_SRCONV@%$BUILD_SRCONV%g
 s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/configure.in binutils-2.13.1/binutils/configure.in
--- orig/binutils-2.13.1/binutils/configure.in	Thu Nov  7 18:04:37 2002
+++ binutils-2.13.1/binutils/configure.in	Tue Apr 29 12:01:03 2003
@@ -98,5 +98,5 @@
 AC_SUBST(DEMANGLER_NAME)
 
-AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
+AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h io.h sys/file.h)
 AC_HEADER_SYS_WAIT
 AC_FUNC_ALLOCA
@@ -190,4 +190,5 @@
 all_targets=false
 BUILD_NLMCONV=
+BUILD_NLMLD=
 NLMCONV_DEFS=
 BUILD_SRCONV=
@@ -212,4 +213,5 @@
 changequote([,])dnl
 	  BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
+          BUILD_NLMLD='$(NLMLD_PROG)$(EXEEXT)'
 	  NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
 	  ;;
@@ -295,4 +297,5 @@
 AC_SUBST(NLMCONV_DEFS)
 AC_SUBST(BUILD_NLMCONV)
+AC_SUBST(BUILD_NLMLD)
 AC_SUBST(BUILD_SRCONV)
 AC_SUBST(BUILD_DLLTOOL)
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/doc/Makefile.in binutils-2.13.1/binutils/doc/Makefile.in
--- orig/binutils-2.13.1/binutils/doc/Makefile.in	Sat Jun  8 10:44:18 2002
+++ binutils-2.13.1/binutils/doc/Makefile.in	Tue Apr 29 12:01:03 2003
@@ -1,5 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -11,4 +12,5 @@
 # PARTICULAR PURPOSE.
 
+@SET_MAKE@
 
 SHELL = @SHELL@
@@ -32,11 +34,7 @@
 includedir = @includedir@
 oldincludedir = /usr/include
-
-DESTDIR =
-
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-
 top_builddir = ..
 
@@ -47,9 +45,9 @@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
 transform = @program_transform_name@
-
 NORMAL_INSTALL = :
 PRE_INSTALL = :
@@ -70,4 +68,5 @@
 BUILD_MISC = @BUILD_MISC@
 BUILD_NLMCONV = @BUILD_NLMCONV@
+BUILD_NLMLD = @BUILD_NLMLD@
 BUILD_SRCONV = @BUILD_SRCONV@
 BUILD_WINDRES = @BUILD_WINDRES@
@@ -84,5 +83,4 @@
 EMULATION = @EMULATION@
 EMULATION_VECTOR = @EMULATION_VECTOR@
-EXEEXT = @EXEEXT@
 EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
 GCJ = @GCJ@
@@ -102,5 +100,4 @@
 LN_S = @LN_S@
 MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
@@ -163,114 +160,88 @@
 DISTCLEANFILES = config.texi
 MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
+subdir = doc
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES = 
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+depcomp =
+DIST_SOURCES =
 TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
 INFO_DEPS = binutils.info
 DVIS = binutils.dvi
 TEXINFOS = binutils.texi
-man1dir = $(mandir)/man1
-MANS = $(man_MANS)
 
 NROFF = nroff
-DIST_COMMON =  Makefile.am Makefile.in
+MANS = $(man_MANS)
+all: all-am
 
+.SUFFIXES:
+.SUFFIXES: .dvi .info .ps .texi
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+mostlyclean-libtool:
+	-rm -f *.lo
 
-TAR = tar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-	cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+clean-libtool:
+	-rm -rf .libs _libs
 
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --cygnus  doc/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
 
 binutils.info: binutils.texi
 binutils.dvi: binutils.texi
 
-
-DVIPS = dvips
-
 .texi.info:
 	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
-	$(MAKEINFO) -I $(srcdir) $<
+	$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+	  -I $(srcdir) $<
 
 .texi.dvi:
-	TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
-	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+	TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+	$(TEXI2DVI) $<
 
 .texi:
 	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
-	$(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.info:
-	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
-	$(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
-	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
-	$(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.dvi:
-	TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
-	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi.info:
-	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
-	$(MAKEINFO) -I $(srcdir) $<
-
-.txi.dvi:
-	TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
-	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+	$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+	  -I $(srcdir) $<
 
-.txi:
-	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
-	$(MAKEINFO) -I $(srcdir) $<
+MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
+            echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
+          else \
+            echo makeinfo; \
+          fi`
+
+TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
+             echo $(top_srcdir)/../texinfo/util/texi2dvi; \
+           else \
+             echo texi2dvi; \
+           fi`
+DVIPS = dvips
 .dvi.ps:
 	$(DVIPS) $< -o $@
 
-install-info-am: $(INFO_DEPS)
-	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(infodir)
-	@list='$(INFO_DEPS)'; \
-	for file in $$list; do \
-	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
-	  for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
-	    if test -f $$d/$$ifile; then \
-	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
-	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
-	    else : ; fi; \
-	  done; \
-	done
-	@$(POST_INSTALL)
-	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+uninstall-info-am:
+	$(PRE_UNINSTALL)
+	@if (install-info --version && \
+	     install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
 	  list='$(INFO_DEPS)'; \
 	  for file in $$list; do \
-	    echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
-	    install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+	    echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
+	    install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
 	  done; \
-	else : ; fi
-
-uninstall-info:
-	$(PRE_UNINSTALL)
-	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
-	  ii=yes; \
-	else ii=; fi; \
-	list='$(INFO_DEPS)'; \
-	for file in $$list; do \
-	  test -z "$$ii" \
-	    || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
-	done
+	else :; fi
 	@$(NORMAL_UNINSTALL)
-	list='$(INFO_DEPS)'; \
+	@list='$(INFO_DEPS)'; \
 	for file in $$list; do \
-	  (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+	  (if cd $(DESTDIR)$(infodir); then \
+	     echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
+	     rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
+	   else :; fi); \
 	done
 
@@ -279,7 +250,6 @@
 	for base in $$list; do \
 	  if test -f $$base; then d=.; else d=$(srcdir); fi; \
-	  for file in `cd $$d && eval echo $$base*`; do \
+	  for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
 	    test -f $(distdir)/$$file \
-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
 	    || cp -p $$d/$$file $(distdir)/$$file; \
 	  done; \
@@ -288,12 +258,6 @@
 mostlyclean-aminfo:
 	-rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \
-	  binutils.fns binutils.ky binutils.kys binutils.ps \
-	  binutils.log binutils.pg binutils.toc binutils.tp \
-	  binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \
-	  binutils.cv binutils.cn
-
-clean-aminfo:
-
-distclean-aminfo:
+	  binutils.ky binutils.log binutils.pg binutils.ps binutils.toc \
+	  binutils.tp binutils.vr
 
 maintainer-clean-aminfo:
@@ -304,10 +268,14 @@
 	  fi; \
 	done
+
 clean-info: mostlyclean-aminfo
 
-install-man1:
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
 	$(mkinstalldirs) $(DESTDIR)$(man1dir)
-	@list='$(man1_MANS)'; \
-	l2='$(man_MANS)'; for i in $$l2; do \
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
 	  case "$$i" in \
 	    *.1*) list="$$list $$i" ;; \
@@ -319,12 +287,14 @@
 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
 	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
 	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
 	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
 	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
 	done
-
 uninstall-man1:
-	@list='$(man1_MANS)'; \
-	l2='$(man_MANS)'; for i in $$l2; do \
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
 	  case "$$i" in \
 	    *.1*) list="$$list $$i" ;; \
@@ -334,63 +304,30 @@
 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
 	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
 	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
 	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
 	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
 	done
-install-man: $(MANS)
-	@$(NORMAL_INSTALL)
-	$(MAKE) $(AM_MAKEFLAGS) install-man1
-uninstall-man:
-	@$(NORMAL_UNINSTALL)
-	$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
 tags: TAGS
 TAGS:
 
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = doc
-
-distdir: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    cp -pr $$d/$$file $(distdir)/$$file; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
-	  fi; \
-	done
-	$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-info-am: $(INFO_DEPS)
-info: info-am
-dvi-am: $(DVIS)
-dvi: dvi-am
 check-am:
 check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am: 
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
+all-am: Makefile $(MANS)
 
-install-data-am: install-man
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+install-exec: install-exec-am
 install-data: install-data-am
+uninstall: uninstall-am
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-man
-uninstall: uninstall-am
-all-am: Makefile $(MANS)
-all-redirect: all-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-	$(mkinstalldirs)  $(DESTDIR)$(mandir)/man1
-
 
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
 	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -399,38 +336,83 @@
 
 distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
 	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
 	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-mostlyclean-am:  mostlyclean-aminfo mostlyclean-generic
+clean: clean-am
 
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool mostlyclean-am
 
-clean-am:  clean-aminfo clean-generic mostlyclean-am
+distclean: distclean-am
 
-clean: clean-am
+distclean-am: clean-am distclean-generic distclean-libtool
 
-distclean-am:  distclean-aminfo distclean-generic clean-am
-	-rm -f libtool
+dvi: dvi-am
 
-distclean: distclean-am
+dvi-am: $(DVIS)
 
-maintainer-clean-am:  maintainer-clean-aminfo maintainer-clean-generic \
-		distclean-am
-	@echo "This command is intended for maintainers to use;"
-	@echo "it deletes files that may require special tools to rebuild."
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-man
+
+install-exec-am:
+
+install-info:
+
+install-info-am: $(INFO_DEPS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(infodir)
+	@list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+	    if test -f $$d/$$ifile; then \
+	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+	    else : ; fi; \
+	  done; \
+	done
+	@$(POST_INSTALL)
+	@if (install-info --version && \
+	     install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
+	  list='$(INFO_DEPS)'; \
+	  for file in $$list; do \
+	    echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+	    install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+	  done; \
+	else : ; fi
+install-man: install-man1
+
+installcheck-am:
 
 maintainer-clean: maintainer-clean-am
 
-.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
-distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man1 \
-uninstall-man1 install-man uninstall-man tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+	maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1
+
+.PHONY: all all-am check check-am clean clean-generic clean-info \
+	clean-libtool dist-info distclean distclean-generic \
+	distclean-libtool dvi dvi-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-man1 \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-aminfo \
+	maintainer-clean-generic mostlyclean mostlyclean-aminfo \
+	mostlyclean-generic mostlyclean-libtool uninstall uninstall-am \
+	uninstall-info-am uninstall-man uninstall-man1
 
 
@@ -560,5 +542,4 @@
 # We need it for the taz target in ../../Makefile.in.
 info: $(MANS)
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/nlmconv.c binutils-2.13.1/binutils/nlmconv.c
--- orig/binutils-2.13.1/binutils/nlmconv.c	Sun May 26 16:55:04 2002
+++ binutils-2.13.1/binutils/nlmconv.c	Tue Apr 29 14:17:19 2003
@@ -82,5 +82,11 @@
 /* Whether to print out debugging information (currently just controls
    whether it prints the linker command if there is one).  */
-static int debug;
+static int debug=0;
+
+/* Wheater to treat indefined symbols as an error. The conventional
+ * behaviour was to treat them as a warning only, but configure
+ * scripts need them to be treated as an error.
+ */
+static int no_undefined_symbols=0;
 
 /* The symbol table.  */
@@ -118,4 +124,5 @@
   { "output-format", required_argument, 0, 'O' }, /* Obsolete */
   { "version", no_argument, 0, 'V' },
+  { "no-undefined-symbols", no_argument, 0, 'U' },
   { NULL, no_argument, 0, 0 }
 };
@@ -212,4 +219,5 @@
   char *modname;
   char **matching;
+  int undefined_symbols=0;
 
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
@@ -237,4 +245,7 @@
 	  debug = 1;
 	  break;
+        case 'U':
+          no_undefined_symbols = 1;
+          break;
 	case 'H':
 	case 'h':
@@ -633,6 +644,10 @@
 	    }
 	  if (l == NULL)
-	    non_fatal (_("warning: symbol %s imported but not in import list"),
-		       bfd_asymbol_name (sym));
+            {
+              non_fatal (_("%ssymbol %s imported but not in import list"),
+                         no_undefined_symbols ? "" : "warning: ",
+                         bfd_asymbol_name (sym));
+              undefined_symbols ++;
+            }
 	}
 
@@ -678,4 +693,9 @@
     }
 
+  if (undefined_symbols && no_undefined_symbols)
+    {
+      fatal(_("%d symbols undefined"), undefined_symbols);
+    }
+
   if (endsym != NULL)
     {
@@ -1115,4 +1135,5 @@
   -h --help                     Display this information\n\
   -v --version                  Display the program's version\n\
+  -U --no-undefined-symbols     Treat undefined symbols as an error\n\
 "));
   if (status == 0)
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/nlmld.c binutils-2.13.1/binutils/nlmld.c
--- orig/binutils-2.13.1/binutils/nlmld.c	Thu Jan  1 01:00:00 1970
+++ binutils-2.13.1/binutils/nlmld.c	Wed Apr 30 20:11:22 2003
@@ -0,0 +1,1345 @@
+/* nlmld -- NLM linker emulation
+   Copyright 2003
+   Free Software Foundation, Inc.
+   
+   Written by Bernd Herd <info@herdsoft.com> http://www.herdsoft.com/
+
+   This file is part of GNU Binutils.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+
+/* 
+ * This program accepts command line parameter in the same way
+ * "ld" does, but processes them in netware-specific way to 
+ * call the normal "ld" and "nlmconv" with temporary files name,
+ * so in the end it behaves like a normal "ld" linker producing NLM
+ * files as its output.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <libiberty.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+#define MAX_SYMBOL_LENGTH 1024  /* Maximum length of a single symbol */
+#define MAX_LINE_LENGTH 1400    /* Maximum length of a single input line. */
+
+#define xfree(p) {if ((p)!=NULL) { free(p); }}
+
+/**
+ * Defines a list of strings.
+ */
+typedef struct
+{
+  int argc;
+  char **argv;
+} STRINGLIST, *PSTRINGLIST;
+
+
+/**
+ * Defines one module import list
+ */
+typedef struct
+{
+  /* Name of the module (for example libc) */
+  char *modulename;
+
+  /* Filename of the .imp file for nlmconv header file */
+  char *import_file_name;
+
+  /* 1 if import_file_name is a temporary file */
+  int temporary_file;
+
+  /* List of functions exported by this module */
+  STRINGLIST symbols;
+
+  /* 1 if this symbols from this module are used during link */
+  int needed;
+} MODULE;
+
+
+
+
+/**
+ * All informations collected
+ */
+typedef struct
+{
+  /* Informations on modules defined by their .imp files. */
+  MODULE * *modules;
+  
+  /* Count of entries into modules */
+  int modules_count;
+
+  /* Parameters that shall be transfered to the GNU linker "ld" */
+  STRINGLIST ldparams;
+
+  /* 1 if partial link requested */
+  int partial;
+
+  /* 1 if stripping (no debug-infos) requested */
+  int strip;
+
+  /* 1 for creation of a shared object */
+  int shared;
+
+  /* 1 if help requested */
+  int help;
+
+  /* Filename of output file. */
+  char *output_filename;
+
+  /* NLM Copyright string */
+  char *nlm_copyright;
+
+  /* NLM Description string */
+  char *nlm_description;
+
+  /* NLM Screen Name string */
+  char *nlm_screenname;
+
+  /* NLM Version number string */
+  char *nlm_version;
+
+  /* Filename of XDC file. */
+  char *xdc_filename;
+
+  /* Base diretory extracted from argv[0] */
+  char *basedirectory;
+
+  /* filename of the temporary file created by ld */
+  char *ld_output_filename;
+
+  /* filename of the temporary header file used by nlmconv */
+  char *header_file;
+
+  /* Filename of a temporary directory created for this run */
+  char *temp_directory_name;
+
+  /* Module name of the NLM to create */
+  char *nlm_creation_modulename;
+
+  /* Temporary nlm filename used to create the NLM file */
+  char *nlm_creation_filename;
+
+  /* Stack Size for NLM */
+  int stack_size;
+
+  /* 1 if verbnose informations are to be displayed on stderr */
+  int verbose;
+
+  /* 1 if temporary files shall be left after processing */
+  int leave;
+
+} APPLICATION;
+
+
+
+
+
+static
+void
+strings_init(PSTRINGLIST list)
+{
+  list->argc=0;
+  list->argv=NULL;
+}
+
+static
+void
+strings_append(PSTRINGLIST list, const char *string)
+{
+  list->argv =
+    list->argc++
+    ? (char **) xrealloc( list->argv, (list->argc+1) * sizeof(char *) )
+    : (char **) xmalloc( (list->argc+1) * sizeof(char *) );
+
+  list->argv[ list->argc-1 ] = xstrdup(string);
+  list->argv[ list->argc   ] = NULL;
+}
+
+static
+void
+strings_prepend(PSTRINGLIST list, const char *string)
+{
+  list->argv =
+    list->argc++
+    ? (char **) xrealloc( list->argv, (list->argc+1) * sizeof(char *) )
+    : (char **) xmalloc( (list->argc+1) * sizeof(char *) );
+
+  memmove(list->argv+1, list->argv, list->argc * sizeof(char *) );
+  list->argv[ 0 ] = xstrdup(string);
+  list->argv[ list->argc   ] = NULL;
+}
+
+
+/**
+ * Free a list of strings.
+ */
+static
+void
+strings_free(PSTRINGLIST list)
+{
+  while (list->argc--)
+    {
+      free(list->argv[list->argc]);
+    }
+      
+  xfree(list->argv);
+  list->argv=NULL;
+}
+
+
+
+/**
+ * Change value of a dynamically allocated string variable.
+ */
+static
+void
+setstring(char **dest, const char *value)
+{
+  if (value != NULL)
+    {
+      xfree(*dest);
+      *dest = xstrdup(value);
+    }
+}
+
+
+/**
+ * Free a MODULE struct
+ */
+static
+void
+module_free(APPLICATION *application, MODULE * module)
+{
+  if (module->import_file_name)
+    {
+      if (module->temporary_file && !application->leave)
+        {
+          remove(module->import_file_name);
+        }
+      xfree(module->import_file_name);
+    }
+
+  if (module->modulename)
+    {
+      xfree(module->modulename);
+    }
+
+  strings_free(&module->symbols);
+  free(module);
+}
+
+/**
+ * Create the name of a module from the filename of the .imp or .nlm file.
+ */
+static
+char *
+modulename_from_filename(const char *filename)
+{
+  char *buffer;
+  char *point;
+
+  buffer = xstrdup(basename(filename));
+  point = strrchr(buffer, '.');
+
+  if (point && !strcasecmp(point, ".so") && !strncasecmp(buffer, "lib", 3))
+    {
+      /* lib*.so is a special case caused by some unix-related scripts */
+      char *buffer2;
+      *point = 0;
+      buffer2 = xstrdup(buffer+3);
+      free(buffer);
+      buffer = buffer2;
+    }
+  else if (point)
+    {
+      *point = 0;
+    }
+
+  {
+    char *src=buffer;
+    char *dst=buffer;
+    
+    while (*src)
+      {
+        if (isalnum(*src))
+          {
+            *dst++ = toupper(*src);
+          }
+        src++;
+      }
+    *dst=0;
+  }
+
+  return buffer;
+}
+
+
+
+
+static
+MODULE *
+application_addmodule(APPLICATION *application, const char *import_file_name, int temporary_file)
+{
+  MODULE * module = (MODULE *) xcalloc( sizeof(MODULE), 1);
+  
+  module->modulename = modulename_from_filename(import_file_name);
+  module->import_file_name = xstrdup(import_file_name);
+  module->temporary_file = temporary_file;
+
+  /* Add the module to the application struct */
+  application->modules =
+    application->modules_count++ == 0
+    ? (MODULE * *) xmalloc( sizeof(MODULE *) )
+    : (MODULE * *) xrealloc( application->modules, application->modules_count * sizeof(MODULE *) );
+
+  application->modules [ application->modules_count-1 ] = module;
+
+  return module;
+}
+
+
+/**
+ * Add a .imp import list contents to the application
+ */
+static
+int
+addmodule(APPLICATION *application, FILE *input_file, const char *name, int temporary_file)
+{
+  PSTRINGLIST symbols = &application_addmodule(application, name, temporary_file)->symbols;
+  char line[ MAX_LINE_LENGTH ];
+
+  while (fgets(line, sizeof(line), input_file) )
+    {
+      char symbol[ MAX_SYMBOL_LENGTH ];
+      const char *src=line;
+      char *dst = symbol;
+
+      while (*src && !strchr("#;", *src))
+        {
+          /* Ignore whitespace and , */
+          while (*src && strchr("\r\n \t,", *src))
+            src++;
+          
+          /* if (name) synatax, that's prefixing, we are not interested... */
+          if (*src=='(')
+            {
+              src++;
+              while (*src && *src!=')') src++;
+              
+              if (*src==')')
+                src++;
+            }
+          else
+            {
+              /* Assume we have a symbol name */
+              while (*src && !strchr("\r\n \t,", *src) &&
+                     (dst-symbol) < (MAX_SYMBOL_LENGTH-1))
+                {
+                  if (*src == '@')
+                    {
+                      /* Was a prefix in LIB@symbolname notation... forget it */
+                      dst = symbol;
+                      src++;
+                    }
+                  else
+                    {
+                      *dst++ = *src++;
+                    }
+                }
+              *dst=0;
+
+              /* We should now have a symbol in the list. Add the name */
+              if (symbol[0])
+                {
+                  strings_append(symbols, symbol);
+                }
+            }
+ 
+          /* Ignore whitespace and , */
+          while (*src && strchr("\r\n \t,", *src))
+            src++;
+        }
+    }
+
+  return EXIT_SUCCESS;
+}
+
+
+/**
+ * Add a module from its .imp filename
+ */
+static
+int
+addimpmodule(APPLICATION *application, const char *impfilename, int temporary_file)
+{
+  FILE *input_file;
+  int result = EXIT_FAILURE;
+
+  input_file = fopen(impfilename, "r");
+  if (input_file != NULL)
+    {
+      result = addmodule(application, input_file, impfilename, temporary_file);
+
+      fclose(input_file);
+    }
+  else
+    {
+      fprintf(stderr, "nlmld: failed to open %s\n", impfilename);
+    }
+    
+  return result;
+}
+
+
+/**
+ * Add all symbols defined by the ld output to the export list 
+ * of the nlmconv header file.
+ */
+static
+int
+add_exports_to_header(APPLICATION *application, FILE *header)
+{
+  FILE *input_pipe;
+  int result = EXIT_FAILURE;
+  char *command;
+  
+  command = 
+    concat(application->basedirectory,
+           "nm "
+           " --defined-only --extern-only \"",
+           application->ld_output_filename,
+           "\"",
+           NULL);
+  
+  input_pipe = popen(command, "r");
+  free(command);
+  
+  if (input_pipe != NULL)
+    {
+      char line[MAX_LINE_LENGTH];
+      int addr;
+      char type;
+      char symbol[MAX_SYMBOL_LENGTH];
+      
+      while (fgets(line, sizeof(line), input_pipe) &&
+             sscanf(line, "%8x %c %s", &addr, &type, symbol))
+        {
+          if (strncmp(symbol, "_LibC", 5) &&
+              strncmp(symbol, "_cstart", 7) &&
+              strncmp(symbol, "_Unwind", 7) &&
+              strncmp(symbol, "__", 2) &&
+              strcmp(symbol, "_argc") &&
+              strcmp(symbol, "kLibCNLMInfo"))
+            {
+              fprintf(header, "export (%s) %s\n",
+                      application->nlm_creation_modulename,
+                      symbol);
+            }
+        }
+      
+      pclose(input_pipe);
+    }
+  else
+    {
+      fprintf(stderr, "nlmld: failed to enumerate contents of %s\n", application->ld_output_filename);
+    }
+  
+  return result;
+}
+
+
+
+/**
+ * Add a module from its .nlm filename
+ *
+ * Create a temporary .imp file, we need it for nlmconv later,
+ * and then do the normal addimpmodule, marking the imp file as
+ * temporary.
+ */
+static
+int
+addnlmmodule(APPLICATION *application, const char *nlmfilename)
+{
+  FILE *input_pipe;
+  FILE *temp_import_file;
+  int result = EXIT_FAILURE;
+  char *command;
+  char *nlm_basename = basename(nlmfilename);
+  char *temp_import_filename =
+    concat(application->temp_directory_name,
+           "/",
+           nlm_basename,
+           NULL);
+
+  command = 
+    concat(application->basedirectory,
+           "nm "
+           " --defined-only --extern-only \"",
+           nlmfilename,
+           "\"",
+           NULL);
+  
+  input_pipe = popen(command, "r");
+  free(command);
+
+  if (input_pipe != NULL)
+    {
+      temp_import_file = fopen(temp_import_filename, "w");
+      if (temp_import_file)
+        {
+          char line[MAX_LINE_LENGTH];
+          int addr;
+          char type;
+          char symbol[MAX_SYMBOL_LENGTH];
+          
+          while (fgets(line, sizeof(line), input_pipe) &&
+                 sscanf(line, "%8x %c %s", &addr, &type, symbol))
+            {
+              char *pat=strrchr(symbol, '@');
+              fprintf(temp_import_file, " %s,\n", pat ? pat+1 : symbol);
+            }
+          fclose(temp_import_file);
+          result = addimpmodule(application, temp_import_filename, 1);
+        }
+      
+      pclose(input_pipe);
+    }
+  else
+    {
+      fprintf(stderr, "failed to enumerate contents of %s\n", nlmfilename);
+    }
+
+  free(temp_import_filename);
+  
+  return result;
+}
+
+
+
+
+
+
+
+
+/**
+ * Fille application structure from the parameters passed on the command line
+ * by parsing those parameters and entering informations into the APPLCIATION structure
+ *
+ * return EXIT_SUCCESS in success
+ */
+static
+int
+application_process_commandline(APPLICATION *application, int argc, char **argv)
+{
+  int result = EXIT_SUCCESS;
+  int i;
+  for (i=1; i<argc && result==EXIT_SUCCESS; i++)
+    {
+      const char *point=strrchr(argv[i], '.');
+
+      if (!strcasecmp(argv[i], "-r") ||
+          !strcasecmp(argv[i], "-Ur"))
+        {
+          /* Partial link requested */
+          application->partial = 1;
+          strings_append(&application->ldparams, argv[i]);
+        }
+      else if (!strcasecmp(argv[i], "-s") ||
+               !strcasecmp(argv[i], "--strip"))
+        {
+          /* Don't include debug infos */
+          application->strip = 1;
+          strings_append(&application->ldparams, argv[i]);
+        }
+      else if (!strcasecmp(argv[i], "-shared"))
+        {
+          /* Create shared object (doesn't have a main()) */
+          application->shared = 1;
+        }
+      else if (!strcasecmp(argv[i], "-o") && (i+1)<argc)
+        {
+          i++;
+          application->output_filename = xstrdup(argv[i]);
+        }
+      else if (!strncasecmp(argv[i], "--output=", 9))
+        {
+          application->output_filename = xstrdup(argv[i]+9);
+        }
+      else if (!strcasecmp(argv[i], "--help") ||
+               !strcasecmp(argv[i], "-help") )
+        {
+          application->help = 1;
+          strings_append(&application->ldparams, argv[i]);
+        }
+      else if (!strcasecmp(argv[i], "--verbose") ||
+               !strcasecmp(argv[i], "-v") )
+        {
+          application->verbose = 1;
+          strings_append(&application->ldparams, argv[i]);
+        }
+      else if (!strcasecmp(argv[i], "--leave"))
+        {
+          application->leave = 1;
+        }
+      else if (!strncasecmp(argv[i], "--nlm-version=", 14)  )
+        {
+          setstring(&application->nlm_version, argv[i]+14);
+        }
+      else if (!strncasecmp(argv[i], "--nlm-copyright=", 16)  )
+        {
+          setstring(&application->nlm_copyright, argv[i]+16);
+        }
+      else if (!strncasecmp(argv[i], "--nlm-screenname=", 17)  )
+        {
+          setstring(&application->nlm_screenname, argv[i]+17);
+        }
+      else if (!strncasecmp(argv[i], "--nlm-description=", 18)  )
+        {
+          setstring(&application->nlm_description, argv[i]+18);
+        }
+      else if (!strncasecmp(argv[i], "--stack=", 8)  )
+        {
+          application->stack_size=atoi(argv[i]+8);
+        }
+      else if (point != NULL && !strcasecmp(point, ".imp") )
+        {
+          result=addimpmodule(application, argv[i], 0);
+        }
+      else if (point != NULL && !strcasecmp(point, ".nlm") )
+        {
+          result=addnlmmodule(application, argv[i]);
+        }
+      else if (point != NULL && !strcasecmp(point, ".xdc") )
+        {
+          setstring(&application->xdc_filename, argv[i]);
+        }
+      else
+        {
+          /* Unknown options, transfer to ld */
+          strings_append(&application->ldparams, argv[i]);
+        }
+    }
+
+  /* Now we know the output filename, we can define the creation module name */
+  application->nlm_creation_modulename=modulename_from_filename(application->output_filename);
+
+  return result;
+}
+
+
+/**
+ * Initialize the application structure from environment variable settings
+ */
+static
+void
+application_init_from_environemnt(APPLICATION *application, const char *argv0)
+{
+  application->stack_size = 0x10000;
+
+  setstring(&application->output_filename, "a.nlm");
+  setstring(&application->nlm_description, "GNU GCC Created NLM");
+  setstring(&application->nlm_screenname, "System Console");
+  setstring(&application->nlm_version, "1,0");
+  
+  setstring(&application->nlm_description, getenv("NLM_DESCRIPTION") );
+  setstring(&application->nlm_copyright, getenv("NLM_COPYRIGHT") );
+  setstring(&application->nlm_screenname, getenv("NLM_SCREENNAME") );
+  setstring(&application->nlm_version, getenv("NLM_VERSION") );
+
+  /* Set basedirectory to the directoryname of the directory containing
+   * nlmld, and thus also nm and ld for the i386-netware target
+   */
+  {
+    char *lastslash=NULL;
+    char *src;
+    char *buffer;
+    
+    buffer=xstrdup(argv0);
+    application->basedirectory=buffer;
+    
+    for (src=buffer; *src; src++)
+      {
+        if (strchr("/\\", *src))
+          lastslash = src;
+      }
+    if (lastslash)
+      {
+        lastslash[1]=0;
+      }
+    else
+      {
+        buffer[0]=0;
+      }
+  }
+
+  /**
+   * Choose a temporary directory for this run
+   */
+  application->temp_directory_name =
+    choose_temp_base();
+
+#ifdef WIN32
+  mkdir(application->temp_directory_name);
+#else
+  mkdir(application->temp_directory_name, S_IRUSR | S_IWUSR | S_IXUSR);
+#endif
+
+  application->xdc_filename=
+    concat(application->basedirectory,
+           "../imports/default.xdc",
+           NULL);
+  if (access(application->xdc_filename, F_OK)==-1)
+    {
+      free(application->xdc_filename);
+      application->xdc_filename=NULL;
+    }
+}
+
+
+/**
+ * get application-specific environment variable
+ */
+static
+void
+application_update_one_variable(char **dest, const char *modulename, const char *varname)
+{
+  char *fullname=
+    concat(modulename, "_NLM_", varname, NULL);
+
+  setstring(dest, getenv(fullname));
+  free(fullname);
+}
+
+
+
+/**
+ * Use NLM-Name Dependent environment variables to complete config data
+ */
+static
+void
+application_update_from_environment(APPLICATION *application)
+{
+  application_update_one_variable(&application->nlm_description, application->nlm_creation_modulename, "DESCRIPTION" );
+  application_update_one_variable(&application->nlm_copyright, application->nlm_creation_modulename, "COPYRIGHT" );
+  application_update_one_variable(&application->nlm_screenname, application->nlm_creation_modulename, "SCREENNAME" );
+  application_update_one_variable(&application->nlm_version, application->nlm_creation_modulename, "VERSION" );
+  application_update_one_variable(&application->nlm_creation_modulename, application->nlm_creation_modulename, "MODULENAME" );
+}
+
+
+
+/**
+ * Run given application.
+ *
+ * Use "pexecute" from libiberty for portability reasons
+ */
+static
+int
+exec_application(APPLICATION *application, STRINGLIST *args)
+{
+  int pid;
+  int exit_code=EXIT_FAILURE;
+  char *errmsg_fmt=NULL;
+  char *errmsg_arg=NULL;
+
+  if (application->verbose)
+    {
+      int i;
+      assert(args->argc > 0);
+      assert(args->argv != NULL);
+      fprintf(stderr, "nlmld: exec_application(");
+      for (i=0; i<args->argc; i++)
+        {
+          fprintf(stderr, "%s,", args->argv[i]);
+        }
+      fprintf(stderr, ")\n");
+    }
+
+  pid =
+    pexecute(args->argv[0],
+             args->argv,
+             "nlmld",
+             NULL,
+             &errmsg_fmt, &errmsg_arg,
+             PEXECUTE_ONE);
+
+  if (pid == -1)
+    {
+      fprintf(stderr, errmsg_fmt, errmsg_arg);
+    }
+  else
+    {
+      pid=pwait(pid, &exit_code, 0);
+      if (pid == -1)
+        {
+          fprintf(stderr, "nlmld: error %s in pwait\n", strerror (errno));
+          exit_code = EXIT_FAILURE;
+        }
+    }
+  
+  return exit_code;
+}
+
+
+
+
+
+/**
+ * Run the GNU linker with the parameters collected
+ */
+static
+int
+run_gnu_ld(APPLICATION *application)
+{
+  int ld_exit_code;
+
+  /* Partial links are done directly, others create a temp file only */
+  application->ld_output_filename = 
+    application->partial
+    ? xstrdup(application->output_filename)
+    : make_temp_file("nlmld");
+
+  if (!application->partial)
+    {
+      char *libcpre_filename;
+
+      /* only do a partial link, finalization is done by nlmconv */
+      strings_append(&application->ldparams, "-Ur");
+
+      /* libcpre.gcc.o must be the first object file on the command line */
+      libcpre_filename =
+        concat(application->basedirectory,
+               "../imports/libcpre.gcc.o",
+               NULL);
+      strings_prepend(&application->ldparams, libcpre_filename);
+      free(libcpre_filename);
+    }
+
+  /* Re-Add the output filename to the list of ld parameters */
+  strings_append(&application->ldparams, "-o");
+  strings_append(&application->ldparams, application->ld_output_filename);
+
+  /* Add the argv0 to ld parameters */
+  {
+    char *argv0ld =
+      concat(application->basedirectory,
+             "ld",
+             NULL);
+    strings_prepend(&application->ldparams, argv0ld);
+    free(argv0ld);
+  }
+
+  /* Call the ld linker */
+  ld_exit_code = exec_application(application, &application->ldparams);
+
+  if (application->verbose)
+    {
+      fprintf(stderr, "ld returned exit code %d\n", ld_exit_code);
+    }
+
+  return ld_exit_code;
+}
+
+/**
+ * Move a file to a different location
+ */
+static
+int
+move_file(const char *oldname, const char *newname)
+{
+  int result;
+  result =
+    rename(oldname, newname);
+
+  if (result==-1)
+    {
+#ifndef __netware__
+      if (errno==EXDEV)
+#endif
+        {
+        /* FIXME: No good... any better idea? */
+          FILE *fin;
+          FILE *fout;
+          
+          fin=fopen(oldname, "rb");
+          if (fin != NULL)
+            {
+              fout=fopen(newname, "wb");
+              if (fout)
+                {
+                  int ch;
+                  while (EOF!=(ch=fgetc(fin)))
+                    fputc(ch, fout);
+
+                  result=ferror(fout) ? -1 : 0;
+                  fclose(fout);
+                }
+              fclose(fin);
+              
+              if (!result)
+                {
+                  remove(oldname);
+                }
+            }
+        }
+    }
+  
+  return result;
+}
+
+
+
+
+/**
+ * run the nlmconv program with the given parameters
+ */
+static
+int
+run_nlmconv(APPLICATION *application)
+{
+  int exit_code = EXIT_FAILURE;
+  STRINGLIST nlmconv_params;
+  FILE *header;
+  char oldworkdir[512];
+
+  /* Build filename for linker definition file. */
+  application->header_file=concat(application->temp_directory_name, "/nlmld.def", NULL);
+  strings_init(&nlmconv_params);
+
+  /* Set the module name of the NLM to create */
+  application->nlm_creation_filename =
+    concat(application->temp_directory_name, "/", application->nlm_creation_modulename, ".nlm", NULL);
+
+  /* First parameter is nlmconv executable filename */
+  {
+    char *nlmconv_filename =
+      concat(application->basedirectory,
+             "nlmconv",
+             NULL);
+    strings_append(&nlmconv_params, nlmconv_filename);
+    free(nlmconv_filename);
+  }
+
+  strings_append(&nlmconv_params, "--no-undefined-symbols");
+  strings_append(&nlmconv_params, "-T");
+  strings_append(&nlmconv_params, application->header_file);
+  header=fopen(application->header_file, "w");
+  if (header)
+    {
+      fprintf(header, 
+              "pseudopreemption\n"
+              "threadname \"main thread\"\n"
+              "type 0 # Ordinary NLM\n"
+              "input %s\n"
+              "output %s.nlm\n"
+              "start _LibCPrelude\n"
+              "exit _LibCPostlude\n"
+              "description \"%s\"\n"
+              "screenname \"%s\"\n"
+              "version %s\n"
+              ,
+              application->ld_output_filename,
+              application->nlm_creation_modulename,
+              application->nlm_description,
+              application->nlm_screenname,
+              application->nlm_version              
+              );
+
+      if (application->nlm_copyright)
+        {
+          fprintf(header, "copyright \"%s\"\n", application->nlm_copyright);
+        }
+      if (!application->strip)
+        {
+          fprintf(header, "debug\n");
+        }
+      if (application->xdc_filename)
+        {
+          fprintf(header, "xdcdata %s\n", application->xdc_filename);
+        }
+      if (application->shared)
+        {
+          fprintf(header, "autounload\n");
+        }
+      fprintf(header, "stack %d\n", application->stack_size);
+
+      /* Add the required import list files */
+      {
+        int i;
+        for (i=0; i<application->modules_count; i++)
+          if (application->modules[i]->needed)
+            {
+              fprintf(header,
+                      "import @%s\n"
+                      "module %s\n",
+                      application->modules[i]->import_file_name,
+                      application->modules[i]->modulename);
+            }
+      }
+      
+      if (application->shared)
+        {
+          /* Export all symbols from the new NLM */
+          add_exports_to_header(application, header);
+        }
+      fclose(header);
+
+      /* Modulename stored in NLM gets confused if directory name used so
+       * netware warns that module name and filename are not identical
+       */
+      getcwd(oldworkdir, sizeof(oldworkdir));
+      chdir(application->temp_directory_name);
+      exit_code = exec_application(application, &nlmconv_params);
+      chdir(oldworkdir);
+      
+      if (exit_code == EXIT_SUCCESS)
+        {
+          remove(application->output_filename);
+
+          if (move_file(application->nlm_creation_filename,
+                        application->output_filename)==-1)
+            {
+              fprintf(stderr, 
+                      "error: failed to rename %s to %s reason %s\n",
+                      application->nlm_creation_filename,
+                      application->output_filename,
+                      strerror(errno));
+              
+              exit_code = EXIT_FAILURE;
+            }
+        }
+      else
+        {
+          if (!application->leave)
+            {
+              remove(application->nlm_creation_filename);
+            }
+        }
+    }
+
+  return exit_code;
+}
+
+
+
+
+
+
+/**
+ * uninitialize the application, deleting temp files etc.
+ */
+static
+void
+application_free(APPLICATION *application)
+{
+  if (application->ld_output_filename != NULL)
+    {
+      if (!application->partial && !application->leave)
+        {
+          /* Delete the temporary file used between ld and nlmconv passes */
+          remove(application->ld_output_filename);
+        }
+      free(application->ld_output_filename);
+    }
+  
+  if (application->header_file)
+    {
+      if (!application->leave)
+        {
+          remove(application->header_file);
+        }
+      free(application->header_file);
+    }
+
+  strings_free(&application->ldparams);
+
+  if (application->modules != NULL)
+    {
+      int i;
+      for (i=0; i<application->modules_count; i++)
+        {
+          module_free(application, application->modules[i]);
+        }
+      free(application->modules);
+    }
+
+  rmdir(application->temp_directory_name);
+  free(application->temp_directory_name);
+
+  xfree(application->nlm_creation_filename);
+  xfree(application->nlm_creation_modulename);
+  xfree(application->xdc_filename);
+  xfree(application->nlm_version);
+  xfree(application->nlm_screenname);
+  xfree(application->nlm_description);
+  xfree(application->nlm_copyright);
+  xfree(application->output_filename);
+}
+
+
+
+/**
+ * Collect the list of default import files in the imports directory.
+ * Make sure "libc.imp" is the last resort only, so functions may
+ * easily be overwritten by the user
+ */
+static
+void
+collect_default_modules(APPLICATION *application)
+{
+  char *imports_directory_name;
+
+  DIR *imports_directory;
+
+  imports_directory_name =
+    concat(application->basedirectory,
+           "../imports",
+           NULL);
+ 
+  imports_directory = opendir(imports_directory_name);
+  if (imports_directory != NULL)
+    {
+      struct dirent *entry;
+      while (NULL!=(entry=readdir(imports_directory)))
+        if (strcasecmp(entry->d_name, "libc.imp")) // LAST resort
+        {
+          char *full_name =
+            concat(imports_directory_name,
+                   "/",
+                   entry->d_name,
+                   NULL);
+
+
+          const char *point=strrchr(entry->d_name, '.');
+          if (!strcasecmp(point, ".imp"))
+            {
+              addimpmodule(application, full_name, 0);
+            }
+          else if (!strcasecmp(point, ".nlm"))
+            {
+              addnlmmodule(application, full_name);
+            }
+
+          free(full_name);
+        }
+
+      closedir(imports_directory);
+
+      {
+        char *full_name =
+          concat(imports_directory_name,
+                 "/libc.imp",
+                 NULL);
+        
+        addimpmodule(application, full_name, 0);
+        free(full_name);
+      }
+    }
+  else
+    {
+      fprintf(stderr, "warning: cannot open directory %s, no default import lists available\n", imports_directory_name);
+    }
+  
+  free(imports_directory_name);
+}
+
+
+/**
+ * Compare function for bsearch and qsort for an array of char *
+ */
+static
+int
+strcmppp (const void *a, const void *b)
+{
+  const char **pa = (const char **)a;
+  const char **pb = (const char **)b;
+  return strcmp(*pa, *pb);
+}
+
+/**
+ * Sort the list of symbols from all modules.
+ */
+static
+void
+sort_symbol_lists(APPLICATION *application)
+{
+  int i;
+  for (i=0; i<application->modules_count; i++)
+    if (application->modules[i]->symbols.argc != 0)
+      {
+        qsort(application->modules[i]->symbols.argv,
+              application->modules[i]->symbols.argc,
+              sizeof(char *),
+              strcmppp);
+      }
+}
+
+
+/**
+ * Choose the list of modules that need to be linghed against
+ * from the list of modules available in the application object
+ * by enumerating the undefined symbol of the ld output file
+ * using the "nm" program.
+ */
+static
+int
+choose_import_modules(APPLICATION *application)
+{
+  FILE *input_pipe;
+  int result = EXIT_FAILURE;
+  char *command;
+  command = 
+    concat(application->basedirectory,
+           "nm "
+           " --undefined-only \"",
+           application->ld_output_filename,
+           "\"",
+           NULL);
+
+  if (application->verbose)
+    {
+      fprintf(stderr, "popen(%s)\n", command);
+    }
+  input_pipe = popen(command, "r");
+
+  free(command);
+
+  if (input_pipe != NULL)
+    {
+      char symbol[MAX_LINE_LENGTH];
+
+      result = EXIT_SUCCESS;
+      while (fgets(symbol, sizeof(symbol), input_pipe))
+        {
+          int found=0;
+          int i;
+
+          int len=strlen(symbol);
+          while (len && strchr("\r\n", symbol[len-1])!=NULL)
+            symbol[--len]=0;
+
+          if (application->verbose)
+            {
+              fprintf(stderr, "symbol: %s ", symbol);
+            }
+
+          for (i=0; i<application->modules_count && !found; i++)
+            {
+              MODULE * module=application->modules[i];
+              char *psymbol = symbol;
+              if (bsearch(&psymbol, module->symbols.argv, module->symbols.argc, sizeof(char *), strcmppp))
+                {
+                  module->needed =
+                    found = 1;
+
+                  if (application->verbose)
+                    {
+                      fprintf(stderr, " -> %s", module->modulename);
+                    }
+                }
+            }
+
+          if (application->verbose)
+            {
+              fprintf(stderr, "\n");
+            }
+          
+          if (!found &&
+              !strcasecmp(symbol, "_edata") && /* ?? */
+              !strcasecmp(symbol, "_end")) /* ?? */
+            {
+              fprintf(stderr, "nlmld: warning: cannot find module source for symbol %s\n", symbol);
+            }
+        }
+      pclose(input_pipe);
+    }
+  else
+    {
+      fprintf(stderr, "nlmld: failed to enumerate required symbols of %s reason %s (%d)\n", 
+              application->ld_output_filename,
+              strerror(errno), errno);
+    }
+
+  return result;
+}
+
+
+/**
+ * display usage informations
+ */
+static
+void
+usage(void)
+{
+  printf("Usage: nlmld [option] file...\n"
+         "Netware NLM Linker wrapper\n"
+         "Options:\n"
+         "Most options understood by the GNU linker \"ld\", see \"ld --help\"\n"
+         "--nlm-decription=\"description text\"\n"
+         "--nlm-copyright=\"copyright text\"\n"
+         "--nlm-version=mayor,minor\n"
+         "--nlm-screenname=\"screen name string\"\n"
+         );
+}
+
+
+
+
+int
+main(int argc, char **argv)
+{
+  APPLICATION application;
+  int result = EXIT_SUCCESS;
+
+  xmalloc_set_program_name( argv[0] );
+
+  memset(&application, 0, sizeof(application));
+  application_init_from_environemnt(&application, argv[0]);
+  result = application_process_commandline(&application, argc, argv);
+
+  if (result == EXIT_SUCCESS && !application.help)
+    {
+      application_update_from_environment(&application);
+      result = run_gnu_ld(&application);
+
+      if (result == EXIT_SUCCESS &&
+          !application.partial)
+        {
+          collect_default_modules(&application);
+          sort_symbol_lists(&application);
+          choose_import_modules(&application);
+
+          result = run_nlmconv(&application);
+        }
+    }
+  else
+    {
+      usage();
+    }
+  
+  application_free(&application);
+
+  return result;
+}
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/rename.c binutils-2.13.1/binutils/rename.c
--- orig/binutils-2.13.1/binutils/rename.c	Thu May 23 06:11:56 2002
+++ binutils-2.13.1/binutils/rename.c	Tue Apr 29 12:01:03 2003
@@ -156,5 +156,5 @@
   exists = lstat (to, &s) == 0;
 
-#if defined (_WIN32) && !defined (__CYGWIN32__)
+#if (defined (_WIN32) && !defined (__CYGWIN32__)) || defined(__netware__)
   /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but
      fail instead.  Also, chown is not present.  */
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/binutils/strings.c binutils-2.13.1/binutils/strings.c
--- orig/binutils-2.13.1/binutils/strings.c	Sat May 25 14:51:38 2002
+++ binutils-2.13.1/binutils/strings.c	Tue Apr 29 12:01:03 2003
@@ -80,5 +80,7 @@
 #endif
 #if O_BINARY
+#ifdef HACE_IO_H
 #include <io.h>
+#endif
 #define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
 #endif
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/configure.in binutils-2.13.1/configure.in
--- orig/binutils-2.13.1/configure.in	Thu Nov  7 23:39:59 2002
+++ binutils-2.13.1/configure.in	Tue Apr 29 12:08:18 2003
@@ -289,5 +289,5 @@
     ;;
   *-*-netware)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libgloss ${libgcj}"
     ;;
   *-*-rtems*)
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/gprof/gmon_io.h binutils-2.13.1/gprof/gmon_io.h
--- orig/binutils-2.13.1/gprof/gmon_io.h	Fri Feb  1 09:24:16 2002
+++ binutils-2.13.1/gprof/gmon_io.h	Tue Apr 29 12:01:03 2003
@@ -35,5 +35,7 @@
 #endif
 #if O_BINARY
+#ifdef HAVE_IO_H
 #include <io.h>
+#endif
 #define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
 #endif
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/include/ChangeLog binutils-2.13.1/include/ChangeLog
--- orig/binutils-2.13.1/include/ChangeLog	Mon Oct 28 19:45:51 2002
+++ binutils-2.13.1/include/ChangeLog	Tue Apr 29 12:01:03 2003
@@ -1,2 +1,6 @@
+2003-04-24  Bernd Herd <info@herdsoft.com>
+	* getopt.h:  for netware host don't declare optarg, optind, opterr and
+	optopt, include <unistd.h> instead, having incompatible declarations.
+
 2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/include/filenames.h binutils-2.13.1/include/filenames.h
--- orig/binutils-2.13.1/include/filenames.h	Tue Oct 16 14:47:31 2001
+++ binutils-2.13.1/include/filenames.h	Tue Apr 29 12:01:03 2003
@@ -27,5 +27,5 @@
 #define FILENAMES_H
 
-#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined(__netware__)
 
 #ifndef HAVE_DOS_BASED_FILE_SYSTEM
@@ -38,5 +38,9 @@
    want to know whether to prepend the current working directory to
    a file name, which should not be done with a name like d:foo.  */
+#ifdef __netware__
 #define IS_ABSOLUTE_PATH(f)	(IS_DIR_SEPARATOR((f)[0]) || (((f)[0]) && ((f)[1] == ':')))
+#else
+#define IS_ABSOLUTE_PATH(f)	(IS_DIR_SEPARATOR((f)[0]) || strchr((f),':')!=NULL)
+#endif
 #define FILENAME_CMP(s1, s2)	strcasecmp(s1, s2)
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/include/getopt.h binutils-2.13.1/include/getopt.h
--- orig/binutils-2.13.1/include/getopt.h	Mon Jun 24 19:39:28 2002
+++ binutils-2.13.1/include/getopt.h	Tue Apr 29 12:01:03 2003
@@ -28,4 +28,11 @@
 #endif
 
+#ifdef __netware__
+  /* for netware host don't declare optarg, optind, opterr and
+   * optopt, include <unistd.h> instead, having incompatible declarations.
+   */
+# include <unistd.h>
+#endif
+
 /* For communication from `getopt' to the caller.
    When `getopt' finds an option that takes an argument,
@@ -34,5 +41,7 @@
    each non-option ARGV-element is returned here.  */
 
+#ifndef __netware__
 extern char *optarg;
+#endif
 
 /* Index in ARGV of the next element to be scanned.
@@ -48,14 +57,20 @@
    how much of ARGV has been scanned so far.  */
 
+#ifndef __netware__
 extern int optind;
+#endif
 
 /* Callers store zero here to inhibit the error message `getopt' prints
    for unrecognized options.  */
 
+#ifndef __netware__
 extern int opterr;
+#endif
 
 /* Set to an option character which was unrecognized.  */
 
+#ifndef __netware__
 extern int optopt;
+#endif
 
 /* Describe the long-named options requested by the application.
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/ld/ChangeLog binutils-2.13.1/ld/ChangeLog
--- orig/binutils-2.13.1/ld/ChangeLog	Wed Oct 30 17:29:45 2002
+++ binutils-2.13.1/ld/ChangeLog	Tue Apr 29 12:01:03 2003
@@ -1,2 +1,5 @@
+2003-04-15  Bernd Herd <info@herdsoft.com>
+	* scripttempl/nw.sc: Added support for C++ linking on Netware
+
 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/ld/configure binutils-2.13.1/ld/configure
--- orig/binutils-2.13.1/ld/configure	Fri May 31 06:33:55 2002
+++ binutils-2.13.1/ld/configure	Tue Apr 29 12:01:03 2003
@@ -1646,5 +1646,5 @@
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj) ;;
+      *.$ac_ext | *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
@@ -3124,5 +3124,5 @@
 fi
 
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
@@ -3256,22 +3256,9 @@
 #include <sys/mman.h>
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
@@ -3381,5 +3368,5 @@
 
 EOF
-if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
@@ -3409,15 +3396,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3412: checking for $ac_hdr" >&5
+echo "configure:3399: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
+#line 3404 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -3449,10 +3436,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3452: checking for $ac_func" >&5
+echo "configure:3439: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3457 "configure"
+#line 3444 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -3477,5 +3464,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -3506,10 +3493,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3509: checking for $ac_func" >&5
+echo "configure:3496: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3514 "configure"
+#line 3501 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -3534,5 +3521,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -3568,10 +3555,10 @@
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3571: checking for LC_MESSAGES" >&5
+echo "configure:3558: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3576 "configure"
+#line 3563 "configure"
 #include "confdefs.h"
 #include <locale.h>
@@ -3580,5 +3567,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
@@ -3601,5 +3588,5 @@
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3604: checking whether NLS is requested" >&5
+echo "configure:3591: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
@@ -3621,5 +3608,5 @@
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3624: checking whether included gettext is requested" >&5
+echo "configure:3611: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
@@ -3640,15 +3627,15 @@
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3643: checking for libintl.h" >&5
+echo "configure:3630: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3648 "configure"
+#line 3635 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -3667,10 +3654,10 @@
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3670: checking for gettext in libc" >&5
+echo "configure:3657: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3675 "configure"
+#line 3662 "configure"
 #include "confdefs.h"
 #include <libintl.h>
@@ -3679,5 +3666,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
@@ -3695,5 +3682,5 @@
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3698: checking for bindtextdomain in -lintl" >&5
+echo "configure:3685: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -3703,5 +3690,5 @@
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3706 "configure"
+#line 3693 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -3714,5 +3701,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -3730,10 +3717,10 @@
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3733: checking for gettext in libintl" >&5
+echo "configure:3720: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3738 "configure"
+#line 3725 "configure"
 #include "confdefs.h"
 
@@ -3742,5 +3729,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libintl=yes
@@ -3770,5 +3757,5 @@
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3773: checking for $ac_word" >&5
+echo "configure:3760: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3804,10 +3791,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3807: checking for $ac_func" >&5
+echo "configure:3794: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3812 "configure"
+#line 3799 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -3832,5 +3819,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -3859,5 +3846,5 @@
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3862: checking for $ac_word" >&5
+echo "configure:3849: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3895,5 +3882,5 @@
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3898: checking for $ac_word" >&5
+echo "configure:3885: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3927,5 +3914,5 @@
 
 		cat > conftest.$ac_ext <<EOF
-#line 3930 "configure"
+#line 3917 "configure"
 #include "confdefs.h"
 
@@ -3935,5 +3922,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
@@ -3967,5 +3954,5 @@
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3970: checking for $ac_word" >&5
+echo "configure:3957: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4001,5 +3988,5 @@
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4004: checking for $ac_word" >&5
+echo "configure:3991: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4037,5 +4024,5 @@
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4040: checking for $ac_word" >&5
+echo "configure:4027: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4127,5 +4114,5 @@
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4130: checking for catalogs to be installed" >&5
+echo "configure:4117: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
@@ -4155,15 +4142,15 @@
 	 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4158: checking for linux/version.h" >&5
+echo "configure:4145: checking for linux/version.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4163 "configure"
+#line 4150 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -4230,5 +4217,5 @@
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4233: checking for executable suffix" >&5
+echo "configure:4220: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4240,8 +4227,8 @@
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:4230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj) ;;
+      *.$ac_ext | *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
@@ -4266,5 +4253,5 @@
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4269: checking for $ac_word" >&5
+echo "configure:4256: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4302,5 +4289,5 @@
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4305: checking for $ac_word" >&5
+echo "configure:4292: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4335,5 +4322,5 @@
 set dummy flex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4338: checking for $ac_word" >&5
+echo "configure:4325: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4369,5 +4356,5 @@
   esac
   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:4372: checking for yywrap in -l$ac_lib" >&5
+echo "configure:4359: checking for yywrap in -l$ac_lib" >&5
 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -4377,5 +4364,5 @@
 LIBS="-l$ac_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4380 "configure"
+#line 4367 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4388,5 +4375,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -4411,5 +4398,5 @@
 
 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:4414: checking lex output file root" >&5
+echo "configure:4401: checking lex output file root" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4432,5 +4419,5 @@
 
 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:4435: checking whether yytext is a pointer" >&5
+echo "configure:4422: checking whether yytext is a pointer" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4444,5 +4431,5 @@
 LIBS="$LIBS $LEXLIB"
 cat > conftest.$ac_ext <<EOF
-#line 4447 "configure"
+#line 4434 "configure"
 #include "confdefs.h"
 `cat $LEX_OUTPUT_ROOT.c`
@@ -4451,5 +4438,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_prog_lex_yytext_pointer=yes
@@ -4474,5 +4461,5 @@
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4477: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4464: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
@@ -4508,15 +4495,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4511: checking for $ac_hdr" >&5
+echo "configure:4498: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4516 "configure"
+#line 4503 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -4547,10 +4534,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4550: checking for $ac_func" >&5
+echo "configure:4537: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4555 "configure"
+#line 4542 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -4575,5 +4562,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -4604,10 +4591,10 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4607: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4594: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4612 "configure"
+#line 4599 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
@@ -4617,5 +4604,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
@@ -4642,5 +4629,5 @@
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4645: checking for opendir in -ldir" >&5
+echo "configure:4632: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -4650,5 +4637,5 @@
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4653 "configure"
+#line 4640 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4661,5 +4648,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -4683,5 +4670,5 @@
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4686: checking for opendir in -lx" >&5
+echo "configure:4673: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -4691,5 +4678,5 @@
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4694 "configure"
+#line 4681 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4702,5 +4689,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -4727,5 +4714,5 @@
 
 case "${host}" in
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-netware)
   cat >> confdefs.h <<\EOF
 #define USE_BINARY_FOPEN 1
@@ -4735,10 +4722,10 @@
 
 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4738: checking whether strstr must be declared" >&5
+echo "configure:4725: checking whether strstr must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4743 "configure"
+#line 4730 "configure"
 #include "confdefs.h"
 
@@ -4761,5 +4748,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strstr=no
@@ -4782,10 +4769,10 @@
 
 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4785: checking whether free must be declared" >&5
+echo "configure:4772: checking whether free must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4790 "configure"
+#line 4777 "configure"
 #include "confdefs.h"
 
@@ -4808,5 +4795,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_free=no
@@ -4829,10 +4816,10 @@
 
 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4832: checking whether sbrk must be declared" >&5
+echo "configure:4819: checking whether sbrk must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4837 "configure"
+#line 4824 "configure"
 #include "confdefs.h"
 
@@ -4855,5 +4842,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_sbrk=no
@@ -4876,10 +4863,10 @@
 
 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4879: checking whether getenv must be declared" >&5
+echo "configure:4866: checking whether getenv must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4884 "configure"
+#line 4871 "configure"
 #include "confdefs.h"
 
@@ -4902,5 +4889,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_getenv=no
@@ -4923,10 +4910,10 @@
 
 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:4926: checking whether environ must be declared" >&5
+echo "configure:4913: checking whether environ must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4931 "configure"
+#line 4918 "configure"
 #include "confdefs.h"
 
@@ -4949,5 +4936,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_environ=no
@@ -4977,10 +4964,10 @@
 # support string concatenation.
 echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
-echo "configure:4980: checking whether ANSI C string concatenation works" >&5
+echo "configure:4967: checking whether ANSI C string concatenation works" >&5
 if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4985 "configure"
+#line 4972 "configure"
 #include "confdefs.h"
 
@@ -4989,5 +4976,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ld_cv_string_concatenation=yes
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/ld/scripttempl/nw.sc binutils-2.13.1/ld/scripttempl/nw.sc
--- orig/binutils-2.13.1/ld/scripttempl/nw.sc	Thu Nov 22 10:08:05 2001
+++ binutils-2.13.1/ld/scripttempl/nw.sc	Tue Apr 29 12:01:03 2003
@@ -21,4 +21,28 @@
 # when specifying the start address of the next.
 #
+
+#  Many sections come in three flavours.  There is the 'real' section,
+#  like ".data".  Then there are the per-procedure or per-variable
+#  sections, generated by -ffunction-sections and -fdata-sections in GCC,
+#  and useful for --gc-sections, which for a variable "foo" might be
+#  ".data.foo".  Then there are the linkonce sections, for which the linker
+#  eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
+#  The exact correspondences are:
+#
+#  Section	Linkonce section
+#  .text	.gnu.linkonce.t.foo
+#  .rodata	.gnu.linkonce.r.foo
+#  .data	.gnu.linkonce.d.foo
+#  .bss		.gnu.linkonce.b.foo
+#  .sdata	.gnu.linkonce.s.foo
+#  .sbss	.gnu.linkonce.sb.foo
+#  .sdata2	.gnu.linkonce.s2.foo
+#  .sbss2	.gnu.linkonce.sb2.foo
+#  .debug_info	.gnu.linkonce.wi.foo
+#  .tdata	.gnu.linkonce.td.foo
+#  .tbss	.gnu.linkonce.tb.foo
+#
+#  Each of these can also have corresponding .rel.* and .rela.* sections.
+
 test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
 test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
@@ -48,9 +72,9 @@
   .dynsym      ${RELOCATING-0} : { *(.dynsym)		}
   .dynstr      ${RELOCATING-0} : { *(.dynstr)		}
-  .rel.text    ${RELOCATING-0} : { *(.rel.text)		}
+  .rel.text    ${RELOCATING-0} : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
   .rela.text   ${RELOCATING-0} : { *(.rela.text) 	}
-  .rel.data    ${RELOCATING-0} : { *(.rel.data)		}
-  .rela.data   ${RELOCATING-0} : { *(.rela.data) 	}
-  .rel.rodata  ${RELOCATING-0} : { *(.rel.rodata) 	}
+  .rel.data    ${RELOCATING-0} : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
+  .rela.data   ${RELOCATING-0} : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
+  .rel.rodata  ${RELOCATING-0} : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
   .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) 	}
   .rel.got     ${RELOCATING-0} : { *(.rel.got)		}
@@ -69,5 +93,6 @@
   {
     ${RELOCATING+${TEXT_START_SYMBOLS}}
-    *(.text)
+    *(.text .stub  .text.* .gnu.linkonce.t.*)
+    ${CONSTRUCTING+	. = ALIGN(4);}
     ${CONSTRUCTING+	__CTOR_LIST__ = .;}
     ${CONSTRUCTING+	LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)}
@@ -86,7 +111,8 @@
   .ctors   ${RELOCATING-0} : { *(.ctors)   }
   .dtors   ${RELOCATING-0} : { *(.dtors)   }
-  .rodata  ${RELOCATING-0} : { *(.rodata)  }
+  .rodata  ${RELOCATING-0} : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
   .rodata1 ${RELOCATING-0} : { *(.rodata1) }
   ${OTHER_READONLY_SECTIONS}
+  .eh_frame_hdr : { *(.eh_frame_hdr) }
 
   /* Read-write section, merged into data segment: */
@@ -95,11 +121,26 @@
   {
     ${RELOCATING+${DATA_START_SYMBOLS}}
-    *(.data)
+    *(.data .data.* .gnu.linkonce.d.*)
     ${CONSTRUCTING+CONSTRUCTORS}
+
+    ${CONSTRUCTING+	. = ALIGN(4);}
+
+    *(.gcc_exc*)
+
+    ${CONSTRUCTING+	. = ALIGN(4);}
+    __EH_FRAME_BEGIN__ = . ;
+    *(.eh_fram*)
+    __EH_FRAME_END__ = . ;
+    LONG(0);
   }
   .data1 ${RELOCATING-0} : { *(.data1) }
+  .tdata	${RELOCATING-0} : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
+  .tbss		${RELOCATING-0} : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+/*  .eh_frame     ${RELOCATING-0} : { KEEP (*(.eh_frame)) } */
+/*  .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } */
   ${OTHER_READWRITE_SECTIONS}
   .got         ${RELOCATING-0} : { *(.got.plt) *(.got) }
   .dynamic     ${RELOCATING-0} : { *(.dynamic) }
+
   ${DATA_PLT+${PLT}}
   /* We want the small data sections together, so single-instruction offsets
@@ -115,14 +156,54 @@
   {
    *(.dynbss)
-   *(.bss)
+   *(.bss .bss.* .gnu.linkonce.b.*)
    *(COMMON)
+   /* Align here to ensure that the .bss section occupies space up to
+      _end.  Align after .bss to ensure correct alignment even if the
+      .bss section disappears because there are no input sections.  */
+   ${RELOCATING+. = ALIGN(4);}
   }
   ${RELOCATING+_end = . ;}
   ${RELOCATING+PROVIDE (end = .);}
 
-  /* These are needed for ELF backends which have not yet been
-     converted to the new style linker.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
+  /* Stabs debugging sections.  */
+  .stab          0 : { *(.stab) }
+  .stabstr       0 : { *(.stabstr) }
+  .stab.excl     0 : { *(.stab.excl) }
+  .stab.exclstr  0 : { *(.stab.exclstr) }
+  .stab.index    0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+
+  .comment       0 : { *(.comment) }
+
+  /* DWARF debug sections.
+     Symbols in the DWARF debugging sections are relative to the beginning
+     of the section so we begin them at 0.  */
+
+  /* DWARF 1 */
+  .debug          0 : { *(.debug) }
+  .line           0 : { *(.line) }
+
+  /* GNU DWARF 1 extensions */
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+
+  /* DWARF 1.1 and DWARF 2 */
+  .debug_aranges  0 : { *(.debug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames) }
+
+  /* DWARF 2 used by -ggdb */
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
+  .debug_abbrev   0 : { *(.debug_abbrev) }
+  .debug_line     0 : { *(.debug_line) }
+  .debug_frame    0 : { *(.debug_frame) }
+  .debug_str      0 : { *(.debug_str) }
+  .debug_loc      0 : { *(.debug_loc) }
+  .debug_macinfo  0 : { *(.debug_macinfo) }
+
+  /* SGI/MIPS DWARF 2 extensions */
+  .debug_weaknames 0 : { *(.debug_weaknames) }
+  .debug_funcnames 0 : { *(.debug_funcnames) }
+  .debug_typenames 0 : { *(.debug_typenames) }
+  .debug_varnames  0 : { *(.debug_varnames) }
 
   ${OTHER_SECTIONS}
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/Makefile.in binutils-2.13.1/libiberty/Makefile.in
--- orig/binutils-2.13.1/libiberty/Makefile.in	Mon Jul  1 20:02:30 2002
+++ binutils-2.13.1/libiberty/Makefile.in	Tue Apr 29 12:01:03 2003
@@ -126,5 +126,5 @@
 # (alphabetical), and add them to REQUIRED_OFILES, or
 # CONFIGURED_OFILES and funcs in configure.in.
-CFILES = alloca.c argv.c asprintf.c atexit.c				\
+CFILES = access.c alloca.c argv.c asprintf.c atexit.c			\
 	basename.c bcmp.c bcopy.c bsearch.c bzero.c			\
 	calloc.c choose-temp.c clock.c concat.c cp-demangle.c		\
@@ -135,9 +135,9 @@
 	hashtab.c hex.c							\
 	index.c insque.c						\
-	lbasename.c							\
+	lbasename.c lstat.c						\
 	make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c	\
-	 memset.c mkstemps.c						\
+	 memset.c mktemp.c mkstemps.c					\
 	objalloc.c obstack.c						\
-	partition.c pexecute.c putenv.c					\
+	partition.c pexecute.c popen.c putenv.c				\
 	random.c regex.c rename.c rindex.c				\
 	safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c		\
@@ -171,5 +171,5 @@
 # $funcs or EXTRA_OFILES.  This list exists here only for "make
 # maint-missing" and "make check".
-CONFIGURED_OFILES = asprintf.o atexit.o					\
+CONFIGURED_OFILES = access.c asprintf.o atexit.o			\
 	basename.o bcmp.o bcopy.o bsearch.o bzero.o			\
 	calloc.o clock.o copysign.o					\
@@ -177,7 +177,8 @@
 	ffs.o								\
 	getcwd.o getpagesize.o						\
-	index.o insque.o						\
+	index.o insque.o lstat.o					\
 	memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o	\
-	putenv.o							\
+	mktemp.o                                                        \
+	popen.o putenv.o						\
 	random.o rename.o rindex.o					\
 	setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o		\
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/access.c binutils-2.13.1/libiberty/access.c
--- orig/binutils-2.13.1/libiberty/access.c	Thu Jan  1 01:00:00 1970
+++ binutils-2.13.1/libiberty/access.c	Tue Apr 29 12:01:03 2003
@@ -0,0 +1,73 @@
+/* access.c -- test file accessabiulity for netware 
+   NetWares libc implementation as of 04.April 2003 of "access" has a bug to never
+   return X_OK as possible even if execution of a file is permitted. -- Bernd Herd
+
+   The code does only incomplete tests of the permissions.
+   It might sometimes return access available which is not available.
+
+   Using this code on unix in a suid program would be a security hazard!
+
+
+   This file is part of the libiberty library.
+   Libiberty is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   Libiberty is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+
+#include <unistd.h>
+#include <errno.h>
+#include <sys/stat.h>
+
+#ifdef __netware__ /* Using this code on unix in a suid program would be a security hazard! */
+
+int          access   ( const char *path, int mode )
+{
+  int result = 0; /* By default assume access allowed */
+  struct stat st;
+
+  if (stat(path, &st)==0)
+    {
+      if ((mode & X_OK)!=0)
+        {
+          result = 
+            /* Assume read permission to be sufficient for execute */
+            (st.st_mode & (S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH))!=0 || 
+            
+            /* On unix by convention a directory also has execution permission 
+             * this code might not be neccessary 
+             */
+            S_ISDIR(st.st_mode)
+            ? 0
+            : -1;
+        }
+      if (!result & ((mode & W_OK)!=0))
+        {
+          result = 
+            /* Test for some write permission */
+            (st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))!=0
+            ? 0
+            : -1;
+        }
+      if (result == -1)
+        errno = EACCES;
+    }
+  else
+    {
+      result = -1;
+      errno = ENOENT;
+    }
+
+  return result;
+}
+#endif
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/config/mh-netware binutils-2.13.1/libiberty/config/mh-netware
--- orig/binutils-2.13.1/libiberty/config/mh-netware	Thu Jan  1 01:00:00 1970
+++ binutils-2.13.1/libiberty/config/mh-netware	Tue Apr 29 12:01:03 2003
@@ -0,0 +1 @@
+EXTRA_OFILES=lstat.o access.o mktemp.o popen.o
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/config.table binutils-2.13.1/libiberty/config.table
--- orig/binutils-2.13.1/libiberty/config.table	Mon Oct 28 19:45:57 2002
+++ binutils-2.13.1/libiberty/config.table	Tue Apr 29 12:01:03 2003
@@ -13,4 +13,5 @@
   i370-*-opened*)       frag=mh-openedition ;;
   i[345]86-*-windows*)	frag=mh-windows ;;
+  i[345]86-*netware*)   frag=mh-netware ;;
 esac
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/getopt.c binutils-2.13.1/libiberty/getopt.c
--- orig/binutils-2.13.1/libiberty/getopt.c	Tue Nov 13 04:54:14 2001
+++ binutils-2.13.1/libiberty/getopt.c	Tue Apr 29 12:01:03 2003
@@ -61,4 +61,11 @@
 #endif
 
+/* Netwares libc environment includes its own thread-safe implementation
+ * of getopt that is in conflict with this implementation.
+ */
+#ifdef __netware__
+#define ELIDE_CODE
+#endif
+
 #ifndef ELIDE_CODE
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/getopt1.c binutils-2.13.1/libiberty/getopt1.c
--- orig/binutils-2.13.1/libiberty/getopt1.c	Fri Dec 29 21:16:02 2000
+++ binutils-2.13.1/libiberty/getopt1.c	Tue Apr 29 12:01:03 2003
@@ -53,4 +53,11 @@
 #endif
 
+/* Netwares libc environment includes its own thread-safe implementation
+ * of getopt that is in conflict with this implementation.
+ */
+#ifdef __netware__
+#define ELIDE_CODE
+#endif
+
 #ifndef ELIDE_CODE
 
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/lstat.c binutils-2.13.1/libiberty/lstat.c
--- orig/binutils-2.13.1/libiberty/lstat.c	Thu Jan  1 01:00:00 1970
+++ binutils-2.13.1/libiberty/lstat.c	Tue Apr 29 12:01:03 2003
@@ -0,0 +1,29 @@
+/* lstat.c -- stat call for links  netware 
+   NetWares libc implementation as of 04.April 2003 does not include "lstat"  -- Bernd Herd
+
+   This code makes lstat an alias for stat.
+
+
+
+   This file is part of the libiberty library.
+   Libiberty is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   Libiberty is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <sys/stat.h>
+
+int lstat (const char *FILENAME, struct stat *BUF)
+{
+  return stat(FILENAME, BUF);
+}
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/mktemp.c binutils-2.13.1/libiberty/mktemp.c
--- orig/binutils-2.13.1/libiberty/mktemp.c	Thu Jan  1 01:00:00 1970
+++ binutils-2.13.1/libiberty/mktemp.c	Tue Apr 29 12:01:03 2003
@@ -0,0 +1,48 @@
+/* mktemp.c -- mktemp implementation for netware 
+   NetWares libc implementation as of 04.April 2003 does not include "mktemp"  -- Bernd Herd
+
+   This implementation does no error-checking for the template name transfered.
+
+
+   This file is part of the libiberty library.
+   Libiberty is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   Libiberty is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <sys/stat.h>
+
+
+char           *mktemp        ( char * template )
+{
+  int len=strlen(template);
+
+  if (len>=6)
+    {
+      int val=time(NULL);
+      struct stat buf;
+
+      do
+        { 
+          snprintf(template+len-6, 6,
+                   "%06x",
+                   (val++) & 0xffffff );
+        }
+      while (stat(template, &buf)==0);
+    }
+
+  return template;
+}
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/pexecute.c binutils-2.13.1/libiberty/pexecute.c
--- orig/binutils-2.13.1/libiberty/pexecute.c	Thu Oct 18 00:35:28 2001
+++ binutils-2.13.1/libiberty/pexecute.c	Tue Apr 29 12:01:04 2003
@@ -661,7 +661,119 @@
 #endif /* MPW */
 
+
+
+#ifdef __netware__
+
+/* Netware cannot fork, but offers procve instead which creates a new process,
+ * allowing to connect stdin and stdout ot pipes
+ */
+
+#include <nksapi.h>
+#include <proc.h>
+
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+     const char *program;
+     char * const *argv;
+     const char *this_pname;
+     const char *temp_base ATTRIBUTE_UNUSED;
+     char **errmsg_fmt, **errmsg_arg;
+     int flags;
+{
+  int pid;
+  int pdes[2];
+  int input_desc, output_desc;
+  wiring_t wire;
+
+  /* Pipe waiting from last process, to be used as input for the next one.
+     Value is STDIN_FILE_NO if no pipe is waiting
+     (i.e. the next command is the first of a group).  */
+  static int last_pipe_input;
+
+  wire.infd=
+    wire.outfd=
+    wire.errfd=FD_UNUSED;
+
+  /* If this is the first process, initialize.  */
+  if (flags & PEXECUTE_FIRST)
+    last_pipe_input = STDIN_FILENO;
+
+  input_desc = last_pipe_input;
+
+  /* If this isn't the last process, make a pipe for its output,
+     and record it as waiting to be the input to the next process.  */
+  if (! (flags & PEXECUTE_LAST))
+    {
+      if (pipe (pdes) < 0)
+	{
+	  *errmsg_fmt = "pipe";
+	  *errmsg_arg = NULL;
+	  return -1;
+	}
+      output_desc = pdes[WRITE_PORT];
+      last_pipe_input = pdes[READ_PORT];
+    }
+  else
+    {
+      /* Last process.  */
+      output_desc = STDOUT_FILENO;
+      last_pipe_input = STDIN_FILENO;
+    }
+
+  wire.outfd = output_desc;
+  wire.infd = input_desc;
+
+  pid = procve
+    (program,
+     PROC_CURRENT_SPACE | PROC_INHERIT_CWD /* | PROC_LOAD_SILENT*/,
+     NULL,               /* env */
+     &wire,              /* wiring */
+     NULL,               /* fds -not implemented */
+     NULL, 0,            /* appdata -not implemented */
+     NULL,               /* reserved */
+     (const char **) argv);
+
+  /* In the parent, after forking.
+     Close the descriptors that we made for this child.  */
+  if (input_desc != STDIN_FILENO)
+    close (input_desc);
+  if (output_desc != STDOUT_FILENO)
+    close (output_desc);
+
+  /* Error test */
+  if (pid == -1)
+    {
+      /* Tell caller that we failed to start the sub-process */
+      *errmsg_fmt = install_error_msg;
+      *errmsg_arg = (char *)program;
+    }
+
+  return pid;
+}
+
+
+int
+pwait (pid, status, flags)
+     int pid;
+     int *status;
+     int flags ATTRIBUTE_UNUSED;
+{
+  int result;
+
+  do
+    {
+      result = waitpid(pid, status, 0);
+    }
+  while (result == -1 && errno == EINTR);
+
+  return result;
+}
+#endif /* __netware__ */
+
+
+
 /* include for Unix-like environments but not for Dos-like environments */
 #if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
-    && ! (defined (_WIN32) && ! defined (_UWIN))
+    && ! (defined (_WIN32) && ! defined (_UWIN)) && ! defined(__netware__)
 
 extern int execv ();
@@ -790,3 +902,3 @@
 }
 
-#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! _UWIN) */
+#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! _UWIN) && !__netware__ */
diff -ru2 --new-file -xCVS -x.#* -x*.orig -x*.rej -x*~ -x*.info* -xlibf2c orig/binutils-2.13.1/libiberty/popen.c binutils-2.13.1/libiberty/popen.c
--- orig/binutils-2.13.1/libiberty/popen.c	Thu Jan  1 01:00:00 1970
+++ binutils-2.13.1/libiberty/popen.c	Wed Apr 30 19:48:30 2003
@@ -0,0 +1,127 @@
+/* popen.c -- open FILE * to pipe on novell netware.
+
+   As of april 2003 netwares implementation of popen is seriously broken.
+   This code implements a simple popen emulation. It is limited to "r" mode
+   pipes only.  -- Bernd Herd <info@herdsoft.com>
+
+
+   This file is part of the libiberty library.
+   Libiberty is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   Libiberty is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+
+#ifdef __netware__
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <libiberty.h>
+#include <nksapi.h>
+#include <proc.h>
+
+/* value of `pipe': port index for reading.  */
+#define READ_PORT 0
+
+/* value of `pipe': port index for writing.  */
+#define WRITE_PORT 1
+
+FILE    *popen           ( const char *command, const char *mode )
+{
+  FILE *result=NULL;
+  int pdes[2];
+  wiring_t wire;
+  pid_t procve_result;
+
+  if (strcmp(mode, "r") && strcmp(mode, "rb") && strcmp(mode, "rt"))
+    {
+      errno = EINVAL;
+      return NULL;
+    }
+
+  /* Create the pipe */
+  if (pipe (pdes) < 0)
+    {
+      return NULL;
+    }
+	
+  wire.infd=
+    wire.outfd=
+    wire.errfd=FD_UNUSED;
+
+  wire.outfd = pdes[ WRITE_PORT ];
+  result = fdopen(pdes[ READ_PORT ], mode);
+  if (result!=NULL)
+    {
+      char **argv;
+
+      /* Build the argument vector from the command line */
+      argv = buildargv(command);
+      if (argv!=NULL && argv[0]!=NULL)
+        {
+          procve_result = procve
+            (argv[0],
+             PROC_CURRENT_SPACE | /*PROC_DETACHED | */ PROC_INHERIT_CWD /* | PROC_LOAD_SILENT*/, 
+             NULL,               /* env */
+             &wire,              /* wiring */
+             NULL,               /* fds -not implemented */
+             NULL, 0,            /* appdata -not implemented */
+             NULL,               /* reserved */
+             (const char **) argv);
+
+          freeargv(argv);
+          close( pdes[ WRITE_PORT ]);
+          if (procve_result == -1)
+            {
+              int olderrno=errno;
+              fclose(result);
+              errno=olderrno;
+              result=NULL;
+            }
+        }
+      else
+        {
+          /* Error parsing command line to argument vector */
+          fclose(result);
+          result=NULL;
+          close( pdes[WRITE_PORT] );
+          errno = EINVAL;
+        }
+    }
+  else
+    {
+      close(pdes[ WRITE_PORT ]);
+      close(pdes[ READ_PORT ]);
+    }
+
+  return result;
+}
+
+
+
+int      pclose          ( FILE *stream )
+{
+  int dummy;
+
+  /* Don't know the pid of the process we should wait for, so we can't call waitpid */
+  wait(&dummy);
+
+  return
+    fclose(stream);
+}
+
+#else /* !__netware__ */
+#error Not compiling for NetWare, What are you doing with popen.c, then?
+#endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]