|
1 dnl This Source Code Form is subject to the terms of the Mozilla Public |
|
2 dnl License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
4 |
|
5 dnl Check if the compiler is gcc and has pr39608. If so |
|
6 dnl disable vrp. |
|
7 |
|
8 AC_DEFUN([MOZ_GCC_PR39608], |
|
9 [ |
|
10 AC_MSG_CHECKING(for gcc pr39608) |
|
11 ac_have_gcc_pr39608="yes" |
|
12 AC_LANG_SAVE |
|
13 AC_LANG_CPLUSPLUS |
|
14 |
|
15 AC_TRY_COMPILE([ |
|
16 typedef void (*FuncType)(); |
|
17 template<FuncType Impl> |
|
18 void f(); |
|
19 template<typename T> class C { |
|
20 typedef C<T> ThisC; |
|
21 template<int g()> |
|
22 static void h() { |
|
23 f<ThisC::h<g> >(); |
|
24 } |
|
25 }; |
|
26 ], true, |
|
27 ac_have_gcc_pr39608="no", |
|
28 true) |
|
29 |
|
30 AC_LANG_RESTORE |
|
31 |
|
32 AC_MSG_RESULT($ac_have_gcc_pr39608) |
|
33 if test "$ac_have_gcc_pr39608" = "yes"; then |
|
34 echo This compiler would fail to build firefox, please upgrade. |
|
35 exit 1 |
|
36 fi |
|
37 ]) |