scummvm random work
[patches.git] / binutils-bfd-vendor-version-tag.patch
CommitLineData
5e993f12 1--- bfd/configure.in
2+++ bfd/configure.in
3@@ -63,6 +63,12 @@ if test $use_secureplt = true; then
4 [Define if we should default to creating read-only plt entries])
5 fi
6
7+AC_ARG_WITH(vendor-tag,
8+[ --with-vendor-tag=TAG Include TAG in version output],
9+[VENDOR_TAG="${withval}"],[VENDOR_TAG=""])dnl
10+AC_SUBST(VENDOR_TAG)
11+
12+
13 AM_BINUTILS_WARNINGS
14
15 AM_CONFIG_HEADER(config.h:config.in)
16--- bfd/Makefile.am
17+++ bfd/Makefile.am
18@@ -954,10 +954,16 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
19 bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
20 @echo "creating $@"
21 @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
22- bfd_version_string="\"$(VERSION)\"" ;\
23+ if test "x$(VENDOR_TAG)" != x ; then \
24+ vendor_tag=" $(VENDOR_TAG)" ;\
25+ else \
26+ vendor_tag="" ;\
27+ fi ;\
28 if test "x$(RELEASE)" = x ; then \
29 bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
30- bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
31+ bfd_version_string="\"$(VERSION) $${bfd_version_date}$${vendor_tag}\"" ;\
32+ else \
33+ bfd_version_string="\"$(VERSION)$${vendor_tag}\"" ;\
34 fi ;\
35 sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
36