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