Backed out changeset 9da36d4b3b14 (bug 1864817) for causing frequent StyleSheet relat...
[gecko.git] / old-configure.in
blob8b8cb9725d8eb7b73b18c8b623e0a7235a76eaeb
1 dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
2 dnl vi: set tabstop=4 shiftwidth=4 expandtab syntax=m4:
3 dnl This Source Code Form is subject to the terms of the Mozilla Public
4 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
5 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 dnl Process this file with autoconf to produce a configure script.
8 dnl ========================================================
9 AC_PREREQ(2.13)
10 AC_INIT(config/config.mk)
11 AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
12 AC_CANONICAL_SYSTEM
14 dnl ========================================================
15 dnl =
16 dnl = Don't change the following lines. Doing so breaks:
17 dnl =
18 dnl = CFLAGS="-foo" ./configure
19 dnl =
20 dnl ========================================================
21 CFLAGS="${CFLAGS=}"
22 CPPFLAGS="${CPPFLAGS=}"
23 CXXFLAGS="${CXXFLAGS=}"
24 LDFLAGS="${LDFLAGS=}"
25 HOST_CFLAGS="${HOST_CFLAGS=}"
26 HOST_CXXFLAGS="${HOST_CXXFLAGS=}"
27 HOST_LDFLAGS="${HOST_LDFLAGS=}"
29 dnl Set the minimum version of toolkit libs used by mozilla
30 dnl ========================================================
31 W32API_VERSION=3.14
33 dnl Set various checks
34 dnl ========================================================
35 MISSING_X=
37 dnl Initialize the Pthread test variables early so they can be
38 dnl  overridden by each platform.
39 dnl ========================================================
40 MOZ_USE_PTHREADS=
41 _PTHREAD_LDFLAGS=""
43 LDFLAGS="$LDFLAGS $LINKER_LDFLAGS $PACK_REL_RELOC_FLAGS"
44 HOST_LDFLAGS="$HOST_LDFLAGS $HOST_LINKER_LDFLAGS"
46 if test "$COMPILE_ENVIRONMENT"; then
47     MOZ_ANDROID_NDK
48 fi # COMPILE_ENVIRONMENT
50 dnl ========================================================
51 dnl Checks for compilers.
52 dnl ========================================================
54 if test "$COMPILE_ENVIRONMENT"; then
56 # Run some logic to figure out exe extensions (mostly for mingw's sake)
57 AC_EXEEXT
59 if test "$target" != "$host"; then
60     MOZ_CROSS_COMPILER
61 else
62     AC_PROG_CC
63     case "$target" in
64     *-mingw*)
65       # Work around the conftest.exe access problem on Windows
66       sleep 2
67     esac
68     AC_PROG_CXX
71 MOZ_TOOL_VARIABLES
73 dnl ========================================================
74 dnl Special win32 checks
75 dnl ========================================================
77 WINVER=0A00
79 case "$target" in
80 *-mingw*)
81     if test "$GCC" != "yes"; then
82         # Check to see if we are really running in a msvc environemnt
83         _WIN32_MSVC=1
85         # Make sure compilers are valid
86         CXXFLAGS="$CXXFLAGS -TP"
87         AC_LANG_SAVE
88         AC_LANG_C
89         AC_TRY_COMPILE([#include <stdio.h>],
90             [ printf("Hello World\n"); ],,
91             AC_MSG_ERROR([\$(CC) test failed.  You must have MS VC++ in your path to build.]) )
93         AC_LANG_CPLUSPLUS
94         AC_TRY_COMPILE([#include <new.h>],
95             [ unsigned *test = new unsigned(42); ],,
96             AC_MSG_ERROR([\$(CXX) test failed.  You must have MS VC++ in your path to build.]) )
97         AC_LANG_RESTORE
99         AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
100         AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
102         MSVC_C_RUNTIME_DLL=vcruntime140.dll
103         if test "$TARGET_CPU" != "x86"; then
104             MSVC_C_RUNTIME_1_DLL=vcruntime140_1.dll
105         fi
106         MSVC_CXX_RUNTIME_DLL=msvcp140.dll
108         # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
109         CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
111         AC_SUBST(MSVC_C_RUNTIME_DLL)
112         AC_SUBST(MSVC_C_RUNTIME_1_DLL)
113         AC_SUBST(MSVC_CXX_RUNTIME_DLL)
115         AC_DEFINE(HAVE_SEH_EXCEPTIONS)
116     else
117         # Check w32api version
118         _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
119         _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
120         AC_MSG_CHECKING([for w32api version >= $W32API_VERSION])
121         AC_TRY_COMPILE([#include <w32api.h>],
122             #if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \
123                 (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \
124                  __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
125                 #error "test failed."
126             #endif
127             , [ res=yes ], [ res=no ])
128         AC_MSG_RESULT([$res])
129         if test "$res" != "yes"; then
130             AC_MSG_ERROR([w32api version $W32API_VERSION or higher required.])
131         fi
132         # strsafe.h on mingw uses macros for function deprecation that pollutes namespace
133         # causing problems with local implementations with the same name.
134         AC_DEFINE(STRSAFE_NO_DEPRECATE)
135     fi # !GNU_CC
137     AC_DEFINE(_USE_MATH_DEFINES) # Otherwise Windows' math.h doesn't #define M_PI.
139     CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
140     CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
142     AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)
143     AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x$WINVER)
144     AC_DEFINE_UNQUOTED(_WIN32_IE,0x0A00)
146     ;;
147 esac
149 if test -n "$_WIN32_MSVC"; then
150     SKIP_PATH_CHECKS=1
151     SKIP_COMPILER_CHECKS=1
152     SKIP_LIBRARY_CHECKS=1
154     # Since we're skipping compiler and library checks, hard-code
155     # some facts here.
156     AC_DEFINE(HAVE_IO_H)
157     AC_DEFINE(HAVE_ISATTY)
160 fi # COMPILE_ENVIRONMENT
162 AC_SUBST(GNU_CC)
163 AC_SUBST(GNU_CXX)
165 dnl ========================================================
166 dnl set the defaults first
167 dnl ========================================================
168 MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
170 dnl Configure platform-specific CPU architecture compiler options.
171 dnl ==============================================================
172 if test "$COMPILE_ENVIRONMENT"; then
173     MOZ_ARCH_OPTS
174 fi # COMPILE_ENVIRONMENT
176 if test -n "$COMPILE_ENVIRONMENT"; then
177    MOZ_CONFIG_SANITIZE
180 dnl ========================================================
181 dnl GNU specific defaults
182 dnl ========================================================
183 if test "$GNU_CC"; then
184     if test "$OS_ARCH" != "WINNT" -o -z "$CLANG_CC"; then
185         DSO_PIC_CFLAGS='-fPIC'
186         ASFLAGS="$ASFLAGS -fPIC"
187     fi
189     DSO_LDOPTS='-shared'
190     if test "$GCC_USE_GNU_LD"; then
191         # Some tools like ASan use a runtime library that is only
192         # linked against executables, so we must allow undefined
193         # symbols for shared objects in some cases.
194         if test -z "$MOZ_ASAN$MOZ_MSAN$MOZ_UBSAN$MOZ_TSAN$FUZZING_INTERFACES"; then
195             # Don't allow undefined symbols in libraries
196             DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
198             # BSDs need `environ' exposed for posix_spawn (bug 753046)
199             case "$OS_TARGET" in
200             DragonFly|FreeBSD|NetBSD|OpenBSD)
201                 if test "$HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED" = 1; then
202                     DSO_LDOPTS="$DSO_LDOPTS -Wl,--ignore-unresolved-symbol,environ"
203                 else
204                     DSO_LDOPTS="$DSO_LDOPTS -Wl,--warn-unresolved-symbols"
205                 fi
206                 ;;
207             esac
208         fi
209     fi
211     _DEFINES_CFLAGS="-include $_objdir/mozilla-config.h -DMOZILLA_CLIENT"
213     ASFLAGS="$ASFLAGS $_DEFINES_CFLAGS"
216 if test "$GNU_CXX"; then
217     CXXFLAGS="$CXXFLAGS -fno-exceptions"
219     _DEFINES_CXXFLAGS="-DMOZILLA_CLIENT -include $_objdir/mozilla-config.h"
222 dnl ========================================================
223 dnl System overrides of the defaults for host
224 dnl ========================================================
225 case "$host" in
226 *mingw*)
227     if test -n "$_WIN32_MSVC"; then
228         HOST_CFLAGS="$HOST_CFLAGS"
229     else
230         HOST_CFLAGS="$HOST_CFLAGS -mwindows"
231     fi
232     HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS"
233     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
234     HOST_BIN_SUFFIX=.exe
236     case "${host_cpu}" in
237     i*86)
238         if test -n "$_WIN32_MSVC"; then
239             HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86"
240         fi
241         ;;
242     x86_64)
243         if test -n "$_WIN32_MSVC"; then
244             HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64"
245         fi
246         HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_"
247         ;;
248     esac
249     ;;
251 *-darwin*)
252     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX"
253     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
254     ;;
256 *-linux*|*-kfreebsd*-gnu|*-gnu*)
257     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
258     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
259     ;;
262     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
263     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
264     ;;
265 esac
267 dnl ========================================================
268 dnl System overrides of the defaults for target
269 dnl ========================================================
271 MOZ_OPTIMIZE_LDFLAGS="${_COMPILATION_OPTIMIZE_LDFLAGS} ${MOZ_OPTIMIZE_FLAGS}"
273 case "$target" in
274 *-darwin*)
275     MOZ_OPTIMIZE_FLAGS="-O3"
276     DSO_LDOPTS=''
277     MOZ_FIX_LINK_PATHS=
278     ;;
280 *-android*|*-linuxandroid*)
281     # From https://github.com/android-ndk/ndk/issues/133#issuecomment-308549264
282     # -Oz is smaller than -Os on clang.
283     MOZ_OPTIMIZE_FLAGS="-Oz"
284     # Disable the outliner, which causes performance regressions, and is
285     # enabled on some platforms at -Oz.
286     if test -z "$MOZ_LTO"; then
287         DISABLE_OUTLINER="-mno-outline"
288         _SAVE_CFLAGS=$CFLAGS
289         CFLAGS="$CFLAGS $DISABLE_OUTLINER"
290         AC_TRY_COMPILE(,,[MOZ_OPTIMIZE_FLAGS="$MOZ_OPTIMIZE_FLAGS $DISABLE_OUTLINER"])
291         CFLAGS="$_SAVE_CFLAGS"
292    else
293         DISABLE_OUTLINER="-Wl,-plugin-opt=-enable-machine-outliner=never"
294         _SAVE_LDFLAGS=$LDFLAGS
295         LDFLAGS="$LDFLAGS $MOZ_LTO_LDFLAGS $DISABLE_OUTLINER"
296         AC_TRY_LINK(,,[MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS $DISABLE_OUTLINER"])
297         LDFLAGS="$_SAVE_LDFLAGS"
298     fi
299     ;;
301 *-*linux*)
302     if test "$GNU_CC" -o "$GNU_CXX"; then
303         MOZ_PGO_OPTIMIZE_FLAGS="-O3"
304         MOZ_OPTIMIZE_FLAGS="-O2"
305     fi
307     case "${target_cpu}" in
308     alpha*)
309         CFLAGS="$CFLAGS -mieee"
310         CXXFLAGS="$CXXFLAGS -mieee"
311     ;;
312     esac
313     ;;
314 *-mingw*)
315     DSO_PIC_CFLAGS=
316     # certain versions of cygwin's makedepend barf on the
317     # #include <string> vs -I./dist/include/string issue so don't use it
318     if test -n "$GNU_CC" -o -n "$CLANG_CC"; then
319         # $GNU_CC will match gcc and clang; while $CLANG_CC will match only clang
320         if test -z "$CLANG_CC"; then
321             AC_MSG_ERROR(Firefox cannot be built with mingw-gcc and requires a mingw-clang toolchain to work)
322         fi
324         DSO_LDOPTS='-shared'
325         MOZ_FIX_LINK_PATHS=
327         MOZ_OPTIMIZE_FLAGS="-O2"
329         WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
330         WIN32_GUI_EXE_LDFLAGS=-mwindows
332         # Silence problematic clang warnings
333         CXXFLAGS="$CXXFLAGS -Wno-incompatible-ms-struct"
334         LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"
335     else
336         TARGET_COMPILER_ABI=msvc
337         WIN32_SUBSYSTEM_VERSION=10.0
338         WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
339         WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
340         DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
341         _DEFINES_CFLAGS="-FI $_objdir/mozilla-config.h -DMOZILLA_CLIENT"
342         _DEFINES_CXXFLAGS="-FI $_objdir/mozilla-config.h -DMOZILLA_CLIENT"
343         CFLAGS="$CFLAGS -Gy -Zc:inline"
344         CXXFLAGS="$CXXFLAGS -Gy -Zc:inline"
345         if test "$TARGET_CPU" = "x86"; then
346             dnl VS2012+ defaults to -arch:SSE2. We want to target nothing
347             dnl more recent, so set that explicitly here unless another
348             dnl target arch has already been set.
349             changequote(,)
350             if test -z `echo $CFLAGS | grep -i [-/]arch:`; then
351               CFLAGS="$CFLAGS -arch:SSE2"
352             fi
353             if test -z `echo $CXXFLAGS | grep -i [-/]arch:`; then
354               CXXFLAGS="$CXXFLAGS -arch:SSE2"
355             fi
356             changequote([,])
357         fi
358         dnl VS2013+ supports -Gw for better linker optimizations.
359         dnl http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx
360         dnl Disabled on ASan because it causes false-positive ODR violations.
361         if test -z "$MOZ_ASAN"; then
362             CFLAGS="$CFLAGS -Gw"
363             CXXFLAGS="$CXXFLAGS -Gw"
364         else
365             # String tail merging doesn't play nice with ASan's ODR checker.
366             LDFLAGS="$LDFLAGS -opt:nolldtailmerge"
367         fi
368         # Silence VS2017 15.5+ TR1 deprecation warnings hit by older gtest versions
369         CXXFLAGS="$CXXFLAGS -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
370         MOZ_DEBUG_LDFLAGS='-DEBUG'
371         if test "$HOST_OS_ARCH" != "WINNT"; then
372           # %_PDB% is a special signal to emit only the PDB basename. This
373           # avoids problems in Windows tools that don't like forward-slashes.
374           MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -PDBALTPATH:%_PDB%"
375         fi
376         MOZ_OPTIMIZE_FLAGS='-O2'
377         MOZ_FIX_LINK_PATHS=
378         LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE"
379     fi
380     AC_DEFINE(WIN32_LEAN_AND_MEAN)
381     dnl See http://support.microsoft.com/kb/143208 to use STL
382     AC_DEFINE(NOMINMAX)
383     BIN_SUFFIX='.exe'
385     case "$host_os" in
386     cygwin*|msvc*|mks*)
387         AC_MSG_ERROR([Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
388         ;;
389     esac
391     case "$target" in
392     i*86-*)
393         if test -n "$GNU_CC"; then
394             CFLAGS="$CFLAGS -mstackrealign"
395             CXXFLAGS="$CXXFLAGS -mstackrealign"
396             LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
397         else
398             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
399             LDFLAGS="$LDFLAGS -SAFESEH"
400         fi
402         AC_DEFINE(_X86_)
403         ;;
404     x86_64-*)
405         if test -n "$_WIN32_MSVC"; then
406             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64"
407         fi
408         AC_DEFINE(_AMD64_)
409         ;;
410     aarch64-*)
411         if test -n "$_WIN32_MSVC"; then
412             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:ARM64"
413         fi
414         AC_DEFINE(_ARM64_)
415         ;;
416     *)
417         AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
418         ;;
419     esac
420     ;;
422 *-netbsd*)
423     CFLAGS="$CFLAGS -Dunix"
424     CXXFLAGS="$CXXFLAGS -Dunix"
425     if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
426         DSO_PIC_CFLAGS='-fPIC -DPIC'
427         DSO_LDOPTS='-shared'
428         MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -Wl,--export-dynamic"
429     else
430         DSO_PIC_CFLAGS='-fPIC -DPIC'
431         DSO_LDOPTS='-shared'
432     fi
433     # This will fail on a.out systems prior to 1.5.1_ALPHA.
434     if test "$LIBRUNPATH"; then
435         DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
436     fi
437     ;;
439 *-openbsd*)
440     if test -z "$X11BASE"; then
441         X11BASE=/usr/X11R6
442     fi
443     MOZ_FIX_LINK_PATHS="$MOZ_FIX_LINK_PATHS -Wl,-rpath-link,${X11BASE}/lib"
444     DSO_PIC_CFLAGS='-fPIC'
445     DSO_LDOPTS='-shared -fPIC'
446     if test "$LIBRUNPATH"; then
447         DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
448     fi
449     ;;
451 *-solaris*)
452     MOZ_FIX_LINK_PATHS="-L${DIST}/bin"
453     ;;
455 esac
457 CFLAGS="$CFLAGS $DSO_PIC_CFLAGS"
458 CXXFLAGS="$CXXFLAGS $DSO_PIC_CFLAGS"
460 if test -z "$MOZ_OPTIMIZE_FLAGS"; then
461     MOZ_OPTIMIZE_FLAGS="-O"
465 if test -z "$COMPILE_ENVIRONMENT"; then
466     SKIP_COMPILER_CHECKS=1
467     SKIP_LIBRARY_CHECKS=1
468     MOZ_DEBUGGING_OPTS
469 else
470     MOZ_COMPILER_OPTS
471 fi # COMPILE_ENVIRONMENT
473 if test -z "$SKIP_COMPILER_CHECKS"; then
474 dnl Checks for typedefs, structures, and compiler characteristics.
475 dnl ========================================================
476 AC_C_CONST
477 AC_TYPE_MODE_T
478 AC_TYPE_OFF_T
479 AC_TYPE_PID_T
480 AC_TYPE_SIZE_T
481 AC_LANG_CPLUSPLUS
482 AC_LANG_C
484 AC_LANG_CPLUSPLUS
486 MOZ_CXX11
488 AC_LANG_C
490 dnl Checks for header files.
491 dnl ========================================================
492 AC_HEADER_DIRENT
494 dnl Checks for libraries.
495 dnl ========================================================
496 AC_CHECK_LIB(c_r, gethostbyname_r)
498 dnl We don't want to link with libdl even if it's present on OS X, since
499 dnl it's not used and not part of the default installation. OS/2 has dlfcn
500 dnl in libc.
501 dnl We don't want to link against libm or libpthread on Darwin since
502 dnl they both are just symlinks to libSystem and explicitly linking
503 dnl against libSystem causes issues when debugging (see bug 299601).
504 case $target in
505 *-darwin*)
506     ;;
508     AC_SEARCH_LIBS(dlopen, dl,
509         MOZ_CHECK_HEADER(dlfcn.h,
510         AC_DEFINE(HAVE_DLOPEN)))
511     ;;
512 esac
514 _SAVE_CFLAGS="$CFLAGS"
515 CFLAGS="$CFLAGS -D_GNU_SOURCE"
516 AC_CHECK_FUNCS(dladdr)
517 CFLAGS="$_SAVE_CFLAGS"
519 if test ! "$GNU_CXX"; then
520     AC_CHECK_LIB(C, demangle)
523 AC_CHECK_LIB(socket, socket)
525 dnl ========================================================
526 dnl = pthread support
527 dnl = Start by checking whether the system support pthreads
528 dnl ========================================================
529 case "$target_os" in
530 darwin*)
531     MOZ_USE_PTHREADS=1
532     ;;
534     AC_CHECK_LIB(pthreads, pthread_create,
535         MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
536         AC_CHECK_LIB(pthread, pthread_create,
537             MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
538             AC_CHECK_LIB(c_r, pthread_create,
539                 MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
540                 AC_CHECK_LIB(c, pthread_create,
541                     MOZ_USE_PTHREADS=1
542                 )
543             )
544         )
545     )
546     ;;
547 esac
549 dnl ========================================================
550 dnl Do the platform specific pthread hackery
551 dnl ========================================================
552 if test "$MOZ_USE_PTHREADS"x != x
553 then
554     dnl
555     dnl See if -pthread is supported.
556     dnl
557     rm -f conftest*
558     ac_cv_have_dash_pthread=no
559     AC_MSG_CHECKING(whether ${CC-cc} accepts -pthread)
560     echo 'int main() { return 0; }' | cat > conftest.c
561     ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
562     if test $? -eq 0; then
563         if test -z "`grep -E -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`grep -E -i '(error|incorrect)' conftest.out`" ; then
564             ac_cv_have_dash_pthread=yes
565             case "$target_os" in
566             freebsd*)
567 # Freebsd doesn't use -pthread for compiles, it uses them for linking
568                 ;;
569             *)
570                 CFLAGS="$CFLAGS -pthread"
571                 CXXFLAGS="$CXXFLAGS -pthread"
572                 ;;
573             esac
574         fi
575     fi
576     rm -f conftest*
577     AC_MSG_RESULT($ac_cv_have_dash_pthread)
579     dnl
580     dnl See if -pthreads is supported.
581     dnl
582     ac_cv_have_dash_pthreads=no
583     if test "$ac_cv_have_dash_pthread" = "no"; then
584         AC_MSG_CHECKING(whether ${CC-cc} accepts -pthreads)
585         echo 'int main() { return 0; }' | cat > conftest.c
586         ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
587         if test $? -eq 0; then
588             if test -z "`grep -E -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`grep -E -i '(error|incorrect)' conftest.out`" ; then
589                 ac_cv_have_dash_pthreads=yes
590                 CFLAGS="$CFLAGS -pthreads"
591                 CXXFLAGS="$CXXFLAGS -pthreads"
592             fi
593         fi
594         rm -f conftest*
595         AC_MSG_RESULT($ac_cv_have_dash_pthreads)
596     fi
598     case "$target" in
599         *-*-freebsd*)
600             AC_DEFINE(_REENTRANT)
601             AC_DEFINE(_THREAD_SAFE)
602             dnl -pthread links in -lpthread, so don't specify it explicitly.
603             if test "$ac_cv_have_dash_pthread" = "yes"; then
604                 _PTHREAD_LDFLAGS="-pthread"
605             fi
606             ;;
608         *-*-openbsd*|*-*-bsdi*)
609             AC_DEFINE(_REENTRANT)
610             AC_DEFINE(_THREAD_SAFE)
611             dnl -pthread links in -lc_r, so don't specify it explicitly.
612             if test "$ac_cv_have_dash_pthread" = "yes"; then
613                 _PTHREAD_LDFLAGS="-pthread"
614             fi
615             ;;
617         *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*)
618             AC_DEFINE(_REENTRANT)
619             ;;
621     esac
622     LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
623     AC_SUBST(MOZ_USE_PTHREADS)
624     MOZ_CHECK_HEADERS(pthread.h)
628 dnl ========================================================
629 dnl Put your C++ language/feature checks below
630 dnl ========================================================
631 AC_LANG_CPLUSPLUS
633 ARM_ABI_PREFIX=
634 if test "$GNU_CC"; then
635   if test "$TARGET_CPU" = "arm" ; then
636     AC_CACHE_CHECK(for ARM EABI,
637         ac_cv_gcc_arm_eabi,
638         [AC_TRY_COMPILE([],
639                         [
640 #if defined(__ARM_EABI__)
641   return 0;
642 #else
643 #error Not ARM EABI.
644 #endif
645                         ],
646                         ac_cv_gcc_arm_eabi="yes",
647                         ac_cv_gcc_arm_eabi="no")])
648     if test "$ac_cv_gcc_arm_eabi" = "yes"; then
649         HAVE_ARM_EABI=1
650         ARM_ABI_PREFIX=eabi-
651     else
652         ARM_ABI_PREFIX=oabi-
653     fi
654   fi
656   TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
659 if test -n "$MOZ_LINKER"; then
660 dnl gold emits wrong sysv-style elf hash tables when building both sysv and
661 dnl style tables. https://sourceware.org/bugzilla/show_bug.cgi?id=13597
662 dnl Since the linker only understands the sysv ones, no need to build the
663 dnl gnu style tables anyways.
664   LDFLAGS="$LDFLAGS -Wl,--hash-style=sysv"
667 dnl End of C++ language/feature checks
668 AC_LANG_C
670 fi # ! SKIP_COMPILER_CHECKS
672 if test -n "${COMPILE_ENVIRONMENT}"; then
673   MOZ_CHECK_ALLOCATOR
676 TARGET_XPCOM_ABI=
677 if test -n "${TARGET_CPU}" -a -n "${TARGET_COMPILER_ABI}"; then
678     TARGET_XPCOM_ABI="${TARGET_CPU}-${TARGET_COMPILER_ABI}"
679     AC_DEFINE_UNQUOTED(TARGET_XPCOM_ABI, ["${TARGET_XPCOM_ABI}"])
682 dnl We can't run TRY_COMPILE tests on Windows, so hard-code some
683 dnl features that Windows actually does support.
685 if test -n "$SKIP_COMPILER_CHECKS"; then
686    dnl Windows has malloc.h
687    AC_DEFINE(MALLOC_H, [<malloc.h>])
688    AC_DEFINE(HAVE_FORCEINLINE)
689 fi # SKIP_COMPILER_CHECKS
691 dnl Mozilla specific options
692 dnl ========================================================
693 dnl The macros used for command line options
694 dnl are defined in build/autoconf/altoptions.m4.
696 dnl ========================================================
697 dnl =
698 dnl = Application
699 dnl =
700 dnl ========================================================
702 MOZ_BRANDING_DIRECTORY=
703 MOZ_OFFICIAL_BRANDING=
704 MOZ_NO_SMART_CARDS=
705 MOZ_BINARY_EXTENSIONS=
706 MOZ_DEVTOOLS=server
708 dnl ========================================================
709 dnl = Trademarked Branding
710 dnl ========================================================
711 MOZ_ARG_ENABLE_BOOL(official-branding,
712 [  --enable-official-branding
713                           Enable Official mozilla.org Branding
714                           Do not distribute builds with
715                           --enable-official-branding unless you have
716                           permission to use trademarks per
717                           http://www.mozilla.org/foundation/trademarks/ .],
718     MOZ_OFFICIAL_BRANDING=1,
719     MOZ_OFFICIAL_BRANDING=)
721 # Allow the application to influence configure with a confvars.sh script.
722 AC_MSG_CHECKING([if app-specific confvars.sh exists])
723 if test -f "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" ; then
724   AC_MSG_RESULT([${srcdir}/${MOZ_BUILD_APP}/confvars.sh])
725   . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh"
726 else
727   AC_MSG_RESULT([no])
730 AC_SUBST(MOZ_OFFICIAL_BRANDING)
731 if test -n "$MOZ_OFFICIAL_BRANDING"; then
732   if test -z "$MOZ_OFFICIAL_BRANDING_DIRECTORY"; then
733     AC_MSG_ERROR([You must specify MOZ_OFFICIAL_BRANDING_DIRECTORY to use --enable-official-branding.])
734   else
735     MOZ_BRANDING_DIRECTORY=${MOZ_OFFICIAL_BRANDING_DIRECTORY}
736     AC_DEFINE(MOZ_OFFICIAL_BRANDING)
737   fi
740 MOZ_ARG_WITH_STRING(branding,
741 [  --with-branding=dir     Use branding from the specified directory.],
742     MOZ_BRANDING_DIRECTORY=$withval)
744 REAL_BRANDING_DIRECTORY="${MOZ_BRANDING_DIRECTORY}"
745 if test -z "$REAL_BRANDING_DIRECTORY"; then
746   REAL_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
749 if test -f "${_topsrcdir}/$REAL_BRANDING_DIRECTORY/configure.sh"; then
750   . "${_topsrcdir}/$REAL_BRANDING_DIRECTORY/configure.sh"
753 AC_SUBST(MOZ_BRANDING_DIRECTORY)
755 dnl ========================================================
756 dnl = Distribution ID
757 dnl ========================================================
758 MOZ_ARG_WITH_STRING(distribution-id,
759 [  --with-distribution-id=ID
760                           Set distribution-specific id (default=org.mozilla)],
761 [ val=`echo $withval`
762     MOZ_DISTRIBUTION_ID="$val"])
764 if test -z "$MOZ_DISTRIBUTION_ID"; then
765    MOZ_DISTRIBUTION_ID="org.mozilla"
768 AC_SUBST(MOZ_DISTRIBUTION_ID)
770 dnl ========================================================
771 dnl = Enable code optimization. ON by default.
772 dnl ========================================================
774 # Use value from moz.configure if one is defined. Else use our computed
775 # value.
776 if test -n "${MOZ_CONFIGURE_OPTIMIZE_FLAGS}"; then
777     MOZ_OPTIMIZE_FLAGS=${MOZ_CONFIGURE_OPTIMIZE_FLAGS}
780 if test "$COMPILE_ENVIRONMENT"; then
781 if test -n "$MOZ_OPTIMIZE"; then
782     AC_MSG_CHECKING([for valid C compiler optimization flags])
783     _SAVE_CFLAGS=$CFLAGS
784     CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
785     AC_TRY_COMPILE([#include <stdio.h>],
786         [printf("Hello World\n");],
787         _results=yes,
788         _results=no)
789     AC_MSG_RESULT([$_results])
790     if test "$_results" = "no"; then
791         AC_MSG_ERROR([These compiler flags for C are invalid: $MOZ_OPTIMIZE_FLAGS])
792     fi
793     CFLAGS=$_SAVE_CFLAGS
794     if test -n "$MOZ_LTO" -a -n "$CLANG_CC"; then
795         # When using llvm-based LTO, non numeric optimization levels are
796         # not supported by the linker, so force the linker to use -O2 (
797         # which doesn't influence the level compilation units are actually
798         # compiled at).
799         case " $MOZ_OPTIMIZE_FLAGS " in
800         *\ -Os\ *|*\ -Oz\ *)
801             MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -O2"
802             ;;
803         esac
804     fi
806 fi # COMPILE_ENVIRONMENT
808 AC_SUBST_LIST(MOZ_OPTIMIZE_FLAGS)
809 AC_SUBST_LIST(MOZ_OPTIMIZE_LDFLAGS)
810 AC_SUBST_LIST(MOZ_PGO_OPTIMIZE_FLAGS)
812 case "${OS_TARGET}" in
813 Android|WINNT|Darwin)
814   MOZ_GLUE_IN_PROGRAM=
815   ;;
817   dnl On !Android !Windows !OSX, we only want to link executables against mozglue
818   MOZ_GLUE_IN_PROGRAM=1
819   AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
820   ;;
821 esac
823 dnl ========================================================
824 dnl = Jemalloc build setup
825 dnl ========================================================
826 if test -n "$MOZ_MEMORY"; then
827   case "${target}" in
828   *-mingw*)
829     export MOZ_NO_DEBUG_RTL=1
830     ;;
831   esac
832 fi # MOZ_MEMORY
833 AC_SUBST(MOZ_GLUE_IN_PROGRAM)
835 dnl ========================================================
836 dnl = Enable using the clang plugin to build
837 dnl ========================================================
839 if test -n "$COMPILE_ENVIRONMENT"; then
840 MOZ_CONFIG_CLANG_PLUGIN
841 fi # COMPILE_ENVIRONMENT
843 AC_LANG_C
845 if test "$COMPILE_ENVIRONMENT"; then
846 MOZ_EXPAND_LIBS
847 fi # COMPILE_ENVIRONMENT
849 dnl ========================================================
850 dnl Check if we need the 32-bit Linux SSE2 error dialog
851 dnl ========================================================
853 AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
855 dnl ========================================================
856 dnl Check for cairo
857 dnl ========================================================
859 if test "$OS_ARCH" = "WINNT"; then
860     # For now we assume that we will have a uint64_t available through
861     # one of the above headers or mozstdint.h.
862     AC_DEFINE(HAVE_UINT64_T)
865 case "$MOZ_WIDGET_TOOLKIT" in
866   windows)
867     if test "$COMPILE_ENVIRONMENT"; then
868       MOZ_CHECK_HEADER(d3d10.h, MOZ_ENABLE_D3D10_LAYER=1)
869     fi
870     ;;
871 esac
872 AC_SUBST(MOZ_ENABLE_D3D10_LAYER)
874 dnl ========================================================
875 dnl =
876 dnl = Maintainer debug option (no --enable equivalent)
877 dnl =
878 dnl ========================================================
880 AC_SUBST_LIST(ASFLAGS)
881 AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
883 AC_SUBST(MOZ_STUB_INSTALLER)
885 AC_SUBST_LIST(MOZ_FIX_LINK_PATHS)
887 AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
889 if test -n "$MOZ_BINARY_EXTENSIONS"; then
890   AC_DEFINE(MOZ_BINARY_EXTENSIONS)
893 dnl ========================================================
894 dnl = Mac bundle name prefix
895 dnl ========================================================
896 MOZ_ARG_WITH_STRING(macbundlename-prefix,
897 [  --with-macbundlename-prefix=prefix
898                           Prefix for MOZ_MACBUNDLE_NAME],
899 [ MOZ_MACBUNDLE_NAME_PREFIX="$withval"])
901 MOZ_MACBUNDLE_NAME=$MOZ_APP_DISPLAYNAME
902 if test "$MOZ_MACBUNDLE_NAME_PREFIX"; then
903   MOZ_MACBUNDLE_NAME="${MOZ_MACBUNDLE_NAME_PREFIX}${MOZ_MACBUNDLE_NAME}"
906 if test "$MOZ_DEBUG"; then
907   MOZ_MACBUNDLE_NAME="${MOZ_MACBUNDLE_NAME}Debug.app"
908 else
909   MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}.app
911 AC_SUBST(MOZ_MACBUNDLE_NAME)
913 dnl Mac bundle identifier (based on MOZ_APP_DISPLAYNAME)
914 # If the MOZ_MACBUNDLE_ID is defined in the configure.sh, use it
915 # Otherwise, use MOZ_APP_DISPLAYNAME
916 if test -z "$MOZ_MACBUNDLE_ID"; then
917    MOZ_MACBUNDLE_ID=`echo $MOZ_APP_DISPLAYNAME | tr 'A-Z' 'a-z' | tr -dc 'a-z-'`
919 MOZ_MACBUNDLE_ID=${MOZ_DISTRIBUTION_ID}.${MOZ_MACBUNDLE_ID}
920 if test "$MOZ_DEBUG"; then
921   MOZ_MACBUNDLE_ID=${MOZ_MACBUNDLE_ID}debug
924 AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
925 AC_SUBST(MOZ_MACBUNDLE_ID)
927 dnl ========================================================
928 dnl = Child Process Name for IPC
929 dnl ========================================================
930 if test "$MOZ_WIDGET_TOOLKIT" != "android"; then
931   MOZ_CHILD_PROCESS_NAME="plugin-container${BIN_SUFFIX}"
932 else
933   # We want to let Android unpack the file at install time, but it only does
934   # so if the file is named libsomething.so. The lib/ path is also required
935   # because the unpacked file will be under the lib/ subdirectory and will
936   # need to be executed from that path.
937   MOZ_CHILD_PROCESS_NAME="libplugin-container.so"
939 MOZ_CHILD_PROCESS_BUNDLE="plugin-container.app/Contents/MacOS/"
940 MOZ_CHILD_PROCESS_BUNDLEID=${MOZ_DISTRIBUTION_ID}.plugincontainer
941 MOZ_CHILD_PROCESS_BUNDLENAME="plugin-container.app"
942 MOZ_CHILD_PROCESS_APPNAME="${MOZ_APP_DISPLAYNAME}CP"
944 AC_SUBST(MOZ_CHILD_PROCESS_NAME)
945 AC_SUBST(MOZ_CHILD_PROCESS_BUNDLE)
946 AC_SUBST(MOZ_CHILD_PROCESS_BUNDLEID)
947 AC_SUBST(MOZ_CHILD_PROCESS_APPNAME)
948 AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
950 dnl ==========================================================
951 dnl = Mac Media Plugin Helper (GMP Child) Process Name for IPC
952 dnl ==========================================================
953 MOZ_EME_PROCESS_NAME="media-plugin-helper"
954 MOZ_EME_PROCESS_NAME_BRANDED="$MOZ_APP_DISPLAYNAME Media Plugin Helper"
955 MOZ_EME_PROCESS_BUNDLENAME="${MOZ_EME_PROCESS_NAME}.app"
956 # Generate a lower case string with no spaces to be used as the bundle ID
957 # for the EME helper .app of the form org.mozilla.<executable-name>.
958 MOZ_EME_PROCESS_BUNDLEID=`echo "$MOZ_APP_DISPLAYNAME" | tr ' ' '-'`
959 MOZ_EME_PROCESS_BUNDLEID=`echo "$MOZ_EME_PROCESS_BUNDLEID" | tr 'A-Z' 'a-z'`
960 MOZ_EME_PROCESS_BUNDLEID=${MOZ_EME_PROCESS_BUNDLEID}-${MOZ_EME_PROCESS_NAME}
961 MOZ_EME_PROCESS_BUNDLEID=${MOZ_DISTRIBUTION_ID}.${MOZ_EME_PROCESS_BUNDLEID}
963 AC_SUBST(MOZ_EME_PROCESS_NAME)
964 AC_SUBST(MOZ_EME_PROCESS_NAME_BRANDED)
965 AC_SUBST(MOZ_EME_PROCESS_BUNDLENAME)
966 AC_SUBST(MOZ_EME_PROCESS_BUNDLEID)
968 # The following variables are available to branding and application
969 # configuration ($BRANDING/configure.sh and $APPLICATION/confvars.sh):
970 # - MOZ_APP_VENDOR: Used for application.ini's "Vendor" field, which also
971 # impacts profile location and user-visible fields.
972 # - MOZ_APP_DISPLAYNAME: Used in user-visible fields (DLL properties,
973 # Mac Bundle name, Updater, Installer), it is typically used for nightly
974 # builds (e.g. Aurora for Firefox).
975 # - MOZ_APP_PROFILE: When set, used for application.ini's
976 # "Profile" field, which controls profile location.
977 # - MOZ_APP_ID: When set, used for application.ini's "ID" field, and
978 # crash reporter server url.
979 # - MOZ_PROFILE_MIGRATOR: When set, enables profile migrator.
981 # The following environment variables used to have an effect, but don't anymore:
982 # - MOZ_APP_VERSION: Defines the application version number. This was replaced with
983 # the contents from the version.txt file in the application directory, or
984 # browser/config/version.txt if there isn't one.
985 # - MOZ_APP_VERSION_DISPLAY: Defines the application version number. Used
986 # in the "About" window. This was replaced with the contents from the
987 # version_display.txt or version.txt in the application directory, or
988 # browser/config/version_display.txt.
990 # For extensions and langpacks, we require a max version that is compatible
991 # across security releases. MOZ_APP_MAXVERSION is our method for doing that.
992 # 24.0a1 and 24.0a2 aren't affected
993 # 24.0 becomes 24.*
994 # 24.1.1 becomes 24.*
995 IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
996 if test -z "$IS_ALPHA"; then
997   changequote(,)
998   if test "$(basename $MOZ_BUILD_APP)" = "suite"; then
999     MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\.[0-9]*\).*|\1|"`.*
1000   else
1001     MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\).*|\1|"`.*
1002   fi
1003   changequote([,])
1004 else
1005   MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
1008 AC_SUBST(MOZ_APP_DISPLAYNAME)
1009 AC_SUBST(MOZ_APP_VENDOR)
1010 AC_SUBST(MOZ_APP_PROFILE)
1011 AC_SUBST(MOZ_APP_ID)
1012 AC_SUBST(MAR_CHANNEL_ID)
1013 AC_SUBST(ACCEPTED_MAR_CHANNEL_IDS)
1014 AC_SUBST(MOZ_PROFILE_MIGRATOR)
1015 AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME")
1016 AC_SUBST(MOZ_APP_UA_NAME)
1017 AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
1018 AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL, $BROWSER_CHROME_URL)
1019 AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL_QUOTED, "$BROWSER_CHROME_URL")
1021 AC_SUBST(MOZ_APP_MAXVERSION)
1022 AC_SUBST(MOZ_PKG_SPECIAL)
1023 AC_SUBST(MOZ_SIMPLE_PACKAGE_NAME)
1025 if test "$MOZILLA_OFFICIAL"; then
1026     # Build revisions should always be present in official builds
1027     MOZ_INCLUDE_SOURCE_INFO=1
1030 # External builds (specifically Ubuntu) may drop the hg repo information, so we allow to
1031 # explicitly set the repository and changeset information in.
1032 AC_SUBST(MOZ_SOURCE_REPO)
1033 AC_SUBST(MOZ_SOURCE_CHANGESET)
1034 AC_SUBST(MOZ_INCLUDE_SOURCE_INFO)
1036 dnl Echo the CFLAGS to remove extra whitespace.
1037 CFLAGS=`echo \
1038     $_COMPILATION_CFLAGS \
1039     $CFLAGS`
1041 CXXFLAGS=`echo \
1042     $_COMPILATION_CXXFLAGS \
1043     $CXXFLAGS`
1045 ASFLAGS=`echo \
1046     $_COMPILATION_ASFLAGS \
1047     $ASFLAGS`
1049 COMPILE_CFLAGS=`echo \
1050     $_DEFINES_CFLAGS \
1051     $COMPILE_CFLAGS`
1053 COMPILE_CXXFLAGS=`echo \
1054     $_DEFINES_CXXFLAGS \
1055     $COMPILE_CXXFLAGS`
1057 HOST_CFLAGS=`echo \
1058     $_COMPILATION_HOST_CFLAGS \
1059     $HOST_CFLAGS`
1061 HOST_CXXFLAGS=`echo \
1062     $_COMPILATION_HOST_CXXFLAGS \
1063     $HOST_CXXFLAGS`
1065 LDFLAGS=`echo \
1066     $LDFLAGS \
1067     $_COMPILATION_LDFLAGS`
1069 HOST_LDFLAGS=`echo \
1070     $HOST_LDFLAGS \
1071     $_COMPILATION_HOST_LDFLAGS`
1073 HOST_CMFLAGS="-x objective-c -fobjc-exceptions"
1074 HOST_CMMFLAGS="-x objective-c++ -fobjc-exceptions"
1075 OS_COMPILE_CMFLAGS="-x objective-c -fobjc-exceptions"
1076 OS_COMPILE_CMMFLAGS="-x objective-c++ -fobjc-exceptions"
1077 if test "$MOZ_WIDGET_TOOLKIT" = uikit; then
1078   OS_COMPILE_CMFLAGS="$OS_COMPILE_CMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
1079   OS_COMPILE_CMMFLAGS="$OS_COMPILE_CMMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
1081 AC_SUBST(HOST_CMFLAGS)
1082 AC_SUBST(HOST_CMMFLAGS)
1083 AC_SUBST(OS_COMPILE_CMFLAGS)
1084 AC_SUBST(OS_COMPILE_CMMFLAGS)
1086 OS_CFLAGS="$CFLAGS"
1087 OS_CXXFLAGS="$CXXFLAGS"
1088 OS_CPPFLAGS="$CPPFLAGS"
1089 OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
1090 OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
1091 OS_LDFLAGS="$LDFLAGS"
1092 OS_LIBS="$LIBS"
1093 AC_SUBST_LIST(OS_CFLAGS)
1094 AC_SUBST_LIST(OS_CXXFLAGS)
1095 AC_SUBST_LIST(OS_CPPFLAGS)
1096 AC_SUBST_LIST(OS_COMPILE_CFLAGS)
1097 AC_SUBST_LIST(OS_COMPILE_CXXFLAGS)
1098 AC_SUBST_LIST(OS_LDFLAGS)
1099 AC_SUBST(OS_LIBS)
1101 AC_SUBST(HOST_CC)
1102 AC_SUBST(HOST_CXX)
1103 AC_SUBST_LIST(HOST_CFLAGS)
1104 AC_SUBST_LIST(HOST_CPPFLAGS)
1105 AC_SUBST_LIST(HOST_CXXFLAGS)
1106 AC_SUBST(HOST_LDFLAGS)
1107 AC_SUBST_LIST(HOST_OPTIMIZE_FLAGS)
1108 AC_SUBST(HOST_BIN_SUFFIX)
1110 AC_SUBST(TARGET_XPCOM_ABI)
1112 AC_SUBST(DSO_LDOPTS)
1113 AC_SUBST(BIN_SUFFIX)
1114 AC_SUBST(USE_N32)
1115 AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
1116 AC_SUBST(WIN32_GUI_EXE_LDFLAGS)
1118 AC_SUBST(MOZ_DEVTOOLS)
1120 AC_SUBST(MOZ_PACKAGE_JSSHELL)
1122 AC_SUBST(DMG_TOOL)
1124 dnl Host JavaScript runtime, if any, to use during cross compiles.
1125 AC_SUBST(JS_BINARY)
1127 AC_SUBST(NSS_EXTRA_SYMBOLS_FILE)
1129 dnl Set various defines and substitutions
1130 dnl ========================================================
1132 AC_SUBST(MOZ_DEV_EDITION)
1133 if test -n "$MOZ_DEV_EDITION"; then
1134     AC_DEFINE(MOZ_DEV_EDITION)
1137 dnl Spit out some output
1138 dnl ========================================================
1140 # Avoid using obsolete NSPR features
1141 AC_DEFINE(NO_NSPR_10_SUPPORT)
1143 MOZ_CREATE_CONFIG_STATUS()
1145 rm -fr confdefs* $ac_clean_files