]> git.pld-linux.org Git - packages/thunderbird.git/blob - mozilla-ac.patch
- added -condstore.patch to fix annoying bug, see https://bugzilla.mozilla.org/show_b...
[packages/thunderbird.git] / mozilla-ac.patch
1 --- mozilla/configure.in        2009-07-29 02:01:16.830297512 +0300
2 +++ mozilla/configure.in        2009-07-30 02:29:31.194612978 +0300
3 @@ -62,6 +62,9 @@
4  
5  AC_PREREQ(2.13)
6  AC_INIT(config/config.mk)
7 +dnl MOZ_READ_MOZCONFIG([.])
8 +_AUTOCONF_TOOLS_DIR="`dirname [$]0`/build/autoconf"
9 +. `dirname [$]0`/build/autoconf/mozconfig2configure
10  AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
11  AC_CANONICAL_SYSTEM
12  TARGET_CPU="${target_cpu}"
13 @@ -283,7 +286,8 @@
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"
23 @@ -291,7 +295,8 @@
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
33 @@ -451,17 +456,17 @@
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          
53          changequote(,)
54          _MSVC_VER_FILTER='s|.* ([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
55 @@ -863,14 +868,13 @@
56      fi
57    fi
58  
59 -  AC_LANG_SAVE
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
72 @@ -930,6 +934,9 @@
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'
82 @@ -1371,8 +1378,7 @@
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([],
92 @@ -1380,7 +1386,7 @@
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"
101 @@ -1443,8 +1449,8 @@
102  dnl test that the macros actually work:
103  AC_MSG_CHECKING(that static assertion macros used in autoconf tests work)
104  AC_CACHE_VAL(ac_cv_static_assertion_macros_work,
105 - [AC_LANG_SAVE
106 -  AC_LANG_C
107 + [
108 +  AC_LANG_PUSH([C])
109    ac_cv_static_assertion_macros_work="yes"
110    AC_TRY_COMPILE([$configure_static_assert_macros],
111                   [CONFIGURE_STATIC_ASSERT(1)],
112 @@ -1454,7 +1460,8 @@
113                   [CONFIGURE_STATIC_ASSERT(0)],
114                   ac_cv_static_assertion_macros_work="no",
115                   )
116 -  AC_LANG_CPLUSPLUS
117 +  AC_LANG_POP
118 +  AC_LANG_PUSH([C++])
119    AC_TRY_COMPILE([$configure_static_assert_macros],
120                   [CONFIGURE_STATIC_ASSERT(1)],
121                   ,
122 @@ -1463,7 +1470,7 @@
123                   [CONFIGURE_STATIC_ASSERT(0)],
124                   ac_cv_static_assertion_macros_work="no",
125                   )
126 -  AC_LANG_RESTORE
127 +  AC_LANG_POP
128   ])
129  AC_MSG_RESULT("$ac_cv_static_assertion_macros_work")
130  if test "$ac_cv_static_assertion_macros_work" = "no"; then
131 @@ -1475,8 +1482,7 @@
132  dnl Checking for 64-bit OS
133  dnl ========================================================
134  if test "$COMPILE_ENVIRONMENT"; then
135 -AC_LANG_SAVE
136 -AC_LANG_C
137 +AC_LANG_PUSH([C])
138  AC_MSG_CHECKING(for 64-bit OS)
139  AC_TRY_COMPILE([$configure_static_assert_macros],
140                 [CONFIGURE_STATIC_ASSERT(sizeof(long) == 8)],
141 @@ -1487,7 +1493,7 @@
142      HAVE_64BIT_OS=1
143  fi
144  AC_SUBST(HAVE_64BIT_OS)
145 -AC_LANG_RESTORE
146 +AC_LANG_POP
147  fi # COMPILE_ENVIRONMENT
148  
149  dnl ========================================================
150 @@ -1618,8 +1624,7 @@
151          MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
152          MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
153          if test "$COMPILE_ENVIRONMENT"; then
154 -            AC_LANG_SAVE
155 -            AC_LANG_CPLUSPLUS
156 +            AC_LANG_PUSH([C++])
157              AC_MSG_CHECKING([for VisualAge C++ compiler version >= 6.0.0.3])
158              AC_TRY_COMPILE([],
159                  [#if (__IBMCPP__ < 600)
160 @@ -1632,7 +1637,7 @@
161              else
162                  AC_MSG_RESULT([yes])    
163              fi
164 -            AC_LANG_RESTORE
165 +            AC_LANG_POP
166              TARGET_COMPILER_ABI="ibmc"
167              CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
168              CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
169 @@ -2184,10 +2189,9 @@
170      *)
171          AC_CHECK_HEADERS(mmintrin.h oleacc.idl)
172  
173 -        AC_LANG_SAVE
174 -        AC_LANG_CPLUSPLUS
175 +        AC_LANG_PUSH([C++])
176          AC_CHECK_HEADERS(atlbase.h wpcapi.h)
177 -        AC_LANG_RESTORE
178 +        AC_LANG_POP
179          ;;
180      esac
181  
182 @@ -2459,8 +2463,7 @@
183          CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
184          CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
185         AC_MSG_CHECKING([for Forte compiler version >= WS6U2])
186 -       AC_LANG_SAVE
187 -       AC_LANG_CPLUSPLUS
188 +       AC_LANG_PUSH([C++])
189         AC_TRY_COMPILE([],
190             [#if (__SUNPRO_CC < 0x530)
191             #error "Denied"
192 @@ -2473,7 +2476,7 @@
193              _res="yes"
194          fi
195          AC_MSG_RESULT([$_res])
196 -        AC_LANG_RESTORE
197 +        AC_LANG_POP
198      else
199         ASFLAGS="$ASFLAGS -fPIC"
200         DSO_LDOPTS='-G'
201 @@ -2596,7 +2599,7 @@
202  if test -z "$SKIP_COMPILER_CHECKS"; then
203  dnl Checks for typedefs, structures, and compiler characteristics.
204  dnl ========================================================
205 -AC_LANG_C
206 +AC_LANG_PUSH([C])
207  AC_HEADER_STDC
208  AC_C_CONST
209  AC_TYPE_MODE_T
210 @@ -2711,11 +2714,12 @@
211  else
212    AC_MSG_RESULT(no)
213  fi
214 +AC_LANG_POP
215  
216  dnl On the gcc trunk (as of 2001-02-09) _GNU_SOURCE, and thus __USE_GNU,
217  dnl are defined when compiling C++ but not C.  Since the result of this
218  dnl test is used only in C++, do it in C++.
219 -AC_LANG_CPLUSPLUS
220 +AC_LANG_PUSH([C++])
221  
222  AC_MSG_CHECKING(for uname.domainname)
223  AC_CACHE_VAL(ac_cv_have_uname_domainname_field,
224 @@ -2746,8 +2750,7 @@
225  else
226      AC_MSG_RESULT(no)
227  fi
228 -
229 -AC_LANG_C
230 +AC_LANG_POP
231  
232  dnl Check for usable wchar_t (2 bytes, unsigned)
233  dnl (we really don't need the unsignedness check anymore)
234 @@ -2771,8 +2774,7 @@
235  dnl only have short-wchar support for c++.
236  dnl Note that we assume that mac & win32 have short wchar (see nscore.h)
237  
238 -    AC_LANG_SAVE
239 -    AC_LANG_CPLUSPLUS
240 +    AC_LANG_PUSH([C++])
241      _SAVE_CXXFLAGS=$CXXFLAGS
242      CXXFLAGS="$CXXFLAGS -fshort-wchar"
243  
244 @@ -2792,7 +2794,7 @@
245      else    
246          CXXFLAGS=$_SAVE_CXXFLAGS
247      fi
248 -    AC_LANG_RESTORE
249 +    AC_LANG_POP
250  fi
251  
252  dnl Check for .hidden assembler directive and visibility attribute.
253 @@ -2911,10 +2913,12 @@
254      ;;
255  *)
256      AC_CHECK_LIB(m, atan)
257 -    AC_CHECK_LIB(dl, dlopen,
258 -    AC_CHECK_HEADER(dlfcn.h, 
259 -        LIBS="-ldl $LIBS"
260 -        AC_DEFINE(HAVE_LIBDL)))
261 +    AC_CHECK_LIB(dl, dlopen, [
262 +        AC_CHECK_HEADER(dlfcn.h, [
263 +            LIBS="-ldl $LIBS"
264 +            AC_DEFINE(HAVE_LIBDL)
265 +        ])
266 +    ])
267      ;;
268  esac
269  
270 @@ -2951,11 +2955,11 @@
271  
272  dnl Check whether the compiler supports the new-style C++ standard
273  dnl library headers (i.e. <new>) or needs the old "new.h"
274 -AC_LANG_CPLUSPLUS
275 +AC_LANG_PUSH([C++])
276  NEW_H=new.h
277  AC_CHECK_HEADER(new, [NEW_H=new])
278  AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>)
279 -AC_LANG_C
280 +AC_LANG_POP
281  
282  AC_ARG_ENABLE(dtrace,
283                [  --enable-dtrace         build with dtrace support if available (default=no)],
284 @@ -3338,8 +3342,7 @@
285  dnl check for wcrtomb/mbrtowc
286  dnl =======================================================================
287  if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
288 -AC_LANG_SAVE
289 -AC_LANG_CPLUSPLUS
290 +AC_LANG_PUSH([C++])
291  AC_CACHE_CHECK(for wcrtomb,
292      ac_cv_have_wcrtomb,
293      [AC_TRY_LINK([#include <wchar.h>],
294 @@ -3358,7 +3361,7 @@
295  if test "$ac_cv_have_mbrtowc" = "yes"; then
296      AC_DEFINE(HAVE_MBRTOWC)
297  fi
298 -AC_LANG_RESTORE
299 +AC_LANG_POP
300  fi
301  
302  AC_CACHE_CHECK(
303 @@ -3383,7 +3386,7 @@
304  dnl        AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT)))
305  fi
306  
307 -AC_LANG_CPLUSPLUS
308 +AC_LANG_PUSH([C++])
309  AC_CACHE_CHECK(
310      [for gnu_get_libc_version()],
311      ac_cv_func_gnu_get_libc_version,
312 @@ -3461,7 +3464,7 @@
313  
314  AM_LANGINFO_CODESET
315  
316 -AC_LANG_C
317 +AC_LANG_POP
318  
319  dnl **********************
320  dnl *** va_copy checks ***
321 @@ -3624,7 +3627,7 @@
322  dnl ========================================================
323  dnl Put your C++ language/feature checks below
324  dnl ========================================================
325 -AC_LANG_CPLUSPLUS
326 +AC_LANG_PUSH([C++])
327  
328  HAVE_GCC3_ABI=
329  if test "$GNU_CC"; then
330 @@ -3939,7 +3942,7 @@
331  
332  
333  dnl End of C++ language/feature checks
334 -AC_LANG_C
335 +AC_LANG_POP
336  
337  dnl ========================================================
338  dnl =  Internationalization checks
339 @@ -6561,10 +6564,9 @@
340      MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS= )
341  if test "$COMPILE_ENVIRONMENT"; then
342  if test "$MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS"; then
343 -    AC_LANG_SAVE
344 -    AC_LANG_CPLUSPLUS
345 +    AC_LANG_PUSH([C++])
346      AC_CHECK_FUNCS(__builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual)
347 -    AC_LANG_RESTORE
348 +    AC_LANG_POP
349      AC_DEFINE(MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS)
350  fi
351  fi # COMPILE_ENVIRONMENT
352 @@ -6681,10 +6683,9 @@
353  dnl = Support for demangling undefined symbols
354  dnl ========================================================
355  if test -z "$SKIP_LIBRARY_CHECKS"; then
356 -    AC_LANG_SAVE
357 -    AC_LANG_CPLUSPLUS
358 +    AC_LANG_PUSH([C++])
359      AC_CHECK_FUNCS(__cxa_demangle, HAVE_DEMANGLE=1, HAVE_DEMANGLE=)
360 -    AC_LANG_RESTORE
361 +    AC_LANG_POP
362  fi
363  
364  # Demangle only for debug or trace-malloc builds
365 @@ -6919,7 +6920,7 @@
366  AC_SUBST(PROFILE_USE_CFLAGS)
367  AC_SUBST(PROFILE_USE_LDFLAGS)
368  
369 -AC_LANG_CPLUSPLUS
370 +AC_LANG_PUSH([C++])
371  
372  dnl ========================================================
373  dnl Test for -pedantic bustage
374 @@ -7060,7 +7061,7 @@
375  else
376      AC_DEFINE(CPP_THROW_NEW, [throw()])
377  fi
378 -AC_LANG_C
379 +AC_LANG_POP
380  
381  dnl ========================================================
382  dnl =
383 @@ -8307,7 +8308,7 @@
384      if test -n "$USE_ARM_KUSER"; then
385          ac_configure_args="$ac_configure_args --with-arm-kuser"
386      fi
387 -    AC_OUTPUT_SUBDIRS(nsprpub)
388 +    AC_CONFIG_SUBDIRS(nsprpub)
389      ac_configure_args="$_SUBDIR_CONFIG_ARGS"
390  fi
391  
392 @@ -8338,7 +8339,7 @@
393  if test "$MOZ_MEMORY"; then
394     ac_configure_args="$ac_configure_args --enable-jemalloc"  
395  fi
396 -AC_OUTPUT_SUBDIRS(js/src)
397 +AC_CONFIG_SUBDIRS(js/src)
398  ac_configure_args="$_SUBDIR_CONFIG_ARGS"
399  
400  fi # COMPILE_ENVIRONMENT && !LIBXUL_SDK_DIR
401 --- mozilla/build/autoconf/altoptions.m4~       2009-03-26 22:38:57.000000000 +0200
402 +++ mozilla/build/autoconf/altoptions.m4        2009-07-29 01:34:11.680668351 +0300
403 @@ -146,9 +146,10 @@
404  ])
405  
406  dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
407 -AC_DEFUN([MOZ_READ_MOZCONFIG],
408 +AC_DEFUN([[MOZ_READ_MOZCONFIG]],
409  [AC_REQUIRE([AC_INIT_BINSH])dnl
410  # Read in '.mozconfig' script to set the initial options.
411  # See the mozconfig2configure script for more details.
412  _AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
413 -. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
414 +. $_AUTOCONF_TOOLS_DIR/mozconfig2configure
415 +])
416 --- mozilla/build/autoconf/nss.m4~      2009-03-26 22:38:57.000000000 +0200
417 +++ mozilla/build/autoconf/nss.m4       2009-07-29 01:57:50.473936834 +0300
418 @@ -5,7 +5,7 @@
419  
420  dnl AM_PATH_NSS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
421  dnl Test for NSS, and define NSS_CFLAGS and NSS_LIBS
422 -AC_DEFUN(AM_PATH_NSS,
423 +AC_DEFUN([AM_PATH_NSS],
424  [dnl
425  
426  AC_ARG_WITH(nss-prefix,
This page took 0.055922 seconds and 3 git commands to generate.