]> git.pld-linux.org Git - packages/thunderbird.git/blame - mozilla-ac.patch
- updated for 3.1.7
[packages/thunderbird.git] / mozilla-ac.patch
CommitLineData
5101173e
ER
1--- icedove-3.1/mozilla/configure.in 2010-06-23 20:43:07.000000000 +0300
2+++ icedove-3.1/mozilla/configure.in 2010-07-23 12:00:43.318986326 +0300
3@@ -67,6 +67,9 @@
281dba07
ER
4
5 AC_PREREQ(2.13)
6 AC_INIT(config/config.mk)
7+dnl MOZ_READ_MOZCONFIG([.])
c3f018aa
ER
8+_AUTOCONF_TOOLS_DIR="`dirname [$]0`/mozilla/build/autoconf"
9+. `dirname [$]0`/mozilla/build/autoconf/mozconfig2configure
10 MOZILLA_SRCDIR=$topsrcdir/mozilla
11 AC_CONFIG_AUX_DIR(${MOZILLA_SRCDIR}/build/autoconf)
281dba07 12 AC_CANONICAL_SYSTEM
5101173e 13@@ -375,7 +378,8 @@
281dba07
ER
14
15 AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
16 AC_TRY_COMPILE([], [return(0);],
17- [ac_cv_prog_hostcc_works=1 AC_MSG_RESULT([yes])],
18+ [ac_cv_prog_hostcc_works=1
19+ AC_MSG_RESULT([yes])],
20 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) )
21
22 CC="$HOST_CXX"
5101173e 23@@ -383,7 +387,8 @@
281dba07
ER
24
25 AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works])
26 AC_TRY_COMPILE([], [return(0);],
27- [ac_cv_prog_hostcxx_works=1 AC_MSG_RESULT([yes])],
28+ [ac_cv_prog_hostcxx_works=1
29+ AC_MSG_RESULT([yes])],
30 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) )
31
32 CC=$_SAVE_CC
5101173e 33@@ -579,17 +584,17 @@
281dba07
ER
34 # Make sure compilers are valid
35 CFLAGS="$CFLAGS -TC -nologo"
36 CXXFLAGS="$CXXFLAGS -TP -nologo"
37- AC_LANG_SAVE
38- AC_LANG_C
39+ AC_LANG_PUSH([C])
40 AC_TRY_COMPILE([#include <stdio.h>],
41 [ printf("Hello World\n"); ],,
42 AC_MSG_ERROR([\$(CC) test failed. You must have MS VC++ in your path to build.]) )
43+ AC_LANG_POP
44
45- AC_LANG_CPLUSPLUS
46+ AC_LANG_PUSH([C++])
47 AC_TRY_COMPILE([#include <new.h>],
48 [ unsigned *test = new unsigned(42); ],,
49 AC_MSG_ERROR([\$(CXX) test failed. You must have MS VC++ in your path to build.]) )
50- AC_LANG_RESTORE
51+ AC_LANG_POP
52
59c0bb3f
ER
53 changequote(,)
54 _MSVC_VER_FILTER='s|.* ([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
5101173e 55@@ -1051,14 +1056,13 @@
59c0bb3f 56 fi
281dba07
ER
57 fi
58
59c0bb3f 59- AC_LANG_SAVE
281dba07
ER
60 AC_MSG_CHECKING([for valid compiler/Mac OS X SDK combination])
61- AC_LANG_CPLUSPLUS
62+ AC_LANG_PUSH([C++])
63 AC_TRY_COMPILE([#include <new>
64 int main() { return 0; }],
65 result=yes,
66 result=no)
67- AC_LANG_RESTORE
68+ AC_LANG_POP
69 AC_MSG_RESULT($result)
70
71 if test "$result" = "no" ; then
5101173e 72@@ -1079,6 +1083,9 @@
281dba07
ER
73 dnl ========================================================
74 dnl set the defaults first
75 dnl ========================================================
76+m4_pattern_allow([AS_BIN])
77+m4_pattern_allow([AS_DASH_C_FLAG])
78+m4_pattern_allow([AS_PERL])
79 AS_BIN=$AS
80 AR_FLAGS='cr $@'
81 AR_LIST='$(AR) t'
5101173e 82@@ -1547,8 +1554,7 @@
59c0bb3f
ER
83 AC_CACHE_CHECK(whether the compiler supports -Wno-invalid-offsetof,
84 ac_has_wno_invalid_offsetof,
85 [
86- AC_LANG_SAVE
87- AC_LANG_CPLUSPLUS
88+ AC_LANG_PUSH([C++])
89 _SAVE_CXXFLAGS="$CXXFLAGS"
90 CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-invalid-offsetof"
91 AC_TRY_COMPILE([],
5101173e 92@@ -1556,7 +1562,7 @@
59c0bb3f
ER
93 ac_has_wno_invalid_offsetof="yes",
94 ac_has_wno_invalid_offsetof="no")
95 CXXFLAGS="$_SAVE_CXXFLAGS"
96- AC_LANG_RESTORE
97+ AC_LANG_POP
98 ])
99 if test "$ac_has_wno_invalid_offsetof" = "yes"; then
100 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-invalid-offsetof"
5101173e
ER
101@@ -1565,8 +1571,7 @@
102 AC_CACHE_CHECK(whether the compiler supports -Wno-variadic-macros,
103 ac_has_wno_variadic_macros,
104 [
105- AC_LANG_SAVE
106- AC_LANG_CPLUSPLUS
107+ AC_LANG_PUSH([C++])
108 _SAVE_CXXFLAGS="$CXXFLAGS"
109 CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-variadic-macros"
110 AC_TRY_COMPILE([],
111@@ -1574,7 +1579,7 @@
112 ac_has_wno_variadic_macros="yes",
113 ac_has_wno_variadic_macros="no")
114 CXXFLAGS="$_SAVE_CXXFLAGS"
115- AC_LANG_RESTORE
116+ AC_LANG_POP
117 ])
118 if test "$ac_has_wno_variadic_macros" = "yes"; then
119 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-variadic-macros"
120@@ -1583,8 +1588,7 @@
121 AC_CACHE_CHECK(whether the compiler supports -Werror=return-type,
122 ac_has_werror_return_type,
123 [
124- AC_LANG_SAVE
125- AC_LANG_CPLUSPLUS
126+ AC_LANG_PUSH([C++])
127 _SAVE_CXXFLAGS="$CXXFLAGS"
128 CXXFLAGS="$CXXFLAGS -Werror=return-type"
129 AC_TRY_COMPILE([],
130@@ -1592,7 +1596,7 @@
131 ac_has_werror_return_type="yes",
132 ac_has_werror_return_type="no")
133 CXXFLAGS="$_SAVE_CXXFLAGS"
134- AC_LANG_RESTORE
135+ AC_LANG_POP
136 ])
137 if test "$ac_has_werror_return_type" = "yes"; then
138 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Werror=return-type"
139@@ -1656,8 +1660,8 @@
281dba07
ER
140 dnl test that the macros actually work:
141 AC_MSG_CHECKING(that static assertion macros used in autoconf tests work)
142 AC_CACHE_VAL(ac_cv_static_assertion_macros_work,
143- [AC_LANG_SAVE
144- AC_LANG_C
59c0bb3f
ER
145+ [
146+ AC_LANG_PUSH([C])
281dba07
ER
147 ac_cv_static_assertion_macros_work="yes"
148 AC_TRY_COMPILE([$configure_static_assert_macros],
149 [CONFIGURE_STATIC_ASSERT(1)],
5101173e 150@@ -1667,7 +1671,8 @@
281dba07
ER
151 [CONFIGURE_STATIC_ASSERT(0)],
152 ac_cv_static_assertion_macros_work="no",
153 )
154- AC_LANG_CPLUSPLUS
155+ AC_LANG_POP
281dba07
ER
156+ AC_LANG_PUSH([C++])
157 AC_TRY_COMPILE([$configure_static_assert_macros],
158 [CONFIGURE_STATIC_ASSERT(1)],
159 ,
5101173e 160@@ -1676,7 +1681,7 @@
281dba07
ER
161 [CONFIGURE_STATIC_ASSERT(0)],
162 ac_cv_static_assertion_macros_work="no",
163 )
164- AC_LANG_RESTORE
165+ AC_LANG_POP
166 ])
167 AC_MSG_RESULT("$ac_cv_static_assertion_macros_work")
168 if test "$ac_cv_static_assertion_macros_work" = "no"; then
5101173e 169@@ -1688,8 +1693,7 @@
59c0bb3f
ER
170 dnl Checking for 64-bit OS
171 dnl ========================================================
172 if test "$COMPILE_ENVIRONMENT"; then
173-AC_LANG_SAVE
174-AC_LANG_C
175+AC_LANG_PUSH([C])
176 AC_MSG_CHECKING(for 64-bit OS)
177 AC_TRY_COMPILE([$configure_static_assert_macros],
5101173e
ER
178 [CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)],
179@@ -1700,7 +1704,7 @@
59c0bb3f
ER
180 HAVE_64BIT_OS=1
181 fi
182 AC_SUBST(HAVE_64BIT_OS)
183-AC_LANG_RESTORE
184+AC_LANG_POP
185 fi # COMPILE_ENVIRONMENT
186
187 dnl ========================================================
5101173e 188@@ -1830,8 +1834,7 @@
281dba07
ER
189 MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
190 MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
191 if test "$COMPILE_ENVIRONMENT"; then
192- AC_LANG_SAVE
193- AC_LANG_CPLUSPLUS
194+ AC_LANG_PUSH([C++])
59c0bb3f 195 AC_MSG_CHECKING([for VisualAge C++ compiler version >= 6.0.0.3])
281dba07 196 AC_TRY_COMPILE([],
59c0bb3f 197 [#if (__IBMCPP__ < 600)
5101173e 198@@ -1844,7 +1847,7 @@
281dba07
ER
199 else
200 AC_MSG_RESULT([yes])
201 fi
202- AC_LANG_RESTORE
203+ AC_LANG_POP
204 TARGET_COMPILER_ABI="ibmc"
205 CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
206 CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
5101173e 207@@ -2682,8 +2685,7 @@
c3f018aa
ER
208 CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
209 CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
210 AC_MSG_CHECKING([for Sun C++ compiler version >= 5.9])
281dba07
ER
211- AC_LANG_SAVE
212- AC_LANG_CPLUSPLUS
213+ AC_LANG_PUSH([C++])
214 AC_TRY_COMPILE([],
c3f018aa 215 [#if (__SUNPRO_CC < 0x590)
281dba07 216 #error "Denied"
5101173e 217@@ -2696,7 +2698,7 @@
281dba07
ER
218 _res="yes"
219 fi
220 AC_MSG_RESULT([$_res])
221- AC_LANG_RESTORE
222+ AC_LANG_POP
223 else
224 ASFLAGS="$ASFLAGS -fPIC"
225 DSO_LDOPTS='-G'
5101173e 226@@ -2808,7 +2810,7 @@
281dba07
ER
227 if test -z "$SKIP_COMPILER_CHECKS"; then
228 dnl Checks for typedefs, structures, and compiler characteristics.
229 dnl ========================================================
230-AC_LANG_C
231+AC_LANG_PUSH([C])
232 AC_HEADER_STDC
233 AC_C_CONST
234 AC_TYPE_MODE_T
5101173e 235@@ -2923,11 +2925,12 @@
59c0bb3f
ER
236 else
237 AC_MSG_RESULT(no)
281dba07 238 fi
59c0bb3f 239+AC_LANG_POP
281dba07
ER
240
241 dnl On the gcc trunk (as of 2001-02-09) _GNU_SOURCE, and thus __USE_GNU,
242 dnl are defined when compiling C++ but not C. Since the result of this
243 dnl test is used only in C++, do it in C++.
244-AC_LANG_CPLUSPLUS
245+AC_LANG_PUSH([C++])
246
247 AC_MSG_CHECKING(for uname.domainname)
248 AC_CACHE_VAL(ac_cv_have_uname_domainname_field,
5101173e
ER
249@@ -3019,8 +3022,7 @@
250 CXXFLAGS=$_SAVE_CXXFLAGS
251 fi
281dba07 252 fi
59c0bb3f 253-
281dba07
ER
254-AC_LANG_C
255+AC_LANG_POP
256
59c0bb3f 257 dnl Check for .hidden assembler directive and visibility attribute.
5101173e
ER
258 dnl Borrowed from glibc configure.in
259@@ -3168,11 +3170,11 @@
c3f018aa
ER
260
261 dnl Check whether the compiler supports the new-style C++ standard
262 dnl library headers (i.e. <new>) or needs the old "new.h"
263-AC_LANG_CPLUSPLUS
264+AC_LANG_PUSH([C++])
265 NEW_H=new.h
266 AC_CHECK_HEADER(new, [NEW_H=new])
267 AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>)
268-AC_LANG_C
269+AC_LANG_POP
270
271 AC_ARG_ENABLE(dtrace,
272 [ --enable-dtrace build with dtrace support if available (default=no)],
5101173e 273@@ -3220,10 +3222,11 @@
c96c8eda
ER
274 ;;
275 *)
276 AC_CHECK_LIB(m, atan)
277- AC_CHECK_LIB(dl, dlopen,
278- AC_CHECK_HEADER(dlfcn.h,
c96c8eda 279+ AC_CHECK_LIB(dl, dlopen, [
5101173e
ER
280+ AC_CHECK_HEADER(dlfcn.h, [
281 LIBS="-ldl $LIBS"
282- ))
c96c8eda
ER
283+ ])
284+ ])
285 ;;
286 esac
287
5101173e 288@@ -3490,8 +3493,7 @@
281dba07
ER
289 dnl check for wcrtomb/mbrtowc
290 dnl =======================================================================
291 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
292-AC_LANG_SAVE
293-AC_LANG_CPLUSPLUS
294+AC_LANG_PUSH([C++])
295 AC_CACHE_CHECK(for wcrtomb,
296 ac_cv_have_wcrtomb,
297 [AC_TRY_LINK([#include <wchar.h>],
5101173e 298@@ -3510,7 +3512,7 @@
281dba07
ER
299 if test "$ac_cv_have_mbrtowc" = "yes"; then
300 AC_DEFINE(HAVE_MBRTOWC)
301 fi
302-AC_LANG_RESTORE
303+AC_LANG_POP
304 fi
305
306 AC_CACHE_CHECK(
5101173e 307@@ -3535,7 +3537,7 @@
281dba07
ER
308 dnl AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT)))
309 fi
310
311-AC_LANG_CPLUSPLUS
312+AC_LANG_PUSH([C++])
313 AC_CACHE_CHECK(
314 [for gnu_get_libc_version()],
315 ac_cv_func_gnu_get_libc_version,
5101173e 316@@ -3613,7 +3615,7 @@
281dba07
ER
317
318 AM_LANGINFO_CODESET
319
320-AC_LANG_C
59c0bb3f
ER
321+AC_LANG_POP
322
281dba07
ER
323 dnl **********************
324 dnl *** va_copy checks ***
5101173e 325@@ -3776,7 +3778,7 @@
281dba07
ER
326 dnl ========================================================
327 dnl Put your C++ language/feature checks below
328 dnl ========================================================
329-AC_LANG_CPLUSPLUS
330+AC_LANG_PUSH([C++])
331
332 HAVE_GCC3_ABI=
333 if test "$GNU_CC"; then
5101173e
ER
334@@ -4150,7 +4152,7 @@
335 ac_cv_attribute_noreturn=no)])
281dba07
ER
336
337 dnl End of C++ language/feature checks
338-AC_LANG_C
339+AC_LANG_POP
340
341 dnl ========================================================
342 dnl = Internationalization checks
5101173e 343@@ -6300,10 +6302,9 @@
281dba07
ER
344 MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS= )
345 if test "$COMPILE_ENVIRONMENT"; then
346 if test "$MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS"; then
347- AC_LANG_SAVE
348- AC_LANG_CPLUSPLUS
349+ AC_LANG_PUSH([C++])
350 AC_CHECK_FUNCS(__builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual)
351- AC_LANG_RESTORE
352+ AC_LANG_POP
353 AC_DEFINE(MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS)
354 fi
355 fi # COMPILE_ENVIRONMENT
5101173e 356@@ -6397,10 +6398,9 @@
281dba07
ER
357 dnl = Support for demangling undefined symbols
358 dnl ========================================================
359 if test -z "$SKIP_LIBRARY_CHECKS"; then
360- AC_LANG_SAVE
361- AC_LANG_CPLUSPLUS
362+ AC_LANG_PUSH([C++])
363 AC_CHECK_FUNCS(__cxa_demangle, HAVE_DEMANGLE=1, HAVE_DEMANGLE=)
364- AC_LANG_RESTORE
365+ AC_LANG_POP
366 fi
367
368 # Demangle only for debug or trace-malloc builds
5101173e 369@@ -6640,7 +6640,7 @@
281dba07 370 AC_SUBST(PROFILE_USE_CFLAGS)
59c0bb3f 371 AC_SUBST(PROFILE_USE_LDFLAGS)
281dba07
ER
372
373-AC_LANG_CPLUSPLUS
374+AC_LANG_PUSH([C++])
375
376 dnl ========================================================
377 dnl Test for -pedantic bustage
5101173e 378@@ -6784,7 +6784,7 @@
281dba07
ER
379 else
380 AC_DEFINE(CPP_THROW_NEW, [throw()])
381 fi
382-AC_LANG_C
383+AC_LANG_POP
384
385 dnl ========================================================
386 dnl =
5101173e 387@@ -7606,7 +7606,7 @@
c3f018aa
ER
388 if test -n "$MOZ_CURRENT_PROJECT"; then
389 export MOZ_BUILD_APP="$MOZ_CURRENT_PROJECT"
c96c8eda 390 fi
c3f018aa
ER
391-AC_OUTPUT_SUBDIRS(mozilla)
392+AC_CONFIG_SUBDIRS(mozilla)
c96c8eda 393 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
c3f018aa 394 MOZ_BUILD_APP="$MOZ_BUILD_APP_CACHED"
c96c8eda 395
5101173e
ER
396@@ -7630,6 +7630,6 @@
397 dnl A 64-bit OS was (auto-)detected: (explicitly) enable 64-bit support.
c3f018aa
ER
398 ac_configure_args="$ac_configure_args --enable-64bit"
399 fi
400- AC_OUTPUT_SUBDIRS(directory/c-sdk)
401+ AC_CONFIG_SUBDIRS(directory/c-sdk)
402 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
5101173e 403 fi # COMPILE_ENVIRONMENT && MOZ_LDAP_XPCOM
This page took 0.074488 seconds and 4 git commands to generate.