diff options
author | Tom Tromey <tromey@redhat.com> | 1998-04-22 05:32:22 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 1998-04-22 05:32:22 +0000 |
commit | 9d04d6183d792349aaab84ecb1338b9445c0981b (patch) | |
tree | ffb8293c9514ab8c38004dc3683d1c858d9e0828 /binutils | |
parent | 53d3ce37d4d65d2df72ec3c96e292adb1759d03e (diff) | |
download | gdb-9d04d6183d792349aaab84ecb1338b9445c0981b.zip gdb-9d04d6183d792349aaab84ecb1338b9445c0981b.tar.gz gdb-9d04d6183d792349aaab84ecb1338b9445c0981b.tar.bz2 |
* Many files: Added gettext invocations around user-visible
strings.
* bucomm.h: Added gettext-related includes and defines.
* acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
HAVE_LC_MESSAGES): Define.
* configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
po/Makefile. Use AM_PROG_LEX.
* Makefile.am (SUBDIRS): New macro.
(POTFILES): Likewise.
(po/POTFILES.in): New target.
(LDADD): Added INTLLIBS.
(objdump_LDADD): Likewise.
(c__filt_LDADD): Likewise.
(ar_LDADD): Likewise.
(ranlib_LDADD): Likewise.
(dlltool_LDADD): Likewise.
(windres_LDADD): Likewise.
* po/Make-in, po/POTFILES.in, po/binutils.pot: New files.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 21 | ||||
-rw-r--r-- | binutils/Makefile.am | 24 | ||||
-rw-r--r-- | binutils/Makefile.in | 358 | ||||
-rw-r--r-- | binutils/acconfig.h | 15 | ||||
-rw-r--r-- | binutils/addr2line.c | 324 | ||||
-rw-r--r-- | binutils/ar.c | 130 | ||||
-rw-r--r-- | binutils/bucomm.h | 149 | ||||
-rw-r--r-- | binutils/coffdump.c | 23 | ||||
-rwxr-xr-x | binutils/configure | 2405 | ||||
-rw-r--r-- | binutils/configure.in | 22 | ||||
-rw-r--r-- | binutils/dlltool.c | 142 | ||||
-rw-r--r-- | binutils/nlmconv.c | 149 | ||||
-rw-r--r-- | binutils/nm.c | 283 | ||||
-rw-r--r-- | binutils/objcopy.c | 68 | ||||
-rw-r--r-- | binutils/objdump.c | 102 | ||||
-rw-r--r-- | binutils/po/Make-in | 250 | ||||
-rw-r--r-- | binutils/po/POTFILES.in | 47 | ||||
-rw-r--r-- | binutils/size.c | 194 | ||||
-rw-r--r-- | binutils/srconv.c | 111 | ||||
-rw-r--r-- | binutils/strings.c | 165 | ||||
-rw-r--r-- | binutils/sysdump.c | 100 | ||||
-rw-r--r-- | binutils/windres.c | 100 |
22 files changed, 4178 insertions, 1004 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 63b62a3..20985cf 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,24 @@ +Tue Apr 21 22:13:08 1998 Tom Tromey <tromey@scribbles.cygnus.com> + + * Many files: Added gettext invocations around user-visible + strings. + * bucomm.h: Added gettext-related includes and defines. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, + HAVE_LC_MESSAGES): Define. + * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and + po/Makefile. Use AM_PROG_LEX. + * Makefile.am (SUBDIRS): New macro. + (POTFILES): Likewise. + (po/POTFILES.in): New target. + (LDADD): Added INTLLIBS. + (objdump_LDADD): Likewise. + (c__filt_LDADD): Likewise. + (ar_LDADD): Likewise. + (ranlib_LDADD): Likewise. + (dlltool_LDADD): Likewise. + (windres_LDADD): Likewise. + * po/Make-in, po/POTFILES.in, po/binutils.pot: New files. + Tue Apr 21 16:07:18 1998 Stanislav Brabec <utx@k332.feld.cvut.cz> * objcopy.c (preserve_dates): New file static variable. diff --git a/binutils/Makefile.am b/binutils/Makefile.am index a4205f8..b0396b6 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS = cygnus dejagnu +SUBDIRS = po + tooldir = $(exec_prefix)/$(target_alias) ## These aren't set by automake, because they appear in @@ -92,6 +94,11 @@ OPCODES = ../opcodes/libopcodes.la LIBIBERTY = ../libiberty/libiberty.a +POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES) +po/POTFILES.in: @MAINT@ Makefile + for file in $(POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/POTFILES.in + EXPECT = `if [ -f $$r/../expect/expect ] ; then \ echo $$r/../expect/expect ; \ else echo expect ; fi` @@ -135,7 +142,7 @@ installcheck: info_TEXINFOS = binutils.texi -LDADD = $(BFDLIB) $(LIBIBERTY) +LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) size_SOURCES = size.c $(BULIBS) @@ -148,7 +155,7 @@ strip_new_SOURCES = objcopy.c is-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS) nm_new_SOURCES = nm.c $(BULIBS) objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS) -objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) +objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) underscore.c: stamp-under ; @true @@ -162,13 +169,13 @@ cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h $(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c c__filt_SOURCES = -c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) +c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS) ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c $(BULIBS) -ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c $(BULIBS) -ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) addr2line_SOURCES = addr2line.c $(BULIBS) @@ -218,7 +225,7 @@ sysinfo.o: sysinfo.c srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS) -dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) dlltool.o:dlltool.c $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c @@ -237,10 +244,11 @@ nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS) windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \ $(BULIBS) -windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ - syslex.c deflex.c + syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c + diststuff: $(DISTSTUFF) info DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \ diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 8cecb1f..b9483ab 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.2e from Makefile.am +# Makefile.in generated automatically by automake 1.3 from Makefile.am # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -32,6 +32,8 @@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include +DISTDIR = + pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -70,20 +72,15 @@ CC = @CC@ DLLTOOL_DEFS = @DLLTOOL_DEFS@ EXEEXT = @EXEEXT@ HDEFINES = @HDEFINES@ -LD = @LD@ LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ NLMCONV_DEFS = @NLMCONV_DEFS@ -NM = @NM@ -PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ UNDERSCORE = @UNDERSCORE@ -VERSION = @VERSION@ AUTOMAKE_OPTIONS = cygnus dejagnu +SUBDIRS = po + tooldir = $(exec_prefix)/$(target_alias) CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -170,6 +167,8 @@ OPCODES = ../opcodes/libopcodes.la LIBIBERTY = ../libiberty/libiberty.a +POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES) + EXPECT = `if [ -f $$r/../expect/expect ] ; then \ echo $$r/../expect/expect ; \ else echo expect ; fi` @@ -194,7 +193,7 @@ CC_FOR_TARGET = ` \ info_TEXINFOS = binutils.texi -LDADD = $(BFDLIB) $(LIBIBERTY) +LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) size_SOURCES = size.c $(BULIBS) @@ -207,23 +206,23 @@ strip_new_SOURCES = objcopy.c is-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS) nm_new_SOURCES = nm.c $(BULIBS) objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS) -objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) +objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) c__filt_SOURCES = -c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) +c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS) ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c $(BULIBS) -ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c $(BULIBS) -ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) addr2line_SOURCES = addr2line.c $(BULIBS) srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS) -dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS) @@ -233,10 +232,10 @@ nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS) windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \ $(BULIBS) -windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ +windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ - syslex.c deflex.c + syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \ site.exp site.bak @@ -335,13 +334,14 @@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +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` TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex INFO_DEPS = binutils.info DVIS = binutils.dvi TEXINFOS = binutils.texi -MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_PROG).1 - +man1dir = $(mandir)/man1 +MANS = $(man_MANS) NROFF = nroff DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS acconfig.h \ @@ -350,6 +350,9 @@ configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c \ stamp-h.in +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar @@ -357,14 +360,14 @@ GZIP = --best SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(c__filt_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(c__filt_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) -default: all +all: all-recursive-am all-am .SUFFIXES: -.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .txi .y +$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -408,18 +411,18 @@ maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ - echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ + echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; \ done uninstall-binPROGRAMS: - $(NORMAL_UNINSTALL) + @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ - rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done mostlyclean-noinstPROGRAMS: @@ -571,26 +574,38 @@ DVIPS = dvips .texinfo.dvi: TEXINPUTS=$(top_srcdir)/../texinfo:$$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:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.txi: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] + $(MAKEINFO) -I $(srcdir) $< .dvi.ps: $(DVIPS) $< -o $@ install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(infodir) + $(mkinstalldirs) $(DESTDIR)$(infodir) @for file in $(INFO_DEPS); 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 $(infodir)/$$ifile"; \ - $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ + 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 \ for file in $(INFO_DEPS); do \ - echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ - install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ + echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ + install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ else : ; fi @@ -601,11 +616,11 @@ uninstall-info: else ii=; fi; \ for file in $(INFO_DEPS); do \ test -z "$ii" \ - || install-info --info-dir=$(infodir) --remove $$file; \ + || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done - $(NORMAL_UNINSTALL) + @$(NORMAL_UNINSTALL) for file in $(INFO_DEPS); do \ - (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ done dist-info: $(INFO_DEPS) @@ -637,101 +652,82 @@ maintainer-clean-aminfo: fi; \ done clean-info: mostlyclean-aminfo -install-man: $(MANS) - $(NORMAL_INSTALL) - $(mkinstalldirs) $(mandir)/man1 - @sect=1; \ - inst=`echo "ar" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/ar.1; then file=$(srcdir)/ar.1; \ - else file=ar.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "nlmconv" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/nlmconv.1; then file=$(srcdir)/nlmconv.1; \ - else file=nlmconv.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "$(DEMANGLER_PROG)" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/$(DEMANGLER_PROG).1; then file=$(srcdir)/$(DEMANGLER_PROG).1; \ - else file=$(DEMANGLER_PROG).1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "nm" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/nm.1; then file=$(srcdir)/nm.1; \ - else file=nm.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "objdump" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/objdump.1; then file=$(srcdir)/objdump.1; \ - else file=objdump.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "ranlib" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/ranlib.1; then file=$(srcdir)/ranlib.1; \ - else file=ranlib.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "size" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/size.1; then file=$(srcdir)/size.1; \ - else file=size.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "strings" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/strings.1; then file=$(srcdir)/strings.1; \ - else file=strings.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "strip" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/strip.1; then file=$(srcdir)/strip.1; \ - else file=strip.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "objcopy" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/objcopy.1; then file=$(srcdir)/objcopy.1; \ - else file=objcopy.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "addr2line" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/addr2line.1; then file=$(srcdir)/addr2line.1; \ - else file=addr2line.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst -uninstall-man: - $(NORMAL_UNINSTALL) - -inst=`echo "ar" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "nlmconv" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "$(DEMANGLER_PROG)" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "nm" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "objdump" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "ranlib" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "size" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "strings" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "strip" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "objcopy" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - -inst=`echo "addr2line" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + 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 \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) uninstall-man1 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (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: + @set fnord $(MAKEFLAGS); amf=$$2; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + target=`echo $@ | sed s/-recursive//`; \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + done; \ + for subdir in $$rev; do \ + target=`echo $@ | sed s/-recursive//`; \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + (cd $$subdir && $(MAKE) tags); \ + done tags: TAGS @@ -739,9 +735,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP) here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) -TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP) +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ @@ -800,6 +799,14 @@ distdir: $(DISTFILES) || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ done + for subdir in $(SUBDIRS); do \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + done $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info RUNTESTFLAGS = @@ -826,29 +833,38 @@ site.exp: Makefile -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t -@mv site.exp site.bak @mv $@-t site.exp -info: $(INFO_DEPS) -dvi: $(DVIS) +info: $(INFO_DEPS) info-recursive +dvi: $(DVIS) dvi-recursive check: - $(MAKE) check-DEJAGNU -installcheck: -install-info: install-info-am -install-exec: install-binPROGRAMS install-exec-local + $(MAKE) check-recursive check-DEJAGNU +installcheck: installcheck-recursive +install-info: install-info-am install-info-recursive +all-recursive-am: config.h + $(MAKE) all-recursive + +all-am: Makefile $(PROGRAMS) $(MANS) config.h + +install-exec-am: install-binPROGRAMS install-exec-local + +install-data-am: install-man + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +install-exec: install-exec-recursive install-exec-am @$(NORMAL_INSTALL) -install-data: install-man +install-data: install-data-recursive install-data-am @$(NORMAL_INSTALL) -install: install-exec install-data all +install: install-recursive install-exec-am install-data-am @: -uninstall: uninstall-binPROGRAMS uninstall-man - -all: Makefile $(PROGRAMS) $(MANS) config.h +uninstall: uninstall-recursive uninstall-am install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install -installdirs: - $(mkinstalldirs) $(bindir) $(mandir)/man1 +installdirs: installdirs-recursive + $(mkinstalldirs) $(DATADIR)$(bindir) $(DESTDIR)$(mandir)/man1 mostlyclean-generic: @@ -865,46 +881,65 @@ distclean-generic: maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \ +mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ mostlyclean-noinstPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-aminfo mostlyclean-tags \ - mostlyclean-generic mostlyclean-local + mostlyclean-generic -clean: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \ - clean-libtool clean-aminfo clean-tags clean-generic \ - mostlyclean +clean-am: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS \ + clean-compile clean-libtool clean-aminfo clean-tags \ + clean-generic mostlyclean-am -distclean: distclean-hdr distclean-binPROGRAMS distclean-noinstPROGRAMS \ - distclean-compile distclean-libtool distclean-aminfo \ - distclean-tags distclean-generic clean - -rm -f config.status - -rm -f libtool +distclean-am: distclean-hdr distclean-binPROGRAMS \ + distclean-noinstPROGRAMS distclean-compile \ + distclean-libtool distclean-aminfo distclean-tags \ + distclean-generic clean-am -maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-aminfo maintainer-clean-tags \ - maintainer-clean-generic distclean + maintainer-clean-generic distclean-am + +mostlyclean: mostlyclean-recursive mostlyclean-am mostlyclean-local + +clean: clean-recursive clean-am + +distclean: distclean-recursive distclean-am + -rm -f config.status + -rm -f libtool + +maintainer-clean: maintainer-clean-recursive maintainer-clean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -rm -f config.status -.PHONY: default 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 \ +.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-info-am uninstall-info \ mostlyclean-aminfo distclean-aminfo clean-aminfo \ -maintainer-clean-aminfo install-man uninstall-man tags mostlyclean-tags \ +maintainer-clean-aminfo install-man1 uninstall-man1 install-man \ +uninstall-man 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 dvi installcheck install-info install-exec install-data install \ -uninstall all installdirs mostlyclean-generic distclean-generic \ +info dvi installcheck install-info all-recursive-am all-am \ +install-exec-am install-data-am uninstall-am install-exec install-data \ +install uninstall all installdirs mostlyclean-generic distclean-generic \ clean-generic maintainer-clean-generic clean mostlyclean distclean \ maintainer-clean +po/POTFILES.in: @MAINT@ Makefile + for file in $(POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/POTFILES.in check-DEJAGNU: site.exp srcdir=`cd $(srcdir) && pwd`; export srcdir; \ @@ -987,6 +1022,7 @@ dlltool.o:dlltool.c nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h ldname=`echo ld | sed '$(transform)'`; \ $(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c + diststuff: $(DISTSTUFF) info # Targets to rebuild dependencies in this Makefile. diff --git a/binutils/acconfig.h b/binutils/acconfig.h index c38c529..816bf84 100644 --- a/binutils/acconfig.h +++ b/binutils/acconfig.h @@ -32,3 +32,18 @@ /* Do we need to use the b modifier when opening binary files? */ #undef USE_BINARY_FOPEN + +/* Define to 1 if NLS is requested. */ +#undef ENABLE_NLS + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +#undef HAVE_CATGETS + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT + +/* Define as 1 if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES diff --git a/binutils/addr2line.c b/binutils/addr2line.c new file mode 100644 index 0000000..3d4ff90 --- /dev/null +++ b/binutils/addr2line.c @@ -0,0 +1,324 @@ +/* addr2line.c -- convert addresses to line number and function name + Copyright 1997, 1998 Free Software Foundation, Inc. + Contributed by Ulrich Lauther <Ulrich.Lauther@zfe.siemens.de> + + 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, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Derived from objdump.c and nm.c by Ulrich.Lauther@zfe.siemens.de + + Usage: + addr2line [options] addr addr ... + or + addr2line [options] + + both forms write results to stdout, the second form reads addresses + to be converted from stdin. */ + +#include <ctype.h> +#include <string.h> + +#include "bfd.h" +#include "getopt.h" +#include "libiberty.h" +#include "demangle.h" +#include "bucomm.h" + +extern char *program_version; + +static boolean with_functions; /* -f, show function names. */ +static boolean do_demangle; /* -C, demangle names. */ +static boolean base_names; /* -s, strip directory names. */ + +static int naddr; /* Number of addresses to process. */ +static char **addr; /* Hex addresses to process. */ + +static asymbol **syms; /* Symbol table. */ + +static struct option long_options[] = +{ + {"basenames", no_argument, NULL, 's'}, + {"demangle", no_argument, NULL, 'C'}, + {"exe", required_argument, NULL, 'e'}, + {"functions", no_argument, NULL, 'f'}, + {"target", required_argument, NULL, 'b'}, + {"help", no_argument, NULL, 'H'}, + {"version", no_argument, NULL, 'V'}, + {0, no_argument, 0, 0} +}; + +static void usage PARAMS ((FILE *, int)); +static void slurp_symtab PARAMS ((bfd *)); +static void find_address_in_section PARAMS ((bfd *, asection *, PTR)); +static void translate_addresses PARAMS ((bfd *)); +static void process_file PARAMS ((const char *, const char *)); + +/* Print a usage message to STREAM and exit with STATUS. */ + +static void +usage (stream, status) + FILE *stream; + int status; +{ + fprintf (stream, _("\ +Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n\ + [-e executable] [--exe=executable] [--demangle]\n\ + [--basenames] [--functions] [addr addr ...]\n"), + program_name); + list_supported_targets (program_name, stream); + if (status == 0) + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); + exit (status); +} + +/* Read in the symbol table. */ + +static void +slurp_symtab (abfd) + bfd *abfd; +{ + long storage; + long symcount; + + if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0) + return; + + storage = bfd_get_symtab_upper_bound (abfd); + if (storage < 0) + bfd_fatal (bfd_get_filename (abfd)); + + syms = (asymbol **) xmalloc (storage); + + symcount = bfd_canonicalize_symtab (abfd, syms); + if (symcount < 0) + bfd_fatal (bfd_get_filename (abfd)); +} + +/* These global variables are used to pass information between + translate_addresses and find_address_in_section. */ + +static bfd_vma pc; +static const char *filename; +static const char *functionname; +static unsigned int line; +static boolean found; + +/* Look for an address in a section. This is called via + bfd_map_over_sections. */ + +static void +find_address_in_section (abfd, section, data) + bfd *abfd; + asection *section; + PTR data; +{ + bfd_vma vma; + + if (found) + return; + + if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0) + return; + + vma = bfd_get_section_vma (abfd, section); + if (pc < vma) + return; + + found = bfd_find_nearest_line (abfd, section, syms, pc - vma, + &filename, &functionname, &line); +} + +/* Read hexadecimal addresses from stdin, translate into + file_name:line_number and optionally function name. */ + +static void +translate_addresses (abfd) + bfd *abfd; +{ + int read_stdin = (naddr == 0); + + for (;;) + { + if (read_stdin) + { + char addr_hex[100]; + + if (fgets (addr_hex, sizeof addr_hex, stdin) == NULL) + break; + pc = bfd_scan_vma (addr_hex, NULL, 16); + } + else + { + if (naddr <= 0) + break; + --naddr; + pc = bfd_scan_vma (*addr++, NULL, 16); + } + + found = false; + bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL); + + if (! found) + { + if (with_functions) + printf ("??\n"); + printf ("??:0\n"); + } + else + { + if (with_functions) + { + if (*functionname == '\0') + printf ("??\n"); + else if (! do_demangle) + printf ("%s\n", functionname); + else + { + char *res; + + res = cplus_demangle (functionname, DMGL_ANSI | DMGL_PARAMS); + if (res == NULL) + printf ("%s\n", functionname); + else + { + printf ("%s\n", res); + free (res); + } + } + } + + if (base_names) + { + char *h; + + h = strrchr (filename, '/'); + if (h != NULL) + filename = h + 1; + } + + printf ("%s:%u\n", filename, line); + } + + /* fflush() is essential for using this command as a server + child process that reads addresses from a pipe and responds + with line number information, processing one address at a + time. */ + fflush (stdout); + } +} + +/* Process a file. */ + +static void +process_file (filename, target) + const char *filename; + const char *target; +{ + bfd *abfd; + char **matching; + + abfd = bfd_openr (filename, target); + if (abfd == NULL) + bfd_fatal (filename); + + if (bfd_check_format (abfd, bfd_archive)) + fatal (_("%s: can not get addresses from archive"), filename); + + if (! bfd_check_format_matches (abfd, bfd_object, &matching)) + { + bfd_nonfatal (bfd_get_filename (abfd)); + if (bfd_get_error () == bfd_error_file_ambiguously_recognized) + { + list_matching_formats (matching); + free (matching); + } + xexit (1); + } + + slurp_symtab (abfd); + + translate_addresses (abfd); + + if (syms != NULL) + { + free (syms); + syms = NULL; + } + + bfd_close (abfd); +} + +int +main (argc, argv) + int argc; + char **argv; +{ + char *filename; + char *target; + int c; + + program_name = *argv; + xmalloc_set_program_name (program_name); + + bfd_init (); + set_default_bfd_target (); + + filename = NULL; + target = NULL; + while ((c = getopt_long (argc, argv, "b:Ce:sfHV", long_options, (int *) 0)) + != EOF) + { + switch (c) + { + case 0: + break; /* we've been given a long option */ + case 'b': + target = optarg; + break; + case 'C': + do_demangle = true; + break; + case 'e': + filename = optarg; + break; + case 's': + base_names = true; + break; + case 'f': + with_functions = true; + break; + case 'V': + print_version ("addr2line"); + break; + case 'H': + usage (stdout, 0); + break; + default: + usage (stderr, 1); + break; + } + } + + if (filename == NULL) + filename = "a.out"; + + addr = argv + optind; + naddr = argc - optind; + + process_file (filename, target); + + return 0; +} diff --git a/binutils/ar.c b/binutils/ar.c index 7d431c4..a8fdebf 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -1,5 +1,5 @@ /* ar.c - Archive modify and extract. - Copyright 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -52,9 +52,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Kludge declaration from BFD! This is ugly! FIXME! XXX */ struct ar_hdr * - bfd_special_undocumented_glue PARAMS ((bfd * abfd, char *filename)); + bfd_special_undocumented_glue PARAMS ((bfd * abfd, const char *filename)); -/* Forward declarations */ +/* Static declarations */ + +static void +mri_emul PARAMS ((void)); static const char * normalize PARAMS ((const char *, bfd *)); @@ -94,6 +97,9 @@ ranlib_only PARAMS ((const char *archname)); static void ranlib_touch PARAMS ((const char *archname)); + +static void +usage PARAMS ((int)); /** Globals and flags */ @@ -139,12 +145,15 @@ enum pos pos_default, pos_before, pos_after, pos_end } postype = pos_default; +static bfd ** +get_pos_bfd PARAMS ((bfd **, enum pos, const char *)); + /* Whether to truncate names of files stored in the archive. */ static boolean ar_truncate = false; int interactive = 0; -void +static void mri_emul () { interactive = isatty (fileno (stdin)); @@ -201,13 +210,13 @@ map_over_members (arch, function, files, count) } } if (!found) - fprintf (stderr, "no entry %s in archive\n", *files); + fprintf (stderr, _("no entry %s in archive\n"), *files); } } boolean operation_alters_arch = false; -void +static void usage (help) int help; { @@ -215,18 +224,18 @@ usage (help) s = help ? stdout : stderr; if (! is_ranlib) - fprintf (s, "\ -Usage: %s [-]{dmpqrtx}[abcilosuvV] [member-name] archive-file file...\n\ - %s -M [<mri-script]\n", + fprintf (s, _("\ +Usage: %s [-]{dmpqrtx}[abcilosSuvV] [member-name] archive-file file...\n\ + %s -M [<mri-script]\n"), program_name, program_name); else - fprintf (s, "\ -Usage: %s [-vV] archive\n", program_name); + fprintf (s, _("\ +Usage: %s [-vV] archive\n"), program_name); list_supported_targets (program_name, stderr); if (help) - fprintf (s, "Report bugs to bug-gnu-utils@prep.ai.mit.edu\n"); + fprintf (s, _("Report bugs to bug-gnu-utils@gnu.org\n")); xexit (help ? 0 : 1); } @@ -337,6 +346,8 @@ main (argc, argv) START_PROGRESS (program_name, 0); bfd_init (); + set_default_bfd_target (); + show_version = 0; xatexit (remove_output); @@ -346,7 +357,7 @@ main (argc, argv) boolean touch = false; if (argc < 2 || strcmp (argv[1], "--help") == 0) - usage (); + usage (0); if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "-v") == 0 || strncmp (argv[1], "--v", 3) == 0) @@ -375,7 +386,7 @@ main (argc, argv) } if (argc < 2) - usage (); + usage (0); arg_ptr = argv[1]; @@ -394,7 +405,7 @@ main (argc, argv) case 't': case 'x': if (operation != none) - fatal ("two different operation options specified"); + fatal (_("two different operation options specified")); switch (c) { case 'd': @@ -437,6 +448,9 @@ main (argc, argv) case 's': write_armap = 1; break; + case 'S': + write_armap = -1; + break; case 'u': newer_only = 1; break; @@ -459,8 +473,8 @@ main (argc, argv) ar_truncate = true; break; default: - fprintf (stderr, "%s: illegal option -- %c\n", program_name, c); - usage (); + fprintf (stderr, _("%s: illegal option -- %c\n"), program_name, c); + usage (0); } } @@ -468,7 +482,7 @@ main (argc, argv) print_version ("ar"); if (argc < 3) - usage (); + usage (0); if (mri_mode) { @@ -491,10 +505,10 @@ main (argc, argv) } if (operation == none) - fatal ("no operation specified"); + fatal (_("no operation specified")); if (newer_only && operation != replace) - fatal ("`u' is only meaningful with the `r' option."); + fatal (_("`u' is only meaningful with the `r' option.")); arg_index = 2; @@ -573,7 +587,7 @@ main (argc, argv) /* Shouldn't happen! */ default: - fprintf (stderr, "%s: internal error -- this option not implemented\n", + fprintf (stderr, _("%s: internal error -- this option not implemented\n"), program_name); xexit (1); } @@ -603,8 +617,6 @@ open_inarch (archive_filename, file) if (stat (archive_filename, &sbuf) != 0) { - bfd *obj; - #ifndef __GO32__ /* KLUDGE ALERT! Temporary fix until I figger why @@ -625,12 +637,17 @@ open_inarch (archive_filename, file) /* Try to figure out the target to use for the archive from the first object on the list. */ - obj = bfd_openr (file, NULL); - if (obj != NULL) + if (file != NULL) { - if (bfd_check_format (obj, bfd_object)) - target = bfd_get_target (obj); - (void) bfd_close (obj); + bfd *obj; + + obj = bfd_openr (file, NULL); + if (obj != NULL) + { + if (bfd_check_format (obj, bfd_object)) + target = bfd_get_target (obj); + (void) bfd_close (obj); + } } /* Create an empty archive. */ @@ -684,10 +701,10 @@ print_contents (abfd) struct stat buf; long size; if (bfd_stat_arch_elt (abfd, &buf) != 0) - fatal ("internal stat error on %s", bfd_get_filename (abfd)); + fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); if (verbose) - printf ("\n<member %s>\n\n", bfd_get_filename (abfd)); + printf (_("\n<member %s>\n\n"), bfd_get_filename (abfd)); bfd_seek (abfd, 0, SEEK_SET); @@ -703,7 +720,7 @@ print_contents (abfd) nread = bfd_read (cbuf, 1, tocopy, abfd); /* oops -- broke abstraction! */ if (nread != tocopy) - fatal ("%s is not a valid archive", + fatal (_("%s is not a valid archive"), bfd_get_filename (bfd_my_archive (abfd))); fwrite (cbuf, 1, nread, stdout); ncopied += tocopy; @@ -732,7 +749,7 @@ extract_file (abfd) long size; struct stat buf; if (bfd_stat_arch_elt (abfd, &buf) != 0) - fatal ("internal stat error on %s", bfd_get_filename (abfd)); + fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); size = buf.st_size; if (verbose) @@ -764,7 +781,7 @@ extract_file (abfd) nread = bfd_read (cbuf, 1, tocopy, abfd); if (nread != tocopy) - fatal ("%s is not a valid archive", + fatal (_("%s is not a valid archive"), bfd_get_filename (bfd_my_archive (abfd))); /* See comment above; this saves disk arm motion */ @@ -871,13 +888,13 @@ do_quick_append (archive_filename, files_to_append) if (newfile == false) { if (bfd_check_format (temp, bfd_archive) != true) - fatal ("%s is not an archive", archive_filename); + fatal (_("%s is not an archive"), archive_filename); } else { fwrite (ARMAG, 1, SARMAG, ofile); if (!silent_create) - fprintf (stderr, "%s: creating %s\n", + fprintf (stderr, _("%s: creating %s\n"), program_name, archive_filename); } @@ -988,13 +1005,26 @@ write_archive (iarch) into when altering. DEFAULT_POS should be how to interpret pos_default, and should be a pos value. */ -bfd ** -get_pos_bfd (contents, default_pos) +static bfd ** +get_pos_bfd (contents, default_pos, default_posname) bfd **contents; enum pos default_pos; + const char *default_posname; { bfd **after_bfd = contents; - enum pos realpos = (postype == pos_default ? default_pos : postype); + enum pos realpos; + const char *realposname; + + if (postype == pos_default) + { + realpos = default_pos; + realposname = default_posname; + } + else + { + realpos = postype; + realposname = posname; + } if (realpos == pos_end) { @@ -1004,7 +1034,7 @@ get_pos_bfd (contents, default_pos) else { for (; *after_bfd; after_bfd = &(*after_bfd)->next) - if (!strcmp ((*after_bfd)->filename, posname)) + if (strcmp ((*after_bfd)->filename, realposname) == 0) { if (realpos == pos_after) after_bfd = &(*after_bfd)->next; @@ -1059,7 +1089,7 @@ delete_members (arch, files_to_delete) if (verbose && found == false) { - printf ("No member named `%s'\n", *files_to_delete); + printf (_("No member named `%s'\n"), *files_to_delete); } next_file: ; @@ -1097,7 +1127,7 @@ move_members (arch, files_to_move) *current_ptr_ptr = current_ptr->next; /* Now glue to end */ - after_bfd = get_pos_bfd (&arch->next, pos_end); + after_bfd = get_pos_bfd (&arch->next, pos_end, NULL); link = *after_bfd; *after_bfd = current_ptr; current_ptr->next = link; @@ -1110,7 +1140,7 @@ move_members (arch, files_to_move) current_ptr_ptr = &((*current_ptr_ptr)->next); } - fprintf (stderr, "%s: no entry %s in archive %s!\n", + fprintf (stderr, _("%s: no entry %s in archive %s!\n"), program_name, *files_to_move, arch->filename); xexit (1); next_file:; @@ -1159,17 +1189,16 @@ replace_members (arch, files_to_move, quick) goto next_file; } if (bfd_stat_arch_elt (current, &asbuf) != 0) - fatal ("internal stat error on %s", current->filename); + fatal (_("internal stat error on %s"), current->filename); if (fsbuf.st_mtime <= asbuf.st_mtime) goto next_file; } - /* snip out this entry from the chain */ - *current_ptr = current->next; - - after_bfd = get_pos_bfd (&arch->next, pos_end); + after_bfd = get_pos_bfd (&arch->next, pos_after, + current->filename); temp = *after_bfd; + *after_bfd = bfd_openr (*files_to_move, NULL); if (*after_bfd == (bfd *) NULL) { @@ -1177,6 +1206,9 @@ replace_members (arch, files_to_move, quick) } (*after_bfd)->next = temp; + /* snip out this entry from the chain */ + *current_ptr = (*current_ptr)->next; + if (verbose) { printf ("r - %s\n", *files_to_move); @@ -1192,7 +1224,7 @@ replace_members (arch, files_to_move, quick) /* Add to the end of the archive. */ - after_bfd = get_pos_bfd (&arch->next, pos_end); + after_bfd = get_pos_bfd (&arch->next, pos_end, NULL); temp = *after_bfd; *after_bfd = bfd_openr (*files_to_move, NULL); if (*after_bfd == (bfd *) NULL) @@ -1266,7 +1298,7 @@ ranlib_touch (archname) } if (! bfd_has_map (arch)) - fatal ("%s: no archive map to update", archname); + fatal (_("%s: no archive map to update"), archname); bfd_update_armap_timestamp (arch); diff --git a/binutils/bucomm.h b/binutils/bucomm.h index 3d79d19..9320750 100644 --- a/binutils/bucomm.h +++ b/binutils/bucomm.h @@ -1,5 +1,5 @@ /* bucomm.h -- binutils common include file. - Copyright 1992 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -15,18 +15,157 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _BUCOMM_H +#define _BUCOMM_H + +#include "ansidecl.h" +#include <stdio.h> +#include <sys/types.h> + +#include "config.h" + +#ifdef USE_BINARY_FOPEN +#include "fopen-bin.h" +#else +#include "fopen-same.h" +#endif + +#include <errno.h> +#ifndef errno +extern int errno; +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#else +extern char *strchr (); +extern char *strrchr (); +#endif +#endif + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#else +#ifdef HAVE_SYS_FILE_H +#include <sys/file.h> +#endif +#endif + +#ifdef NEED_DECLARATION_STRSTR +extern char *strstr (); +#endif + +#ifdef HAVE_SBRK +#ifdef NEED_DECLARATION_SBRK +extern char *sbrk (); +#endif +#endif + +#ifdef NEED_DECLARATION_GETENV +extern char *getenv (); +#endif + +#ifndef O_RDONLY +#define O_RDONLY 0 +#endif + +#ifndef O_RDWR +#define O_RDWR 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifdef __GNUC__ +# undef alloca +# define alloca __builtin_alloca +#else +# if HAVE_ALLOCA_H +# include <alloca.h> +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +# if !defined (__STDC__) && !defined (__hpux) +char *alloca (); +# else +void *alloca (); +# endif /* __STDC__, __hpux */ +# endif /* alloca */ +# endif /* HAVE_ALLOCA_H */ +#endif + +#ifdef ENABLE_NLS +#include <libintl.h> +#define _(String) gettext (String) +#ifdef gettext_noop +#define N_(String) gettext_noop (String) +#else +#define N_(String) (String) +#endif +#else +/* Stubs that do something close enough. */ +#define textdomain(String) (String) +#define gettext(String) (String) +#define dgettext(Domain,Message) (Message) +#define dcgettext(Domain,Message,Type) (Message) +#define bindtextdomain(Domain,Directory) (Domain) +#define _(String) (String) +#define N_(String) (String) +/* In this case we don't care about the value. */ +#ifndef LC_MESSAGES +#define LC_MESSAGES 0 +#endif +#endif + +/* bucomm.c */ void bfd_nonfatal PARAMS ((CONST char *)); void bfd_fatal PARAMS ((CONST char *)); -PTR xmalloc PARAMS ((size_t)); +void fatal PARAMS ((CONST char *, ...)); -PTR xrealloc PARAMS ((char *, size_t)); +void set_default_bfd_target PARAMS ((void)); -void fatal PARAMS ((CONST char *, ...)); +void list_matching_formats PARAMS ((char **p)); + +void list_supported_targets PARAMS ((const char *, FILE *)); void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose)); +char *make_tempname PARAMS ((char *)); + +bfd_vma parse_vma PARAMS ((const char *, const char *)); + extern char *program_name; + +/* filemode.c */ +void mode_string PARAMS ((unsigned long mode, char *buf)); + +/* version.c */ +extern void print_version PARAMS ((const char *)); + +/* libiberty */ +PTR xmalloc PARAMS ((size_t)); + +PTR xrealloc PARAMS ((PTR, size_t)); + +#endif /* _BUCOMM_H */ diff --git a/binutils/coffdump.c b/binutils/coffdump.c index 120915d..12f6344 100644 --- a/binutils/coffdump.c +++ b/binutils/coffdump.c @@ -1,5 +1,5 @@ /* Coff file dumper. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -15,7 +15,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Steve Chamberlain <sac@cygnus.com> @@ -25,16 +25,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <bfd.h> #include <getopt.h> -#include <stdio.h> #include <libiberty.h> -#include "bucomm.h" #include "coffgrok.h" - +#include "bucomm.h" #define PROGRAM_VERSION "1.0" - char *xcalloc(a,b) int a; int b; @@ -103,7 +100,7 @@ dump_coff_lines (p) int i; int online = 0; tab(1); - printf("#lines %d ",p->nlines); + printf(_("#lines %d "),p->nlines); for (i = 0; i < p->nlines; i++) { printf("(%d 0x%x)", p->lines[i], p->addresses[i]); @@ -127,6 +124,12 @@ dump_coff_type (p) printf ("size %d ", p->size); switch (p->type) { + case coff_secdef_type: + printf ("section definition at %x size %x\n", + p->u.asecdef.address, + p->u.asecdef.size); + nl(); + break; case coff_pointer_type: printf ("pointer to"); nl (); @@ -459,7 +462,7 @@ show_usage (file, status) static void show_help () { - printf ("%s: Print a human readable interpretation of a SYSROFF object file\n", + printf (_("%s: Print a human readable interpretation of a SYSROFF object file\n"), program_name); show_usage (stdout, 0); } @@ -495,7 +498,7 @@ main (ac, av) show_help (); /*NOTREACHED*/ case 'V': - printf ("GNU %s version %s\n", program_name, PROGRAM_VERSION); + printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION); exit (0); /*NOTREACHED*/ case 0: @@ -513,7 +516,7 @@ main (ac, av) if (!input_file) { - fprintf (stderr,"%s: no input file specified\n", + fprintf (stderr,_("%s: no input file specified\n"), program_name); exit(1); } diff --git a/binutils/configure b/binutils/configure index 67be0f9..3007ada 100755 --- a/binutils/configure +++ b/binutils/configure @@ -12,16 +12,24 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --with-gnu-ld assume the C compiler uses GNU ld [default=no]" + --enable-shared build shared libraries [default=yes] + --enable-shared=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" ac_help="$ac_help - --enable-shared build shared libraries [default=yes]" + --enable-static build static libraries [default=yes] + --enable-static=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" ac_help="$ac_help - --enable-static build static libraries [default=yes]" + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ac_help="$ac_help --enable-targets alternative target configurations" ac_help="$ac_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" ac_help="$ac_help + --disable-nls do not use Native Language Support" +ac_help="$ac_help + --with-included-gettext use the GNU gettext library included here" +ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" @@ -580,7 +588,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:584: checking host system type" >&5 +echo "configure:592: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -601,7 +609,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:605: checking target system type" >&5 +echo "configure:613: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -619,7 +627,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:623: checking build system type" >&5 +echo "configure:631: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -654,7 +662,7 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./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:658: checking for a BSD compatible install" >&5 +echo "configure:666: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -707,24 +715,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -PACKAGE=binutils - -VERSION=2.8.2 - -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } -fi -cat >> confdefs.h <<EOF -#define PACKAGE "$PACKAGE" -EOF - -cat >> confdefs.h <<EOF -#define VERSION "$VERSION" -EOF - echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:728: checking whether build environment is sane" >&5 +echo "configure:720: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -735,10 +727,21 @@ echo timestamp > conftestfile # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "" = "X"; then + if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + test "$2" = conftestfile ) then @@ -769,9 +772,54 @@ test "$program_suffix" != NONE && # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:777: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=binutils + +VERSION=2.9.1 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <<EOF +#define PACKAGE "$PACKAGE" +EOF + +cat >> confdefs.h <<EOF +#define VERSION "$VERSION" +EOF + + + missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:775: checking for working aclocal" >&5 +echo "configure:823: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -784,7 +832,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:788: checking for working autoconf" >&5 +echo "configure:836: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -797,7 +845,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:801: checking for working automake" >&5 +echo "configure:849: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -810,7 +858,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:814: checking for working autoheader" >&5 +echo "configure:862: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -823,7 +871,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:827: checking for working makeinfo" >&5 +echo "configure:875: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -835,38 +883,58 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:840: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake + enable_shared=yes fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" + enable_static=yes fi - # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:870: checking for $ac_word" >&5 +echo "configure:938: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -895,7 +963,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:899: checking for $ac_word" >&5 +echo "configure:967: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -924,7 +992,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:928: checking for $ac_word" >&5 +echo "configure:996: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -972,7 +1040,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -982,11 +1050,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 986 "configure" +#line 1054 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1006,12 +1074,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1010: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1078: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1015: checking whether we are using GNU C" >&5 +echo "configure:1083: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1088,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1035,7 +1103,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1039: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1107: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1075,11 +1143,11 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1079: checking for ld used by GCC" >&5 +echo "configure:1147: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. - /*) + /* | [A-Za-z]:\\*) test -z "$LD" && LD="$ac_prog" ;; "") @@ -1093,10 +1161,10 @@ echo "configure:1079: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1097: checking for GNU ld" >&5 +echo "configure:1165: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1100: checking for non-GNU ld" >&5 +echo "configure:1168: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1132,7 +1200,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1136: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1204: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1148,25 +1216,21 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1152: checking for BSD-compatible nm" >&5 +echo "configure:1220: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$NM" in -/*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. - ;; -*) + if test -z "$NM"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do - test -z "$ac_dir" && dir=. + test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1!d' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" else ac_cv_path_NM="$ac_dir/nm" @@ -1176,8 +1240,9 @@ else done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm - ;; -esac +else + ac_cv_path_NM="$NM" # Let the user override the test with a path. +fi fi NM="$ac_cv_path_NM" @@ -1185,7 +1250,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1189: checking whether ln -s works" >&5 +echo "configure:1254: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1205,51 +1270,19 @@ else echo "$ac_t""no" 1>&6 fi - - - - - - - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-bogus-package-name} - case "$enableval" in - yes) libtool_enable_shared=yes ;; - no) libtool_enable_shared=no ;; - # The value of $p (aka $PACKAGE) is assumed to come from AM_INIT_AUTOMAKE. - # If it didn't, it'll be `bogus-package-name', thus making this condition - # not be used. - *$p*) libtool_enable_shared=yes ;; - *) libtool_enable_shared=no ;; -esac -fi - -test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared" -libtool_shared= -test "$enable_shared" = no && libtool_shared=" --disable-shared" - -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - if test "$enableval" = no; then - libtool_enable_static=no +if test $host != $build; then + ac_tool_prefix=${host_alias}- else - libtool_enable_static=yes -fi + ac_tool_prefix= fi -test -n "$libtool_enable_static" && enable_static="$libtool_enable_static" -libtool_static= -test "$enable_static" = no && libtool_static=" --disable-static" +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' -libtool_flags="$libtool_shared$libtool_static" +# Check for any special flags to pass to ltconfig. +libtool_flags= +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$silent" = yes && libtool_flags="$libtool_flags --silent" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" @@ -1258,42 +1291,169 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" # libtool support. case "$host" in *-*-irix6*) - ac_save_CFLAGS="$CFLAGS" - flag_passed=no - for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do - case "$f" in - ABI) - test -n "$SGI_ABI" && flag_passed=yes - if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then - # Choose the ABI flag according to GCC's specs. - if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then - LD="${LD-ld} -32" - else - LD="${LD-ld} -n32" - fi - fi + # Find out which ABI we are using. + echo '#line 1296 "configure"' > conftest.$ac_ext + if { (eval echo configure:1297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" ;; - - *) - if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then - flag_passed=yes - LD="${LD-ld} $f" - fi + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" ;; esac - done - CFLAGS="$ac_save_CFLAGS" + fi + rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. CFLAGS="$CFLAGS -belf" ;; + +*-*-cygwin32*) + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1322: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_DLLTOOL"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1353: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="dlltool" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" +fi +fi +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + DLLTOOL="false" +fi +fi + +# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1387: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="${ac_tool_prefix}as" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_AS"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1418: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="as" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + AS="false" +fi +fi + + + ;; + esac # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ +DLLTOOL="$DLLTOOL" AS="$AS" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } @@ -1333,7 +1493,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1337: checking for $ac_word" >&5 +echo "configure:1497: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1362,7 +1522,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1366: checking for $ac_word" >&5 +echo "configure:1526: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1410,7 +1570,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1414: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1574: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1420,11 +1580,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 1424 "configure" +#line 1584 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1444,12 +1604,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1448: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1608: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1453: checking whether we are using GNU C" >&5 +echo "configure:1613: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1458,7 +1618,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1473,7 +1633,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1477: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1637: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1506,7 +1666,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1510: checking for $ac_word" >&5 +echo "configure:1670: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1535,10 +1695,106 @@ test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1700: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 1715 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 1732 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +missing_dir=`cd $ac_aux_dir && pwd` +for ac_prog in flex lex +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1766: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$LEX" && break +done +test -n "$LEX" || LEX=""$missing_dir/missing flex"" + # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1542: checking for $ac_word" >&5 +echo "configure:1798: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1571,7 +1827,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1575: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1831: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -1579,7 +1835,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 1583 "configure" +#line 1839 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1590,7 +1846,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1612,132 +1868,1695 @@ fi fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1617: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= +echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +echo "configure:1873: 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 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +echo '%% +%%' | $LEX +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +fi + +echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 +echo "configure:1894: 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 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS="$LIBS" +LIBS="$LIBS $LEXLIB" +cat > conftest.$ac_ext <<EOF +#line 1906 "configure" +#include "confdefs.h" +`cat $LEX_OUTPUT_ROOT.c` +int main() { + +; return 0; } +EOF +if { (eval echo configure:1913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_prog_lex_yytext_pointer=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi + +echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + cat >> confdefs.h <<\EOF +#define YYTEXT_POINTER 1 +EOF + +fi + + +ALL_LINGUAS= +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1937: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1958: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1632 "configure" +#line 1963 "configure" #include "confdefs.h" -#include <assert.h> -Syntax Error +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1988 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 2006 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then : else + cat > conftest.$ac_ext <<EOF +#line 2027 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:2062: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2067 "configure" +#include "confdefs.h" + +int main() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:2137: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <<EOF +#line 2144 "configure" +#include "confdefs.h" + +int main() { +} $ac_kw foo() { +; return 0; } +EOF +if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <<EOF +#define inline $ac_cv_c_inline +EOF + ;; +esac + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:2177: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2182 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:2210: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2215 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:2245: 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 2250 "configure" +#include "confdefs.h" +#include <alloca.h> +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:2278: 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 2283 "configure" +#include "confdefs.h" + +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# if HAVE_ALLOCA_H +# include <alloca.h> +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + +int main() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_func_alloca_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_alloca_works=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 +if test $ac_cv_func_alloca_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.o + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:2338: 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 2343 "configure" +#include "confdefs.h" +#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2368: 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 2373 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<EOF +#define CRAY_STACKSEG_END $ac_func +EOF + + break +else + echo "$ac_t""no" 1>&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:2423: 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 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat > conftest.$ac_ext <<EOF +#line 2431 "configure" +#include "confdefs.h" +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_c_stack_direction=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_stack_direction=-1 +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <<EOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +EOF + +fi + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2475: 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 2480 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2514: 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 1649 "configure" +#line 2519 "configure" #include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ #include <assert.h> -Syntax Error +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:2567: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat > conftest.$ac_ext <<EOF +#line 2575 "configure" +#include "confdefs.h" + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the filesystem buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include <sys/types.h> +#include <fcntl.h> +#include <sys/mman.h> + +/* 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. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + + + for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h values.h sys/param.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2743: 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 2748 "configure" +#include "confdefs.h" +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then - : + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - CPP=/lib/cpp + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ +__argz_count __argz_stringify __argz_next +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2783: 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 2788 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi rm -f conftest* - ac_cv_prog_CPP="$CPP" fi - CPP="$ac_cv_prog_CPP" + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + else - ac_cv_prog_CPP="$CPP" + echo "$ac_t""no" 1>&6 fi -echo "$ac_t""$CPP" 1>&6 +done -echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:1678: checking lex output file root" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + for ac_func in stpcpy +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2840: 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 - # The minimal lex program is just a single line: %%. But some broken lexes -# (Solaris, I think it was) want two %% lines, so accommodate them. -echo '%% -%%' | $LEX -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy + cat > conftest.$ac_ext <<EOF +#line 2845 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" else - { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done -echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:1699: checking whether yytext is a pointer" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STPCPY 1 +EOF + + fi + + if test $ac_cv_header_locale_h = yes; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:2902: 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 - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c -ac_save_LIBS="$LIBS" -LIBS="$LIBS $LEXLIB" -cat > conftest.$ac_ext <<EOF -#line 1711 "configure" + cat > conftest.$ac_ext <<EOF +#line 2907 "configure" #include "confdefs.h" -`cat $LEX_OUTPUT_ROOT.c` +#include <locale.h> int main() { +return LC_MESSAGES +; return 0; } +EOF +if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_val_LC_MESSAGES=no +fi +rm -f conftest* +fi +echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 + if test $am_cv_val_LC_MESSAGES = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LC_MESSAGES 1 +EOF + + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +echo "configure:2935: checking whether NLS is requested" >&5 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi + + echo "$ac_t""$USE_NLS" 1>&6 + + + USE_INCLUDED_LIBINTL=no + + if test "$USE_NLS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ENABLE_NLS 1 +EOF + + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +echo "configure:2955: 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 + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +echo "configure:2974: 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 2979 "configure" +#include "confdefs.h" +#include <libintl.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +echo "configure:3001: 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 3006 "configure" +#include "confdefs.h" +#include <libintl.h> +int main() { +return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - ac_cv_prog_lex_yytext_pointer=yes + gt_cv_func_gettext_libc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gt_cv_func_gettext_libc=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 + + if test "$gt_cv_func_gettext_libc" != "yes"; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +echo "configure:3029: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 3037 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char bindtextdomain(); + +int main() { +bindtextdomain() +; return 0; } +EOF +if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" -rm -f "${LEX_OUTPUT_ROOT}.c" fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +echo "configure:3064: 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 3069 "configure" +#include "confdefs.h" -echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 -if test $ac_cv_prog_lex_yytext_pointer = yes; then - cat >> confdefs.h <<\EOF -#define YYTEXT_POINTER 1 +int main() { +return (int) gettext ("") +; return 0; } +EOF +if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + gt_cv_func_gettext_libintl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gt_cv_func_gettext_libintl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT 1 EOF + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3104: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$MSGFMT" != "no"; then + for ac_func in dcgettext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3138: 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 3143 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3193: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3228: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + cat > conftest.$ac_ext <<EOF +#line 3260 "configure" +#include "confdefs.h" + +int main() { +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr +; return 0; } +EOF +if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CATOBJEXT=.mo + DATADIRNAME=lib +fi +rm -f conftest* + INSTOBJEXT=.mo + fi + fi + +else + echo "$ac_t""no" 1>&6 +fi + + + + if test "$CATOBJEXT" = "NONE"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3300: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3334: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3369: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/../intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=libintl.h + nls_cv_header_libgt=libgettext.h + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=libintl.h + nls_cv_header_libgt=libgettext.h + fi + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + + + + + + + + + + + + + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +echo "configure:3459: checking for catalogs to be installed" >&5 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + echo "$ac_t""$LINGUAS" 1>&6 + fi + + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include <locale.h>" + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header <locale.h>. Take care yourself. */" + fi + + + if test -f $srcdir/po2tbl.sed.in; then + if test "$CATOBJEXT" = ".cat"; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +echo "configure:3487: 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 3492 "configure" +#include "confdefs.h" +#include <linux/version.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + msgformat=linux +else + echo "$ac_t""no" 1>&6 +msgformat=xopen +fi + + + sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed + fi + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/po2tbl.sed.in > po2tbl.sed + fi + + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + + + + MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" + + + l= + + + if test -d $srcdir/po; then + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + fi + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1741: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:3560: 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 enableval="$enable_maintainer_mode" @@ -1755,19 +3574,19 @@ fi echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:1759: checking for Cygwin32 environment" >&5 +echo "configure:3578: checking for Cygwin32 environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1764 "configure" +#line 3583 "configure" #include "confdefs.h" int main() { return __CYGWIN32__; ; return 0; } EOF -if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -1784,19 +3603,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 CYGWIN32= test "$am_cv_cygwin32" = yes && CYGWIN32=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:1788: checking for Mingw32 environment" >&5 +echo "configure:3607: checking for Mingw32 environment" >&5 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1793 "configure" +#line 3612 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:1800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -1815,12 +3634,11 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1819: checking for executable suffix" >&5 +echo "configure:3638: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - -if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then + if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then am_cv_exeext=.exe else cat > am_c_test.c << 'EOF' @@ -1829,7 +3647,14 @@ int main() { } EOF ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 -am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` +am_cv_exeext= +for file in am_c_test.*; do + case $file in + *.c) ;; + *.o) ;; + *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; + esac +done rm -f am_c_test* fi @@ -1852,7 +3677,7 @@ AR=${AR-ar} # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1856: checking for $ac_word" >&5 +echo "configure:3681: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1896,7 +3721,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:1900: checking for build system executable suffix" >&5 +echo "configure:3725: 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 else @@ -1921,17 +3746,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.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:1925: checking for $ac_hdr" >&5 +echo "configure:3750: 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 1930 "configure" +#line 3755 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1958,12 +3783,12 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1962: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3787: 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 1967 "configure" +#line 3792 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -1979,7 +3804,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2002,19 +3827,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2006: checking for working alloca.h" >&5 +echo "configure:3831: 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 2011 "configure" +#line 3836 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2035,12 +3860,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2039: checking for alloca" >&5 +echo "configure:3864: 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 2044 "configure" +#line 3869 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2063,7 +3888,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2095,12 +3920,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2099: checking whether alloca needs Cray hooks" >&5 +echo "configure:3924: 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 2104 "configure" +#line 3929 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2125,12 +3950,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2129: checking for $ac_func" >&5 +echo "configure:3954: 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 2134 "configure" +#line 3959 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2153,7 +3978,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2180,7 +4005,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2184: checking stack direction for C alloca" >&5 +echo "configure:4009: 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 else @@ -2188,7 +4013,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2192 "configure" +#line 4017 "configure" #include "confdefs.h" find_stack_direction () { @@ -2207,7 +4032,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2231,12 +4056,12 @@ fi for ac_func in sbrk utimes do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2235: checking for $ac_func" >&5 +echo "configure:4060: 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 2240 "configure" +#line 4065 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2259,7 +4084,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2285,19 +4110,19 @@ done echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6 -echo "configure:2289: checking for time_t in time.h" >&5 +echo "configure:4114: 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 2294 "configure" +#line 4119 "configure" #include "confdefs.h" #include <time.h> int main() { time_t i; ; return 0; } EOF -if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_time_h=yes else @@ -2318,19 +4143,19 @@ EOF fi echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2322: checking for time_t in sys/types.h" >&5 +echo "configure:4147: 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 2327 "configure" +#line 4152 "configure" #include "confdefs.h" #include <sys/types.h> int main() { time_t i; ; return 0; } EOF -if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_types_h=yes else @@ -2353,12 +4178,12 @@ fi # Under Next 3.2 <utime.h> apparently does not define struct utimbuf # by default. echo $ac_n "checking for utime.h""... $ac_c" 1>&6 -echo "configure:2357: checking for utime.h" >&5 +echo "configure:4182: 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 2362 "configure" +#line 4187 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef HAVE_TIME_H @@ -2369,7 +4194,7 @@ int main() { struct utimbuf s; ; return 0; } EOF -if { (eval echo configure:2373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_header_utime_h=yes else @@ -2390,12 +4215,12 @@ EOF fi echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6 -echo "configure:2394: checking whether fprintf must be declared" >&5 +echo "configure:4219: 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 2399 "configure" +#line 4224 "configure" #include "confdefs.h" #include <stdio.h> @@ -2416,7 +4241,7 @@ int main() { char *(*pfn) = (char *(*)) fprintf ; return 0; } EOF -if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_fprintf=no else @@ -2438,12 +4263,12 @@ EOF fi echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:2442: checking whether strstr must be declared" >&5 +echo "configure:4267: 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 2447 "configure" +#line 4272 "configure" #include "confdefs.h" #include <stdio.h> @@ -2464,7 +4289,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -2486,12 +4311,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:2490: checking whether sbrk must be declared" >&5 +echo "configure:4315: 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 2495 "configure" +#line 4320 "configure" #include "confdefs.h" #include <stdio.h> @@ -2512,7 +4337,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -2534,12 +4359,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:2538: checking whether getenv must be declared" >&5 +echo "configure:4363: 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 2543 "configure" +#line 4368 "configure" #include "confdefs.h" #include <stdio.h> @@ -2560,7 +4385,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -2786,7 +4611,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -2849,18 +4674,40 @@ s%@LD@%$LD%g s%@NM@%$NM%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g +s%@DLLTOOL@%$DLLTOOL%g +s%@AS@%$AS%g s%@YACC@%$YACC%g s%@LEX@%$LEX%g s%@LEXLIB@%$LEXLIB%g s%@CPP@%$CPP%g s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g +s%@ALLOCA@%$ALLOCA%g +s%@USE_NLS@%$USE_NLS%g +s%@MSGFMT@%$MSGFMT%g +s%@GMSGFMT@%$GMSGFMT%g +s%@XGETTEXT@%$XGETTEXT%g +s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g +s%@CATALOGS@%$CATALOGS%g +s%@CATOBJEXT@%$CATOBJEXT%g +s%@DATADIRNAME@%$DATADIRNAME%g +s%@GMOFILES@%$GMOFILES%g +s%@INSTOBJEXT@%$INSTOBJEXT%g +s%@INTLDEPS@%$INTLDEPS%g +s%@INTLLIBS@%$INTLLIBS%g +s%@INTLOBJS@%$INTLOBJS%g +s%@POFILES@%$POFILES%g +s%@POSUB@%$POSUB%g +s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g +s%@GT_NO@%$GT_NO%g +s%@GT_YES@%$GT_YES%g +s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g +s%@l@%$l%g s%@MAINT@%$MAINT%g s%@EXEEXT@%$EXEEXT%g s%@HDEFINES@%$HDEFINES%g s%@AR@%$AR%g s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g -s%@ALLOCA@%$ALLOCA%g s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g s%@BUILD_SRCONV@%$BUILD_SRCONV%g @@ -2909,7 +4756,7 @@ EOF cat >> $CONFIG_STATUS <<EOF -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} +CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -3082,7 +4929,7 @@ cat >> $CONFIG_STATUS <<EOF EOF cat >> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h - +sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile exit 0 EOF chmod +x $CONFIG_STATUS diff --git a/binutils/configure.in b/binutils/configure.in index f41e42d..f763fd7 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -5,7 +5,7 @@ AC_INIT(ar.c) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(binutils, 2.8.2) +AM_INIT_AUTOMAKE(binutils, 2.9.1) AM_PROG_LIBTOOL @@ -37,8 +37,10 @@ fi AC_PROG_CC AC_PROG_YACC -AC_PROG_LEX -AC_DECL_YYTEXT +AM_PROG_LEX + +ALL_LINGUAS= +CY_GNU_GETTEXT AM_MAINTAINER_MODE AM_CYGWIN32 @@ -62,13 +64,6 @@ AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h) AC_HEADER_SYS_WAIT AC_FUNC_ALLOCA AC_CHECK_FUNCS(sbrk utimes) -dnl Temporary workaround for bug in autoconf 2.12. When the bug is -dnl fixed, we can just call AC_FUNC_VFORK in all cases. -if test "x$cross_compiling" = "xno"; then - AC_FUNC_VFORK -else - AC_CHECK_FUNC(vfork, , AC_DEFINE(vfork, fork)) -fi AC_MSG_CHECKING(for time_t in time.h) AC_CACHE_VAL(bu_cv_decl_time_t_time_h, @@ -173,7 +168,7 @@ changequote([,])dnl BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; changequote(,)dnl - i[3-6]86-*pe* | i[3-6]86-*-cygwin32) + i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32*) changequote([,])dnl BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" @@ -195,6 +190,8 @@ AC_SUBST(BUILD_DLLTOOL) AC_SUBST(DLLTOOL_DEFS) AC_SUBST(BUILD_WINDRES) +AC_DEFINE_UNQUOTED(TARGET, "${target}") + targ=$target . $srcdir/../bfd/config.bfd if test "x$targ_underscore" = "xyes"; then @@ -204,4 +201,5 @@ else fi AC_SUBST(UNDERSCORE) -AC_OUTPUT(Makefile) +AC_OUTPUT(Makefile po/Makefile.in:po/Make-in, +[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]) diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 0a484e4..78ff1ab 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -15,7 +15,8 @@ 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. */ + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* @@ -223,7 +224,8 @@ #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> -#else +#else /* ! HAVE_SYS_WAIT_H */ +#if ! defined (_WIN32) || defined (__CYGWIN32__) #ifndef WIFEXITED #define WIFEXITED(w) (((w)&0377) == 0) #endif @@ -236,7 +238,21 @@ #ifndef WEXITSTATUS #define WEXITSTATUS(w) (((w) >> 8) & 0377) #endif +#else /* defined (_WIN32) && ! defined (__CYGWIN32__) */ +#ifndef WIFEXITED +#define WIFEXITED(w) (((w) & 0xff) == 0) #endif +#ifndef WIFSIGNALED +#define WIFSIGNALED(w) (((w) & 0xff) != 0 && ((w) & 0xff) != 0x7f) +#endif +#ifndef WTERMSIG +#define WTERMSIG(w) ((w) & 0x7f) +#endif +#ifndef WEXITSTATUS +#define WEXITSTATUS(w) (((w) & 0xff00) >> 8) +#endif +#endif /* defined (_WIN32) && ! defined (__CYGWIN32__) */ +#endif /* ! HAVE_SYS_WAIT_H */ static char *as_name = "as"; @@ -483,7 +499,7 @@ process_def_file (name) FILE *f = fopen (name, FOPEN_RT); if (!f) { - fprintf (stderr, "%s: Can't open def file %s\n", program_name, name); + fprintf (stderr, _("%s: Can't open def file %s\n"), program_name, name); exit (1); } @@ -513,7 +529,7 @@ int yyerror (err) const char *err; { - fprintf (stderr, "%s: Syntax error in def file %s:%d\n", + fprintf (stderr, _("%s: Syntax error in def file %s:%d\n"), program_name, def_file, linenumber); return 0; } @@ -546,10 +562,10 @@ def_name (name, base) int base; { if (verbose) - fprintf (stderr, "%s NAME %s base %x\n", program_name, name, base); + fprintf (stderr, _("%s NAME %s base %x\n"), program_name, name, base); if (d_is_dll) { - fprintf (stderr, "Can't have LIBRARY and NAME\n"); + fprintf (stderr, _("Can't have LIBRARY and NAME\n")); } d_name = name; d_is_exe = 1; @@ -561,10 +577,10 @@ def_library (name, base) int base; { if (verbose) - printf ("%s: LIBRARY %s base %x\n", program_name, name, base); + printf (_("%s: LIBRARY %s base %x\n"), program_name, name, base); if (d_is_exe) { - fprintf (stderr, "%s: Can't have LIBRARY and NAME\n", program_name); + fprintf (stderr, _("%s: Can't have LIBRARY and NAME\n"), program_name); } d_name = name; d_is_dll = 1; @@ -623,7 +639,7 @@ def_import (internal, module, entry) const char *entry; { if (verbose) - fprintf (stderr, "%s: IMPORTS are ignored", program_name); + fprintf (stderr, _("%s: IMPORTS are ignored"), program_name); } void @@ -725,19 +741,19 @@ run (what, args) pid = pwait (pid, &wait_status, 0); if (pid == -1) { - fprintf (stderr, "%s: wait: %s\n", program_name, strerror (errno)); + fprintf (stderr, _("%s: wait: %s\n"), program_name, strerror (errno)); exit (1); } else if (WIFSIGNALED (wait_status)) { - fprintf (stderr, "%s: subprocess got fatal signal %d\n", + fprintf (stderr, _("%s: subprocess got fatal signal %d\n"), program_name, WTERMSIG (wait_status)); exit (1); } else if (WIFEXITED (wait_status)) { if (WEXITSTATUS (wait_status) != 0) - fprintf (stderr, "%s: %s exited with status %d\n", + fprintf (stderr, _("%s: %s exited with status %d\n"), program_name, what, WEXITSTATUS (wait_status)); } else @@ -765,7 +781,7 @@ scan_open_obj_file (abfd) char *e; bfd_get_section_contents (abfd, s, buf, 0, size); if (verbose) - fprintf (stderr, "%s: Sucking in info from %s\n", + fprintf (stderr, _("%s: Sucking in info from %s\n"), program_name, bfd_get_filename (abfd)); @@ -800,7 +816,7 @@ scan_open_obj_file (abfd) basenames (abfd); if (verbose) - fprintf (stderr, "%s: Done readin\n", + fprintf (stderr, _("%s: Done readin\n"), program_name); } @@ -812,7 +828,7 @@ scan_obj_file (filename) if (!f) { - fprintf (stderr, "%s: Unable to open object file %s\n", + fprintf (stderr, _("%s: Unable to open object file %s\n"), program_name, filename); exit (1); @@ -937,18 +953,18 @@ gen_exp_file () sprintf (outfile, "t%s", exp_name); if (verbose) - fprintf (stderr, "%s: Generate exp file %s\n", + fprintf (stderr, _("%s: Generate exp file %s\n"), program_name, exp_name); f = fopen (outfile, FOPEN_WT); if (!f) { - fprintf (stderr, "%s: Unable to open output file %s\n", program_name, outfile); + fprintf (stderr, _("%s: Unable to open output file %s\n"), program_name, outfile); exit (1); } if (verbose) { - fprintf (stderr, "%s: Opened file %s\n", + fprintf (stderr, _("%s: Opened file %s\n"), program_name, outfile); } @@ -1081,8 +1097,13 @@ gen_exp_file () for (i = 0, exp = d_exports; exp; i++, exp = exp->next) if (!exp->noname || show_allnames) { + /* We use a single underscore for MS compatibility, and a + double underscore for backward compatibility with old + cygwin releases. */ fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); + fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name); fprintf (f, "__imp_%s:\n", exp->name); + fprintf (f, "_imp__%s:\n", exp->name); fprintf (f, "\t%s\t%s\n", ASM_LONG, exp->name); } } @@ -1266,7 +1287,8 @@ static sinfo secdata[NSECS] = #endif /* -This is what we're trying to make +This is what we're trying to make. We generate the imp symbols with +both single and double underscores, for compatibility. .text .global _GetFileVersionInfoSizeW@8 @@ -1330,6 +1352,7 @@ make_one_lib_file (exp, i) fprintf (f, "\t.text\n"); fprintf (f, "\t%s\t%s%s\n", ASM_GLOBAL, ASM_PREFIX, exp->name); fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); + fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name); fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX, exp->name, ASM_JUMP, exp->name); @@ -1341,6 +1364,7 @@ make_one_lib_file (exp, i) fprintf (f, "\t.section .idata$5\n"); fprintf (f, "__imp_%s:\n", exp->name); + fprintf (f, "_imp__%s:\n", exp->name); dump_iat (f, exp); @@ -1371,7 +1395,7 @@ make_one_lib_file (exp, i) bfd *abfd; asymbol *exp_label; - asymbol *iname; + asymbol *iname, *iname2; asymbol *iname_lab; asymbol **iname_lab_pp; asymbol **iname_pp; @@ -1388,8 +1412,7 @@ make_one_lib_file (exp, i) asymbol **toc_pp; #endif - /* one symbol for each section, 2 extra + a null */ - asymbol *ptrs[NSECS+3+EXTRA+1]; + asymbol *ptrs[NSECS + 4 + EXTRA + 1]; char *outname = xmalloc (10); int oidx = 0; @@ -1397,7 +1420,7 @@ make_one_lib_file (exp, i) abfd = bfd_openw (outname, HOW_BFD_TARGET); if (!abfd) { - fprintf (stderr, "%s: bfd_open failed open output file %s\n", + fprintf (stderr, _("%s: bfd_open failed open output file %s\n"), program_name, outname); exit (1); } @@ -1454,12 +1477,20 @@ make_one_lib_file (exp, i) ptrs[oidx++] = exp_label; } + /* Generate imp symbols with one underscore for Microsoft + compatibility, and with two underscores for backward + compatibility with old versions of cygwin. */ iname = bfd_make_empty_symbol(abfd); iname->name = make_label ("__imp_", exp->name); iname->section = secdata[IDATA5].sec; iname->flags = BSF_GLOBAL; iname->value = 0; + iname2 = bfd_make_empty_symbol(abfd); + iname2->name = make_label ("_imp__", exp->name); + iname2->section = secdata[IDATA5].sec; + iname2->flags = BSF_GLOBAL; + iname2->value = 0; iname_lab = bfd_make_empty_symbol(abfd); @@ -1471,6 +1502,7 @@ make_one_lib_file (exp, i) iname_pp = ptrs + oidx; ptrs[oidx++] = iname; + ptrs[oidx++] = iname2; iname_lab_pp = ptrs + oidx; ptrs[oidx++] = iname_lab; @@ -1581,7 +1613,10 @@ make_one_lib_file (exp, i) case IDATA6: if (!exp->noname) { - int idx = exp->hint + 1; + /* This used to add 1 to exp->hint. I don't know + why it did that, and it does not match what I see + in programs compiled with the MS tools. */ + int idx = exp->hint; si->size = strlen (xlate (exp->name)) + 3; si->data = xmalloc (si->size); si->data[0] = idx & 0xff; @@ -1874,7 +1909,8 @@ gen_lib_file () if (!outarch) { - fprintf (stderr, "%s: Can't open .lib file %s\n", program_name, imp_name); + fprintf (stderr, _("%s: Can't open .lib file %s\n"), + program_name, imp_name); exit (1); } bfd_set_format (outarch, bfd_archive); @@ -1928,13 +1964,17 @@ gen_lib_file () } if (dontdeltemps < 2) - for (i = 0, exp = d_exports; exp; i++, exp = exp->next) - { - sprintf (outfile, "ds%d.o",i); - unlink (outfile); - } - + { + for (i = 0, exp = d_exports; exp; i++, exp = exp->next) + { + sprintf (outfile, "ds%d.o",i); + if (unlink (outfile) < 0) + fprintf (stderr, _("%s: cannot delete %s: %s\n"), program_name, + outfile, strerror (errno)); + } + } } + /**********************************************************************/ /* Run through the information gathered from the .o files and the @@ -2032,7 +2072,7 @@ process_duplicates (d_export_vec) more = 1; if (verbose) - fprintf (stderr, "Warning, ignoring duplicate EXPORT %s %d,%d\n", + fprintf (stderr, _("Warning, ignoring duplicate EXPORT %s %d,%d\n"), a->name, a->ordinal, b->ordinal); @@ -2040,7 +2080,7 @@ process_duplicates (d_export_vec) && b->ordinal != -1) { - fprintf (stderr, "Error, duplicate EXPORT with oridinals %s\n", + fprintf (stderr, _("Error, duplicate EXPORT with oridinals %s\n"), a->name); exit (1); } @@ -2212,22 +2252,22 @@ usage (file, status) FILE *file; int status; { - fprintf (file, "Usage %s <options> <object-files>\n", program_name); - fprintf (file, " --machine <machine>\n"); - fprintf (file, " --output-exp <outname> Generate export file.\n"); - fprintf (file, " --output-lib <outname> Generate input library.\n"); - fprintf (file, " --add-indirect Add dll indirects to export file.\n"); - fprintf (file, " --dllname <name> Name of input dll to put into output lib.\n"); - fprintf (file, " --def <deffile> Name input .def file\n"); - fprintf (file, " --output-def <deffile> Name output .def file\n"); - fprintf (file, " --base-file <basefile> Read linker generated base file\n"); - fprintf (file, " --no-idata4 Don't generate idata$4 section\n"); - fprintf (file, " --no-idata5 Don't generate idata$5 section\n"); - fprintf (file, " -v Verbose\n"); - fprintf (file, " -U Add underscores to .lib\n"); - fprintf (file, " -k Kill @<n> from exported names\n"); - fprintf (file, " --as <name> Use <name> for assembler\n"); - fprintf (file, " --nodelete Keep temp files.\n"); + fprintf (file, _("Usage %s <options> <object-files>\n"), program_name); + fprintf (file, _(" --machine <machine>\n")); + fprintf (file, _(" --output-exp <outname> Generate export file.\n")); + fprintf (file, _(" --output-lib <outname> Generate input library.\n")); + fprintf (file, _(" --add-indirect Add dll indirects to export file.\n")); + fprintf (file, _(" --dllname <name> Name of input dll to put into output lib.\n")); + fprintf (file, _(" --def <deffile> Name input .def file\n")); + fprintf (file, _(" --output-def <deffile> Name output .def file\n")); + fprintf (file, _(" --base-file <basefile> Read linker generated base file\n")); + fprintf (file, _(" --no-idata4 Don't generate idata$4 section\n")); + fprintf (file, _(" --no-idata5 Don't generate idata$5 section\n")); + fprintf (file, _(" -v Verbose\n")); + fprintf (file, _(" -U Add underscores to .lib\n")); + fprintf (file, _(" -k Kill @<n> from exported names\n")); + fprintf (file, _(" --as <name> Use <name> for assembler\n")); + fprintf (file, _(" --nodelete Keep temp files.\n")); exit (status); } @@ -2330,7 +2370,7 @@ main (ac, av) base_file = fopen (optarg, FOPEN_RB); if (!base_file) { - fprintf (stderr, "%s: Unable to open base-file %s\n", + fprintf (stderr, _("%s: Unable to open base-file %s\n"), av[0], optarg); exit (1); @@ -2350,7 +2390,7 @@ main (ac, av) if (!mtable[i].type) { - fprintf (stderr, "Machine not supported\n"); + fprintf (stderr, _("Machine not supported\n")); exit (1); } machine = i; diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c index e1df033..8544ba0 100644 --- a/binutils/nlmconv.c +++ b/binutils/nlmconv.c @@ -1,5 +1,5 @@ /* nlmconv.c -- NLM conversion program - Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -186,12 +186,25 @@ main (argc, argv) char inlead, outlead; boolean gotstart, gotexit, gotcheck; struct stat st; - FILE *custom_data, *help_data, *message_data, *rpc_data, *shared_data; - size_t custom_size, help_size, message_size, module_size, rpc_size; - asection *custom_section, *help_section, *message_section, *module_section; - asection *rpc_section, *shared_section; + FILE *custom_data = NULL; + FILE *help_data = NULL; + FILE *message_data = NULL; + FILE *rpc_data = NULL; + FILE *shared_data = NULL; + size_t custom_size = 0; + size_t help_size = 0; + size_t message_size = 0; + size_t module_size = 0; + size_t rpc_size = 0; + asection *custom_section = NULL; + asection *help_section = NULL; + asection *message_section = NULL; + asection *module_section = NULL; + asection *rpc_section = NULL; + asection *shared_section = NULL; bfd *sharedbfd; - size_t shared_offset, shared_size; + size_t shared_offset = 0; + size_t shared_size = 0; Nlm_Internal_Fixed_Header sharedhdr; int len; char *modname; @@ -253,7 +266,7 @@ main (argc, argv) if (strcmp (input_file, output_file) == 0) { fprintf (stderr, - "%s: input and output files must be different\n", + _("%s: input and output files must be different\n"), program_name); exit (1); } @@ -303,7 +316,7 @@ main (argc, argv) if (input_file != NULL) { fprintf (stderr, - "%s: input file named both on command line and with INPUT\n", + _("%s: input file named both on command line and with INPUT\n"), program_name); exit (1); } @@ -314,7 +327,7 @@ main (argc, argv) } else if (input_file == NULL) { - fprintf (stderr, "%s: no input file\n", program_name); + fprintf (stderr, _("%s: no input file\n"), program_name); show_usage (stderr, 1); } @@ -344,7 +357,7 @@ main (argc, argv) Otherwise use the file named in the OUTPUT statement. */ if (output_file == NULL) { - fprintf (stderr, "%s: no name for output file\n", + fprintf (stderr, _("%s: no name for output file\n"), program_name); show_usage (stderr, 1); } @@ -359,7 +372,7 @@ main (argc, argv) if (bfd_arch_get_compatible (inbfd, outbfd) == NULL) fprintf (stderr, - "%s: warning:input and output formats are not compatible\n", + _("%s: warning:input and output formats are not compatible\n"), program_name); /* Move the values read from the command file into outbfd. */ @@ -389,7 +402,7 @@ main (argc, argv) if (bss_sec == NULL || ! bfd_set_section_flags (outbfd, bss_sec, SEC_ALLOC) || ! bfd_set_section_alignment (outbfd, bss_sec, 1)) - bfd_fatal ("make .bss section"); + bfd_fatal (_("make .bss section")); } /* We store the original section names in the .nlmsections section, @@ -398,9 +411,9 @@ main (argc, argv) the NLM header area. */ secsec = bfd_make_section (outbfd, ".nlmsections"); if (secsec == NULL) - bfd_fatal ("make .nlmsections section"); + bfd_fatal (_("make .nlmsections section")); if (! bfd_set_section_flags (outbfd, secsec, SEC_HAS_CONTENTS)) - bfd_fatal ("set .nlmsections flags"); + bfd_fatal (_("set .nlmsections flags")); #ifdef NLMCONV_POWERPC /* For PowerPC NetWare we need to build stubs for calls to undefined @@ -428,14 +441,14 @@ main (argc, argv) add = ((vma + align - 1) &~ (align - 1)) - vma; vma += add; if (! bfd_set_section_vma (outbfd, bss_sec, vma)) - bfd_fatal ("set .bss vma"); + bfd_fatal (_("set .bss vma")); if (add != 0) { bfd_size_type data_size; data_size = bfd_get_section_size_before_reloc (data_sec); if (! bfd_set_section_size (outbfd, data_sec, data_size + add)) - bfd_fatal ("set .data size"); + bfd_fatal (_("set .data size")); } } @@ -616,7 +629,7 @@ main (argc, argv) } if (l == NULL) fprintf (stderr, - "%s: warning: symbol %s imported but not in import list\n", + _("%s: warning: symbol %s imported but not in import list\n"), program_name, bfd_asymbol_name (sym)); } @@ -636,7 +649,7 @@ main (argc, argv) && text_sec != (asection *) NULL) val += bfd_section_size (outbfd, text_sec); if (! bfd_set_start_address (outbfd, val)) - bfd_fatal ("set start address"); + bfd_fatal (_("set start address")); gotstart = true; } if (strcmp (bfd_asymbol_name (sym), exit_procedure) == 0) @@ -685,14 +698,14 @@ main (argc, argv) bfd_set_symtab (outbfd, outsyms, symcount + newsymcount); if (! gotstart) - fprintf (stderr, "%s: warning: START procedure %s not defined\n", + fprintf (stderr, _("%s: warning: START procedure %s not defined\n"), program_name, start_procedure); if (! gotexit) - fprintf (stderr, "%s: warning: EXIT procedure %s not defined\n", + fprintf (stderr, _("%s: warning: EXIT procedure %s not defined\n"), program_name, exit_procedure); if (check_procedure != NULL && ! gotcheck) - fprintf (stderr, "%s: warning: CHECK procedure %s not defined\n", + fprintf (stderr, _("%s: warning: CHECK procedure %s not defined\n"), program_name, check_procedure); /* Add additional sections required for the header information. */ @@ -714,7 +727,7 @@ main (argc, argv) || ! bfd_set_section_size (outbfd, custom_section, custom_size) || ! bfd_set_section_flags (outbfd, custom_section, SEC_HAS_CONTENTS)) - bfd_fatal ("custom section"); + bfd_fatal (_("custom section")); } } if (help_file != NULL) @@ -735,7 +748,7 @@ main (argc, argv) || ! bfd_set_section_size (outbfd, help_section, help_size) || ! bfd_set_section_flags (outbfd, help_section, SEC_HAS_CONTENTS)) - bfd_fatal ("help section"); + bfd_fatal (_("help section")); strncpy (nlm_extended_header (outbfd)->stamp, "MeSsAgEs", 8); } } @@ -757,7 +770,7 @@ main (argc, argv) || ! bfd_set_section_size (outbfd, message_section, message_size) || ! bfd_set_section_flags (outbfd, message_section, SEC_HAS_CONTENTS)) - bfd_fatal ("message section"); + bfd_fatal (_("message section")); strncpy (nlm_extended_header (outbfd)->stamp, "MeSsAgEs", 8); } } @@ -773,7 +786,7 @@ main (argc, argv) || ! bfd_set_section_size (outbfd, module_section, module_size) || ! bfd_set_section_flags (outbfd, module_section, SEC_HAS_CONTENTS)) - bfd_fatal ("module section"); + bfd_fatal (_("module section")); } if (rpc_file != NULL) { @@ -793,7 +806,7 @@ main (argc, argv) || ! bfd_set_section_size (outbfd, rpc_section, rpc_size) || ! bfd_set_section_flags (outbfd, rpc_section, SEC_HAS_CONTENTS)) - bfd_fatal ("rpc section"); + bfd_fatal (_("rpc section")); strncpy (nlm_extended_header (outbfd)->stamp, "MeSsAgEs", 8); } } @@ -830,19 +843,19 @@ main (argc, argv) { /* There is no place to record this information. */ fprintf (stderr, - "%s:%s: warning: shared libraries can not have uninitialized data\n", + _("%s:%s: warning: shared libraries can not have uninitialized data\n"), program_name, sharelib_file); } shared_offset = st.st_size; - if (shared_offset > sharedhdr.codeImageOffset) + if (shared_offset > (size_t) sharedhdr.codeImageOffset) shared_offset = sharedhdr.codeImageOffset; - if (shared_offset > sharedhdr.dataImageOffset) + if (shared_offset > (size_t) sharedhdr.dataImageOffset) shared_offset = sharedhdr.dataImageOffset; - if (shared_offset > sharedhdr.relocationFixupOffset) + if (shared_offset > (size_t) sharedhdr.relocationFixupOffset) shared_offset = sharedhdr.relocationFixupOffset; - if (shared_offset > sharedhdr.externalReferencesOffset) + if (shared_offset > (size_t) sharedhdr.externalReferencesOffset) shared_offset = sharedhdr.externalReferencesOffset; - if (shared_offset > sharedhdr.publicsOffset) + if (shared_offset > (size_t) sharedhdr.publicsOffset) shared_offset = sharedhdr.publicsOffset; shared_size = st.st_size - shared_offset; shared_section = bfd_make_section (outbfd, ".nlmshared"); @@ -851,7 +864,7 @@ main (argc, argv) shared_size) || ! bfd_set_section_flags (outbfd, shared_section, SEC_HAS_CONTENTS)) - bfd_fatal ("shared section"); + bfd_fatal (_("shared section")); strncpy (nlm_extended_header (outbfd)->stamp, "MeSsAgEs", 8); } } @@ -859,7 +872,7 @@ main (argc, argv) /* Check whether a version was given. */ if (strncmp (version_hdr->stamp, "VeRsIoN#", 8) != 0) - fprintf (stderr, "%s: warning: No version number given\n", + fprintf (stderr, _("%s: warning: No version number given\n"), program_name); /* At least for now, always create an extended header, because that @@ -900,13 +913,13 @@ main (argc, argv) data = xmalloc (custom_size); if (fread (data, 1, custom_size, custom_data) != custom_size) - fprintf (stderr, "%s:%s: read: %s\n", program_name, custom_file, + fprintf (stderr, _("%s:%s: read: %s\n"), program_name, custom_file, strerror (errno)); else { if (! bfd_set_section_contents (outbfd, custom_section, data, (file_ptr) 0, custom_size)) - bfd_fatal ("custom section"); + bfd_fatal (_("custom section")); nlm_fixed_header (outbfd)->customDataOffset = custom_section->filepos; nlm_fixed_header (outbfd)->customDataSize = custom_size; @@ -924,7 +937,7 @@ main (argc, argv) } if (map_file != NULL) fprintf (stderr, - "%s: warning: MAP and FULLMAP are not supported; try ld -M\n", + _("%s: warning: MAP and FULLMAP are not supported; try ld -M\n"), program_name); if (help_file != NULL) { @@ -932,13 +945,13 @@ main (argc, argv) data = xmalloc (help_size); if (fread (data, 1, help_size, help_data) != help_size) - fprintf (stderr, "%s:%s: read: %s\n", program_name, help_file, + fprintf (stderr, _("%s:%s: read: %s\n"), program_name, help_file, strerror (errno)); else { if (! bfd_set_section_contents (outbfd, help_section, data, (file_ptr) 0, help_size)) - bfd_fatal ("help section"); + bfd_fatal (_("help section")); nlm_extended_header (outbfd)->helpFileOffset = help_section->filepos; nlm_extended_header (outbfd)->helpFileLength = help_size; @@ -951,13 +964,13 @@ main (argc, argv) data = xmalloc (message_size); if (fread (data, 1, message_size, message_data) != message_size) - fprintf (stderr, "%s:%s: read: %s\n", program_name, message_file, + fprintf (stderr, _("%s:%s: read: %s\n"), program_name, message_file, strerror (errno)); else { if (! bfd_set_section_contents (outbfd, message_section, data, (file_ptr) 0, message_size)) - bfd_fatal ("message section"); + bfd_fatal (_("message section")); nlm_extended_header (outbfd)->messageFileOffset = message_section->filepos; nlm_extended_header (outbfd)->messageFileLength = message_size; @@ -990,7 +1003,7 @@ main (argc, argv) } if (! bfd_set_section_contents (outbfd, module_section, data, (file_ptr) 0, module_size)) - bfd_fatal ("module section"); + bfd_fatal (_("module section")); nlm_fixed_header (outbfd)->moduleDependencyOffset = module_section->filepos; nlm_fixed_header (outbfd)->numberOfModuleDependencies = c; @@ -1001,13 +1014,13 @@ main (argc, argv) data = xmalloc (rpc_size); if (fread (data, 1, rpc_size, rpc_data) != rpc_size) - fprintf (stderr, "%s:%s: read: %s\n", program_name, rpc_file, + fprintf (stderr, _("%s:%s: read: %s\n"), program_name, rpc_file, strerror (errno)); else { if (! bfd_set_section_contents (outbfd, rpc_section, data, (file_ptr) 0, rpc_size)) - bfd_fatal ("rpc section"); + bfd_fatal (_("rpc section")); nlm_extended_header (outbfd)->RPCDataOffset = rpc_section->filepos; nlm_extended_header (outbfd)->RPCDataLength = rpc_size; @@ -1021,13 +1034,13 @@ main (argc, argv) data = xmalloc (shared_size); if (fseek (shared_data, shared_offset, SEEK_SET) != 0 || fread (data, 1, shared_size, shared_data) != shared_size) - fprintf (stderr, "%s:%s: read: %s\n", program_name, sharelib_file, + fprintf (stderr, _("%s:%s: read: %s\n"), program_name, sharelib_file, strerror (errno)); else { if (! bfd_set_section_contents (outbfd, shared_section, data, (file_ptr) 0, shared_size)) - bfd_fatal ("shared section"); + bfd_fatal (_("shared section")); } nlm_extended_header (outbfd)->sharedCodeOffset = sharedhdr.codeImageOffset - shared_offset + shared_section->filepos; @@ -1074,7 +1087,7 @@ main (argc, argv) for (modname = nlm_fixed_header (outbfd)->moduleName; *modname != '\0'; modname++) - if (islower (*modname)) + if (islower ((unsigned char) *modname)) *modname = toupper (*modname); strncpy (nlm_variable_header (outbfd)->oldThreadName, " LONG", @@ -1099,7 +1112,7 @@ main (argc, argv) static void show_help () { - printf ("%s: Convert an object file into a NetWare Loadable Module\n", + printf (_("%s: Convert an object file into a NetWare Loadable Module\n"), program_name); show_usage (stdout, 0); } @@ -1111,15 +1124,15 @@ show_usage (file, status) FILE *file; int status; { - fprintf (file, "\ + fprintf (file, _("\ Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n\ [--input-target=bfdname] [--output-target=bfdname]\n\ [--header-file=file] [--linker=linker] [--debug]\n\ [--help] [--version]\n\ - [in-file [out-file]]\n", + [in-file [out-file]]\n"), program_name); if (status == 0) - fprintf (file, "Report bugs to bug-gnu-utils@prep.ai.mit.edu\n"); + fprintf (file, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (status); } @@ -1151,7 +1164,7 @@ select_output_format (arch, mach, bigendian) return "nlm32-powerpc"; #endif default: - fprintf (stderr, "%s: support not compiled in for %s\n", + fprintf (stderr, _("%s: support not compiled in for %s\n"), program_name, bfd_printable_arch_mach (arch, mach)); exit (1); /* Avoid warning. */ @@ -1194,7 +1207,7 @@ setup_sections (inbfd, insec, data_ptr) { outsec = bfd_make_section (outbfd, outname); if (outsec == NULL) - bfd_fatal ("make section"); + bfd_fatal (_("make section")); } insec->output_section = outsec; @@ -1208,17 +1221,17 @@ setup_sections (inbfd, insec, data_ptr) (bfd_section_size (outbfd, outsec) + bfd_section_size (inbfd, insec) + add))) - bfd_fatal ("set section size"); + bfd_fatal (_("set section size")); if ((bfd_section_alignment (inbfd, insec) > bfd_section_alignment (outbfd, outsec)) && ! bfd_set_section_alignment (outbfd, outsec, bfd_section_alignment (inbfd, insec))) - bfd_fatal ("set section alignment"); + bfd_fatal (_("set section alignment")); if (! bfd_set_section_flags (outbfd, outsec, f | bfd_get_section_flags (outbfd, outsec))) - bfd_fatal ("set section flags"); + bfd_fatal (_("set section flags")); bfd_set_reloc (outbfd, outsec, (arelent **) NULL, 0); @@ -1229,7 +1242,7 @@ setup_sections (inbfd, insec, data_ptr) secsecsize = (secsecsize + 3) &~ 3; secsecsize += 8; if (! bfd_set_section_size (outbfd, secsec, secsecsize)) - bfd_fatal ("set .nlmsections size"); + bfd_fatal (_("set .nlmsections size")); } /* Copy the section contents. */ @@ -1317,7 +1330,7 @@ copy_sections (inbfd, insec, data_ptr) /* Add this section to .nlmsections. */ if (! bfd_set_section_contents (outbfd, secsec, (PTR) inname, secsecoff, strlen (inname) + 1)) - bfd_fatal ("set .nlmsection contents"); + bfd_fatal (_("set .nlmsection contents")); secsecoff += strlen (inname) + 1; add = ((secsecoff + 3) &~ 3) - secsecoff; @@ -1325,7 +1338,7 @@ copy_sections (inbfd, insec, data_ptr) { bfd_h_put_32 (outbfd, (bfd_vma) 0, buf); if (! bfd_set_section_contents (outbfd, secsec, buf, secsecoff, add)) - bfd_fatal ("set .nlmsection contents"); + bfd_fatal (_("set .nlmsection contents")); secsecoff += add; } @@ -1334,12 +1347,12 @@ copy_sections (inbfd, insec, data_ptr) else bfd_h_put_32 (outbfd, (bfd_vma) 0, buf); if (! bfd_set_section_contents (outbfd, secsec, buf, secsecoff, 4)) - bfd_fatal ("set .nlmsection contents"); + bfd_fatal (_("set .nlmsection contents")); secsecoff += 4; bfd_h_put_32 (outbfd, (bfd_vma) size, buf); if (! bfd_set_section_contents (outbfd, secsec, buf, secsecoff, 4)) - bfd_fatal ("set .nlmsection contents"); + bfd_fatal (_("set .nlmsection contents")); secsecoff += 4; } @@ -1663,7 +1676,7 @@ alpha_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents, { register bfd_size_type i; - for (i = 0; i < old_reloc_count; i++, relocs++) + for (i = 0; i < (bfd_size_type) old_reloc_count; i++, relocs++) (*relocs)->address += insec->output_offset; } } @@ -1842,7 +1855,7 @@ powerpc_build_stubs (inbfd, outbfd, symbols_ptr, symcount_ptr) (got_base + (stubcount * POWERPC_STUB_TOC_ENTRY_SIZE)))) - bfd_fatal ("stub section sizes"); + bfd_fatal (_("stub section sizes")); } } @@ -1891,7 +1904,7 @@ powerpc_resolve_stubs (inbfd, outbfd) buf, l->start->value, POWERPC_STUB_SIZE)) - bfd_fatal ("writing stub"); + bfd_fatal (_("writing stub")); /* Create a new reloc for the TOC entry. */ reloc = (arelent *) xmalloc (sizeof (arelent)); @@ -1981,7 +1994,7 @@ powerpc_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents, between two sections both of which were placed in the same output section. This should not happen. */ if (bfd_get_section (sym) != insec->output_section) - fprintf (stderr, "%s: unresolved PC relative reloc against %s\n", + fprintf (stderr, _("%s: unresolved PC relative reloc against %s\n"), program_name, bfd_asymbol_name (sym)); else { @@ -2046,7 +2059,7 @@ powerpc_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents, if ((bfd_signed_vma) val < - 0x8000 || (bfd_signed_vma) val >= 0x8000) fprintf (stderr, - "%s: overflow when adjusting relocation against %s\n", + _("%s: overflow when adjusting relocation against %s\n"), program_name, bfd_asymbol_name (sym)); bfd_put_16 (outbfd, val, (bfd_byte *) contents + rel->address); break; @@ -2169,7 +2182,7 @@ link_inputs (inputs, ld) PEXECUTE_SEARCH | PEXECUTE_ONE); if (pid == -1) { - fprintf (stderr, "%s: execution of %s failed: ", program_name, ld); + fprintf (stderr, _("%s: execution of %s failed: "), program_name, ld); fprintf (stderr, errfmt, errarg); unlink (unlink_on_exit); exit (1); @@ -2184,7 +2197,7 @@ link_inputs (inputs, ld) if (status != 0) { - fprintf (stderr, "%s: Execution of %s failed\n", program_name, ld); + fprintf (stderr, _("%s: Execution of %s failed\n"), program_name, ld); unlink (unlink_on_exit); exit (1); } diff --git a/binutils/nm.c b/binutils/nm.c index 8350368..204c6a2 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -1,5 +1,5 @@ /* nm.c -- Describe symbol table of a rel file. - Copyright 1991, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -35,6 +35,29 @@ struct size_sym bfd_vma size; }; +/* When fetching relocs, we use this structure to pass information to + get_relocs. */ + +struct get_relocs_info +{ + asection **secs; + arelent ***relocs; + long *relcount; + asymbol **syms; +}; + +static void +usage PARAMS ((FILE *, int)); + +static void +set_print_radix PARAMS ((char *)); + +static void +set_output_format PARAMS ((char *)); + +static void +display_archive PARAMS ((bfd *)); + static boolean display_file PARAMS ((char *filename)); @@ -55,6 +78,9 @@ static void print_size_symbols PARAMS ((bfd *, boolean, struct size_sym *, long, bfd *)); static void +print_symname PARAMS ((const char *, const char *, bfd *)); + +static void print_symbol PARAMS ((bfd *, asymbol *, bfd *)); static void @@ -134,6 +160,8 @@ print_symbol_info_sysv PARAMS ((symbol_info * info, bfd * abfd)); static void print_symbol_info_posix PARAMS ((symbol_info * info, bfd * abfd)); +static void +get_relocs PARAMS ((bfd *, asection *, PTR)); /* Support for different output formats. */ struct output_fns @@ -187,6 +215,7 @@ static struct output_fns *format = &formats[FORMAT_DEFAULT]; static int do_demangle = 0; /* Pretty print C++ symbol names. */ static int external_only = 0; /* print external symbols only */ +static int defined_only = 0; /* Print defined symbols only */ static int no_sort = 0; /* don't sort; print syms in order found */ static int print_debug_syms = 0; /* print debugger-only symbols too */ static int print_armap = 0; /* describe __.SYMDEF data in archive files. */ @@ -197,6 +226,7 @@ static int undefined_only = 0; /* print undefined symbols only */ static int dynamic = 0; /* print dynamic symbols. */ static int show_version = 0; /* show the version number */ static int show_stats = 0; /* show statistics */ +static int line_numbers = 0; /* print line numbers for symbols */ /* When to print the names of files. Not mutually exclusive in SYSV format. */ static int filename_per_file = 0; /* Once per file, on its own line. */ @@ -217,11 +247,11 @@ static int print_radix = 16; static char other_format[] = "%02x"; static char desc_format[] = "%04x"; -/* IMPORT */ -extern char *program_name; -extern char *program_version; -extern char *target; -extern int print_version; +static char *target = NULL; + +/* Used to cache the line numbers for a BFD. */ +static bfd *lineno_cache_bfd; +static bfd *lineno_cache_rel_bfd; static struct option long_options[] = { @@ -231,6 +261,7 @@ static struct option long_options[] = {"extern-only", no_argument, &external_only, 1}, {"format", required_argument, 0, 'f'}, {"help", no_argument, 0, 'h'}, + {"line-numbers", no_argument, 0, 'l'}, {"no-cplus", no_argument, &do_demangle, 0}, /* Linux compatibility. */ {"no-demangle", no_argument, &do_demangle, 0}, {"no-sort", no_argument, &no_sort, 1}, @@ -243,6 +274,7 @@ static struct option long_options[] = {"size-sort", no_argument, &sort_by_size, 1}, {"stats", no_argument, &show_stats, 1}, {"target", required_argument, 0, 200}, + {"defined-only", no_argument, &defined_only, 1}, {"undefined-only", no_argument, &undefined_only, 1}, {"version", no_argument, &show_version, 1}, {0, no_argument, 0, 0} @@ -250,27 +282,30 @@ static struct option long_options[] = /* Some error-reporting functions */ -void +static void usage (stream, status) FILE *stream; int status; { - fprintf (stream, "\ -Usage: %s [-aABCDgnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n\ + fprintf (stream, _("\ +Usage: %s [-aABCDglnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n\ [--debug-syms] [--extern-only] [--print-armap] [--print-file-name]\n\ [--numeric-sort] [--no-sort] [--reverse-sort] [--size-sort]\n\ [--undefined-only] [--portability] [-f {bsd,sysv,posix}]\n\ [--format={bsd,sysv,posix}] [--demangle] [--no-demangle] [--dynamic]\n\ + [--defined-only] [--line-numbers]\n\ [--version] [--help]\n\ - [file...]\n", + [file...]\n"), program_name); list_supported_targets (program_name, stream); + if (status == 0) + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (status); } /* Set the radix for the symbol value and size according to RADIX. */ -void +static void set_print_radix (radix) char *radix; { @@ -297,12 +332,12 @@ set_print_radix (radix) other_format[3] = desc_format[3] = *radix; break; default: - fprintf (stderr, "%s: %s: invalid radix\n", program_name, radix); + fprintf (stderr, _("%s: %s: invalid radix\n"), program_name, radix); exit (1); } } -void +static void set_output_format (f) char *f; { @@ -323,7 +358,7 @@ set_output_format (f) i = FORMAT_SYSV; break; default: - fprintf (stderr, "%s: %s: invalid output format\n", program_name, f); + fprintf (stderr, _("%s: %s: invalid output format\n"), program_name, f); exit (1); } format = &formats[i]; @@ -343,8 +378,9 @@ main (argc, argv) START_PROGRESS (program_name, 0); bfd_init (); + set_default_bfd_target (); - while ((c = getopt_long (argc, argv, "aABCDef:gnopPrst:uvV", long_options, (int *) 0)) != EOF) + while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvV", long_options, (int *) 0)) != EOF) { switch (c) { @@ -375,6 +411,9 @@ main (argc, argv) break; case 'h': usage (stdout, 0); + case 'l': + line_numbers = 1; + break; case 'n': case 'v': sort_numerically = 1; @@ -414,10 +453,7 @@ main (argc, argv) } if (show_version) - { - printf ("GNU %s version %s\n", program_name, program_version); - exit (0); - } + print_version ("nm"); /* OK, all options now parsed. If no filename specified, do a.out. */ if (optind == argc) @@ -444,7 +480,7 @@ main (argc, argv) extern char **environ; char *lim = (char *) sbrk (0); - fprintf (stderr, "%s: data size %ld\n", program_name, + fprintf (stderr, _("%s: data size %ld\n"), program_name, (long) (lim - (char *) &environ)); } #endif @@ -496,12 +532,20 @@ display_archive (file) } if (last_arfile != NULL) - bfd_close (last_arfile); + { + bfd_close (last_arfile); + lineno_cache_bfd = NULL; + lineno_cache_rel_bfd = NULL; + } last_arfile = arfile; } if (last_arfile != NULL) - bfd_close (last_arfile); + { + bfd_close (last_arfile); + lineno_cache_bfd = NULL; + lineno_cache_rel_bfd = NULL; + } } static boolean @@ -542,6 +586,9 @@ display_file (filename) if (bfd_close (file) == false) bfd_fatal (filename); + lineno_cache_bfd = NULL; + lineno_cache_rel_bfd = NULL; + return retval; } @@ -745,7 +792,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp) { struct size_sym *symsizes; bfd_byte *from, *fromend; - asymbol *sym; + asymbol *sym = NULL; asymbol *store_sym, *store_next; qsort (minisyms, symcount, size, size_forward1); @@ -789,6 +836,8 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp) if (next == NULL) bfd_fatal (bfd_get_filename (abfd)); } + else + next = NULL; sec = bfd_get_section (sym); @@ -843,7 +892,7 @@ display_rel_file (abfd, archive_bfd) { if (!(bfd_get_file_flags (abfd) & HAS_SYMS)) { - printf ("No symbols in \"%s\".\n", bfd_get_filename (abfd)); + printf (_("No symbols in \"%s\".\n"), bfd_get_filename (abfd)); return; } } @@ -854,7 +903,7 @@ display_rel_file (abfd, archive_bfd) if (symcount == 0) { - fprintf (stderr, "%s: no symbols\n", bfd_get_filename (abfd)); + fprintf (stderr, _("%s: no symbols\n"), bfd_get_filename (abfd)); return; } @@ -928,6 +977,7 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size) keep = bfd_is_und_section (sym->section); else if (external_only) keep = ((sym->flags & BSF_GLOBAL) != 0 + || (sym->flags & BSF_WEAK) != 0 || bfd_is_und_section (sym->section) || bfd_is_com_section (sym->section)); else @@ -944,6 +994,13 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size) || bfd_is_und_section (sym->section))) keep = 0; + if (keep + && defined_only) + { + if (bfd_is_und_section (sym->section)) + keep = 0; + } + if (keep) { memcpy (to, from, size); @@ -959,7 +1016,8 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size) static void print_symname (format, name, abfd) - char *format, *name; + const char *format; + const char *name; bfd *abfd; { if (do_demangle && *name) @@ -1067,7 +1125,7 @@ print_symbol (abfd, sym, archive_bfd) if (undefined_only) { if (bfd_is_und_section (bfd_get_section (sym))) - print_symname ("%s\n", bfd_asymbol_name (sym), abfd); + print_symname ("%s", bfd_asymbol_name (sym), abfd); } else { @@ -1075,8 +1133,121 @@ print_symbol (abfd, sym, archive_bfd) bfd_get_symbol_info (abfd, sym, &syminfo); (*format->print_symbol_info) (&syminfo, abfd); - putchar ('\n'); } + + if (line_numbers) + { + static asymbol **syms; + static long symcount; + const char *filename, *functionname; + unsigned int lineno; + + /* We need to get the canonical symbols in order to call + bfd_find_nearest_line. This is inefficient, but, then, you + don't have to use --line-numbers. */ + if (abfd != lineno_cache_bfd && syms != NULL) + { + free (syms); + syms = NULL; + } + if (syms == NULL) + { + long symsize; + + symsize = bfd_get_symtab_upper_bound (abfd); + if (symsize < 0) + bfd_fatal (bfd_get_filename (abfd)); + syms = (asymbol **) xmalloc (symsize); + symcount = bfd_canonicalize_symtab (abfd, syms); + if (symcount < 0) + bfd_fatal (bfd_get_filename (abfd)); + lineno_cache_bfd = abfd; + } + + if (bfd_is_und_section (bfd_get_section (sym))) + { + static asection **secs; + static arelent ***relocs; + static long *relcount; + static unsigned int seccount; + unsigned int i; + const char *symname; + + /* For an undefined symbol, we try to find a reloc for the + symbol, and print the line number of the reloc. */ + + if (abfd != lineno_cache_rel_bfd && relocs != NULL) + { + for (i = 0; i < seccount; i++) + if (relocs[i] != NULL) + free (relocs[i]); + free (secs); + free (relocs); + free (relcount); + secs = NULL; + relocs = NULL; + relcount = NULL; + } + + if (relocs == NULL) + { + struct get_relocs_info info; + + seccount = bfd_count_sections (abfd); + + secs = (asection **) xmalloc (seccount * sizeof *secs); + relocs = (arelent ***) xmalloc (seccount * sizeof *relocs); + relcount = (long *) xmalloc (seccount * sizeof *relcount); + + info.secs = secs; + info.relocs = relocs; + info.relcount = relcount; + info.syms = syms; + bfd_map_over_sections (abfd, get_relocs, (PTR) &info); + lineno_cache_rel_bfd = abfd; + } + + symname = bfd_asymbol_name (sym); + for (i = 0; i < seccount; i++) + { + long j; + + for (j = 0; j < relcount[i]; j++) + { + arelent *r; + + r = relocs[i][j]; + if (r->sym_ptr_ptr != NULL + && (*r->sym_ptr_ptr)->section == sym->section + && (*r->sym_ptr_ptr)->value == sym->value + && strcmp (symname, + bfd_asymbol_name (*r->sym_ptr_ptr)) == 0 + && bfd_find_nearest_line (abfd, secs[i], syms, + r->address, &filename, + &functionname, &lineno)) + { + /* We only print the first one we find. */ + printf ("\t%s:%u", filename, lineno); + i = seccount; + break; + } + } + } + } + else if (bfd_get_section (sym)->owner == abfd) + { + if (bfd_find_nearest_line (abfd, bfd_get_section (sym), syms, + sym->value, &filename, &functionname, + &lineno) + && filename != NULL + && lineno != 0) + { + printf ("\t%s:%u", filename, lineno); + } + } + } + + putchar ('\n'); } /* The following 3 groups of functions are called unconditionally, @@ -1100,11 +1271,11 @@ print_object_filename_sysv (filename) char *filename; { if (undefined_only) - printf ("\n\nUndefined symbols from %s:\n\n", filename); + printf (_("\n\nUndefined symbols from %s:\n\n"), filename); else - printf ("\n\nSymbols from %s:\n\n", filename); - printf ("\ -Name Value Class Type Size Line Section\n\n"); + printf (_("\n\nSymbols from %s:\n\n"), filename); + printf (_("\ +Name Value Class Type Size Line Section\n\n")); } static void @@ -1154,11 +1325,11 @@ print_archive_member_sysv (archive, filename) CONST char *filename; { if (undefined_only) - printf ("\n\nUndefined symbols from %s[%s]:\n\n", archive, filename); + printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename); else - printf ("\n\nSymbols from %s[%s]:\n\n", archive, filename); - printf ("\ -Name Value Class Type Size Line Section\n\n"); + printf (_("\n\nSymbols from %s[%s]:\n\n"), archive, filename); + printf (_("\ +Name Value Class Type Size Line Section\n\n")); } static void @@ -1327,7 +1498,7 @@ print_symdef_entry (abfd) bfd *elt; if (!everprinted) { - printf ("\nArchive index:\n"); + printf (_("\nArchive index:\n")); everprinted = true; } elt = bfd_get_elt_at_index (abfd, idx); @@ -1340,3 +1511,41 @@ print_symdef_entry (abfd) } } } + +/* This function is used to get the relocs for a particular section. + It is called via bfd_map_over_sections. */ + +static void +get_relocs (abfd, sec, dataarg) + bfd *abfd; + asection *sec; + PTR dataarg; +{ + struct get_relocs_info *data = (struct get_relocs_info *) dataarg; + + *data->secs = sec; + + if ((sec->flags & SEC_RELOC) == 0) + { + *data->relocs = NULL; + *data->relcount = 0; + } + else + { + long relsize; + + relsize = bfd_get_reloc_upper_bound (abfd, sec); + if (relsize < 0) + bfd_fatal (bfd_get_filename (abfd)); + + *data->relocs = (arelent **) xmalloc (relsize); + *data->relcount = bfd_canonicalize_reloc (abfd, sec, *data->relocs, + data->syms); + if (*data->relcount < 0) + bfd_fatal (bfd_get_filename (abfd)); + } + + ++data->secs; + ++data->relocs; + ++data->relcount; +} diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 2c5575f..b9da0c9 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -291,14 +291,14 @@ copy_usage (stream, exit_status) FILE *stream; int exit_status; { - fprintf (stream, "\ + fprintf (stream, _("\ Usage: %s [-vVSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-b byte]\n\ [-R section] [-i interleave] [--interleave=interleave] [--byte=byte]\n\ [--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\ [--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\ - [--discard-locals] [--debugging] [--remove-section=section]\n", + [--discard-locals] [--debugging] [--remove-section=section]\n"), program_name); - fprintf (stream, "\ + fprintf (stream, _("\ [--gap-fill=val] [--pad-to=address] [--preserve-dates]\n\ [--set-start=val] [--adjust-start=incr]\n\ [--adjust-vma=incr] [--adjust-section-vma=section{=,+,-}val]\n\ @@ -307,10 +307,10 @@ Usage: %s [-vVSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-b byte]\n\ [--keep-symbol symbol] [-K symbol] [--strip-symbol symbol] [-N symbol]\n\ [--localize-symbol symbol] [-L symbol] [--weaken-symbol symbol]\n\ [-W symbol] [--change-leading-char] [--remove-leading-char] [--weaken]\n\ - [--verbose] [--version] [--help] in-file [out-file]\n"); + [--verbose] [--version] [--help] in-file [out-file]\n")); list_supported_targets (program_name, stream); if (exit_status == 0) - fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n"); + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (exit_status); } @@ -319,17 +319,17 @@ strip_usage (stream, exit_status) FILE *stream; int exit_status; { - fprintf (stream, "\ + fprintf (stream, _("\ Usage: %s [-vVsSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-R section]\n\ [--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\ [--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\ [--discard-locals] [--keep-symbol symbol] [-K symbol]\n\ [--strip-symbol symbol] [-N symbol] [--remove-section=section]\n\ - [-o file] [--preserve-dates] [--verbose] [--version] [--help] file...\n", + [-o file] [--preserve-dates] [--verbose] [--version] [--help] file...\n"), program_name); list_supported_targets (program_name, stream); if (exit_status == 0) - fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n"); + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (exit_status); } @@ -375,10 +375,10 @@ parse_flags (s) copy = xmalloc (len + 1); strncpy (copy, s, len); copy[len] = '\0'; - fprintf (stderr, "%s: unrecognized section flag `%s'\n", + fprintf (stderr, _("%s: unrecognized section flag `%s'\n"), program_name, copy); fprintf (stderr, - "%s: supported flags: alloc, load, readonly, code, data, rom, contents\n", + _("%s: supported flags: alloc, load, readonly, code, data, rom, contents\n"), program_name); exit (1); } @@ -608,7 +608,7 @@ copy_object (ibfd, obfd) } if (verbose) - printf ("copy from %s(%s) to %s(%s)\n", + printf (_("copy from %s(%s) to %s(%s)\n"), bfd_get_filename(ibfd), bfd_get_target(ibfd), bfd_get_filename(obfd), bfd_get_target(obfd)); @@ -631,7 +631,7 @@ copy_object (ibfd, obfd) bfd_get_mach (ibfd))) { fprintf (stderr, - "Warning: Output file cannot represent architecture %s\n", + _("Warning: Output file cannot represent architecture %s\n"), bfd_printable_arch_mach (bfd_get_arch (ibfd), bfd_get_mach (ibfd))); } @@ -659,7 +659,7 @@ copy_object (ibfd, obfd) padd->section = bfd_make_section (obfd, padd->name); if (padd->section == NULL) { - fprintf (stderr, "%s: can't create section `%s': %s\n", + fprintf (stderr, _("%s: can't create section `%s': %s\n"), program_name, padd->name, bfd_errmsg (bfd_get_error ())); status = 1; @@ -736,7 +736,7 @@ copy_object (ibfd, obfd) if (! bfd_set_section_size (obfd, osections[i], size + (gap_stop - gap_start))) { - fprintf (stderr, "%s: Can't fill gap after %s: %s\n", + fprintf (stderr, _("%s: Can't fill gap after %s: %s\n"), program_name, bfd_get_section_name (obfd, osections[i]), bfd_errmsg (bfd_get_error())); @@ -762,7 +762,7 @@ copy_object (ibfd, obfd) if (! bfd_set_section_size (obfd, osections[c - 1], pad_to - lma)) { - fprintf (stderr, "%s: Can't add padding to %s: %s\n", + fprintf (stderr, _("%s: Can't add padding to %s: %s\n"), program_name, bfd_get_section_name (obfd, osections[c - 1]), bfd_errmsg (bfd_get_error ())); @@ -911,7 +911,7 @@ copy_object (ibfd, obfd) important for the ECOFF code at least. */ if (!bfd_copy_private_bfd_data (ibfd, obfd)) { - fprintf (stderr, "%s: %s: error copying private BFD data: %s\n", + fprintf (stderr, _("%s: %s: error copying private BFD data: %s\n"), program_name, bfd_get_filename (obfd), bfd_errmsg (bfd_get_error ())); status = 1; @@ -945,7 +945,7 @@ copy_archive (ibfd, obfd, output_target) if (mkdir (dir, 0700) != 0) #endif { - fatal ("cannot mkdir %s for archive copying (error: %s)", + fatal (_("cannot mkdir %s for archive copying (error: %s)"), dir, strerror (errno)); } obfd->has_armap = ibfd->has_armap; @@ -1198,7 +1198,7 @@ setup_section (ibfd, isection, obfdarg) return; loser: - fprintf (stderr, "%s: %s: section `%s': error in %s: %s\n", + fprintf (stderr, _("%s: %s: section `%s': error in %s: %s\n"), program_name, bfd_get_filename (ibfd), bfd_section_name (ibfd, isection), err, bfd_errmsg (bfd_get_error ())); @@ -1461,7 +1461,7 @@ write_debugging_info (obfd, dhandle, symcountp, symppp) | SEC_READONLY | SEC_DEBUGGING))) { - fprintf (stderr, "%s: can't create debugging section: %s\n", + fprintf (stderr, _("%s: can't create debugging section: %s\n"), bfd_get_filename (obfd), bfd_errmsg (bfd_get_error ())); return false; } @@ -1475,7 +1475,7 @@ write_debugging_info (obfd, dhandle, symcountp, symppp) || ! bfd_set_section_contents (obfd, stabstrsec, strings, (file_ptr) 0, stringsize)) { - fprintf (stderr, "%s: can't set debugging section contents: %s\n", + fprintf (stderr, _("%s: can't set debugging section contents: %s\n"), bfd_get_filename (obfd), bfd_errmsg (bfd_get_error ())); return false; } @@ -1484,7 +1484,7 @@ write_debugging_info (obfd, dhandle, symcountp, symppp) } fprintf (stderr, - "%s: don't know how to write debugging information for %s\n", + _("%s: don't know how to write debugging information for %s\n"), bfd_get_filename (obfd), bfd_get_target (obfd)); return false; } @@ -1669,7 +1669,7 @@ set_times (destination, statbuf) if (result != 0) { fprintf (stderr, "%s: ", destination); - perror ("can not set time"); + perror (_("can not set time")); } } @@ -1774,7 +1774,7 @@ strip_main (argc, argv) if (stat (argv[i], &statbuf) < 0) { fprintf (stderr, "%s: ", argv[i]); - perror ("cannot stat"); + perror (_("cannot stat")); continue; } } @@ -1825,7 +1825,7 @@ copy_main (argc, argv) copy_byte = atoi(optarg); if (copy_byte < 0) { - fprintf (stderr, "%s: byte number must be non-negative\n", + fprintf (stderr, _("%s: byte number must be non-negative\n"), program_name); exit (1); } @@ -1834,7 +1834,7 @@ copy_main (argc, argv) interleave = atoi(optarg); if (interleave < 1) { - fprintf(stderr, "%s: interleave must be positive\n", + fprintf(stderr, _("%s: interleave must be positive\n"), program_name); exit (1); } @@ -1907,7 +1907,7 @@ copy_main (argc, argv) if (s == NULL) { fprintf (stderr, - "%s: bad format for --add-section NAME=FILENAME\n", + _("%s: bad format for --add-section NAME=FILENAME\n"), program_name); exit (1); } @@ -1942,7 +1942,7 @@ copy_main (argc, argv) if (fread (pa->contents, 1, pa->size, f) == 0 || ferror (f)) { - fprintf (stderr, "%s: %s: fread failed\n", + fprintf (stderr, _("%s: %s: fread failed\n"), program_name, pa->filename); exit (1); } @@ -1971,7 +1971,7 @@ copy_main (argc, argv) if (s == NULL) { fprintf (stderr, - "%s: bad format for --adjust-section-vma\n", + _("%s: bad format for --adjust-section-vma\n"), program_name); exit (1); } @@ -2018,7 +2018,7 @@ copy_main (argc, argv) gap_fill = (bfd_byte) gap_fill_vma; if ((bfd_vma) gap_fill != gap_fill_vma) { - fprintf (stderr, "%s: warning: truncating gap-fill from 0x", + fprintf (stderr, _("%s: warning: truncating gap-fill from 0x"), program_name); fprintf_vma (stderr, gap_fill_vma); fprintf (stderr, "to 0x%x\n", (unsigned int) gap_fill); @@ -2045,7 +2045,7 @@ copy_main (argc, argv) s = strchr (optarg, '='); if (s == NULL) { - fprintf (stderr, "%s: bad format for --set-section-flags\n", + fprintf (stderr, _("%s: bad format for --set-section-flags\n"), program_name); exit (1); } @@ -2079,7 +2079,7 @@ copy_main (argc, argv) if (copy_byte >= interleave) { - fprintf (stderr, "%s: byte number must be less than interleave\n", + fprintf (stderr, _("%s: byte number must be less than interleave\n"), program_name); exit (1); } @@ -2103,7 +2103,7 @@ copy_main (argc, argv) if (stat (input_filename, &statbuf) < 0) { fprintf (stderr, "%s: ", input_filename); - perror ("cannot stat"); + perror (_("cannot stat")); exit (1); } } @@ -2138,11 +2138,11 @@ copy_main (argc, argv) { if (! p->used && p->adjust != ignore_vma) { - fprintf (stderr, "%s: warning: --adjust-section-vma %s%c0x", + fprintf (stderr, _("%s: warning: --adjust-section-vma %s%c0x"), program_name, p->name, p->adjust == set_vma ? '=' : '+'); fprintf_vma (stderr, p->val); - fprintf (stderr, " never used\n"); + fprintf (stderr, _(" never used\n")); } } } diff --git a/binutils/objdump.c b/binutils/objdump.c index ecfce42..29c440e 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1,5 +1,6 @@ /* objdump.c -- dump information about an object file. - Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 + Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -215,24 +216,24 @@ usage (stream, status) FILE *stream; int status; { - fprintf (stream, "\ + fprintf (stream, _("\ Usage: %s [-ahifCdDprRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\ [--archive-headers] [--target=bfdname] [--debugging] [--disassemble]\n\ [--disassemble-all] [--disassemble-zeroes] [--file-headers]\n\ [--section-headers] [--headers]\n\ - [--info] [--section=section-name] [--line-numbers] [--source]\n", + [--info] [--section=section-name] [--line-numbers] [--source]\n"), program_name); - fprintf (stream, "\ + fprintf (stream, _("\ [--architecture=machine] [--reloc] [--full-contents] [--stabs]\n\ [--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\ [--wide] [--version] [--help] [--private-headers]\n\ [--start-address=addr] [--stop-address=addr]\n\ [--prefix-addresses] [--[no-]show-raw-insn] [--demangle]\n\ [--adjust-vma=offset] [-EB|-EL] [--endian={big|little}] objfile...\n\ -at least one option besides -l (--line-numbers) must be given\n"); +at least one option besides -l (--line-numbers) must be given\n")); list_supported_targets (program_name, stream); if (status == 0) - fprintf (stream, "Report bugs to bug-gnu-utils@prep.ai.mit.edu\n"); + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (status); } @@ -357,11 +358,11 @@ static void dump_headers (abfd) bfd *abfd; { - printf ("Sections:\n"); + printf (_("Sections:\n")); #ifndef BFD64 - printf ("Idx Name Size VMA LMA File off Algn\n"); + printf (_("Idx Name Size VMA LMA File off Algn\n")); #else - printf ("Idx Name Size VMA LMA File off Algn\n"); + printf (_("Idx Name Size VMA LMA File off Algn\n")); #endif bfd_map_over_sections (abfd, dump_section_header, (PTR) NULL); } @@ -375,7 +376,7 @@ slurp_symtab (abfd) if (!(bfd_get_file_flags (abfd) & HAS_SYMS)) { - printf ("No symbols in \"%s\".\n", bfd_get_filename (abfd)); + printf (_("No symbols in \"%s\".\n"), bfd_get_filename (abfd)); symcount = 0; return NULL; } @@ -392,7 +393,7 @@ slurp_symtab (abfd) if (symcount < 0) bfd_fatal (bfd_get_filename (abfd)); if (symcount == 0) - fprintf (stderr, "%s: %s: No symbols\n", + fprintf (stderr, _("%s: %s: No symbols\n"), program_name, bfd_get_filename (abfd)); return sy; } @@ -411,7 +412,7 @@ slurp_dynamic_symtab (abfd) { if (!(bfd_get_file_flags (abfd) & DYNAMIC)) { - fprintf (stderr, "%s: %s: not a dynamic object\n", + fprintf (stderr, _("%s: %s: not a dynamic object\n"), program_name, bfd_get_filename (abfd)); dynsymcount = 0; return NULL; @@ -428,7 +429,7 @@ slurp_dynamic_symtab (abfd) if (dynsymcount < 0) bfd_fatal (bfd_get_filename (abfd)); if (dynsymcount == 0) - fprintf (stderr, "%s: %s: No dynamic symbols\n", + fprintf (stderr, _("%s: %s: No dynamic symbols\n"), program_name, bfd_get_filename (abfd)); return sy; } @@ -828,9 +829,6 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes) objdump_print_value (vma - bfd_asymbol_value (sym), info, true); } (*info->fprintf_func) (info->stream, ">"); - - /* Notify the disassembler of the symbol being used: */ - disasm_symaddr (sym, info); } } @@ -1232,7 +1230,8 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp, { char buf[1000]; SFILE sfile; - int bpc, pb = 0; + int bpc = 0; + int pb = 0; done_dot = false; @@ -1265,6 +1264,11 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp, info->stream = (FILE *) &sfile; info->bytes_per_line = 0; info->bytes_per_chunk = 0; + if ((*relppp < relppend) && ((**relppp)->address >= (bfd_vma) i && + (**relppp)->address < (bfd_vma) i + bytes)) + info->flags = INSN_HAS_RELOC; + else + info->flags = 0; bytes = (*disassemble_fn) (section->vma + i, info); info->fprintf_func = (fprintf_ftype) fprintf; info->stream = stdout; @@ -1489,7 +1493,7 @@ disassemble_data (abfd) const bfd_arch_info_type *info = bfd_scan_arch (machine); if (info == NULL) { - fprintf (stderr, "%s: Can't use supplied machine %s\n", + fprintf (stderr, _("%s: Can't use supplied machine %s\n"), program_name, machine); exit (1); @@ -1510,7 +1514,7 @@ disassemble_data (abfd) disassemble_fn = disassembler (abfd); if (!disassemble_fn) { - fprintf (stderr, "%s: Can't disassemble for architecture %s\n", + fprintf (stderr, _("%s: Can't disassemble for architecture %s\n"), program_name, bfd_printable_arch_mach (bfd_get_arch (abfd), 0)); return; @@ -1575,7 +1579,7 @@ disassemble_data (abfd) } } - printf ("Disassembly of section %s:\n", section->name); + printf (_("Disassembly of section %s:\n"), section->name); datasize = bfd_get_section_size_before_reloc (section); if (datasize == 0) @@ -1608,7 +1612,7 @@ disassemble_data (abfd) sym = find_symbol_for_address (abfd, section, section->vma + i, true, &place); - ++place; + while (i < stop) { asymbol *nextsym; @@ -1616,10 +1620,20 @@ disassemble_data (abfd) boolean insns; if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + i) - disasm_info.symbol = sym; + { + int x; + + for (x = place; + (x < sorted_symcount + && bfd_asymbol_value (sorted_syms[x]) <= section->vma + i); + ++x) + continue; + disasm_info.symbols = & sorted_syms[place]; + disasm_info.num_symbols = x - place; + } else - disasm_info.symbol = NULL; - + disasm_info.symbols = NULL; + if (! prefix_addresses) { printf ("\n"); @@ -1637,6 +1651,7 @@ disassemble_data (abfd) else { while (place < sorted_symcount + /* ??? Why the test for != section? */ && (sorted_syms[place]->section != section || (bfd_asymbol_value (sorted_syms[place]) <= bfd_asymbol_value (sym)))) @@ -1735,14 +1750,14 @@ read_section_stabs (abfd, stabsect_name, strsect_name) stabsect = bfd_get_section_by_name (abfd, stabsect_name); if (0 == stabsect) { - printf ("No %s section present\n\n", stabsect_name); + printf (_("No %s section present\n\n"), stabsect_name); return false; } stabstrsect = bfd_get_section_by_name (abfd, strsect_name); if (0 == stabstrsect) { - fprintf (stderr, "%s: %s has no %s section\n", program_name, + fprintf (stderr, _("%s: %s has no %s section\n"), program_name, bfd_get_filename (abfd), strsect_name); return false; } @@ -1755,7 +1770,7 @@ read_section_stabs (abfd, stabsect_name, strsect_name) if (! bfd_get_section_contents (abfd, stabsect, (PTR) stabs, 0, stab_size)) { - fprintf (stderr, "%s: Reading %s section of %s failed: %s\n", + fprintf (stderr, _("%s: Reading %s section of %s failed: %s\n"), program_name, stabsect_name, bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); free (stabs); @@ -1766,7 +1781,7 @@ read_section_stabs (abfd, stabsect_name, strsect_name) if (! bfd_get_section_contents (abfd, stabstrsect, (PTR) strtab, 0, stabstr_size)) { - fprintf (stderr, "%s: Reading %s section of %s failed: %s\n", + fprintf (stderr, _("%s: Reading %s section of %s failed: %s\n"), program_name, strsect_name, bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); free (stabs); @@ -1808,7 +1823,7 @@ print_section_stabs (abfd, stabsect_name, strsect_name) stabp = stabs; stabs_end = stabp + stab_size; - printf ("Contents of %s section:\n\n", stabsect_name); + printf (_("Contents of %s section:\n\n"), stabsect_name); printf ("Symnum n_type n_othr n_desc n_value n_strx String\n"); /* Loop through all symbols and print them. @@ -1885,11 +1900,12 @@ dump_section_stabs (abfd, stabsect_name, strsect_name) len = strlen (stabsect_name); -/* If the prefix matches, and the files section name ends with a nul or a digit, - then we match. Ie: we want either an exact match or a a section followed by - a number. */ + /* If the prefix matches, and the files section name ends with a + nul or a digit, then we match. I.e., we want either an exact + match or a section followed by a number. */ if (strncmp (stabsect_name, s->name, len) == 0 - && (s->name[len] == '\000' || isdigit (s->name[len]))) + && (s->name[len] == '\000' + || isdigit ((unsigned char) s->name[len]))) { if (read_section_stabs (abfd, s->name, strsect_name)) { @@ -1907,10 +1923,10 @@ dump_bfd_header (abfd) { char *comma = ""; - printf ("architecture: %s, ", + printf (_("architecture: %s, "), bfd_printable_arch_mach (bfd_get_arch (abfd), bfd_get_mach (abfd))); - printf ("flags 0x%08x:\n", abfd->flags); + printf (_("flags 0x%08x:\n"), abfd->flags); #define PF(x, y) if (abfd->flags & x) {printf("%s%s", comma, y); comma=", ";} PF (HAS_RELOC, "HAS_RELOC"); @@ -1923,7 +1939,7 @@ dump_bfd_header (abfd) PF (WP_TEXT, "WP_TEXT"); PF (D_PAGED, "D_PAGED"); PF (BFD_IS_RELAXABLE, "BFD_IS_RELAXABLE"); - printf ("\nstart address 0x"); + printf (_("\nstart address 0x")); printf_vma (abfd->start_address); printf ("\n"); } @@ -1966,7 +1982,7 @@ display_bfd (abfd) } } - printf ("\n%s: file format %s\n", bfd_get_filename (abfd), + printf (_("\n%s: file format %s\n"), bfd_get_filename (abfd), abfd->xvec->name); if (dump_ar_hdrs) print_arelt_descr (stdout, abfd, true); @@ -2007,7 +2023,7 @@ display_bfd (abfd) if (dhandle != NULL) { if (! print_debugging_info (stdout, dhandle)) - fprintf (stderr, "%s: printing debugging information failed\n", + fprintf (stderr, _("%s: printing debugging information failed\n"), bfd_get_filename (abfd)); } } @@ -2041,7 +2057,7 @@ display_file (filename, target) { bfd *last_arfile = NULL; - printf ("In archive %s:\n", bfd_get_filename (file)); + printf (_("In archive %s:\n"), bfd_get_filename (file)); for (;;) { bfd_set_error (bfd_error_no_error); @@ -2094,7 +2110,7 @@ dump_data (abfd) { if (section->flags & SEC_HAS_CONTENTS) { - printf ("Contents of section %s:\n", section->name); + printf (_("Contents of section %s:\n"), section->name); if (bfd_section_size (abfd, section) == 0) continue; @@ -2597,7 +2613,7 @@ display_target_tables () static void display_info () { - printf ("BFD header file version %s\n", BFD_VERSION); + printf (_("BFD header file version %s\n"), BFD_VERSION); display_target_list (); display_target_tables (); } @@ -2716,7 +2732,7 @@ main (argc, argv) endian = BFD_ENDIAN_LITTLE; else { - fprintf (stderr, "%s: unrecognized -E option\n", program_name); + fprintf (stderr, _("%s: unrecognized -E option\n"), program_name); usage (stderr, 1); } break; @@ -2727,7 +2743,7 @@ main (argc, argv) endian = BFD_ENDIAN_LITTLE; else { - fprintf (stderr, "%s: unrecognized --endian type `%s'\n", + fprintf (stderr, _("%s: unrecognized --endian type `%s'\n"), program_name, optarg); usage (stderr, 1); } diff --git a/binutils/po/Make-in b/binutils/po/Make-in new file mode 100644 index 0000000..82d3590 --- /dev/null +++ b/binutils/po/Make-in @@ -0,0 +1,250 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: $(CATALOGS) +all-no: + +$(srcdir)/$(PACKAGE).pot: @MAINT@ $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in + rm -f $(srcdir)/$(PACKAGE).pot + mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +POTFILES.in: @MAINT@ ../Makefile + cd .. && $(MAKE) po/POTFILES.in + +Makefile: Make-in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \ + CONFIG_HEADERS= $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/binutils/po/POTFILES.in b/binutils/po/POTFILES.in new file mode 100644 index 0000000..04fddb2 --- /dev/null +++ b/binutils/po/POTFILES.in @@ -0,0 +1,47 @@ +addr2line.c +ar.c +arsup.c +arsup.h +bucomm.c +bucomm.h +budbg.h +coffdump.c +coffgrok.c +coffgrok.h +debug.c +debug.c +debug.h +dlltool.c +dlltool.h +filemode.c +ieee.c +ieee.c +is-ranlib.c +is-strip.c +maybe-ranlib.c +maybe-strip.c +nlmconv.c +nlmconv.h +nm.c +not-ranlib.c +not-strip.c +objcopy.c +objdump.c +prdbg.c +rdcoff.c +rdcoff.c +rddbg.c +rddbg.c +resbin.c +rescoff.c +resrc.c +size.c +srconv.c +stabs.c +stabs.c +strings.c +sysdump.c +version.c +windres.c +windres.h +wrstabs.c diff --git a/binutils/size.c b/binutils/size.c index 175e3ff..4ed3555 100644 --- a/binutils/size.c +++ b/binutils/size.c @@ -1,5 +1,5 @@ /* size.c -- report size of various sections of an executable file. - Copyright 1991, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -15,7 +15,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Extensions/incompatibilities: o - BSD output has filenames at the end. @@ -29,9 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ */ #include "bfd.h" -#include "sysdep.h" #include "getopt.h" #include "bucomm.h" +#include "libiberty.h" #ifndef BSD_DEFAULT #define BSD_DEFAULT 1 @@ -50,31 +50,42 @@ int show_help = 0; /* Program exit status. */ int return_code = 0; -/* IMPORTS */ -extern char *program_version; -extern char *target; +static char *target = NULL; -/* Forward declarations */ +/* Static declarations */ +static void usage PARAMS ((FILE *, int)); static void display_file PARAMS ((char *filename)); - +static void display_bfd PARAMS ((bfd *)); +static void display_archive PARAMS ((bfd *)); +static int size_number PARAMS ((bfd_size_type)); +#if 0 +static void lprint_number PARAMS ((int, bfd_size_type)); +#endif +static void rprint_number PARAMS ((int, bfd_size_type)); +static void print_berkeley_format PARAMS ((bfd *)); +static void sysv_internal_sizer PARAMS ((bfd *, asection *, PTR)); +static void sysv_internal_printer PARAMS ((bfd *, asection *, PTR)); +static void print_sysv_format PARAMS ((bfd *)); static void print_sizes PARAMS ((bfd * file)); - static void berkeley_sum PARAMS ((bfd *, sec_ptr, PTR)); -void +static void usage (stream, status) FILE *stream; int status; { - fprintf (stream, "\ + fprintf (stream, _("\ Usage: %s [-ABdoxV] [--format=berkeley|sysv] [--radix=8|10|16]\n\ - [--target=bfdname] [--version] [--help] [file...]\n", program_name); + [--target=bfdname] [--version] [--help] [file...]\n"), program_name); #if BSD_DEFAULT - fputs ("default is --format=berkeley\n", stream); + fputs (_("default is --format=berkeley\n"), stream); #else - fputs ("default is --format=sysv\n", stream); + fputs (_("default is --format=sysv\n"), stream); #endif + list_supported_targets (program_name, stream); + if (status == 0) + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (status); } @@ -97,8 +108,10 @@ main (argc, argv) int c; program_name = *argv; + xmalloc_set_program_name (program_name); bfd_init (); + set_default_bfd_target (); while ((c = getopt_long (argc, argv, "ABVdox", long_options, (int *) 0)) != EOF) @@ -116,7 +129,7 @@ main (argc, argv) berkeley_format = 0; break; default: - fprintf (stderr, "invalid argument to --format: %s\n", optarg); + fprintf (stderr, _("invalid argument to --format: %s\n"), optarg); usage (stderr, 1); } break; @@ -143,7 +156,7 @@ main (argc, argv) radix = hex; break; default: - printf ("Invalid radix: %s\n", optarg); + printf (_("Invalid radix: %s\n"), optarg); usage (stderr, 1); } break; @@ -173,10 +186,7 @@ main (argc, argv) } if (show_version) - { - printf ("GNU %s version %s\n", program_name, program_version); - exit (0); - } + print_version ("size"); if (show_help) usage (stdout, 0); @@ -191,7 +201,7 @@ main (argc, argv) /* Display stats on file or archive member ABFD. */ -void +static void display_bfd (abfd) bfd *abfd; { @@ -208,7 +218,7 @@ display_bfd (abfd) return; } - if (bfd_error == file_ambiguously_recognized) + if (bfd_get_error () == bfd_error_file_ambiguously_recognized) { bfd_nonfatal (bfd_get_filename (abfd)); list_matching_formats (matching); @@ -234,7 +244,7 @@ display_bfd (abfd) bfd_nonfatal (bfd_get_filename (abfd)); - if (bfd_error == file_ambiguously_recognized) + if (bfd_get_error () == bfd_error_file_ambiguously_recognized) { list_matching_formats (matching); free (matching); @@ -251,12 +261,12 @@ display_archive (file) for (;;) { - bfd_error = no_error; + bfd_set_error (bfd_error_no_error); arfile = bfd_openr_next_archived_file (file, arfile); if (arfile == NULL) { - if (bfd_error != no_more_archived_files) + if (bfd_get_error () != bfd_error_no_more_archived_files) { bfd_nonfatal (bfd_get_filename (file)); return_code = 2; @@ -296,24 +306,51 @@ display_file (filename) /* This is what lexical functions are for. */ -void +static int +size_number (num) + bfd_size_type num; +{ + char buffer[40]; + sprintf (buffer, + (radix == decimal ? "%lu" : + ((radix == octal) ? "0%lo" : "0x%lx")), + (unsigned long) num); + + return strlen (buffer); +} + +#if 0 + +/* This is not used. */ + +static void lprint_number (width, num) int width; bfd_size_type num; { - printf ((radix == decimal ? "%-*lu\t" : - ((radix == octal) ? "%-*lo\t" : "%-*lx\t")), - width, (unsigned long) num); + char buffer[40]; + sprintf (buffer, + (radix == decimal ? "%lu" : + ((radix == octal) ? "0%lo" : "0x%lx")), + (unsigned long) num); + + printf ("%-*s", width, buffer); } -void +#endif + +static void rprint_number (width, num) int width; bfd_size_type num; { - printf ((radix == decimal ? "%*lu\t" : - ((radix == octal) ? "%*lo\t" : "%*lx\t")), - width, (unsigned long) num); + char buffer[40]; + sprintf (buffer, + (radix == decimal ? "%lu" : + ((radix == octal) ? "0%lo" : "0x%lx")), + (unsigned long) num); + + printf ("%*s", width, buffer); } static bfd_size_type bsssize; @@ -326,18 +363,23 @@ berkeley_sum (abfd, sec, ignore) sec_ptr sec; PTR ignore; { + flagword flags; bfd_size_type size; + flags = bfd_get_section_flags (abfd, sec); + if ((flags & SEC_ALLOC) == 0) + return; + size = bfd_get_section_size_before_reloc (sec); - if (bfd_get_section_flags (abfd, sec) & SEC_CODE) + if ((flags & SEC_CODE) != 0 || (flags & SEC_READONLY) != 0) textsize += size; - else if (bfd_get_section_flags (abfd, sec) & SEC_DATA) + else if ((flags & SEC_HAS_CONTENTS) != 0) datasize += size; - else if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC) + else bsssize += size; } -void +static void print_berkeley_format (abfd) bfd *abfd; { @@ -353,19 +395,21 @@ print_berkeley_format (abfd) if (files_seen++ == 0) #if 0 /* Intel doesn't like bss/stk because they don't have core files. */ - puts ((radix == octal) ? "text\tdata\tbss/stk\toct\thex\tfilename" : - "text\tdata\tbss/stk\tdec\thex\tfilename"); + puts ((radix == octal) ? " text\t data\tbss/stk\t oct\t hex\tfilename" : + " text\t data\tbss/stk\t dec\t hex\tfilename"); #else - puts ((radix == octal) ? "text\tdata\tbss\toct\thex\tfilename" : - "text\tdata\tbss\tdec\thex\tfilename"); + puts ((radix == octal) ? " text\t data\t bss\t oct\t hex\tfilename" : + " text\t data\t bss\t dec\t hex\tfilename"); #endif total = textsize + datasize + bsssize; - lprint_number (7, textsize); - lprint_number (7, datasize); - lprint_number (7, bsssize); - printf (((radix == octal) ? "%-7lo\t%-7lx\t" : "%-7lu\t%-7lx\t"), + rprint_number (7, textsize); + putchar ('\t'); + rprint_number (7, datasize); + putchar ('\t'); + rprint_number (7, bsssize); + printf (((radix == octal) ? "\t%7lo\t%7lx\t" : "\t%7lu\t%7lx\t"), (unsigned long) total, (unsigned long) total); fputs (bfd_get_filename (abfd), stdout); @@ -375,43 +419,81 @@ print_berkeley_format (abfd) /* I REALLY miss lexical functions! */ bfd_size_type svi_total = 0; +bfd_vma svi_maxvma = 0; +int svi_namelen = 0; +int svi_vmalen = 0; +int svi_sizelen = 0; -void +static void +sysv_internal_sizer (file, sec, ignore) + bfd *file; + sec_ptr sec; + PTR ignore; +{ + bfd_size_type size = bfd_section_size (file, sec); + if (!bfd_is_abs_section (sec) + && !bfd_is_com_section (sec) + && !bfd_is_und_section (sec)) + { + int namelen = strlen (bfd_section_name (file, sec)); + if (namelen > svi_namelen) + svi_namelen = namelen; + + svi_total += size; + if (bfd_section_vma (file, sec) > svi_maxvma) + svi_maxvma = bfd_section_vma (file, sec); + } +} + +static void sysv_internal_printer (file, sec, ignore) bfd *file; sec_ptr sec; PTR ignore; { bfd_size_type size = bfd_section_size (file, sec); - if (sec != &bfd_abs_section + if (!bfd_is_abs_section (sec) && !bfd_is_com_section (sec) - && sec != &bfd_und_section) + && !bfd_is_und_section (sec)) { svi_total += size; - printf ("%-12s", bfd_section_name (file, sec)); - rprint_number (8, size); - printf (" "); - rprint_number (8, bfd_section_vma (file, sec)); + printf ("%-*s ", svi_namelen, bfd_section_name (file, sec)); + rprint_number (svi_sizelen, size); + printf (" "); + rprint_number (svi_vmalen, bfd_section_vma (file, sec)); printf ("\n"); } } -void +static void print_sysv_format (file) bfd *file; { + /* size all of the columns */ svi_total = 0; + svi_maxvma = 0; + svi_namelen = 0; + bfd_map_over_sections (file, sysv_internal_sizer, (PTR) NULL); + svi_vmalen = size_number ((bfd_size_type)svi_maxvma); + if ((size_t) svi_vmalen < sizeof ("addr") - 1) + svi_vmalen = sizeof ("addr")-1; + svi_sizelen = size_number (svi_total); + if ((size_t) svi_sizelen < sizeof ("size") - 1) + svi_sizelen = sizeof ("size")-1; + + svi_total = 0; printf ("%s ", bfd_get_filename (file)); if (bfd_my_archive (file)) printf (" (ex %s)", bfd_get_filename (bfd_my_archive (file))); - puts (":\nsection\t\tsize\t addr"); + printf (":\n%-*s %*s %*s\n", svi_namelen, "section", + svi_sizelen, "size", svi_vmalen, "addr"); bfd_map_over_sections (file, sysv_internal_printer, (PTR) NULL); - printf ("Total "); - rprint_number (8, svi_total); + printf ("%-*s ", svi_namelen, "Total"); + rprint_number (svi_sizelen, svi_total); printf ("\n\n"); } diff --git a/binutils/srconv.c b/binutils/srconv.c index fca3dfd..098a6d4 100644 --- a/binutils/srconv.c +++ b/binutils/srconv.c @@ -1,5 +1,5 @@ /* srconv.c -- Sysroff conversion program - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -15,7 +15,8 @@ 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. */ + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* Written by Steve Chamberlain (sac@cygnus.com) @@ -37,8 +38,10 @@ #define PROGRAM_VERSION "1.5" /*#define FOOP1 1 */ -static int sh; -static int h8300; +static int addrsize; +static char *toolname; +static char **rnames; + static void wr_cs (); static void walk_tree_scope (); static void wr_globals (); @@ -171,12 +174,7 @@ writeINT (n, ptr, idx, size, file) int byte = *idx / 8; if (size == -2) - { - if (sh) - size = 4; - else if (h8300) - size = 2; - } + size = addrsize; else if (size == -1) size = 0; @@ -319,14 +317,14 @@ wr_un (ptr, sfile, first, nsecs) un.spare1 = 0; - if (abfd->flags & EXEC_P) + if (bfd_get_file_flags (abfd) & EXEC_P) un.format = FORMAT_LM; else un.format = FORMAT_OM; un.spare1 = 0; -#if 0 +#if 1 un.nsections = ptr->nsections - 1; /* Don't count the abs section */ #else /*NEW - only count sections with size */ @@ -349,10 +347,7 @@ wr_un (ptr, sfile, first, nsecs) un.nextrefs++; } } - if (sh) - un.tool = "C_SH"; - else if (h8300) - un.tool = "C_H8/300H"; + un.tool = toolname; un.tcd = DATE; un.linker = "L_GX00"; un.lcd = DATE; @@ -368,7 +363,7 @@ wr_hd (p) struct IT_hd hd; hd.spare1 = 0; - if (abfd->flags & EXEC_P) + if (bfd_get_file_flags (abfd) & EXEC_P) { hd.mt = MTYPE_ABS_LM; } @@ -381,17 +376,38 @@ wr_hd (p) hd.nu = p->nsources; /* Always one unit */ hd.code = 0; /* Always ASCII */ hd.ver = "0200"; /* Version 2.00 */ - switch (abfd->arch_info->arch) + switch (bfd_get_arch (abfd)) { case bfd_arch_h8300: hd.au = 8; hd.si = 0; - hd.afl = 2; hd.spcsz = 32; hd.segsz = 0; hd.segsh = 0; - hd.cpu = "H8300H"; - h8300 = 1; + switch (bfd_get_mach (abfd)) + { + case bfd_mach_h8300: + hd.cpu = "H8300"; + hd.afl = 2; + addrsize = 2; + toolname = "C_H8/300"; + break; + case bfd_mach_h8300h: + hd.cpu = "H8300H"; + hd.afl = 4; + addrsize = 4; + toolname = "C_H8/300H"; + break; + case bfd_mach_h8300s: + hd.cpu = "H8300S"; + hd.afl = 4; + addrsize = 4; + toolname = "C_H8/300S"; + break; + default: + abort(); + } + rnames = rname_h8300; break; case bfd_arch_sh: hd.au = 8; @@ -401,13 +417,15 @@ wr_hd (p) hd.segsz = 0; hd.segsh = 0; hd.cpu = "SH"; - sh = 1; + addrsize = 4; + toolname = "C_SH"; + rnames = rname_sh; break; default: abort (); } - if (!abfd->flags & EXEC_P) + if (! bfd_get_file_flags(abfd) & EXEC_P) { hd.ep = 0; } @@ -422,8 +440,7 @@ wr_hd (p) hd.os = ""; hd.sys = ""; - hd.mn = strip_suffix (abfd->filename); - + hd.mn = strip_suffix (bfd_get_filename (abfd)); sysroff_swap_hd_out (file, &hd); } @@ -449,7 +466,7 @@ wr_ob (p, section) struct coff_ofile *p; struct coff_section *section; { - int i; + bfd_size_type i; int first = 1; unsigned char stuff[200]; @@ -465,7 +482,7 @@ wr_ob (p, section) if (first) { ob.saf = 1; - if (abfd->flags & EXEC_P) + if (bfd_get_file_flags (abfd) & EXEC_P) ob.address = section->address; else ob.address = 0; @@ -485,12 +502,12 @@ wr_ob (p, section) i += todo; } /* Now fill the rest with blanks */ - while (i < section->size) + while (i < (bfd_size_type) section->size) { struct IT_ob ob; int todo = 200; /* Copy in 200 byte lumps */ ob.spare = 0; - if (i + todo > section->size) + if (i + todo > (bfd_size_type) section->size) todo = section->size - i; ob.saf = 0; @@ -959,7 +976,7 @@ walk_tree_symbol (sfile, section, symbol, nest) { struct IT_dsy dsy; - dsy.spare2 = 0; + memset(&dsy, 0, sizeof(dsy)); dsy.nesting = nest; switch (symbol->type->type) @@ -1116,12 +1133,7 @@ walk_tree_symbol (sfile, section, symbol, nest) } if (symbol->where->where == coff_where_register) - { - if (sh) - dsy.reg = rname_sh[symbol->where->offset]; - else if (h8300) - dsy.reg = rname_h8300[symbol->where->offset]; - } + dsy.reg = rnames[symbol->where->offset]; switch (symbol->visible->type) { @@ -1230,9 +1242,10 @@ wr_du (p, sfile, n) int j; unsigned int *lowest = (unsigned *) nints (p->nsections); unsigned int *highest = (unsigned *) nints (p->nsections); - du.spare = 0; - du.format = abfd->flags & EXEC_P ? 0 : 1; + du.format = bfd_get_file_flags (abfd) & EXEC_P ? 0 : 1; du.optimized = 0; + du.stackfrmt = 0; + du.spare = 0; du.unit = n; du.sections = p->nsections - 1; du.san = (int *) xcalloc (sizeof (int), du.sections); @@ -1275,7 +1288,7 @@ wr_du (p, sfile, n) } du.san[used] = i; du.length[used] = highest[i] - lowest[i]; - du.address[used] = abfd->flags & EXEC_P ? lowest[i] : 0; + du.address[used] = bfd_get_file_flags (abfd) & EXEC_P ? lowest[i] : 0; if (debug) { printf (" section %6s 0x%08x..0x%08x\n", @@ -1664,14 +1677,14 @@ int scount = 0; { /* Don't have a symbol set aside for this section, which means that nothing in this file does anything for the section. */ - sc.format = !(abfd->flags & EXEC_P); + sc.format = !(bfd_get_file_flags (abfd) & EXEC_P); sc.addr = 0; sc.length = 0; name = info[i].sec->name; } else { - if (abfd->flags & EXEC_P) + if (bfd_get_file_flags (abfd) & EXEC_P) { sc.format = 0; sc.addr = symbol->where->offset; @@ -1713,11 +1726,15 @@ int scount = 0; { sc.contents = CONTENTS_CODE; } +#if 0 /* NEW */ if (sc.length) { +#endif sysroff_swap_sc_out (file, &sc); scount++; +#if 0 } +#endif } return scount; } @@ -1869,14 +1886,14 @@ show_usage (file, status) FILE *file; int status; { - fprintf (file, "Usage: %s [-dhVq] in-file [out-file]\n", program_name); + fprintf (file, _("Usage: %s [-dhVq] in-file [out-file]\n"), program_name); exit (status); } static void show_help () { - printf ("%s: Convert a COFF object file into a SYSROFF object file\n", + printf (_("%s: Convert a COFF object file into a SYSROFF object file\n"), program_name); show_usage (stdout, 0); } @@ -1924,7 +1941,7 @@ main (ac, av) show_help (); /*NOTREACHED */ case 'V': - printf ("GNU %s version %s\n", program_name, PROGRAM_VERSION); + printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION); exit (0); /*NOTREACHED */ case 0: @@ -1950,7 +1967,7 @@ main (ac, av) if (strcmp (input_file, output_file) == 0) { fprintf (stderr, - "%s: input and output files must be different\n", + _("%s: input and output files must be different\n"), program_name); exit (1); } @@ -1961,7 +1978,7 @@ main (ac, av) if (!input_file) { - fprintf (stderr, "%s: no input file specified\n", + fprintf (stderr, _("%s: no input file specified\n"), program_name); exit (1); } @@ -2008,7 +2025,7 @@ main (ac, av) if (!file) { - fprintf (stderr, "%s: unable to open output file %s\n", + fprintf (stderr, _("%s: unable to open output file %s\n"), program_name, output_file); exit (1); } diff --git a/binutils/strings.c b/binutils/strings.c index 02ef67b..5cf573a 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -1,5 +1,5 @@ /* strings -- print the strings of printable characters in files - Copyright (C) 1993, 94 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. 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 @@ -13,7 +13,8 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* Usage: strings [options] file... @@ -49,12 +50,13 @@ Written by Richard Stallman <rms@gnu.ai.mit.edu> and David MacKenzie <djm@gnu.ai.mit.edu>. */ +#include "bfd.h" #include <stdio.h> #include <getopt.h> #include <ctype.h> #include <errno.h> -#include "bfd.h" #include "bucomm.h" +#include "libiberty.h" #ifdef isascii #define isgraphic(c) (isascii (c) && isprint (c)) @@ -67,7 +69,7 @@ extern int errno; #endif /* The BFD section flags that identify an initialized data section. */ -#define DATA_FLAGS (SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS) +#define DATA_FLAGS (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS) /* Radix for printing addresses (must be 8, 10 or 16). */ static int address_radix; @@ -90,8 +92,6 @@ static boolean got_a_section; /* The BFD object file format. */ static char *target; -extern char *program_version; - static struct option long_options[] = { {"all", no_argument, NULL, 'a'}, @@ -104,14 +104,16 @@ static struct option long_options[] = {NULL, 0, NULL, 0} }; +static void strings_a_section PARAMS ((bfd *, asection *, PTR)); +static boolean strings_object_file PARAMS ((const char *)); static boolean strings_file PARAMS ((char *file)); static int integer_arg PARAMS ((char *s)); -static void print_strings PARAMS ((char *filename, FILE *stream, +static void print_strings PARAMS ((const char *filename, FILE *stream, file_ptr address, int stop_point, int magiccount, char *magic)); static void usage PARAMS ((FILE *stream, int status)); -void +int main (argc, argv) int argc; char **argv; @@ -121,6 +123,7 @@ main (argc, argv) boolean files_given = false; program_name = argv[0]; + xmalloc_set_program_name (program_name); string_min = -1; print_addresses = false; print_filenames = false; @@ -147,7 +150,7 @@ main (argc, argv) string_min = integer_arg (optarg); if (string_min < 1) { - fprintf (stderr, "%s: invalid number %s\n", + fprintf (stderr, _("%s: invalid number %s\n"), program_name, optarg); exit (1); } @@ -186,8 +189,8 @@ main (argc, argv) break; case 'v': - printf ("GNU %s version %s\n", program_name, program_version); - exit (0); + print_version ("strings"); + break; case '?': usage (stderr, 1); @@ -205,22 +208,32 @@ main (argc, argv) string_min = 4; bfd_init (); + set_default_bfd_target (); - for (; optind < argc; ++optind) + if (optind >= argc) { - if (!strcmp (argv[optind], "-")) - datasection_only = false; - else + datasection_only = false; + print_strings ("{standard input}", stdin, 0, 0, 0, (char *) NULL); + files_given = true; + } + else + { + for (; optind < argc; ++optind) { - files_given = true; - exit_status |= (strings_file (argv[optind]) == false); + if (strcmp (argv[optind], "-") == 0) + datasection_only = false; + else + { + files_given = true; + exit_status |= (strings_file (argv[optind]) == false); + } } } if (files_given == false) usage (stderr, 1); - exit (exit_status); + return (exit_status); } /* Scan section SECT of the file ABFD, whose printable name is FILE. @@ -228,11 +241,13 @@ main (argc, argv) set `got_a_section' and print the strings in it. */ static void -strings_a_section (abfd, sect, file) +strings_a_section (abfd, sect, filearg) bfd *abfd; asection *sect; - PTR file; + PTR filearg; { + const char *file = (const char *) filearg; + if ((sect->flags & DATA_FLAGS) == DATA_FLAGS) { bfd_size_type sz = bfd_get_section_size_before_reloc (sect); @@ -254,7 +269,7 @@ strings_a_section (abfd, sect, file) static boolean strings_object_file (file) - char *file; + const char *file; { bfd *abfd = bfd_openr (file, target); @@ -274,7 +289,7 @@ strings_object_file (file) } got_a_section = false; - bfd_map_over_sections (abfd, strings_a_section, file); + bfd_map_over_sections (abfd, strings_a_section, (PTR) file); if (!bfd_close (abfd)) { @@ -299,7 +314,10 @@ strings_file (file) { FILE *stream; - stream = fopen (file, "r"); + stream = fopen (file, "rb"); + /* Not all systems permit "rb", so try "r" if it failed. */ + if (stream == NULL) + stream = fopen (file, "r"); if (stream == NULL) { fprintf (stderr, "%s: ", program_name); @@ -334,18 +352,18 @@ strings_file (file) static void print_strings (filename, stream, address, stop_point, magiccount, magic) - char *filename; + const char *filename; FILE *stream; file_ptr address; int stop_point; int magiccount; char *magic; { - int bufsize = 100; - char *buf = (char *) xmalloc (bufsize); + char *buf = (char *) xmalloc (string_min + 1); while (1) { + file_ptr start; int i; int c; @@ -353,6 +371,7 @@ print_strings (filename, stream, address, stop_point, magiccount, magic) tryline: if (stop_point && address >= stop_point) break; + start = address; for (i = 0; i < string_min; i++) { if (magiccount) @@ -365,7 +384,7 @@ print_strings (filename, stream, address, stop_point, magiccount, magic) if (stream == NULL) return; c = getc (stream); - if (c < 0) + if (c == EOF) return; } address++; @@ -375,78 +394,51 @@ print_strings (filename, stream, address, stop_point, magiccount, magic) buf[i] = c; } - /* We found a run of `string_min' graphic characters. - Now see if it is terminated with a NUL byte or a newline. */ - while (1) - { - if (i == bufsize) - { - bufsize *= 2; - buf = (char *) xrealloc (buf, bufsize); - } - if (magiccount) - { - magiccount--; - c = *magic++; - } - else - { - if (stream == NULL) - return; - c = getc (stream); - if (c < 0) - return; - } - address++; - if (c == '\0' || c == '\n') - break; /* It is; print this string. */ - if (!isgraphic (c)) - goto tryline; /* It isn't; give up on this string. */ - buf[i++] = c; /* The string continues; store it all. */ - } + /* We found a run of `string_min' graphic characters. Print up + to the next non-graphic character. */ - /* If we get here, the string is all graphics and properly terminated, - so print it. It is all in `buf' and `i' is its length. */ - buf[i] = '\0'; if (print_filenames) printf ("%s: ", filename); if (print_addresses) switch (address_radix) { case 8: - printf ("%7lo ", (unsigned long) (address - i - 1)); + printf ("%7lo ", (unsigned long) start); break; case 10: - printf ("%7ld ", (long) (address - i - 1)); + printf ("%7ld ", (long) start); break; case 16: - printf ("%7lx ", (unsigned long) (address - i - 1)); + printf ("%7lx ", (unsigned long) start); break; } - for (i = 0; (c = buf[i]) != '\0'; i++) - switch (c) - { - case '\n': - printf ("\\n"); - break; - case '\t': - printf ("\\t"); - break; - case '\f': - printf ("\\f"); - break; - case '\b': - printf ("\\b"); - break; - case '\r': - printf ("\\r"); + buf[i] = '\0'; + fputs (buf, stdout); + + while (1) + { + if (magiccount) + { + magiccount--; + c = *magic++; + } + else + { + if (stream == NULL) + break; + c = getc (stream); + if (c == EOF) + break; + } + address++; + if (! isgraphic (c)) break; - default: - putchar (c); - } + putchar (c); + } + putchar ('\n'); } } @@ -493,7 +485,7 @@ integer_arg (s) if (*p) { - fprintf (stderr, "%s: invalid integer argument %s\n", program_name, s); + fprintf (stderr, _("%s: invalid integer argument %s\n"), program_name, s); exit (1); } return value; @@ -504,10 +496,13 @@ usage (stream, status) FILE *stream; int status; { - fprintf (stream, "\ + fprintf (stream, _("\ Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n\ [--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n\ - [--target=bfdname] [--help] [--version] file...\n", + [--target=bfdname] [--help] [--version] file...\n"), program_name); + list_supported_targets (program_name, stream); + if (status == 0) + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (status); } diff --git a/binutils/sysdump.c b/binutils/sysdump.c index 891ce13..ed365b4 100644 --- a/binutils/sysdump.c +++ b/binutils/sysdump.c @@ -1,21 +1,22 @@ /* Sysroff object format dumper. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 1998 Free Software Foundation, Inc. -This file is part of GNU Binutils. + 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 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. + 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. */ + 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. */ /* Written by Steve Chamberlain <sac@cygnus.com>. @@ -23,19 +24,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ This program reads a SYSROFF object file and prints it in an almost human readable form to stdout. */ +#include "bfd.h" +#include "bucomm.h" + #include <stdio.h> #include <ctype.h> #include <libiberty.h> #include <getopt.h> #include "sysroff.h" -#include <stdlib.h> -#include "sysdep.h" + #define PROGRAM_VERSION "1.0" -static int h8300; -static int sh; + static int dump = 1; static int segmented_p; static int code; +static int addrsize = 4; static FILE *file; static char * @@ -43,7 +46,7 @@ xcalloc (a, b) int a; int b; { - char *r = xmalloc (a, b); + char *r = xmalloc (a * b); memset (r, 0, a * b); return r; } @@ -130,7 +133,8 @@ fillup (ptr) } if (dump) dh (ptr, size); - return size; + + return size - 1; } barray @@ -168,7 +172,7 @@ getINT (ptr, idx, size, max) return 0; } if (size == -2) - size = 4; + size = addrsize; if (size == -1) size = 0; switch (size) @@ -192,14 +196,17 @@ getINT (ptr, idx, size, max) } int -getBITS (ptr, idx, size) +getBITS (ptr, idx, size, max) char *ptr; int *idx; - int size; + int size, max; { int byte = *idx / 8; int bit = *idx % 8; + if (byte >= max) + return 0; + *idx += size; return (ptr[byte] >> (8 - bit - size)) & ((1 << size) - 1); @@ -305,6 +312,7 @@ getone (type) { struct IT_hd dummy; sysroff_swap_hd_in (&dummy); + addrsize = dummy.afl; sysroff_print_hd_out (&dummy); } break; @@ -484,6 +492,10 @@ opt (x) return getone (x); } +#if 0 + +/* This is no longer used. */ + static void unit_info_list () { @@ -502,6 +514,12 @@ unit_info_list () } } +#endif + +#if 0 + +/* This is no longer used. */ + static void object_body_list () { @@ -514,6 +532,8 @@ object_body_list () } } +#endif + static void must (x) int x; @@ -541,7 +561,7 @@ tab (i, s) static void derived_type (); static void -symbol_info () +dump_symbol_info () { tab (1, "SYMBOL INFO"); while (opt (IT_dsy_CODE)) @@ -564,27 +584,27 @@ derived_type () { if (opt (IT_dpp_CODE)) { - symbol_info (); + dump_symbol_info (); must (IT_dpp_CODE); } else if (opt (IT_dfp_CODE)) { - symbol_info (); + dump_symbol_info (); must (IT_dfp_CODE); } else if (opt (IT_den_CODE)) { - symbol_info (); + dump_symbol_info (); must (IT_den_CODE); } else if (opt (IT_den_CODE)) { - symbol_info (); + dump_symbol_info (); must (IT_den_CODE); } else if (opt (IT_dds_CODE)) { - symbol_info (); + dump_symbol_info (); must (IT_dds_CODE); } else if (opt (IT_dar_CODE)) @@ -609,6 +629,10 @@ derived_type () tab (-1, ""); } +#if 0 + +/* This is no longer used. */ + static void program_structure () { @@ -617,12 +641,18 @@ program_structure () { must (IT_dso_CODE); opt (IT_dss_CODE); - symbol_info (); + dump_symbol_info (); must (IT_dps_CODE); } tab (-1, ""); } +#endif + +#if 0 + +/* This is no longer used. */ + static void debug_list () { @@ -636,6 +666,8 @@ debug_list () tab (-1, ""); } +#endif + static void module () { @@ -687,14 +719,14 @@ show_usage (file, status) FILE *file; int status; { - fprintf (file, "Usage: %s [-hV] in-file\n", program_name); + fprintf (file, _("Usage: %s [-hV] in-file\n"), program_name); exit (status); } static void show_help () { - printf ("%s: Print a human readable interpretation of a SYSROFF object file\n", + printf (_("%s: Print a human readable interpretation of a SYSROFF object file\n"), program_name); show_usage (stdout, 0); } @@ -724,7 +756,7 @@ main (ac, av) show_help (); /*NOTREACHED*/ case 'V': - printf ("GNU %s version %s\n", program_name, PROGRAM_VERSION); + printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION); exit (0); /*NOTREACHED*/ case 0: @@ -744,7 +776,7 @@ main (ac, av) if (!input_file) { - fprintf (stderr, "%s: no input file specified\n", + fprintf (stderr, _("%s: no input file specified\n"), program_name); exit (1); } @@ -752,7 +784,7 @@ main (ac, av) file = fopen (input_file, FOPEN_RB); if (!file) { - fprintf (stderr, "%s: cannot open input file %s\n", + fprintf (stderr, _("%s: cannot open input file %s\n"), program_name, input_file); exit (1); } diff --git a/binutils/windres.c b/binutils/windres.c index 359026b..b4a17df 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -1,5 +1,5 @@ /* windres.c -- a program to manipulate Windows resources - Copyright 1997 Free Software Foundation, Inc. + Copyright 1997, 1998 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -44,6 +44,7 @@ #include <assert.h> #include <ctype.h> +#include <time.h> /* An enumeration of format types. */ @@ -224,7 +225,7 @@ open_file_search (filename, mode, errmsg, real_filename) } } - fatal ("can't open %s `%s': %s", errmsg, filename, strerror (errno)); + fatal (_("can't open %s `%s': %s"), errmsg, filename, strerror (errno)); /* Return a value to avoid a compiler warning. */ return NULL; @@ -283,8 +284,50 @@ unicode_print (e, unicode, length) ++unicode; - if ((ch & 0x7f) == ch && isprint (ch)) - putc (ch, e); + if ((ch & 0x7f) == ch) + { + if (ch == '\\') + fputs ("\\", e); + else if (isprint (ch)) + putc (ch, e); + else + { + switch (ch) + { + case ESCAPE_A: + fputs ("\\a", e); + break; + + case ESCAPE_B: + fputs ("\\b", e); + break; + + case ESCAPE_F: + fputs ("\\f", e); + break; + + case ESCAPE_N: + fputs ("\\n", e); + break; + + case ESCAPE_R: + fputs ("\\r", e); + break; + + case ESCAPE_T: + fputs ("\\t", e); + break; + + case ESCAPE_V: + fputs ("\\v", e); + break; + + default: + fprintf (e, "\\%03o", (unsigned int) ch); + break; + } + } + } else if ((ch & 0xff) == ch) fprintf (e, "\\%03o", (unsigned int) ch); else @@ -418,10 +461,17 @@ define_resource (resources, cids, ids, dupok) if (*resources == NULL) { + static unsigned long timeval; + + /* Use the same timestamp for every resource created in a + single run. */ + if (timeval == 0) + timeval = time (NULL); + *resources = ((struct res_directory *) res_alloc (sizeof **resources)); (*resources)->characteristics = 0; - (*resources)->time = 0; + (*resources)->time = timeval; (*resources)->major = 0; (*resources)->minor = 0; (*resources)->entries = NULL; @@ -458,7 +508,7 @@ define_resource (resources, cids, ids, dupok) { fprintf (stderr, "%s: ", program_name); res_ids_print (stderr, i, ids); - fprintf (stderr, ": expected to be a directory\n"); + fprintf (stderr, _(": expected to be a directory\n")); xexit (1); } @@ -470,7 +520,7 @@ define_resource (resources, cids, ids, dupok) { fprintf (stderr, "%s: ", program_name); res_ids_print (stderr, cids, ids); - fprintf (stderr, ": expected to be a leaf\n"); + fprintf (stderr, _(": expected to be a leaf\n")); xexit (1); } @@ -479,9 +529,9 @@ define_resource (resources, cids, ids, dupok) if (dupok) return re->u.res; - fprintf (stderr, "%s: warning: ", program_name); + fprintf (stderr, _("%s: warning: "), program_name); res_ids_print (stderr, cids, ids); - fprintf (stderr, ": duplicate value\n"); + fprintf (stderr, _(": duplicate value\n")); } re->u.res = ((struct res_resource *) @@ -644,8 +694,8 @@ format_from_name (name) if (m->name == NULL) { - fprintf (stderr, "%s: unknown format type `%s'\n", program_name, name); - fprintf (stderr, "%s: supported formats:", program_name); + fprintf (stderr, _("%s: unknown format type `%s'\n"), program_name, name); + fprintf (stderr, _("%s: supported formats:"), program_name); for (m = format_names; m->name != NULL; m++) fprintf (stderr, " %s", m->name); fprintf (stderr, "\n"); @@ -732,7 +782,7 @@ format_from_filename (filename, input) return RES_FORMAT_RC; /* Otherwise, we give up. */ - fatal ("can not determine type of file `%s'; use the -I option", + fatal (_("can not determine type of file `%s'; use the -I option"), filename); /* Return something to silence the compiler warning. */ @@ -746,9 +796,9 @@ usage (stream, status) FILE *stream; int status; { - fprintf (stream, "Usage: %s [options] [input-file] [output-file]\n", + fprintf (stream, _("Usage: %s [options] [input-file] [output-file]\n"), program_name); - fprintf (stream, "\ + fprintf (stream, _("\ Options:\n\ -i FILE, --input FILE Name input file\n\ -o FILE, --output FILE Name output file\n\ @@ -760,21 +810,21 @@ Options:\n\ --preprocessor PROGRAM Program to use to preprocess rc file\n\ --include-dir DIR Include directory when preprocessing rc file\n\ --define SYM[=VAL] Define SYM when preprocessing rc file\n\ - --language VAL Set language when reading rc file\n"); + --language VAL Set language when reading rc file\n")); #ifdef YYDEBUG - fprintf (stream, "\ - --yydebug Turn on parser debugging\n"); + fprintf (stream, _("\ + --yydebug Turn on parser debugging\n")); #endif - fprintf (stream, "\ + fprintf (stream, _("\ --help Print this help message\n\ - --version Print version information\n"); - fprintf (stream, "\ + --version Print version information\n")); + fprintf (stream, _("\ FORMAT is one of rc, res, or coff, and is deduced from the file name\n\ extension if not specified. A single file name is an input file.\n\ -No input-file is stdin, default rc. No output-file is stdout, default rc.\n"); +No input-file is stdin, default rc. No output-file is stdout, default rc.\n")); list_supported_targets (program_name, stream); if (status == 0) - fprintf (stream, "Report bugs to bug-gnu-utils@prep.ai.mit.edu\n"); + fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); exit (status); } @@ -963,7 +1013,7 @@ main (argc, argv) } if (resources == NULL) - fatal ("no resources"); + fatal (_("no resources")); /* Sort the resources. This is required for COFF, convenient for rc, and unimportant for res. */ @@ -997,7 +1047,7 @@ struct res_directory * read_res_file (filename) const char *filename; { - fatal ("read_res_file unimplemented"); + fatal (_("read_res_file unimplemented")); return NULL; } @@ -1006,5 +1056,5 @@ write_res_file (filename, resources) const char *filename; const struct res_directory *resources; { - fatal ("write_res_file unimplemented"); + fatal (_("write_res_file unimplemented")); } |