1 --- mozilla/configure.in 2008-03-31 15:00:07.275311356 +0300
2 +++ mozilla/configure.in 2008-03-31 15:25:03.241264725 +0300
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)
12 TARGET_CPU="${target_cpu}"
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.]) )
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.]) )
34 # Make sure compilers are valid
35 CFLAGS="$CFLAGS -TC -nologo"
36 CXXFLAGS="$CXXFLAGS -TP -nologo"
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.]) )
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.]) )
53 _MSVC_VER_FILTER='s|.* \([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*|\1|p'
58 AC_MSG_CHECKING([for valid compiler/Mac OS X SDK combination])
61 AC_TRY_COMPILE([#include <new>
62 int main() { return 0; }],
67 AC_MSG_RESULT($result)
69 if test "$result" = "no" ; then
71 dnl ========================================================
72 dnl set the defaults first
73 dnl ========================================================
74 +m4_pattern_allow([AS_BIN])
75 +m4_pattern_allow([AS_DASH_C_FLAG])
76 +m4_pattern_allow([AS_PERL])
81 dnl Checking for 64-bit OS
82 dnl ========================================================
83 if test "$COMPILE_ENVIRONMENT"; then
87 AC_MSG_CHECKING(for 64-bit OS)
88 AC_TRY_RUN([ int main () {
89 if (sizeof(long) == 8) { return 0; } return 1; } ],
91 solaris*) TARGET_NSPR_MDCPUCFG='\"md/_solaris64.cfg\"' ;;
96 fi # COMPILE_ENVIRONMENT
98 dnl ========================================================
100 dnl test that the macros actually work:
101 AC_MSG_CHECKING(that static assertion macros used in autoconf tests work)
102 AC_CACHE_VAL(ac_cv_static_assertion_macros_work,
106 ac_cv_static_assertion_macros_work="yes"
107 AC_TRY_COMPILE([$configure_static_assert_macros],
108 [CONFIGURE_STATIC_ASSERT(1)],
109 @@ -1292,7 +1298,9 @@
110 [CONFIGURE_STATIC_ASSERT(0)],
111 ac_cv_static_assertion_macros_work="no",
116 + AC_LANG_PUSH([C++])
117 AC_TRY_COMPILE([$configure_static_assert_macros],
118 [CONFIGURE_STATIC_ASSERT(1)],
120 @@ -1301,7 +1309,7 @@
121 [CONFIGURE_STATIC_ASSERT(0)],
122 ac_cv_static_assertion_macros_work="no",
127 AC_MSG_RESULT("$ac_cv_static_assertion_macros_work")
128 if test "$ac_cv_static_assertion_macros_work" = "no"; then
129 @@ -1353,8 +1361,7 @@
130 MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
131 MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
132 if test "$COMPILE_ENVIRONMENT"; then
135 + AC_LANG_PUSH([C++])
136 AC_MSG_CHECKING([for VisualAge C++ compiler version >= 5.0.2.0])
138 [#if (__IBMCPP__ < 502)
139 @@ -1367,7 +1374,7 @@
145 TARGET_COMPILER_ABI="ibmc"
146 CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
147 CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
148 @@ -2149,8 +2156,7 @@
149 CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
150 CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
151 AC_MSG_CHECKING([for Forte compiler version >= WS6U2])
154 + AC_LANG_PUSH([C++])
156 [#if (__SUNPRO_CC < 0x530)
158 @@ -2163,7 +2169,7 @@
161 AC_MSG_RESULT([$_res])
165 ASFLAGS="$ASFLAGS -fPIC"
167 @@ -2247,8 +2253,7 @@
168 CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
169 CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
170 AC_MSG_CHECKING([for Forte compiler version >= WS6U2])
171 - AC_LANG_PUSH([C++])
173 + AC_LANG_PUSH([C++]) AC_TRY_COMPILE([],
174 [#if (__SUNPRO_CC < 0x530)
177 @@ -2382,7 +2387,7 @@
178 if test -z "$SKIP_COMPILER_CHECKS"; then
179 dnl Checks for typedefs, structures, and compiler characteristics.
180 dnl ========================================================
186 @@ -2483,8 +2488,7 @@
187 dnl only have short-wchar support for c++.
188 dnl Note that we assume that mac & win32 have short wchar (see nscore.h)
192 + AC_LANG_PUSH([C++])
193 _SAVE_CXXFLAGS=$CXXFLAGS
194 CXXFLAGS="$CXXFLAGS -fshort-wchar"
196 @@ -2504,13 +2508,13 @@
198 CXXFLAGS=$_SAVE_CXXFLAGS
204 dnl On the gcc trunk (as of 2001-02-09) _GNU_SOURCE, and thus __USE_GNU,
205 dnl are defined when compiling C++ but not C. Since the result of this
206 dnl test is used only in C++, do it in C++.
210 AC_MSG_CHECKING(for uname.domainname)
211 AC_CACHE_VAL(ac_cv_have_uname_domainname_field,
212 @@ -2542,7 +2546,7 @@
219 dnl Check for usable wchar_t (2 bytes, unsigned)
220 dnl (we really don't need the unsignedness check anymore)
221 @@ -2652,10 +2656,10 @@
225 - AC_CHECK_LIB(dl, dlopen,
226 - AC_CHECK_HEADER(dlfcn.h,
227 + AC_CHECK_LIB(dl, dlopen,[
228 + AC_CHECK_HEADER(dlfcn.h,[
230 - AC_DEFINE(HAVE_LIBDL)))
231 + AC_DEFINE(HAVE_LIBDL)])])
234 if test ! "$GNU_CXX"; then
235 @@ -2728,11 +2732,11 @@
237 dnl Check whether the compiler supports the new-style C++ standard
238 dnl library headers (i.e. <new>) or needs the old "new.h"
242 AC_CHECK_HEADER(new, [NEW_H=new])
243 AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>)
249 @@ -2984,8 +2988,7 @@
250 dnl check for wcrtomb/mbrtowc
251 dnl =======================================================================
252 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
256 AC_CACHE_CHECK(for wcrtomb,
258 [AC_TRY_LINK([#include <wchar.h>],
259 @@ -3004,7 +3007,7 @@
260 if test "$ac_cv_have_mbrtowc" = "yes"; then
261 AC_DEFINE(HAVE_MBRTOWC)
268 @@ -3103,7 +3106,7 @@
269 dnl AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT)))
275 [for gnu_get_libc_version()],
276 ac_cv_func_gnu_get_libc_version,
277 @@ -3181,8 +3184,6 @@
283 dnl **********************
284 dnl *** va_copy checks ***
285 dnl **********************
286 @@ -3344,7 +3345,7 @@
287 dnl ========================================================
288 dnl Put your C++ language/feature checks below
289 dnl ========================================================
294 if test "$GNU_CC"; then
295 @@ -3659,7 +3660,7 @@
298 dnl End of C++ language/feature checks
302 dnl ========================================================
303 dnl = Internationalization checks
304 @@ -4050,8 +4051,7 @@
305 _SAVE_LDFLAGS=$LDFLAGS
306 QT_LDFLAGS=-L${QTDIR}/lib
307 LDFLAGS="$LDFLAGS $QT_LDFLAGS"
310 + AC_LANG_PUSH([C++])
311 AC_CHECK_LIB(qt, main, QT_LIB=-lqt,
312 AC_CHECK_LIB(qt-mt, main, QT_LIB=-lqt-mt,
313 AC_MSG_ERROR([Cannot find QT libraries.])))
314 @@ -4082,7 +4082,7 @@
315 CXXFLAGS=$_SAVE_CXXFLAGS
321 fi # COMPILE_ENVIRONMENT
323 @@ -5275,13 +5275,12 @@
324 dnl AC_MSG_ERROR([Gdiplus.h not found!]))
325 dnl So do this instead:
326 AC_MSG_CHECKING(for Gdiplus.h)
329 + AC_LANG_PUSH([C++])
330 AC_TRY_COMPILE([#include <windows.h>
332 #include <Gdiplus.h>],,AC_MSG_RESULT(yes),
333 AC_MSG_ERROR([Building the SVG GDI+ renderer requires an appropriate Microsoft SDK.]))
336 AC_DEFINE(MOZ_SVG_RENDERER_GDIPLUS)
339 @@ -5868,10 +5867,9 @@
340 MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS= )
341 if test "$COMPILE_ENVIRONMENT"; then
342 if test "$MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS"; then
345 + AC_LANG_PUSH([C++])
346 AC_CHECK_FUNCS(__builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual)
349 AC_DEFINE(MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS)
351 fi # COMPILE_ENVIRONMENT
352 @@ -6012,10 +6010,9 @@
353 dnl = Support for demangling undefined symbols
354 dnl ========================================================
355 if test -z "$SKIP_LIBRARY_CHECKS"; then
358 + AC_LANG_PUSH([C++])
359 AC_CHECK_FUNCS(__cxa_demangle, HAVE_DEMANGLE=1, HAVE_DEMANGLE=)
364 # Demangle only for debug or trace-malloc builds
365 @@ -6279,7 +6276,7 @@
366 AC_SUBST(PROFILE_GEN_CFLAGS)
367 AC_SUBST(PROFILE_USE_CFLAGS)
372 dnl ========================================================
373 dnl Test for -pedantic bustage
374 @@ -6418,7 +6415,7 @@
376 AC_DEFINE(CPP_THROW_NEW, [throw()])
381 dnl ========================================================
383 @@ -6966,12 +6963,11 @@
384 dnl older versions of glib do not seem to have gmodule which ctl needs
386 CFLAGS="$CFLAGS $GLIB_CFLAGS"
390 AC_TRY_COMPILE([#include <gmodule.h>],
391 [ int x = 1; x++; ],,
392 [AC_MSG_ERROR([Cannot build ctl without gmodule support in glib.])])
398 @@ -7523,7 +7519,7 @@
399 if test -n "$HAVE_64BIT_OS"; then
400 ac_configure_args="$ac_configure_args --enable-64bit"
402 - AC_OUTPUT_SUBDIRS(nsprpub)
403 + AC_CONFIG_SUBDIRS(nsprpub)
404 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
407 @@ -7569,7 +7565,7 @@
408 if test -n "$HAVE_64BIT_OS"; then
409 ac_configure_args="$ac_configure_args --enable-64bit"
411 - AC_OUTPUT_SUBDIRS(directory/c-sdk)
412 + AC_CONFIG_SUBDIRS(directory/c-sdk)
413 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
415 fi # COMPILE_ENVIRONMENT
416 --- mozilla/build/autoconf/altoptions.m4.orig 2006-11-02 15:09:27.229505000 +0100
417 +++ mozilla/build/autoconf/altoptions.m4 2006-11-02 15:13:14.929505000 +0100
418 @@ -145,12 +145,13 @@
421 dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
422 -AC_DEFUN(MOZ_READ_MOZCONFIG,
423 +AC_DEFUN([MOZ_READ_MOZCONFIG],
424 [AC_REQUIRE([AC_INIT_BINSH])dnl
425 # Read in '.mozconfig' script to set the initial options.
426 # See the mozconfig2configure script for more details.
427 _AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
428 -. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
429 +. $_AUTOCONF_TOOLS_DIR/mozconfig2configure
432 dnl This gets inserted at the top of the configure script
433 -MOZ_READ_MOZCONFIG(MOZ_TOPSRCDIR)
434 +dnl MOZ_READ_MOZCONFIG(MOZ_TOPSRCDIR)