update dev300-m57
[ooovba.git] / moz / patches / embed_manifest.patch
blob3b0e80b3ab810d831002c14a8d5642d903063531
1 --- mozilla.pure/configure 2008-06-16 00:25:31.000000000 +0200
2 +++ mozilla/configure 2008-11-09 23:59:19.984375000 +0100
3 @@ -1068,6 +1068,8 @@
4 GCONF_VERSION=1.2.1
5 LIBGNOME_VERSION=2.0
7 +MSMANIFEST_TOOL=
9 MISSING_X=
10 for ac_prog in gawk mawk nawk awk
12 @@ -3025,6 +3027,22 @@
13 else
14 { echo "configure: error: This version of the MSVC compiler, $CC_VERSION , is unsupported." 1>&2; exit 1; }
17 + # bug #249782
18 + # ensure that mt.exe is Microsoft (R) Manifest Tool and not magnetic tape manipulation utility (or something else)
19 + if test "$_CC_SUITE" -ge "8"; then
20 + MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
21 + if test -n "MSMT_TOOL"; then
22 + MSMANIFEST_TOOL_VERSION=`echo ${MSMANIFEST_TOOL}|grep -Po "(^|\s)[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(\s|$)"`
23 + if test -z "MSMANIFEST_TOOL_VERSION"; then
24 + echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
25 + fi
26 + MSMANIFEST_TOOL=1
27 + unset MSMT_TOOL
28 + else
29 + { echo "Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
30 + fi
31 + fi
33 # Check linker version
34 _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
35 --- mozilla.pure/configure.in 2008-06-16 00:25:32.000000000 +0200
36 +++ mozilla/configure.in 2008-11-09 23:59:20.000000000 +0100
37 @@ -126,6 +126,8 @@
38 GCONF_VERSION=1.2.1
39 LIBGNOME_VERSION=2.0
41 +MSMANIFEST_TOOL=
43 dnl Set various checks
44 dnl ========================================================
45 MISSING_X=
46 @@ -428,6 +430,22 @@
47 else
48 AC_MSG_ERROR([This version of the MSVC compiler, $CC_VERSION , is unsupported.])
51 + # bug #249782
52 + # ensure that mt.exe is Microsoft (R) Manifest Tool and not magnetic tape manipulation utility (or something else)
53 + if test "$_CC_SUITE" -ge "8"; then
54 + MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
55 + if test -n "MSMT_TOOL"; then
56 + MSMANIFEST_TOOL_VERSION=`echo ${MSMANIFEST_TOOL}|grep -Po "(^|\s)[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(\s|$)"`
57 + if test -z "MSMANIFEST_TOOL_VERSION"; then
58 + AC_MSG_WARN([Unknown version of the Microsoft (R) Manifest Tool.])
59 + fi
60 + MSMANIFEST_TOOL=1
61 + unset MSMT_TOOL
62 + else
63 + AC_MSG_ERROR([Microsoft (R) Manifest Tool must be in your \$PATH.])
64 + fi
65 + fi
67 # Check linker version
68 _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
69 @@ -7319,6 +7339,7 @@
70 AC_SUBST(USE_N32)
71 AC_SUBST(CC_VERSION)
72 AC_SUBST(CXX_VERSION)
73 +AC_SUBST(MSMANIFEST_TOOL)
75 if test "$USING_HCC"; then
76 CC='${topsrcdir}/build/hcc'
77 --- mozilla.pure/config/rules.mk 2008-01-29 20:30:22.000000000 +0100
78 +++ mozilla/config/rules.mk 2008-11-09 23:59:19.968750000 +0100
79 @@ -811,6 +812,12 @@
81 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
82 $(LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
83 +ifdef MSMANIFEST_TOOL
84 + @if test -f $@.manifest; then \
85 + mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
86 + rm -f $@.manifest; \
87 + fi
88 +endif # MSVC with manifest tool
89 else
90 ifeq ($(CPP_PROG_LINK),1)
91 $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(EXE_DEF_FILE)
92 @@ -843,6 +850,12 @@
93 else
94 ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
95 $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
96 +ifdef MSMANIFEST_TOOL
97 + @if test -f $@.manifest; then \
98 + mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
99 + rm -f $@.manifest; \
100 + fi
101 +endif # MSVC with manifest tool
102 else
103 $(HOST_CC) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
104 endif
105 @@ -866,6 +879,12 @@
106 else
107 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
108 $(LD) -nologo -out:$@ -pdb:$(PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
109 +ifdef MSMANIFEST_TOOL
110 + @if test -f $@.manifest; then \
111 + mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
112 + rm -f $@.manifest; \
113 + fi
114 +endif # MSVC with manifest tool
115 else
116 ifeq ($(CPP_PROG_LINK),1)
117 $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
118 @@ -1019,6 +1038,14 @@
119 endif # SHARED_LIBRARY_LIBS
120 endif # NO_LD_ARCHIVE_FLAGS
121 $(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
122 +ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
123 +ifdef MSMANIFEST_TOOL
124 + @if test -f $@.manifest; then \
125 + mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \
126 + rm -f $@.manifest; \
127 + fi
128 +endif # MSVC with manifest tool
129 +endif # WINNT && !GCC
130 @rm -f foodummyfilefoo $(SUB_SHLOBJS) $(DELETE_AFTER_LINK)
131 else # os2 vacpp
132 $(MKSHLIB) -O:$@ -DLL -INC:_dllentry $(LDFLAGS) $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
133 --- mozilla.pure/config/autoconf.mk.in 2006-09-14 20:07:03.000000000 +0200
134 +++ mozilla/config/autoconf.mk.in 2008-11-09 23:59:19.953125000 +0100
135 @@ -543,6 +543,7 @@
136 MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
137 MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
138 MOZ_QUANTIFY = @MOZ_QUANTIFY@
139 +MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
141 #python options
142 PYTHON = @MOZ_PYTHON@