diff options
-rw-r--r-- | ld/ChangeLog | 19 | ||||
-rw-r--r-- | ld/Makefile.am | 21 | ||||
-rw-r--r-- | ld/Makefile.in | 276 | ||||
-rw-r--r-- | ld/acconfig.h | 15 | ||||
-rwxr-xr-x | ld/configure | 2151 | ||||
-rw-r--r-- | ld/configure.in | 17 | ||||
-rw-r--r-- | ld/ld.h | 42 | ||||
-rw-r--r-- | ld/ldmain.c | 135 | ||||
-rw-r--r-- | ld/lexsup.c | 302 | ||||
-rw-r--r-- | ld/mpw-elfmips.c | 20 | ||||
-rw-r--r-- | ld/mpw-eppcmac.c | 48 | ||||
-rw-r--r-- | ld/mpw-idtmips.c | 8 | ||||
-rw-r--r-- | ld/po/Make-in | 250 |
13 files changed, 2854 insertions, 450 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 700ef71..1113fea 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,22 @@ +Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com> + + * Many files: Added gettext invocations around user-visible + strings. + * ld.h: Added gettext-related includes and defines. + * ldmain.c: Call setlocale, bindtextdomain, textdomain. + * 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. + (TDIRS): AC_SUBST early on, to avoid having value split when it + happens to cross line 90 of the generated sed script. + * Makefile.am (SUBDIRS): New macro. + (POTFILES): Likewise. + (po/POTFILES.in): New target. + (ld_new_LDADD): Added INTLLIBS. + (ld_new_DEPENDENCIES): Added INTLDEPS. + * po/Make-in, po/POTFILES.in, po/gas.pot: New files. + Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com> * ld.texinfo (Simple Example): Rewrite a few things as suggested diff --git a/ld/Makefile.am b/ld/Makefile.am index 5466bc8..29acbcc 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -1,7 +1,12 @@ ## Process this file with automake to generate Makefile.in +## FIXME: work around apparent automake bug. +INTLLIBS = @INTLLIBS@ + AUTOMAKE_OPTIONS = cygnus dejagnu +SUBDIRS = po + tooldir = $(exec_prefix)/$(target_alias) YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi` @@ -84,7 +89,7 @@ info_TEXINFOS = ld.texinfo noinst_TEXINFOS = ldint.texinfo man_MANS = ld.1 -INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS) +INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\"" BFDLIB = ../bfd/libbfd.la LIBIBERTY = ../libiberty/libiberty.a @@ -216,6 +221,11 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \ STAGESTUFF = *.o ldscripts/* e*.c +POTFILES = $(CFILES) $(HFILES) +po/POTFILES.in: @MAINT@ Makefile + for file in $(POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/POTFILES.in + ldmain.o: ldmain.c config.status $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c @@ -567,8 +577,8 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \ ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c -ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) -ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) +ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS) +ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) # The generated emulation files mostly have the same dependencies. $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \ @@ -576,7 +586,7 @@ $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \ ldctor.h ldexp.h ldlang.h ldgram.h # This is the real libbfd.a created by libtool. -TESTBFDLIB = ../bfd/.libs/libbfd.a +TESTBFDLIB = @TESTBFDLIB@ check-DEJAGNU: site.exp srcroot=`cd $(srcdir) && pwd`; export srcroot; \ @@ -662,6 +672,9 @@ configdoc.texi: ${DOCVER}-doc.texi || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \ || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi +ld.info: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi +ld.dvi: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi + ld.info: $(srcdir)/ld.texinfo configdoc.texi @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo diff --git a/ld/Makefile.in b/ld/Makefile.in index 4dd928a..ad5b0e4 100644 --- a/ld/Makefile.in +++ b/ld/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@ @@ -62,21 +64,20 @@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ CC = @CC@ +CC_FOR_BUILD = @CC_FOR_BUILD@ EXEEXT = @EXEEXT@ +EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ HDEFINES = @HDEFINES@ -LD = @LD@ LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@ -NM = @NM@ -PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ -VERSION = @VERSION@ + +INTLLIBS = @INTLLIBS@ AUTOMAKE_OPTIONS = cygnus dejagnu +SUBDIRS = po + tooldir = $(exec_prefix)/$(target_alias) YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi` @@ -159,7 +160,7 @@ info_TEXINFOS = ld.texinfo noinst_TEXINFOS = ldint.texinfo man_MANS = ld.1 -INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS) +INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\"" BFDLIB = ../bfd/libbfd.la LIBIBERTY = ../libiberty/libiberty.a @@ -291,6 +292,8 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \ STAGESTUFF = *.o ldscripts/* e*.c +POTFILES = $(CFILES) $(HFILES) + # These all start with e so 'make clean' can find them. GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@" @@ -298,11 +301,11 @@ GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c -ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) -ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) +ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS) +ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) # This is the real libbfd.a created by libtool. -TESTBFDLIB = ../bfd/.libs/libbfd.a +TESTBFDLIB = @TESTBFDLIB@ MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.o crtend.o ld.log ld.sum @@ -334,12 +337,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 = ld.info DVIS = ld.dvi TEXINFOS = ld.texinfo -MANS = ld.1 +man1dir = $(mandir)/man1 +MANS = $(man_MANS) NROFF = nroff DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \ @@ -347,6 +352,9 @@ acconfig.h acinclude.m4 aclocal.m4 config.in configure configure.in \ ldgram.c ldlex.c stamp-h.in +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar @@ -354,14 +362,14 @@ GZIP = --best SOURCES = $(ld_new_SOURCES) OBJECTS = $(ld_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 @@ -483,26 +491,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 @@ -513,11 +533,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) @@ -547,21 +567,82 @@ maintainer-clean-aminfo: fi; \ done clean-info: mostlyclean-aminfo -install-man: $(MANS) - $(NORMAL_INSTALL) - $(mkinstalldirs) $(mandir)/man1 - @sect=1; \ - inst=`echo "ld" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/ld.1; then file=$(srcdir)/ld.1; \ - else file=ld.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst -uninstall-man: - $(NORMAL_UNINSTALL) - -inst=`echo "ld" | 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 @@ -569,9 +650,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; } \ @@ -630,6 +714,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 DEJATOOL = $(PACKAGE) @@ -654,29 +746,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-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-exec-local + +install-data-am: install-man install-data-local + +uninstall-am: uninstall-man + +install-exec: install-exec-recursive install-exec-am @$(NORMAL_INSTALL) -install-data: install-man install-data-local +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-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) $(mandir)/man1 +installdirs: installdirs-recursive + $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 mostlyclean-generic: @@ -693,42 +794,60 @@ distclean-generic: maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ +mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ mostlyclean-compile mostlyclean-libtool \ - mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \ - mostlyclean-local + mostlyclean-aminfo mostlyclean-tags mostlyclean-generic -clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \ - clean-aminfo clean-tags clean-generic mostlyclean +clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \ + clean-aminfo clean-tags clean-generic mostlyclean-am -distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \ +distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \ distclean-libtool distclean-aminfo distclean-tags \ - distclean-generic clean distclean-local - -rm -f config.status - -rm -f libtool + distclean-generic clean-am -maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstPROGRAMS \ +maintainer-clean-am: maintainer-clean-hdr \ + 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 distclean-local + -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-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 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 clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean - +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +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-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 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 ldmain.o: ldmain.c config.status $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c @@ -1163,6 +1282,9 @@ configdoc.texi: ${DOCVER}-doc.texi || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \ || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi +ld.info: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi +ld.dvi: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi + ld.info: $(srcdir)/ld.texinfo configdoc.texi @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo diff --git a/ld/acconfig.h b/ld/acconfig.h index c627d7f..ed7a2e4 100644 --- a/ld/acconfig.h +++ b/ld/acconfig.h @@ -20,3 +20,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/ld/configure b/ld/configure index 529249d..e4fa8c5 100755 --- a/ld/configure +++ b/ld/configure @@ -26,6 +26,10 @@ ac_help="$ac_help ac_help="$ac_help --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" 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" @@ -584,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:588: checking host system type" >&5 +echo "configure:592: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -605,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:609: checking target system type" >&5 +echo "configure:613: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -623,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:627: checking build system type" >&5 +echo "configure:631: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -658,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:662: 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 @@ -712,7 +716,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:716: 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 @@ -769,7 +773,7 @@ test "$program_suffix" != NONE && 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:773: checking whether ${MAKE-make} sets \${MAKE}" >&5 +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 @@ -815,7 +819,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:819: 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. @@ -828,7 +832,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:832: 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. @@ -841,7 +845,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:845: 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. @@ -854,7 +858,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:858: 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. @@ -867,7 +871,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:871: 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. @@ -930,7 +934,7 @@ 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:934: 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 @@ -959,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:963: 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 @@ -988,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:992: 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 @@ -1036,7 +1040,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1040: 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. @@ -1046,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 1050 "configure" +#line 1054 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1054: \"$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 @@ -1070,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:1074: 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:1079: 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 @@ -1084,7 +1088,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$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 @@ -1099,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:1103: 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 @@ -1139,7 +1143,7 @@ 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:1143: 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. @@ -1157,10 +1161,10 @@ echo "configure:1143: 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:1161: 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:1164: 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 @@ -1196,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:1200: 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 @@ -1212,15 +1216,11 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1216: 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 -/* | [A-Za-z]:\\*) - 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" && ac_dir=. @@ -1240,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" @@ -1249,7 +1250,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1253: 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 @@ -1269,6 +1270,12 @@ else echo "$ac_t""no" 1>&6 fi +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1285,8 +1292,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1289 "configure"' > conftest.$ac_ext - if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + 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" @@ -1306,11 +1313,147 @@ case "$host" in # 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; } @@ -1354,7 +1497,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:1358: checking for $ac_word" >&5 +echo "configure:1501: 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 @@ -1383,7 +1526,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:1387: checking for $ac_word" >&5 +echo "configure:1530: 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 @@ -1431,7 +1574,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1435: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1578: 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. @@ -1441,11 +1584,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 1445 "configure" +#line 1588 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1592: \"$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 @@ -1465,12 +1608,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:1469: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1612: 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:1474: checking whether we are using GNU C" >&5 +echo "configure:1617: 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 @@ -1479,7 +1622,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1483: \"$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:1626: \"$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 @@ -1494,7 +1637,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:1498: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1641: 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 @@ -1524,20 +1667,1706 @@ fi test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +ALL_LINGUAS= +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1674: 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 1689 "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:1695: \"$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 1706 "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:1712: \"$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 + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1735: 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:1756: 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 + cat > conftest.$ac_ext <<EOF +#line 1761 "configure" +#include "confdefs.h" +#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:1769: \"$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 1786 "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 1804 "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 1825 "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:1836: \"$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:1860: 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 1865 "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:1914: \"$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:1935: 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 1942 "configure" +#include "confdefs.h" + +int main() { +} $ac_kw foo() { +; return 0; } +EOF +if { (eval echo configure:1949: \"$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:1975: 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 1980 "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:2008: 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 2013 "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:2043: 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 2048 "configure" +#include "confdefs.h" +#include <alloca.h> +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:2055: \"$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:2076: 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 2081 "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:2104: \"$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:2136: 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 2141 "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:2166: 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 2171 "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:2194: \"$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:2221: 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 2229 "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:2248: \"$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:2273: 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 2278 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2283: \"$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 + 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:2312: 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 2317 "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:2340: \"$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:2365: 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 2373 "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:2513: \"$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:2541: 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 2546 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2551: \"$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 + 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:2581: 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 2586 "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:2609: \"$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 + + + 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:2638: 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 2643 "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:2666: \"$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 + + 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:2700: checking for LC_MESSAGES" >&5 +if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2705 "configure" +#include "confdefs.h" +#include <locale.h> +int main() { +return LC_MESSAGES +; return 0; } +EOF +if { (eval echo configure:2712: \"$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:2733: 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:2753: 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:2772: 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 2777 "configure" +#include "confdefs.h" +#include <libintl.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2782: \"$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:2799: 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 2804 "configure" +#include "confdefs.h" +#include <libintl.h> +int main() { +return (int) gettext ("") +; return 0; } +EOF +if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + 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:2827: 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 2835 "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:2846: \"$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" + +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:2862: 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 2867 "configure" +#include "confdefs.h" + +int main() { +return (int) gettext ("") +; return 0; } +EOF +if { (eval echo configure:2874: \"$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:2902: 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:2936: 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 2941 "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:2964: \"$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:2991: 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:3026: 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 3058 "configure" +#include "confdefs.h" + +int main() { +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr +; return 0; } +EOF +if { (eval echo configure:3066: \"$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:3098: 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:3132: 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:3167: 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:3257: 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:3285: 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 3290 "configure" +#include "confdefs.h" +#include <linux/version.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3295: \"$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 for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:1529: checking for Cygwin32 environment" >&5 +echo "configure:3358: 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 1534 "configure" +#line 3363 "configure" #include "confdefs.h" int main() { return __CYGWIN32__; ; return 0; } EOF -if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -1554,19 +3383,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:1558: checking for Mingw32 environment" >&5 +echo "configure:3387: 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 1563 "configure" +#line 3392 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -1585,7 +3414,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1589: checking for executable suffix" >&5 +echo "configure:3418: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1598,7 +3427,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 @@ -1614,7 +3450,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:1618: checking for $ac_word" >&5 +echo "configure:3454: 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 @@ -1643,10 +3479,45 @@ test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" +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:3489: 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:1650: checking for $ac_word" >&5 +echo "configure:3521: 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 @@ -1679,7 +3550,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1683: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3554: 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 @@ -1687,7 +3558,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 1691 "configure" +#line 3562 "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 @@ -1698,7 +3569,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3573: \"$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 @@ -1720,69 +3591,8 @@ fi fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1725: 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 1740 "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:1746: \"$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 1757 "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:1763: \"$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 - echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:1786: checking lex output file root" >&5 +echo "configure:3596: 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 @@ -1803,7 +3613,7 @@ 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:1807: checking whether yytext is a pointer" >&5 +echo "configure:3617: 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 @@ -1815,14 +3625,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <<EOF -#line 1819 "configure" +#line 3629 "configure" #include "confdefs.h" `cat $LEX_OUTPUT_ROOT.c` int main() { ; return 0; } EOF -if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -1845,7 +3655,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1849: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:3659: 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" @@ -1874,17 +3684,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1878: checking for $ac_hdr" >&5 +echo "configure:3688: 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 1883 "configure" +#line 3693 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1913,12 +3723,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1917: checking for $ac_func" >&5 +echo "configure:3727: 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 1922 "configure" +#line 3732 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1941,7 +3751,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1970,12 +3780,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1974: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3784: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1979 "configure" +#line 3789 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -1983,7 +3793,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2008,7 +3818,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2012: checking for opendir in -ldir" >&5 +echo "configure:3822: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2016,7 +3826,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 2020 "configure" +#line 3830 "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 @@ -2027,7 +3837,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3841: \"$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 @@ -2049,7 +3859,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2053: checking for opendir in -lx" >&5 +echo "configure:3863: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2057,7 +3867,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 2061 "configure" +#line 3871 "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 @@ -2068,7 +3878,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3882: \"$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 @@ -2101,12 +3911,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:2105: checking whether strstr must be declared" >&5 +echo "configure:3915: 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 2110 "configure" +#line 3920 "configure" #include "confdefs.h" #include <stdio.h> @@ -2127,7 +3937,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -2149,12 +3959,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:2153: checking whether free must be declared" >&5 +echo "configure:3963: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2158 "configure" +#line 3968 "configure" #include "confdefs.h" #include <stdio.h> @@ -2175,7 +3985,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -2197,12 +4007,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:2201: checking whether sbrk must be declared" >&5 +echo "configure:4011: 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 2206 "configure" +#line 4016 "configure" #include "confdefs.h" #include <stdio.h> @@ -2223,7 +4033,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -2245,12 +4055,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:2249: checking whether getenv must be declared" >&5 +echo "configure:4059: 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 2254 "configure" +#line 4064 "configure" #include "confdefs.h" #include <stdio.h> @@ -2271,7 +4081,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -2350,6 +4160,13 @@ else fi +if test x${enable_static} = xno; then + TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" +else + TESTBFDLIB="../bfd/.libs/libbfd.a" +fi + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -2451,7 +4268,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 @@ -2514,11 +4331,34 @@ 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%@CPP@%$CPP%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%@EXEEXT@%$EXEEXT%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%@MAINT@%$MAINT%g s%@HDEFINES@%$HDEFINES%g @@ -2529,6 +4369,7 @@ s%@EMUL@%$EMUL%g /@TDIRS@/r $TDIRS s%@TDIRS@%%g s%@EMULATION_OFILES@%$EMULATION_OFILES%g +s%@TESTBFDLIB@%$TESTBFDLIB%g CEOF EOF @@ -2570,7 +4411,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 @@ -2743,7 +4584,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/ld/configure.in b/ld/configure.in index 8a27a72..b87943d 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -38,12 +38,15 @@ fi AC_PROG_CC AM_PROG_INSTALL + +ALL_LINGUAS= +CY_GNU_GETTEXT + AM_CYGWIN32 AM_EXEEXT AC_PROG_YACC -AC_PROG_LEX -AC_DECL_YYTEXT +AM_PROG_LEX AM_MAINTAINER_MODE @@ -129,4 +132,12 @@ else fi AC_SUBST(EMULATION_OFILES) -AC_OUTPUT(Makefile) +if test x${enable_static} = xno; then + TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" +else + TESTBFDLIB="../bfd/.libs/libbfd.a" +fi +AC_SUBST(TESTBFDLIB) + +AC_OUTPUT(Makefile po/Makefile.in:po/Make-in, +[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]) @@ -1,5 +1,5 @@ /* ld.h -- general linker header file - Copyright (C) 1991, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -21,6 +21,29 @@ #ifndef LD_H #define LD_H +#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 + /* Look in this environment name for the linker to pretend to be */ #define EMULATION_ENVIRON "LDEMULATION" /* If in there look for the strings: */ @@ -90,6 +113,18 @@ typedef struct /* If true, generate a cross reference report. */ boolean cref; + + /* If true (which is the default), warn about mismatched input + files. */ + boolean warn_mismatch; + + /* Name of shared object whose symbol table should be filtered with + this shared object. From the --filter option. */ + char *filter_shlib; + + /* Name of shared object for whose symbol table this shared object + is an auxiliary filter. From the --auxiliary option. */ + char **auxiliary_filters; } args_type; extern args_type command_line; @@ -121,6 +156,10 @@ typedef struct only). */ boolean warn_multiple_gp; + /* If true, warn if the starting address of an output section + changes due to the alignment of an input section. */ + boolean warn_section_align; + boolean sort_common; boolean text_read_only; @@ -153,5 +192,6 @@ extern int yyparse PARAMS ((void)); extern void add_cref PARAMS ((const char *, bfd *, asection *, bfd_vma)); extern void output_cref PARAMS ((FILE *)); +extern void check_nocrossrefs PARAMS ((void)); #endif diff --git a/ld/ldmain.c b/ld/ldmain.c index 03dd315..ec4086a 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -1,5 +1,5 @@ /* Main program of GNU linker. - Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. @@ -86,6 +86,7 @@ args_type command_line; ld_config_type config; +static void remove_output PARAMS ((void)); static boolean check_for_scripts_dir PARAMS ((char *dir)); static boolean add_archive_element PARAMS ((struct bfd_link_info *, bfd *, const char *)); @@ -161,6 +162,10 @@ main (argc, argv) char *emulation; long start_time = get_run_time (); + setlocale (LC_MESSAGES, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + program_name = argv[0]; xmalloc_set_program_name (program_name); @@ -178,7 +183,7 @@ main (argc, argv) a different target. The macro TARGET is defined by Makefile. */ if (! bfd_set_default_target (TARGET)) { - einfo ("%X%P: can't set BFD default target to `%s': %E\n", TARGET); + einfo (_("%X%P: can't set BFD default target to `%s': %E\n"), TARGET); xexit (1); } @@ -190,6 +195,7 @@ main (argc, argv) command_line.force_common_definition = false; command_line.interpreter = NULL; command_line.rpath = NULL; + command_line.warn_mismatch = true; link_info.callbacks = &link_callbacks; link_info.relocateable = false; @@ -229,9 +235,9 @@ main (argc, argv) if (link_info.relocateable) { if (command_line.relax) - einfo ("%P%F: -relax and -r may not be used together\n"); + einfo (_("%P%F: -relax and -r may not be used together\n")); if (link_info.shared) - einfo ("%P%F: -r and -shared may not be used together\n"); + einfo (_("%P%F: -r and -shared may not be used together\n")); } /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I @@ -260,7 +266,7 @@ main (argc, argv) { if (trace_file_tries) { - info_msg ("using internal linker script:\n"); + info_msg (_("using internal linker script:\n")); info_msg ("==================================================\n"); info_msg (s); info_msg ("\n==================================================\n"); @@ -279,12 +285,12 @@ main (argc, argv) { if (version_printed) xexit (0); - einfo ("%P%F: no input files\n"); + einfo (_("%P%F: no input files\n")); } if (trace_files) { - info_msg ("%P: mode %s\n", emulation); + info_msg (_("%P: mode %s\n"), emulation); } ldemul_after_parse (); @@ -302,7 +308,7 @@ main (argc, argv) if (config.map_file == (FILE *) NULL) { bfd_set_error (bfd_error_system_call); - einfo ("%P%F: cannot open map file %s: %E\n", + einfo (_("%P%F: cannot open map file %s: %E\n"), config.map_filename); } } @@ -348,7 +354,7 @@ main (argc, argv) { if (trace_files == true) { - einfo ("%P: link errors found, deleting executable `%s'\n", + einfo (_("%P: link errors found, deleting executable `%s'\n"), output_filename); } @@ -359,7 +365,7 @@ main (argc, argv) else { if (! bfd_close (output_bfd)) - einfo ("%F%B: final close failed: %E\n", output_bfd); + einfo (_("%F%B: final close failed: %E\n"), output_bfd); /* If the --force-exe-suffix is enabled, and we're making an executable file and it doesn't end in .exe, copy it to one which does. */ @@ -383,21 +389,21 @@ main (argc, argv) dst = fopen (dst_name, FOPEN_WB); if (!src) - einfo ("%X%P: unable to open for source of copy `%s'\n", output_filename); + einfo (_("%X%P: unable to open for source of copy `%s'\n"), output_filename); if (!dst) - einfo ("%X%P: unable to open for destination of copy `%s'\n", dst_name); + einfo (_("%X%P: unable to open for destination of copy `%s'\n"), dst_name); while ((l = fread (buf, 1, bsize, src)) > 0) { int done = fwrite (buf, 1, l, dst); if (done != l) { - einfo ("%P: Error writing file `%s'\n", dst_name); + einfo (_("%P: Error writing file `%s'\n"), dst_name); } } fclose (src); - if (!fclose (dst)) + if (fclose (dst) == EOF) { - einfo ("%P: Error closing file `%s'\n", dst_name); + einfo (_("%P: Error closing file `%s'\n"), dst_name); } free (dst_name); free (buf); @@ -415,10 +421,10 @@ main (argc, argv) #endif long run_time = get_run_time () - start_time; - fprintf (stderr, "%s: total time in link: %ld.%06ld\n", + fprintf (stderr, _("%s: total time in link: %ld.%06ld\n"), program_name, run_time / 1000000, run_time % 1000000); #ifdef HAVE_SBRK - fprintf (stderr, "%s: data size %ld\n", program_name, + fprintf (stderr, _("%s: data size %ld\n"), program_name, (long) (lim - (char *) &environ)); #endif } @@ -459,7 +465,7 @@ get_emulation (argc, argv) } else { - einfo("%P%F: missing argument to -m\n"); + einfo(_("%P%F: missing argument to -m\n")); } } else if (strcmp (argv[i], "-mips1") == 0 @@ -573,12 +579,12 @@ add_ysym (name) if (! bfd_hash_table_init_n (link_info.notice_hash, bfd_hash_newfunc, 61)) - einfo ("%P%F: bfd_hash_table_init failed: %E\n"); + einfo (_("%P%F: bfd_hash_table_init failed: %E\n")); } if (bfd_hash_lookup (link_info.notice_hash, name, true, true) == (struct bfd_hash_entry *) NULL) - einfo ("%P%F: bfd_hash_lookup failed: %E\n"); + einfo (_("%P%F: bfd_hash_lookup failed: %E\n")); } /* Record a symbol to be wrapped, from the --wrap option. */ @@ -594,10 +600,10 @@ add_wrap (name) if (! bfd_hash_table_init_n (link_info.wrap_hash, bfd_hash_newfunc, 61)) - einfo ("%P%F: bfd_hash_table_init failed: %E\n"); + einfo (_("%P%F: bfd_hash_table_init failed: %E\n")); } if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL) - einfo ("%P%F: bfd_hash_lookup failed: %E\n"); + einfo (_("%P%F: bfd_hash_lookup failed: %E\n")); } /* Handle the -retain-symbols-file option. */ @@ -612,7 +618,7 @@ add_keepsyms_file (filename) int c; if (link_info.strip == strip_some) - einfo ("%X%P: error: duplicate retain-symbols-file\n"); + einfo (_("%X%P: error: duplicate retain-symbols-file\n")); file = fopen (filename, "r"); if (file == (FILE *) NULL) @@ -625,7 +631,7 @@ add_keepsyms_file (filename) link_info.keep_hash = ((struct bfd_hash_table *) xmalloc (sizeof (struct bfd_hash_table))); if (! bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc)) - einfo ("%P%F: bfd_hash_table_init failed: %E\n"); + einfo (_("%P%F: bfd_hash_table_init failed: %E\n")); bufsize = 100; buf = (char *) xmalloc (bufsize); @@ -656,12 +662,12 @@ add_keepsyms_file (filename) if (bfd_hash_lookup (link_info.keep_hash, buf, true, true) == (struct bfd_hash_entry *) NULL) - einfo ("%P%F: bfd_hash_lookup for insertion failed: %E\n"); + einfo (_("%P%F: bfd_hash_lookup for insertion failed: %E\n")); } } if (link_info.strip != strip_none) - einfo ("%P: `-retain-symbols-file' overrides `-s' and `-S'\n"); + einfo (_("%P: `-retain-symbols-file' overrides `-s' and `-S'\n")); link_info.strip = strip_some; } @@ -738,8 +744,8 @@ add_archive_element (info, abfd, name) { char buf[100]; - sprintf (buf, "%-29s %s\n\n", "Archive member included", - "because of file (symbol)"); + sprintf (buf, "%-29s %s\n\n", _("Archive member included"), + _("because of file (symbol)")); minfo ("%s", buf); header_printed = true; } @@ -811,10 +817,10 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval) && bfd_is_abs_section (nsec->output_section))) return true; - einfo ("%X%C: multiple definition of `%T'\n", + einfo (_("%X%C: multiple definition of `%T'\n"), nbfd, nsec, nval, name); if (obfd != (bfd *) NULL) - einfo ("%D: first defined here\n", obfd, osec, oval); + einfo (_("%D: first defined here\n"), obfd, osec, oval); return true; } @@ -843,43 +849,43 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize) || ntype == bfd_link_hash_indirect) { ASSERT (otype == bfd_link_hash_common); - einfo ("%B: warning: definition of `%T' overriding common\n", + einfo (_("%B: warning: definition of `%T' overriding common\n"), nbfd, name); if (obfd != NULL) - einfo ("%B: warning: common is here\n", obfd); + einfo (_("%B: warning: common is here\n"), obfd); } else if (otype == bfd_link_hash_defined || otype == bfd_link_hash_defweak || otype == bfd_link_hash_indirect) { ASSERT (ntype == bfd_link_hash_common); - einfo ("%B: warning: common of `%T' overridden by definition\n", + einfo (_("%B: warning: common of `%T' overridden by definition\n"), nbfd, name); if (obfd != NULL) - einfo ("%B: warning: defined here\n", obfd); + einfo (_("%B: warning: defined here\n"), obfd); } else { ASSERT (otype == bfd_link_hash_common && ntype == bfd_link_hash_common); if (osize > nsize) { - einfo ("%B: warning: common of `%T' overridden by larger common\n", + einfo (_("%B: warning: common of `%T' overridden by larger common\n"), nbfd, name); if (obfd != NULL) - einfo ("%B: warning: larger common is here\n", obfd); + einfo (_("%B: warning: larger common is here\n"), obfd); } else if (nsize > osize) { - einfo ("%B: warning: common of `%T' overriding smaller common\n", + einfo (_("%B: warning: common of `%T' overriding smaller common\n"), nbfd, name); if (obfd != NULL) - einfo ("%B: warning: smaller common is here\n", obfd); + einfo (_("%B: warning: smaller common is here\n"), obfd); } else { - einfo ("%B: warning: multiple common of `%T'\n", nbfd, name); + einfo (_("%B: warning: multiple common of `%T'\n"), nbfd, name); if (obfd != NULL) - einfo ("%B: warning: previous common is here\n", obfd); + einfo (_("%B: warning: previous common is here\n"), obfd); } } @@ -901,7 +907,7 @@ add_to_set (info, h, reloc, abfd, section, value) bfd_vma value; { if (config.warn_constructors) - einfo ("%P: warning: global constructor %s used\n", + einfo (_("%P: warning: global constructor %s used\n"), h->root.string); if (! config.build_constructors) @@ -940,7 +946,7 @@ constructor_callback (info, constructor, name, abfd, section, value) char set_name[1 + sizeof "__CTOR_LIST__"]; if (config.warn_constructors) - einfo ("%P: warning: global constructor %s used\n", name); + einfo (_("%P: warning: global constructor %s used\n"), name); if (! config.build_constructors) return true; @@ -950,7 +956,7 @@ constructor_callback (info, constructor, name, abfd, section, value) if (bfd_reloc_type_lookup (output_bfd, BFD_RELOC_CTOR) == NULL && (link_info.relocateable || bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL)) - einfo ("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"); + einfo (_("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n")); s = set_name; if (bfd_get_symbol_leading_char (abfd) != '\0') @@ -962,7 +968,7 @@ constructor_callback (info, constructor, name, abfd, section, value) h = bfd_link_hash_lookup (info->hash, set_name, true, true, true); if (h == (struct bfd_link_hash_entry *) NULL) - einfo ("%P%F: bfd_link_hash_lookup failed: %E\n"); + einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n")); if (h->type == bfd_link_hash_new) { h->type = bfd_link_hash_undefined; @@ -1030,11 +1036,11 @@ warning_callback (info, warning, symbol, abfd, section, address) symsize = bfd_get_symtab_upper_bound (abfd); if (symsize < 0) - einfo ("%B%F: could not read symbols: %E\n", abfd); + einfo (_("%B%F: could not read symbols: %E\n"), abfd); asymbols = (asymbol **) xmalloc (symsize); symbol_count = bfd_canonicalize_symtab (abfd, asymbols); if (symbol_count < 0) - einfo ("%B%F: could not read symbols: %E\n", abfd); + einfo (_("%B%F: could not read symbols: %E\n"), abfd); if (entry != NULL) { entry->asymbols = asymbols; @@ -1080,14 +1086,14 @@ warning_find_reloc (abfd, sec, iarg) relsize = bfd_get_reloc_upper_bound (abfd, sec); if (relsize < 0) - einfo ("%B%F: could not read relocs: %E\n", abfd); + einfo (_("%B%F: could not read relocs: %E\n"), abfd); if (relsize == 0) return; relpp = (arelent **) xmalloc (relsize); relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols); if (relcount < 0) - einfo ("%B%F: could not read relocs: %E\n", abfd); + einfo (_("%B%F: could not read relocs: %E\n"), abfd); p = relpp; pend = p + relcount; @@ -1136,14 +1142,14 @@ undefined_symbol (info, name, abfd, section, address) hash = ((struct bfd_hash_table *) xmalloc (sizeof (struct bfd_hash_table))); if (! bfd_hash_table_init (hash, bfd_hash_newfunc)) - einfo ("%F%P: bfd_hash_table_init failed: %E\n"); + einfo (_("%F%P: bfd_hash_table_init failed: %E\n")); } if (bfd_hash_lookup (hash, name, false, false) != NULL) return true; if (bfd_hash_lookup (hash, name, true, true) == NULL) - einfo ("%F%P: bfd_hash_lookup failed: %E\n"); + einfo (_("%F%P: bfd_hash_lookup failed: %E\n")); } /* We never print more than a reasonable number of errors in a row @@ -1162,19 +1168,19 @@ undefined_symbol (info, name, abfd, section, address) if (section != NULL) { if (error_count < MAX_ERRORS_IN_A_ROW) - einfo ("%X%C: undefined reference to `%T'\n", + einfo (_("%X%C: undefined reference to `%T'\n"), abfd, section, address, name); else if (error_count == MAX_ERRORS_IN_A_ROW) - einfo ("%D: more undefined references to `%T' follow\n", + einfo (_("%D: more undefined references to `%T' follow\n"), abfd, section, address, name); } else { if (error_count < MAX_ERRORS_IN_A_ROW) - einfo ("%X%B: undefined reference to `%T'\n", + einfo (_("%X%B: undefined reference to `%T'\n"), abfd, name); else if (error_count == MAX_ERRORS_IN_A_ROW) - einfo ("%B: more undefined references to `%T' follow\n", + einfo (_("%B: more undefined references to `%T' follow\n"), abfd, name); } @@ -1195,10 +1201,10 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address) bfd_vma address; { if (abfd == (bfd *) NULL) - einfo ("%P%X: generated"); + einfo (_("%P%X: generated")); else einfo ("%X%C:", abfd, section, address); - einfo (" relocation truncated to fit: %s %T", reloc_name, name); + einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name); if (addend != 0) einfo ("+%v", addend); einfo ("\n"); @@ -1217,10 +1223,10 @@ reloc_dangerous (info, message, abfd, section, address) bfd_vma address; { if (abfd == (bfd *) NULL) - einfo ("%P%X: generated"); + einfo (_("%P%X: generated")); else einfo ("%X%C:", abfd, section, address); - einfo ("dangerous relocation: %s\n", message); + einfo (_("dangerous relocation: %s\n"), message); return true; } @@ -1237,10 +1243,10 @@ unattached_reloc (info, name, abfd, section, address) bfd_vma address; { if (abfd == (bfd *) NULL) - einfo ("%P%X: generated"); + einfo (_("%P%X: generated")); else einfo ("%X%C:", abfd, section, address); - einfo (" reloc refers to symbol `%T' which is not being output\n", name); + einfo (_(" reloc refers to symbol `%T' which is not being output\n"), name); return true; } @@ -1259,9 +1265,12 @@ notice (info, name, abfd, section, value) if (! info->notice_all || (info->notice_hash != NULL && bfd_hash_lookup (info->notice_hash, name, false, false) != NULL)) - einfo ("%B: %s %s\n", abfd, - bfd_is_und_section (section) ? "reference to" : "definition of", - name); + { + if (bfd_is_und_section (section)) + einfo ("%B: reference to %s\n", abfd, name); + else + einfo ("%B: definition of %s\n", abfd, name); + } if (command_line.cref || nocrossref_list != NULL) add_cref (name, abfd, section, value); diff --git a/ld/lexsup.c b/ld/lexsup.c index bf61c74..52ec448 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -1,5 +1,6 @@ /* Parse options for the GNU linker. - Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -14,8 +15,9 @@ 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 GLD; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +along with GLD; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -36,6 +38,14 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307 #include "ldver.h" #include "ldemul.h" +#ifndef PATH_SEPARATOR +#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__)) +#define PATH_SEPARATOR ';' +#else +#define PATH_SEPARATOR ':' +#endif +#endif + /* Somewhere above, sys/stat.h got included . . . . */ #if !defined(S_ISDIR) && defined(S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) @@ -68,7 +78,8 @@ int parsing_defsym = 0; #define OPTION_IGNORE (OPTION_HELP + 1) #define OPTION_MAP (OPTION_IGNORE + 1) #define OPTION_NO_KEEP_MEMORY (OPTION_MAP + 1) -#define OPTION_NOINHIBIT_EXEC (OPTION_NO_KEEP_MEMORY + 1) +#define OPTION_NO_WARN_MISMATCH (OPTION_NO_KEEP_MEMORY + 1) +#define OPTION_NOINHIBIT_EXEC (OPTION_NO_WARN_MISMATCH + 1) #define OPTION_NON_SHARED (OPTION_NOINHIBIT_EXEC + 1) #define OPTION_NO_WHOLE_ARCHIVE (OPTION_NON_SHARED + 1) #define OPTION_OFORMAT (OPTION_NO_WHOLE_ARCHIVE + 1) @@ -81,18 +92,21 @@ int parsing_defsym = 0; #define OPTION_SORT_COMMON (OPTION_SONAME + 1) #define OPTION_STATS (OPTION_SORT_COMMON + 1) #define OPTION_SYMBOLIC (OPTION_STATS + 1) -#define OPTION_TBSS (OPTION_SYMBOLIC + 1) +#define OPTION_TASK_LINK (OPTION_SYMBOLIC + 1) +#define OPTION_TBSS (OPTION_TASK_LINK + 1) #define OPTION_TDATA (OPTION_TBSS + 1) #define OPTION_TTEXT (OPTION_TDATA + 1) #define OPTION_TRADITIONAL_FORMAT (OPTION_TTEXT + 1) #define OPTION_UR (OPTION_TRADITIONAL_FORMAT + 1) #define OPTION_VERBOSE (OPTION_UR + 1) #define OPTION_VERSION (OPTION_VERBOSE + 1) -#define OPTION_WARN_COMMON (OPTION_VERSION + 1) +#define OPTION_VERSION_SCRIPT (OPTION_VERSION + 1) +#define OPTION_WARN_COMMON (OPTION_VERSION_SCRIPT + 1) #define OPTION_WARN_CONSTRUCTORS (OPTION_WARN_COMMON + 1) #define OPTION_WARN_MULTIPLE_GP (OPTION_WARN_CONSTRUCTORS + 1) #define OPTION_WARN_ONCE (OPTION_WARN_MULTIPLE_GP + 1) -#define OPTION_SPLIT_BY_RELOC (OPTION_WARN_ONCE + 1) +#define OPTION_WARN_SECTION_ALIGN (OPTION_WARN_ONCE + 1) +#define OPTION_SPLIT_BY_RELOC (OPTION_WARN_SECTION_ALIGN + 1) #define OPTION_SPLIT_BY_FILE (OPTION_SPLIT_BY_RELOC + 1) #define OPTION_WHOLE_ARCHIVE (OPTION_SPLIT_BY_FILE + 1) #define OPTION_WRAP (OPTION_WHOLE_ARCHIVE + 1) @@ -126,93 +140,96 @@ struct ld_option static const struct ld_option ld_options[] = { { {NULL, required_argument, NULL, '\0'}, - 'a', "KEYWORD", "Shared library control for HP/UX compatibility", + 'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"), ONE_DASH }, { {"architecture", required_argument, NULL, 'A'}, - 'A', "ARCH", "Set architecture" , TWO_DASHES }, + 'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES }, { {"format", required_argument, NULL, 'b'}, - 'b', "TARGET", "Specify target for following input files", TWO_DASHES }, + 'b', N_("TARGET"), N_("Specify target for following input files"), TWO_DASHES }, { {"mri-script", required_argument, NULL, 'c'}, - 'c', "FILE", "Read MRI format linker script", TWO_DASHES }, + 'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES }, { {"dc", no_argument, NULL, 'd'}, - 'd', NULL, "Force common symbols to be defined", ONE_DASH }, + 'd', NULL, N_("Force common symbols to be defined"), ONE_DASH }, { {"dp", no_argument, NULL, 'd'}, '\0', NULL, NULL, ONE_DASH }, { {"entry", required_argument, NULL, 'e'}, - 'e', "ADDRESS", "Set start address", TWO_DASHES }, + 'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES }, { {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC}, - 'E', NULL, "Export all dynamic symbols", TWO_DASHES }, - { {NULL, optional_argument, NULL, '\0'}, - 'F', "[FORMAT]", "Ignored", ONE_DASH }, + 'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES }, + { {"auxiliary", required_argument, NULL, 'f'}, + 'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"), + TWO_DASHES }, + { {"filter", required_argument, NULL, 'F'}, + 'F', N_("SHLIB"), N_("Filter for shared object symbol table"), TWO_DASHES }, { {NULL, no_argument, NULL, '\0'}, - 'g', NULL, "Ignored", ONE_DASH }, + 'g', NULL, N_("Ignored"), ONE_DASH }, { {"gpsize", required_argument, NULL, 'G'}, - 'G', "SIZE", "Small data size (if no size, same as --shared)", + 'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"), TWO_DASHES }, { {"soname", required_argument, NULL, OPTION_SONAME}, - 'h', "FILENAME", "Set internal name of shared library", ONE_DASH }, + 'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH }, { {"library", required_argument, NULL, 'l'}, - 'l', "LIBNAME", "Search for library LIBNAME", TWO_DASHES }, + 'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES }, { {"library-path", required_argument, NULL, 'L'}, - 'L', "DIRECTORY", "Add DIRECTORY to library search path", TWO_DASHES }, + 'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"), TWO_DASHES }, { {NULL, required_argument, NULL, '\0'}, - 'm', "EMULATION", "Set emulation", ONE_DASH }, + 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH }, { {"print-map", no_argument, NULL, 'M'}, - 'M', NULL, "Print map file on standard output", TWO_DASHES }, + 'M', NULL, N_("Print map file on standard output"), TWO_DASHES }, { {"nmagic", no_argument, NULL, 'n'}, - 'n', NULL, "Do not page align data", TWO_DASHES }, + 'n', NULL, N_("Do not page align data"), TWO_DASHES }, { {"omagic", no_argument, NULL, 'N'}, - 'N', NULL, "Do not page align data, do not make text readonly", + 'N', NULL, N_("Do not page align data, do not make text readonly"), TWO_DASHES }, { {"output", required_argument, NULL, 'o'}, - 'o', "FILE", "Set output file name", TWO_DASHES }, + 'o', N_("FILE"), N_("Set output file name"), TWO_DASHES }, { {NULL, required_argument, NULL, '\0'}, - 'O', NULL, "Ignored", ONE_DASH }, + 'O', NULL, N_("Ignored"), ONE_DASH }, { {"relocateable", no_argument, NULL, 'r'}, - 'r', NULL, "Generate relocateable output", TWO_DASHES }, + 'r', NULL, N_("Generate relocateable output"), TWO_DASHES }, { {NULL, no_argument, NULL, '\0'}, 'i', NULL, NULL, ONE_DASH }, { {"just-symbols", required_argument, NULL, 'R'}, - 'R', "FILE", "Just link symbols (if directory, same as --rpath)", + 'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"), TWO_DASHES }, { {"strip-all", no_argument, NULL, 's'}, - 's', NULL, "Strip all symbols", TWO_DASHES }, + 's', NULL, N_("Strip all symbols"), TWO_DASHES }, { {"strip-debug", no_argument, NULL, 'S'}, - 'S', NULL, "Strip debugging symbols", TWO_DASHES }, + 'S', NULL, N_("Strip debugging symbols"), TWO_DASHES }, { {"trace", no_argument, NULL, 't'}, - 't', NULL, "Trace file opens", TWO_DASHES }, + 't', NULL, N_("Trace file opens"), TWO_DASHES }, { {"script", required_argument, NULL, 'T'}, - 'T', "FILE", "Read linker script", TWO_DASHES }, + 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES }, { {"undefined", required_argument, NULL, 'u'}, - 'u', "SYMBOL", "Start with undefined reference to SYMBOL", TWO_DASHES }, + 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES }, { {"version", no_argument, NULL, OPTION_VERSION}, - 'v', NULL, "Print version information", TWO_DASHES }, + 'v', NULL, N_("Print version information"), TWO_DASHES }, { {NULL, no_argument, NULL, '\0'}, - 'V', NULL, "Print version and emulation information", ONE_DASH }, + 'V', NULL, N_("Print version and emulation information"), ONE_DASH }, { {"discard-all", no_argument, NULL, 'x'}, - 'x', NULL, "Discard all local symbols", TWO_DASHES }, + 'x', NULL, N_("Discard all local symbols"), TWO_DASHES }, { {"discard-locals", no_argument, NULL, 'X'}, - 'X', NULL, "Discard temporary local symbols", TWO_DASHES }, + 'X', NULL, N_("Discard temporary local symbols"), TWO_DASHES }, { {"trace-symbol", required_argument, NULL, 'y'}, - 'y', "SYMBOL", "Trace mentions of SYMBOL", TWO_DASHES }, + 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES }, { {NULL, required_argument, NULL, '\0'}, - 'Y', "PATH", "Default search path for Solaris compatibility", ONE_DASH }, + 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"), ONE_DASH }, { {NULL, required_argument, NULL, '\0'}, - 'z', "KEYWORD", "Ignored for Solaris compatibility", ONE_DASH }, + 'z', N_("KEYWORD"), N_("Ignored for Solaris compatibility"), ONE_DASH }, { {"start-group", no_argument, NULL, '('}, - '(', NULL, "Start a group", TWO_DASHES }, + '(', NULL, N_("Start a group"), TWO_DASHES }, { {"end-group", no_argument, NULL, ')'}, - ')', NULL, "End a group", TWO_DASHES }, + ')', NULL, N_("End a group"), TWO_DASHES }, { {"assert", required_argument, NULL, OPTION_ASSERT}, - '\0', "KEYWORD", "Ignored for SunOS compatibility", ONE_DASH }, + '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH }, { {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED}, - '\0', NULL, "Link against shared libraries", ONE_DASH }, + '\0', NULL, N_("Link against shared libraries"), ONE_DASH }, { {"dy", no_argument, NULL, OPTION_CALL_SHARED}, '\0', NULL, NULL, ONE_DASH }, { {"call_shared", no_argument, NULL, OPTION_CALL_SHARED}, '\0', NULL, NULL, ONE_DASH }, { {"Bstatic", no_argument, NULL, OPTION_NON_SHARED}, - '\0', NULL, "Do not link against shared libraries", ONE_DASH }, + '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH }, { {"dn", no_argument, NULL, OPTION_NON_SHARED}, '\0', NULL, NULL, ONE_DASH }, { {"non_shared", no_argument, NULL, OPTION_NON_SHARED}, @@ -220,92 +237,101 @@ static const struct ld_option ld_options[] = { {"static", no_argument, NULL, OPTION_NON_SHARED}, '\0', NULL, NULL, ONE_DASH }, { {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC}, - '\0', NULL, "Bind global references locally", ONE_DASH }, + '\0', NULL, N_("Bind global references locally"), ONE_DASH }, { {"cref", no_argument, NULL, OPTION_CREF}, - '\0', NULL, "Output cross reference table", TWO_DASHES }, + '\0', NULL, N_("Output cross reference table"), TWO_DASHES }, { {"defsym", required_argument, NULL, OPTION_DEFSYM}, - '\0', "SYMBOL=EXPRESSION", "Define a symbol", TWO_DASHES }, + '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES }, { {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER}, - '\0', "PROGRAM", "Set the dynamic linker to use", TWO_DASHES }, + '\0', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES }, { {"EB", no_argument, NULL, OPTION_EB}, - '\0', NULL, "Link big-endian objects", ONE_DASH }, + '\0', NULL, N_("Link big-endian objects"), ONE_DASH }, { {"EL", no_argument, NULL, OPTION_EL}, - '\0', NULL, "Link little-endian objects", ONE_DASH }, + '\0', NULL, N_("Link little-endian objects"), ONE_DASH }, { {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS}, - '\0', NULL, "Generate embedded relocs", TWO_DASHES}, + '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES}, { {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX}, - '\0', NULL, "Force generation of file with .exe suffix", TWO_DASHES}, + '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES}, { {"help", no_argument, NULL, OPTION_HELP}, - '\0', NULL, "Print option help", TWO_DASHES }, + '\0', NULL, N_("Print option help"), TWO_DASHES }, { {"Map", required_argument, NULL, OPTION_MAP}, - '\0', "FILE", "Write a map file", ONE_DASH }, + '\0', N_("FILE"), N_("Write a map file"), ONE_DASH }, { {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY}, - '\0', NULL, "Use less memory and more disk I/O", TWO_DASHES }, + '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES }, + { {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH}, + '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES}, { {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE}, - '\0', NULL, "Turn off --whole-archive", TWO_DASHES }, + '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES }, { {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC}, - '\0', NULL, "Create an output file even if errors occur", TWO_DASHES }, + '\0', NULL, N_("Create an output file even if errors occur"), TWO_DASHES }, { {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC}, '\0', NULL, NULL, NO_HELP }, { {"oformat", required_argument, NULL, OPTION_OFORMAT}, - '\0', "TARGET", "Specify target of output file", TWO_DASHES }, + '\0', N_("TARGET"), N_("Specify target of output file"), TWO_DASHES }, { {"qmagic", no_argument, NULL, OPTION_IGNORE}, - '\0', NULL, "Ignored for Linux compatibility", ONE_DASH }, + '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH }, { {"Qy", no_argument, NULL, OPTION_IGNORE}, - '\0', NULL, "Ignored for SVR4 compatibility", ONE_DASH }, + '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH }, { {"relax", no_argument, NULL, OPTION_RELAX}, - '\0', NULL, "Relax branches on certain targets", TWO_DASHES }, + '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES }, { {"retain-symbols-file", required_argument, NULL, OPTION_RETAIN_SYMBOLS_FILE}, - '\0', "FILE", "Keep only symbols listed in FILE", TWO_DASHES }, + '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES }, { {"rpath", required_argument, NULL, OPTION_RPATH}, - '\0', "PATH", "Set runtime shared library search path", ONE_DASH }, + '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH }, { {"rpath-link", required_argument, NULL, OPTION_RPATH_LINK}, - '\0', "PATH", "Set link time shared library search path", ONE_DASH }, + '\0', N_("PATH"), N_("Set link time shared library search path"), ONE_DASH }, { {"shared", no_argument, NULL, OPTION_SHARED}, - '\0', NULL, "Create a shared library", ONE_DASH }, + '\0', NULL, N_("Create a shared library"), ONE_DASH }, { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */ '\0', NULL, NULL, ONE_DASH }, { {"sort-common", no_argument, NULL, OPTION_SORT_COMMON}, - '\0', NULL, "Sort common symbols by size", TWO_DASHES }, + '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES }, { {"sort_common", no_argument, NULL, OPTION_SORT_COMMON}, '\0', NULL, NULL, NO_HELP }, { {"split-by-file", no_argument, NULL, OPTION_SPLIT_BY_FILE}, - '\0', NULL, "Split output sections for each file", TWO_DASHES }, + '\0', NULL, N_("Split output sections for each file"), TWO_DASHES }, { {"split-by-reloc", required_argument, NULL, OPTION_SPLIT_BY_RELOC}, - '\0', "COUNT", "Split output sections every COUNT relocs", TWO_DASHES }, + '\0', N_("COUNT"), N_("Split output sections every COUNT relocs"), TWO_DASHES }, { {"stats", no_argument, NULL, OPTION_STATS}, - '\0', NULL, "Print memory usage statistics", TWO_DASHES }, + '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES }, + { {"task-link", required_argument, NULL, OPTION_TASK_LINK}, + '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES }, { {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT}, - '\0', NULL, "Use same format as native linker", TWO_DASHES }, + '\0', NULL, N_("Use same format as native linker"), TWO_DASHES }, { {"Tbss", required_argument, NULL, OPTION_TBSS}, - '\0', "ADDRESS", "Set address of .bss section", ONE_DASH }, + '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH }, { {"Tdata", required_argument, NULL, OPTION_TDATA}, - '\0', "ADDRESS", "Set address of .data section", ONE_DASH }, + '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH }, { {"Ttext", required_argument, NULL, OPTION_TTEXT}, - '\0', "ADDRESS", "Set address of .text section", ONE_DASH }, + '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH }, { {"Ur", no_argument, NULL, OPTION_UR}, - '\0', NULL, "Build global constructor/destructor tables", ONE_DASH }, + '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH }, { {"verbose", no_argument, NULL, OPTION_VERBOSE}, - '\0', NULL, "Output lots of information during link", TWO_DASHES }, + '\0', NULL, N_("Output lots of information during link"), TWO_DASHES }, { {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */ '\0', NULL, NULL, NO_HELP }, + { {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT }, + '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES }, { {"warn-common", no_argument, NULL, OPTION_WARN_COMMON}, - '\0', NULL, "Warn about duplicate common symbols", TWO_DASHES }, + '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES }, { {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS}, - '\0', NULL, "Warn if global constructors/destructors are seen", + '\0', NULL, N_("Warn if global constructors/destructors are seen"), TWO_DASHES }, { {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP}, - '\0', NULL, "Warn if the multiple GP values are used", TWO_DASHES }, + '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES }, { {"warn-once", no_argument, NULL, OPTION_WARN_ONCE}, - '\0', NULL, "Warn only once per undefined symbol", TWO_DASHES }, + '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES }, + { {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN}, + '\0', NULL, N_("Warn if start of section changes due to alignment"), + TWO_DASHES }, { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, - '\0', NULL, "Include all objects from following archives", TWO_DASHES }, + '\0', NULL, N_("Include all objects from following archives"), TWO_DASHES }, { {"wrap", required_argument, NULL, OPTION_WRAP}, - '\0', "SYMBOL", "Use wrapper functions for SYMBOL", TWO_DASHES } + '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES } }; -#define OPTION_COUNT (sizeof ld_options / sizeof ld_options[0]) +#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0])) void parse_args (argc, argv) @@ -317,6 +343,7 @@ parse_args (argc, argv) char *default_dirlist = NULL; char shortopts[OPTION_COUNT * 3 + 2]; struct option longopts[OPTION_COUNT + 1]; + int last_optind; /* Starting the short option string with '-' is for programs that expect options and other ARGV-elements in any order and that care about @@ -366,9 +393,10 @@ parse_args (argc, argv) for (i = 1; i < argc; i++) if (strcmp (argv[i], "-G") == 0 && (i + 1 >= argc - || ! isdigit (argv[i + 1][0]))) + || ! isdigit ((unsigned char) argv[i + 1][0]))) argv[i] = (char *) "--shared"; + last_optind = -1; while (1) { /* getopt_long_only is like getopt_long, but '-' as well as '--' can @@ -376,8 +404,18 @@ parse_args (argc, argv) int longind; int optc; - if (ldemul_parse_args (argc, argv)) - continue; + /* Using last_optind lets us avoid calling ldemul_parse_args + multiple times on a single option, which would lead to + confusion in the internal static variables maintained by + getopt. This could otherwise happen for an argument like + -nx, in which the -n is parsed as a single option, and we + loop around to pick up the -x. */ + if (optind != last_optind) + { + if (ldemul_parse_args (argc, argv)) + continue; + last_optind = optind; + } optc = getopt_long_only (argc, argv, shortopts, longopts, &longind); @@ -404,7 +442,7 @@ parse_args (argc, argv) || strcmp (optarg, "default") == 0) config.dynamic_link = true; else - einfo ("%P%F: unrecognized -a option `%s'\n", optarg); + einfo (_("%P%F: unrecognized -a option `%s'\n"), optarg); break; case OPTION_ASSERT: /* FIXME: We just ignore these, but we should handle them. */ @@ -417,7 +455,7 @@ parse_args (argc, argv) else if (strcmp (optarg, "pure-text") == 0) ; else - einfo ("%P%F: unrecognized -assert option `%s'\n", optarg); + einfo (_("%P%F: unrecognized -assert option `%s'\n"), optarg); break; case 'A': ldfile_add_arch (optarg); @@ -471,8 +509,31 @@ parse_args (argc, argv) case 'e': lang_add_entry (optarg, true); break; + case 'f': + if (command_line.auxiliary_filters == NULL) + { + command_line.auxiliary_filters = + (char **) xmalloc (2 * sizeof (char *)); + command_line.auxiliary_filters[0] = optarg; + command_line.auxiliary_filters[1] = NULL; + } + else + { + int c; + char **p; + + c = 0; + for (p = command_line.auxiliary_filters; *p != NULL; p++) + ++c; + command_line.auxiliary_filters = + (char **) xrealloc (command_line.auxiliary_filters, + (c + 2) * sizeof (char *)); + command_line.auxiliary_filters[c] = optarg; + command_line.auxiliary_filters[c + 1] = NULL; + } + break; case 'F': - /* Ignore. */ + command_line.filter_shlib = optarg; break; case OPTION_FORCE_EXE_SUFFIX: command_line.force_exe_suffix = true; @@ -482,7 +543,7 @@ parse_args (argc, argv) char *end; g_switch_value = strtoul (optarg, &end, 0); if (*end) - einfo ("%P%F: invalid number `%s'\n", optarg); + einfo (_("%P%F: invalid number `%s'\n"), optarg); } break; case 'g': @@ -520,6 +581,9 @@ parse_args (argc, argv) case OPTION_NO_KEEP_MEMORY: link_info.keep_memory = false; break; + case OPTION_NO_WARN_MISMATCH: + command_line.warn_mismatch = false; + break; case OPTION_NOINHIBIT_EXEC: force_make_executable = true; break; @@ -646,6 +710,9 @@ parse_args (argc, argv) case OPTION_TRADITIONAL_FORMAT: link_info.traditional_format = true; break; + case OPTION_TASK_LINK: + link_info.task_link = true; + /* Fall through - do an implied -r option. */ case OPTION_UR: link_info.relocateable = true; config.build_constructors = true; @@ -672,14 +739,14 @@ parse_args (argc, argv) case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ printf ("GNU ld %s\n", ld_program_version); - printf ("Copyright 1996 Free Software Foundation, Inc.\n"); - printf ("\ + printf (_("Copyright 1997 Free Software Foundation, Inc.\n")); + printf (_("\ This program is free software; you may redistribute it under the terms of\n\ -the GNU General Public License. This program has absolutely no warranty.\n"); +the GNU General Public License. This program has absolutely no warranty.\n")); { ld_emulation_xfer_type **ptr = ld_emulations; - printf (" Supported emulations:\n"); + printf (_(" Supported emulations:\n")); while (*ptr) { printf (" %s\n", (*ptr)->emulation_name); @@ -688,6 +755,20 @@ the GNU General Public License. This program has absolutely no warranty.\n"); } xexit (0); break; + case OPTION_VERSION_SCRIPT: + /* This option indicates a small script that only specifies + version information. Read it, but don't assume that + we've seen a linker script. */ + { + boolean hold_had_script; + + hold_had_script = had_script; + ldfile_open_command_file (optarg); + had_script = hold_had_script; + parser_input = input_version_script; + yyparse (); + } + break; case OPTION_WARN_COMMON: config.warn_common = true; break; @@ -700,6 +781,9 @@ the GNU General Public License. This program has absolutely no warranty.\n"); case OPTION_WARN_ONCE: config.warn_once = true; break; + case OPTION_WARN_SECTION_ALIGN: + config.warn_section_align = true; + break; case OPTION_WHOLE_ARCHIVE: whole_archive = true; break; @@ -735,7 +819,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"); if (ingroup) { fprintf (stderr, - "%s: may not nest groups (--help for usage)\n", + _("%s: may not nest groups (--help for usage)\n"), program_name); xexit (1); } @@ -746,7 +830,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"); if (! ingroup) { fprintf (stderr, - "%s: group ended before it began (--help for usage)\n", + _("%s: group ended before it began (--help for usage)\n"), program_name); xexit (1); } @@ -776,7 +860,7 @@ set_default_dirlist (dirlist_ptr) while (1) { - p = strchr (dirlist_ptr, ':'); + p = strchr (dirlist_ptr, PATH_SEPARATOR); if (p != NULL) *p = '\0'; if (*dirlist_ptr != '\0') @@ -794,7 +878,7 @@ set_section_start (sect, valstr) char *end; unsigned long val = strtoul (valstr, &end, 16); if (*end) - einfo ("%P%F: invalid hex number `%s'\n", valstr); + einfo (_("%P%F: invalid hex number `%s'\n"), valstr); lang_section_start (sect, exp_intop (val)); } @@ -806,9 +890,9 @@ help () int i; const char **targets, **pp; - printf ("Usage: %s [options] file...\n", program_name); + printf (_("Usage: %s [options] file...\n"), program_name); - printf ("Options:\n"); + printf (_("Options:\n")); for (i = 0; i < OPTION_COUNT; i++) { if (ld_options[i].doc != NULL) @@ -837,8 +921,8 @@ help () printf (" "); ++len; } - printf ("%s", ld_options[j].arg); - len += strlen (ld_options[j].arg); + printf ("%s", _(ld_options[j].arg)); + len += strlen (_(ld_options[j].arg)); } comma = true; } @@ -862,8 +946,8 @@ help () + strlen (ld_options[j].opt.name)); if (ld_options[j].arg != NULL) { - printf (" %s", ld_options[j].arg); - len += 1 + strlen (ld_options[j].arg); + printf (" %s", _(ld_options[j].arg)); + len += 1 + strlen (_(ld_options[j].arg)); } comma = true; } @@ -880,19 +964,19 @@ help () for (; len < 30; len++) putchar (' '); - printf ("%s\n", ld_options[i].doc); + printf ("%s\n", _(ld_options[i].doc)); } } - printf ("%s: supported targets:", program_name); + printf (_("%s: supported targets:"), program_name); targets = bfd_target_list (); for (pp = targets; *pp != NULL; pp++) printf (" %s", *pp); free (targets); printf ("\n"); - printf ("%s: supported emulations: ", program_name); + printf (_("%s: supported emulations: "), program_name); ldemul_list_emulations (stdout); printf ("\n"); - printf ("\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n"); + printf (_("\nReport bugs to bug-gnu-utils@gnu.org\n")); } diff --git a/ld/mpw-elfmips.c b/ld/mpw-elfmips.c index ec88bb7..cbf1589 100644 --- a/ld/mpw-elfmips.c +++ b/ld/mpw-elfmips.c @@ -1,7 +1,7 @@ /* This file is is generated by a shell script. DO NOT EDIT! */ /* 32 bit ELF emulation code for elf32ebmip - Copyright (C) 1991, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 94, 95, 1996, 1998 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> ELF support by Ian Lance Taylor <ian@cygnus.com> @@ -212,7 +212,7 @@ gldelf32ebmip_after_open () if (search != NULL) continue; - einfo ("%P: warning: %s, needed by %B, not found\n", + einfo (_("%P: warning: %s, needed by %B, not found\n"), l->name, l->by); } } @@ -296,7 +296,7 @@ gldelf32ebmip_try_needed (name) can only check that using stat. */ if (bfd_stat (abfd, &global_stat) != 0) - einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); + einfo (_("%F%P:%B: bfd_stat failed: %E\n"), abfd); global_found = false; lang_for_each_input_file (gldelf32ebmip_stat_needed); if (global_found) @@ -312,7 +312,7 @@ gldelf32ebmip_try_needed (name) /* Add this file into the symbol table. */ if (! bfd_link_add_symbols (abfd, &link_info)) - einfo ("%F%B: could not read symbols: %E\n", abfd); + einfo (_("%F%B: could not read symbols: %E\n"), abfd); return true; } @@ -381,7 +381,7 @@ gldelf32ebmip_stat_needed (s) if (bfd_stat (s->the_bfd, &st) != 0) { - einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd); + einfo (_("%P:%B: bfd_stat failed: %E\n"), s->the_bfd); return; } @@ -419,7 +419,7 @@ gldelf32ebmip_stat_needed (s) f = soname; if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) - einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", + einfo (_("%P: warning: %s, needed by %B, may conflict with %s\n"), global_needed->name, global_needed->by, f); } @@ -448,7 +448,7 @@ gldelf32ebmip_before_allocation () command_line.export_dynamic, &link_info, &sinterp)) - einfo ("%P%F: failed to set dynamic section sizes: %E\n"); + einfo (_("%P%F: failed to set dynamic section sizes: %E\n")); /* Let the user override the dynamic linker we are using. */ if (command_line.interpreter != NULL @@ -481,7 +481,7 @@ gldelf32ebmip_before_allocation () sz = bfd_section_size (is->the_bfd, s); msg = xmalloc ((size_t) sz + 1); if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz)) - einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n", + einfo (_("%F%B: Can't read contents of section .gnu.warning: %E\n"), is->the_bfd); msg[sz] = '\0'; ret = link_info.callbacks->warning (&link_info, msg, @@ -573,7 +573,7 @@ gldelf32ebmip_find_exp_assignment (exp) if (! (bfd_elf32_record_link_assignment (output_bfd, &link_info, exp->assign.dst, exp->type.node_class == etree_provide ? true : false))) - einfo ("%P%F: failed to record assignment to %s: %E\n", + einfo (_("%P%F: failed to record assignment to %s: %E\n"), exp->assign.dst); } gldelf32ebmip_find_exp_assignment (exp->assign.src); @@ -678,7 +678,7 @@ gldelf32ebmip_place_orphan (file, s) place. This shuffling is to make the output file look neater. */ snew = bfd_make_section (output_bfd, secname); if (snew == NULL) - einfo ("%P%F: output format %s cannot represent section called %s\n", + einfo (_("%P%F: output format %s cannot represent section called %s\n"), output_bfd->xvec->name, secname); if (place->bfd_section != NULL) { diff --git a/ld/mpw-eppcmac.c b/ld/mpw-eppcmac.c index 3df5a02..ba09a41 100644 --- a/ld/mpw-eppcmac.c +++ b/ld/mpw-eppcmac.c @@ -1,7 +1,7 @@ /* This file is is generated by a shell script. DO NOT EDIT! */ /* AIX emulation code for ppcmacos - Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc. + Copyright (C) 1991, 1993, 1995, 1998 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> AIX support by Ian Lance Taylor <ian@cygnus.com> @@ -229,7 +229,7 @@ gldppcmacos_parse_args (argc, argv) case 'D': val = strtol (optarg, &end, 0); if (*end != '\0') - einfo ("%P: warning: ignoring invalid -D number %s\n", optarg); + einfo (_("%P: warning: ignoring invalid -D number %s\n"), optarg); else if (val != -1) lang_section_start (".data", exp_intop (val)); break; @@ -238,7 +238,7 @@ gldppcmacos_parse_args (argc, argv) val = strtoul (optarg, &end, 0); if (*end != '\0' || (val & (val - 1)) != 0) - einfo ("%P: warning: ignoring invalid -H number %s\n", optarg); + einfo (_("%P: warning: ignoring invalid -H number %s\n"), optarg); else file_align = val; break; @@ -304,7 +304,7 @@ gldppcmacos_parse_args (argc, argv) case OPTION_MAXDATA: val = strtoul (optarg, &end, 0); if (*end != '\0') - einfo ("%P: warning: ignoring invalid -bmaxdata number %s\n", + einfo (_("%P: warning: ignoring invalid -bmaxdata number %s\n"), optarg); else maxdata = val; @@ -313,7 +313,7 @@ gldppcmacos_parse_args (argc, argv) case OPTION_MAXSTACK: val = strtoul (optarg, &end, 0); if (*end != '\0') - einfo ("%P: warning: ignoring invalid -bmaxstack number %s\n", + einfo (_("%P: warning: ignoring invalid -bmaxstack number %s\n"), optarg); else maxstack = val; @@ -326,7 +326,7 @@ gldppcmacos_parse_args (argc, argv) ++optarg; } if (*optarg == '\0' || optarg[1] == '\0') - einfo ("%P: warning: ignoring invalid module type %s\n", optarg); + einfo (_("%P: warning: ignoring invalid module type %s\n"), optarg); else modtype = (*optarg << 8) | optarg[1]; break; @@ -346,7 +346,7 @@ gldppcmacos_parse_args (argc, argv) expression. */ val = strtoul (optarg, &end, 0); if (*end != '\0') - einfo ("%P: warning: ignoring invalid -pD number %s\n", optarg); + einfo (_("%P: warning: ignoring invalid -pD number %s\n"), optarg); else { etree_type *t; @@ -369,7 +369,7 @@ gldppcmacos_parse_args (argc, argv) within the file. */ val = strtoul (optarg, &end, 0); if (*end != '\0') - einfo ("%P: warning: ignoring invalid -pT number %s\n", optarg); + einfo (_("%P: warning: ignoring invalid -pT number %s\n"), optarg); else { etree_type *t; @@ -475,7 +475,7 @@ gldppcmacos_after_open () size = (p->count + 2) * 4; if (! bfd_xcoff_link_record_set (output_bfd, &link_info, p->h, size)) - einfo ("%F%P: bfd_xcoff_link_record_set failed: %E\n"); + einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n")); } } @@ -500,9 +500,9 @@ gldppcmacos_before_allocation () h = bfd_link_hash_lookup (link_info.hash, el->name, false, false, false); if (h == NULL) - einfo ("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n"); + einfo (_("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n")); if (! bfd_xcoff_export_symbol (output_bfd, &link_info, h, el->syscall)) - einfo ("%P%F: bfd_xcoff_export_symbol failed: %E\n"); + einfo (_("%P%F: bfd_xcoff_export_symbol failed: %E\n")); } /* Track down all relocations called for by the linker script (these @@ -547,7 +547,7 @@ gldppcmacos_before_allocation () textro ? true : false, unix_ld, special_sections)) - einfo ("%P%F: failed to set dynamic section sizes: %E\n"); + einfo (_("%P%F: failed to set dynamic section sizes: %E\n")); /* Look through the special sections, and put them in the right place in the link ordering. This is especially magic. */ @@ -569,7 +569,7 @@ gldppcmacos_before_allocation () is = NULL; os = lang_output_section_find (sec->output_section->name); if (os == NULL) - einfo ("%P%F: can't find output section %s\n", + einfo (_("%P%F: can't find output section %s\n"), sec->output_section->name); for (pls = &os->children.head; *pls != NULL; pls = &(*pls)->next) { @@ -602,7 +602,7 @@ gldppcmacos_before_allocation () } if (is == NULL) - einfo ("%P%F: can't find %s in output section\n", + einfo (_("%P%F: can't find %s in output section\n"), bfd_get_section_name (sec->owner, sec)); /* Now figure out where the section should go. */ @@ -731,7 +731,7 @@ gldppcmacos_read_file (filename, import) obstack_free (o, obstack_base (o)); } else if (*s == '(') - einfo ("%F%s%d: #! ([member]) is not supported in import files\n", + einfo (_("%F%s%d: #! ([member]) is not supported in import files\n"), filename, lineno); else { @@ -771,7 +771,7 @@ gldppcmacos_read_file (filename, import) { impmember = ""; if (cs != '\0') - einfo ("%s:%d: warning: syntax error in import file\n", + einfo (_("%s:%d: warning: syntax error in import file\n"), filename, lineno); } else @@ -783,7 +783,7 @@ gldppcmacos_read_file (filename, import) if (*s == ')') *s = '\0'; else - einfo ("%s:%d: warning: syntax error in import file\n", + einfo (_("%s:%d: warning: syntax error in import file\n"), filename, lineno); } } @@ -816,7 +816,7 @@ gldppcmacos_read_file (filename, import) while (isspace ((unsigned char) *se)) ++se; if (*se != '\0') - einfo ("%s%d: warning: syntax error in import/export file\n", + einfo (_("%s%d: warning: syntax error in import/export file\n"), filename, lineno); } @@ -829,7 +829,7 @@ gldppcmacos_read_file (filename, import) address = strtoul (s, &end, 0); if (*end != '\0') - einfo ("%s:%d: warning: syntax error in import/export file\n", + einfo (_("%s:%d: warning: syntax error in import/export file\n"), filename, lineno); } } @@ -860,7 +860,7 @@ gldppcmacos_read_file (filename, import) if (! bfd_xcoff_import_symbol (output_bfd, &link_info, h, address, imppath, impfile, impmember)) - einfo ("%X%s:%d: failed to import symbol %s: %E\n", + einfo (_("%X%s:%d: failed to import symbol %s: %E\n"), filename, lineno, symname); } } @@ -870,7 +870,7 @@ gldppcmacos_read_file (filename, import) if (obstack_object_size (o) > 0) { - einfo ("%s:%d: warning: ignoring unterminated last line\n", + einfo (_("%s:%d: warning: ignoring unterminated last line\n"), filename, lineno); obstack_free (o, obstack_base (o)); } @@ -905,9 +905,9 @@ gldppcmacos_find_relocs (s) rs = &s->reloc_statement; if (rs->name == NULL) - einfo ("%F%P: only relocations against symbols are permitted\n"); + einfo (_("%F%P: only relocations against symbols are permitted\n")); if (! bfd_xcoff_link_count_reloc (output_bfd, &link_info, rs->name)) - einfo ("%F%P: bfd_xcoff_link_count_reloc failed: %E\n"); + einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n")); } if (s->header.type == lang_assignment_statement_enum) @@ -935,7 +935,7 @@ gldppcmacos_find_exp_assignment (exp) { if (! bfd_xcoff_record_link_assignment (output_bfd, &link_info, exp->assign.dst)) - einfo ("%P%F: failed to record assignment to %s: %E\n", + einfo (_("%P%F: failed to record assignment to %s: %E\n"), exp->assign.dst); } gldppcmacos_find_exp_assignment (exp->assign.src); diff --git a/ld/mpw-idtmips.c b/ld/mpw-idtmips.c index b8450e0..08ddc70 100644 --- a/ld/mpw-idtmips.c +++ b/ld/mpw-idtmips.c @@ -90,7 +90,7 @@ gldmipsidt_after_open () || ! bfd_set_section_alignment (abfd, relsec, 2) || ! bfd_set_section_size (abfd, relsec, datasec->reloc_count * 4)) - einfo ("%F%B: can not create .rel.sdata section: %E\n"); + einfo (_("%F%B: can not create .rel.sdata section: %E\n")); } /* Double check that all other data sections are empty, as is @@ -111,7 +111,7 @@ check_sections (abfd, sec, sdatasec) if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0 && sec != (asection *) sdatasec && sec->reloc_count != 0) - einfo ("%F%X: section %s has relocs; can not use --embedded-relocs\n", + einfo (_("%F%X: section %s has relocs; can not use --embedded-relocs\n"), abfd, bfd_get_section_name (abfd, sec)); } @@ -146,10 +146,10 @@ gldmipsidt_after_allocation () &errmsg)) { if (errmsg == NULL) - einfo ("%B%X: can not create runtime reloc information: %E\n", + einfo (_("%B%X: can not create runtime reloc information: %E\n"), abfd); else - einfo ("%X%B: can not create runtime reloc information: %s\n", + einfo (_("%X%B: can not create runtime reloc information: %s\n"), abfd, errmsg); } } diff --git a/ld/po/Make-in b/ld/po/Make-in new file mode 100644 index 0000000..82d3590 --- /dev/null +++ b/ld/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: |