1 | dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*- |
---|
2 | dnl vi: set tabstop=4 shiftwidth=4 expandtab: |
---|
3 | dnl The contents of this file are subject to the Mozilla Public |
---|
4 | dnl License Version 1.1 (the "License"); you may not use this file |
---|
5 | dnl except in compliance with the License. You may obtain a copy of |
---|
6 | dnl the License at http://www.mozilla.org/MPL/ |
---|
7 | dnl |
---|
8 | dnl Software distributed under the License is distributed on an "AS |
---|
9 | dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
---|
10 | dnl implied. See the License for the specific language governing |
---|
11 | dnl rights and limitations under the License. |
---|
12 | dnl |
---|
13 | dnl The Original Code is this file as it was released upon August 6, 1998. |
---|
14 | dnl |
---|
15 | dnl The Initial Developer of the Original Code is Christopher |
---|
16 | dnl Seawood. Portions created by Christopher Seawood are |
---|
17 | dnl Copyright (C) 1998-2001 Christopher Seawood. All Rights Reserved. |
---|
18 | dnl |
---|
19 | dnl Contributor(s): Jamie Zawinski <jwz@jwz.org> |
---|
20 | dnl gettimeofday args check |
---|
21 | dnl Christopher Blizzard <blizzard@appliedtheory.com> |
---|
22 | dnl gnomefe update & enable-pthreads |
---|
23 | dnl Ramiro Estrugo <ramiro@netscape.com> |
---|
24 | dnl X11 makedepend support |
---|
25 | dnl Insure support. |
---|
26 | dnl Henry Sobotka <sobotka@axess.com> |
---|
27 | dnl OS/2 support |
---|
28 | dnl Dan Mosedale <dmose@mozilla.org> |
---|
29 | dnl LDAP support |
---|
30 | dnl Seth Spitzer <sspitzer@netscape.com> |
---|
31 | dnl xpctools support |
---|
32 | dnl |
---|
33 | dnl Process this file with autoconf to produce a configure script. |
---|
34 | dnl ======================================================== |
---|
35 | |
---|
36 | AC_PREREQ(2.12) |
---|
37 | AC_INIT(config/config.mk) |
---|
38 | AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf) |
---|
39 | AC_CANONICAL_SYSTEM |
---|
40 | TARGET_CPU="${target_cpu}" |
---|
41 | TARGET_VENDOR="${target_vendor}" |
---|
42 | TARGET_OS="${target_os}" |
---|
43 | |
---|
44 | dnl ======================================================== |
---|
45 | dnl = |
---|
46 | dnl = Dont change the following two lines. Doing so breaks: |
---|
47 | dnl = |
---|
48 | dnl = CFLAGS="-foo" ./configure |
---|
49 | dnl = |
---|
50 | dnl ======================================================== |
---|
51 | CFLAGS="${CFLAGS=}" |
---|
52 | CPPFLAGS="${CPPFLAGS=}" |
---|
53 | CXXFLAGS="${CXXFLAGS=}" |
---|
54 | LDFLAGS="${LDFLAGS=}" |
---|
55 | HOST_CFLAGS="${HOST_CFLAGS=}" |
---|
56 | HOST_CXXFLAGS="${HOST_CXXFLAGS=}" |
---|
57 | HOST_LDFLAGS="${HOST_LDFLAGS=}" |
---|
58 | |
---|
59 | dnl ======================================================== |
---|
60 | dnl = Preserve certain environment flags passed to configure |
---|
61 | dnl = We want sub projects to receive the same flags |
---|
62 | dnl = untainted by this configure script |
---|
63 | dnl ======================================================== |
---|
64 | _SUBDIR_CC="$CC" |
---|
65 | _SUBDIR_CXX="$CXX" |
---|
66 | _SUBDIR_CFLAGS="$CFLAGS" |
---|
67 | _SUBDIR_CPPFLAGS="$CPPFLAGS" |
---|
68 | _SUBDIR_CXXFLAGS="$CFLAGS" |
---|
69 | _SUBDIR_LDFLAGS="$LDFLAGS" |
---|
70 | _SUBDIR_HOST_CC="$HOST_CC" |
---|
71 | _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS" |
---|
72 | _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS" |
---|
73 | _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS" |
---|
74 | _SUBDIR_CONFIG_ARGS="$ac_configure_args" |
---|
75 | |
---|
76 | dnl Set the version number of the libs included with mozilla |
---|
77 | dnl ======================================================== |
---|
78 | MOZJPEG=62 |
---|
79 | MOZPNG=10200 |
---|
80 | MOZZLIB=1.0.0 |
---|
81 | NSPR_VERSION=4 |
---|
82 | |
---|
83 | dnl Set the minimum version of toolkit libs used by mozilla |
---|
84 | dnl ======================================================== |
---|
85 | GLIB_VERSION=1.2.0 |
---|
86 | GTK_VERSION=1.2.0 |
---|
87 | LIBIDL_VERSION=0.6.3 |
---|
88 | PERL_VERSION=5.004 |
---|
89 | LIBART_VERSION=2.3.4 |
---|
90 | CAIRO_VERSION=0.1.17 |
---|
91 | GTK2_VERSION=1.3.7 |
---|
92 | MAKE_VERSION=3.78 |
---|
93 | WINDRES_VERSION=2.14.90 |
---|
94 | W32API_VERSION=2.4 |
---|
95 | GNOMEVFS_VERSION=2.0 |
---|
96 | GCONF_VERSION=1.2.1 |
---|
97 | LIBGNOME_VERSION=2.0 |
---|
98 | |
---|
99 | dnl Set various checks |
---|
100 | dnl ======================================================== |
---|
101 | MISSING_X= |
---|
102 | |
---|
103 | dnl Initialize the Pthread test variables early so they can be |
---|
104 | dnl overridden by each platform. |
---|
105 | dnl ======================================================== |
---|
106 | USE_PTHREADS= |
---|
107 | _PTHREAD_LDFLAGS="" |
---|
108 | |
---|
109 | dnl Do not allow a separate objdir build if a srcdir build exists. |
---|
110 | dnl ============================================================== |
---|
111 | _topsrcdir=`cd \`dirname $0\`; pwd` |
---|
112 | _objdir=`pwd` |
---|
113 | if test "$_topsrcdir" != "$_objdir" |
---|
114 | then |
---|
115 | # Check for a couple representative files in the source tree |
---|
116 | _conflict_files= |
---|
117 | for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do |
---|
118 | if test -f $file; then |
---|
119 | _conflict_files="$_conflict_files $file" |
---|
120 | fi |
---|
121 | done |
---|
122 | if test "$_conflict_files"; then |
---|
123 | echo "***" |
---|
124 | echo "* Your source tree contains these files:" |
---|
125 | for file in $_conflict_files; do |
---|
126 | echo "* $file" |
---|
127 | done |
---|
128 | cat 1>&2 <<-EOF |
---|
129 | * This indicates that you previously built in the source tree. |
---|
130 | * A source tree build can confuse the separate objdir build. |
---|
131 | * |
---|
132 | * To clean up the source tree: |
---|
133 | * 1. cd $_topsrcdir |
---|
134 | * 2. gmake distclean |
---|
135 | *** |
---|
136 | EOF |
---|
137 | exit 1 |
---|
138 | break |
---|
139 | fi |
---|
140 | fi |
---|
141 | MOZ_BUILD_ROOT=`pwd` |
---|
142 | |
---|
143 | dnl Default to MSVC for win32 |
---|
144 | dnl ============================================================== |
---|
145 | if test -z "$CROSS_COMPILE"; then |
---|
146 | case "$target" in |
---|
147 | *-cygwin*|*-mingw*|*-msvc*|*-mks*) |
---|
148 | MAKE_VERSION=3.79 |
---|
149 | if test -z "$CC"; then CC=cl; fi |
---|
150 | if test -z "$CXX"; then CXX=cl; fi |
---|
151 | if test -z "$CPP"; then CPP=cl; fi |
---|
152 | if test -z "$LD"; then LD=link; fi |
---|
153 | if test -z "$AS"; then AS=ml; fi |
---|
154 | if test -z "$MIDL"; then MIDL=midl; fi |
---|
155 | ;; |
---|
156 | esac |
---|
157 | fi |
---|
158 | |
---|
159 | dnl ======================================================== |
---|
160 | dnl Checks for compilers. |
---|
161 | dnl ======================================================== |
---|
162 | dnl Set CROSS_COMPILE in the environment when running configure |
---|
163 | dnl to use the cross-compile setup for now |
---|
164 | dnl ======================================================== |
---|
165 | if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then |
---|
166 | echo "cross compiling from $host to $target" |
---|
167 | cross_compiling=yes |
---|
168 | |
---|
169 | _SAVE_CC="$CC" |
---|
170 | _SAVE_CFLAGS="$CFLAGS" |
---|
171 | _SAVE_LDFLAGS="$LDFLAGS" |
---|
172 | |
---|
173 | AC_MSG_CHECKING([for host c compiler]) |
---|
174 | AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc cl icc, "") |
---|
175 | if test -z "$HOST_CC"; then |
---|
176 | AC_MSG_ERROR([no acceptable c compiler found in \$PATH]) |
---|
177 | fi |
---|
178 | AC_MSG_RESULT([$HOST_CC]) |
---|
179 | AC_MSG_CHECKING([for host c++ compiler]) |
---|
180 | AC_CHECK_PROGS(HOST_CXX, $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc, "") |
---|
181 | if test -z "$HOST_CXX"; then |
---|
182 | AC_MSG_ERROR([no acceptable c++ compiler found in \$PATH]) |
---|
183 | fi |
---|
184 | AC_MSG_RESULT([$HOST_CXX]) |
---|
185 | |
---|
186 | if test -z "$HOST_CFLAGS"; then |
---|
187 | HOST_CFLAGS="$CFLAGS" |
---|
188 | fi |
---|
189 | if test -z "$HOST_CXXFLAGS"; then |
---|
190 | HOST_CXXFLAGS="$CXXFLAGS" |
---|
191 | fi |
---|
192 | if test -z "$HOST_LDFLAGS"; then |
---|
193 | HOST_LDFLAGS="$LDFLAGS" |
---|
194 | fi |
---|
195 | AC_CHECK_PROGS(HOST_RANLIB, $HOST_RANLIB ranlib, ranlib, :) |
---|
196 | AC_CHECK_PROGS(HOST_AR, $HOST_AR ar, ar, :) |
---|
197 | CC="$HOST_CC" |
---|
198 | CFLAGS="$HOST_CFLAGS" |
---|
199 | LDFLAGS="$HOST_LDFLAGS" |
---|
200 | |
---|
201 | AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works]) |
---|
202 | AC_TRY_COMPILE([], [return(0);], |
---|
203 | [ac_cv_prog_hostcc_works=1 AC_MSG_RESULT([yes])], |
---|
204 | AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) ) |
---|
205 | |
---|
206 | CC="$HOST_CXX" |
---|
207 | CFLAGS="$HOST_CXXFLAGS" |
---|
208 | |
---|
209 | AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works]) |
---|
210 | AC_TRY_COMPILE([], [return(0);], |
---|
211 | [ac_cv_prog_hostcxx_works=1 AC_MSG_RESULT([yes])], |
---|
212 | AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) ) |
---|
213 | |
---|
214 | CC=$_SAVE_CC |
---|
215 | CFLAGS=$_SAVE_CFLAGS |
---|
216 | LDFLAGS=$_SAVE_LDFLAGS |
---|
217 | |
---|
218 | AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :) |
---|
219 | unset ac_cv_prog_CC |
---|
220 | AC_PROG_CC |
---|
221 | AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", :) |
---|
222 | unset ac_cv_prog_CXX |
---|
223 | AC_PROG_CXX |
---|
224 | AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :) |
---|
225 | AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :) |
---|
226 | AC_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :) |
---|
227 | AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", :) |
---|
228 | AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :) |
---|
229 | AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :) |
---|
230 | AC_DEFINE(CROSS_COMPILE) |
---|
231 | else |
---|
232 | AC_PROG_CC |
---|
233 | AC_PROG_CXX |
---|
234 | AC_PROG_RANLIB |
---|
235 | AC_PATH_PROGS(AS, $AS as, $CC) |
---|
236 | AC_CHECK_PROGS(AR, ar, :) |
---|
237 | AC_CHECK_PROGS(LD, ld, :) |
---|
238 | AC_CHECK_PROGS(STRIP, strip, :) |
---|
239 | AC_CHECK_PROGS(WINDRES, windres, :) |
---|
240 | if test -z "$HOST_CC"; then |
---|
241 | HOST_CC="$CC" |
---|
242 | fi |
---|
243 | if test -z "$HOST_CFLAGS"; then |
---|
244 | HOST_CFLAGS="$CFLAGS" |
---|
245 | fi |
---|
246 | if test -z "$HOST_CXX"; then |
---|
247 | HOST_CXX="$CXX" |
---|
248 | fi |
---|
249 | if test -z "$HOST_CXXFLAGS"; then |
---|
250 | HOST_CXXFLAGS="$CXXFLAGS" |
---|
251 | fi |
---|
252 | if test -z "$HOST_LDFLAGS"; then |
---|
253 | HOST_LDFLAGS="$LDFLAGS" |
---|
254 | fi |
---|
255 | if test -z "$HOST_RANLIB"; then |
---|
256 | HOST_RANLIB="$RANLIB" |
---|
257 | fi |
---|
258 | if test -z "$HOST_AR"; then |
---|
259 | HOST_AR="$AR" |
---|
260 | fi |
---|
261 | fi |
---|
262 | |
---|
263 | GNU_AS= |
---|
264 | GNU_LD= |
---|
265 | GNU_CC= |
---|
266 | GNU_CXX= |
---|
267 | CC_VERSION='N/A' |
---|
268 | CXX_VERSION='N/A' |
---|
269 | if test "$GCC" = "yes"; then |
---|
270 | GNU_CC=1 |
---|
271 | CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'` |
---|
272 | fi |
---|
273 | if test "$GXX" = "yes"; then |
---|
274 | GNU_CXX=1 |
---|
275 | CXX_VERSION=`$CXX -v 2>&1 | grep 'gcc version'` |
---|
276 | fi |
---|
277 | if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then |
---|
278 | GNU_AS=1 |
---|
279 | fi |
---|
280 | if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then |
---|
281 | GNU_LD=1 |
---|
282 | fi |
---|
283 | if test "$GNU_CC"; then |
---|
284 | if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then |
---|
285 | GCC_USE_GNU_LD=1 |
---|
286 | fi |
---|
287 | fi |
---|
288 | |
---|
289 | AC_PROG_AWK |
---|
290 | |
---|
291 | dnl Special win32 checks |
---|
292 | dnl ======================================================== |
---|
293 | case "$target" in |
---|
294 | *-cygwin*|*-mingw*|*-msvc*|*-mks*) |
---|
295 | if test "$GCC" != "yes"; then |
---|
296 | # Check to see if we are really running in a msvc environemnt |
---|
297 | _WIN32_MSVC=1 |
---|
298 | AC_CHECK_PROGS(MIDL, midl) |
---|
299 | |
---|
300 | # Make sure compilers are valid |
---|
301 | CFLAGS="$CFLAGS -TC -nologo" |
---|
302 | CXXFLAGS="$CXXFLAGS -TP -nologo" |
---|
303 | AC_LANG_SAVE |
---|
304 | AC_LANG_C |
---|
305 | AC_TRY_COMPILE([#include <stdio.h>], |
---|
306 | [ printf("Hello World\n"); ],, |
---|
307 | AC_MSG_ERROR([\$(CC) test failed. You must have MS VC++ in your path to build.]) ) |
---|
308 | |
---|
309 | AC_LANG_CPLUSPLUS |
---|
310 | AC_TRY_COMPILE([#include <new.h>], |
---|
311 | [ unsigned *test = new unsigned(42); ],, |
---|
312 | AC_MSG_ERROR([\$(CXX) test failed. You must have MS VC++ in your path to build.]) ) |
---|
313 | AC_LANG_RESTORE |
---|
314 | |
---|
315 | # Determine compiler version |
---|
316 | CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'` |
---|
317 | _CC_MAJOR_VERSION=`echo ${CC_VERSION} | $AWK -F\. '{ print $1 }'` |
---|
318 | |
---|
319 | CXX_VERSION=`"${CXX}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'` |
---|
320 | _CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | $AWK -F\. '{ print $1 }'` |
---|
321 | |
---|
322 | if test "$_CC_MAJOR_VERSION" != "$_CXX_MAJOR_VERSION"; then |
---|
323 | AC_MSG_ERROR([The major versions of \$CC and \$CXX do not match.]) |
---|
324 | fi |
---|
325 | if test "$_CC_MAJOR_VERSION" = "12"; then |
---|
326 | _CC_SUITE=6 |
---|
327 | elif test "$_CC_MAJOR_VERSION" = "13"; then |
---|
328 | _CC_SUITE=7 |
---|
329 | else |
---|
330 | AC_MSG_ERROR([This version of the MSVC compiler, $CC_VERSION , is unsupported.]) |
---|
331 | fi |
---|
332 | |
---|
333 | # Check linker version |
---|
334 | _LD_FULL_VERSION=`"${LD}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'` |
---|
335 | _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'` |
---|
336 | if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then |
---|
337 | AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.]) |
---|
338 | fi |
---|
339 | INCREMENTAL_LINKER=1 |
---|
340 | |
---|
341 | # Check midl version |
---|
342 | _MIDL_FULL_VERSION=`"${MIDL}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'` |
---|
343 | _MIDL_MAJOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $1 }'` |
---|
344 | _MIDL_MINOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $2 }'` |
---|
345 | _MIDL_REV_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $3 }'` |
---|
346 | if test "$_MIDL_MAJOR_VERSION" != "5" -a "$_MIDL_FULL_VERSION" != "6.00.0347" -a "$_MIDL_FULL_VERSION" != "6.00.0361"; then |
---|
347 | AC_MSG_ERROR([Midl version $_MIDL_FULL_VERSION was found. Midl version must be 5.x.x (VC6*) or 6.00.0347 (VC7) or 6.00.0361 (VC.net 2003).]) |
---|
348 | fi |
---|
349 | |
---|
350 | # Add flags if necessary |
---|
351 | AC_MSG_CHECKING([for midl flags]) |
---|
352 | if test \( "$_MIDL_MAJOR_VERSION" -gt "6" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" -gt "0" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" -gt "359" \); then |
---|
353 | # Starting with MIDL version 6.0.359, the MIDL compiler |
---|
354 | # generates /Oicf /robust stubs by default, which is not |
---|
355 | # compatible with versions of Windows older than Win2k. |
---|
356 | # This switches us back to the old behaviour. When we drop |
---|
357 | # support for Windows older than Win2k, we should remove |
---|
358 | # this. |
---|
359 | MIDL_FLAGS="${MIDL_FLAGS} /no_robust" |
---|
360 | AC_MSG_RESULT([need /no_robust]) |
---|
361 | else |
---|
362 | MIDL_FLAGS="${MIDL_FLAGS}" |
---|
363 | AC_MSG_RESULT([none needed]) |
---|
364 | fi |
---|
365 | else |
---|
366 | # Check w32api version |
---|
367 | _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` |
---|
368 | _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` |
---|
369 | AC_MSG_CHECKING([for w32api version >= $W32API_VERSION]) |
---|
370 | AC_TRY_COMPILE([#include <w32api.h>], |
---|
371 | #if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \ |
---|
372 | (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \ |
---|
373 | __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION) |
---|
374 | #error "test failed." |
---|
375 | #endif |
---|
376 | , [ res=yes ], [ res=no ]) |
---|
377 | AC_MSG_RESULT([$res]) |
---|
378 | if test "$res" != "yes"; then |
---|
379 | AC_MSG_ERROR([w32api version $W32API_VERSION or higher required.]) |
---|
380 | fi |
---|
381 | # Check windres version |
---|
382 | AC_MSG_CHECKING([for windres version >= $WINDRES_VERSION]) |
---|
383 | _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` |
---|
384 | AC_MSG_RESULT([$_WINDRES_VERSION]) |
---|
385 | _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` |
---|
386 | _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'` |
---|
387 | _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'` |
---|
388 | WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'` |
---|
389 | WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'` |
---|
390 | WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'` |
---|
391 | if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \ |
---|
392 | "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ |
---|
393 | "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \ |
---|
394 | "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ |
---|
395 | "$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \ |
---|
396 | "$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION" |
---|
397 | then |
---|
398 | AC_MSG_ERROR([windres version $WINDRES_VERSION or higher is required to build.]) |
---|
399 | fi |
---|
400 | fi # !GNU_CC |
---|
401 | ;; |
---|
402 | esac |
---|
403 | |
---|
404 | AC_SUBST(MIDL_FLAGS) |
---|
405 | |
---|
406 | if test -n "$_WIN32_MSVC"; then |
---|
407 | SKIP_PATH_CHECKS=1 |
---|
408 | SKIP_COMPILER_CHECKS=1 |
---|
409 | SKIP_LIBRARY_CHECKS=1 |
---|
410 | AC_CHECK_HEADERS(mmintrin.h) |
---|
411 | fi |
---|
412 | |
---|
413 | dnl Test breaks icc on OS/2 && MSVC |
---|
414 | if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then |
---|
415 | AC_PROG_CC_C_O |
---|
416 | if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then |
---|
417 | USING_HCC=1 |
---|
418 | _OLDCC=$CC |
---|
419 | _OLDCXX=$CXX |
---|
420 | CC="${srcdir}/build/hcc '$CC'" |
---|
421 | CXX="${srcdir}/build/hcpp '$CXX'" |
---|
422 | fi |
---|
423 | fi |
---|
424 | |
---|
425 | AC_SUBST(GNU_AS) |
---|
426 | AC_SUBST(GNU_LD) |
---|
427 | AC_SUBST(GNU_CC) |
---|
428 | AC_SUBST(GNU_CXX) |
---|
429 | |
---|
430 | dnl ======================================================== |
---|
431 | dnl = Mac OS X SDK support |
---|
432 | dnl ======================================================== |
---|
433 | MACOS_SDK_DIR= |
---|
434 | MOZ_ARG_WITH_STRING(macos-sdk, |
---|
435 | [ --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)], |
---|
436 | MACOS_SDK_DIR=$withval) |
---|
437 | |
---|
438 | AC_SUBST(MACOS_SDK_DIR) |
---|
439 | |
---|
440 | if test "$MACOS_SDK_DIR"; then |
---|
441 | export NEXT_ROOT=$MACOS_SDK_DIR |
---|
442 | CFLAGS="-I${MACOS_SDK_DIR}/usr/include $CFLAGS" |
---|
443 | CXXFLAGS="-I${MACOS_SDK_DIR}/usr/include $CXXFLAGS" |
---|
444 | changequote(,) |
---|
445 | GCC_VERSION=`echo $CXX_VERSION | perl -pe "s/gcc version ([^ ]*).*/\1/"` |
---|
446 | changequote([,]) |
---|
447 | LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOS_SDK_DIR}/usr/lib $LIBS" |
---|
448 | fi |
---|
449 | |
---|
450 | dnl ======================================================== |
---|
451 | dnl Checks for programs. |
---|
452 | dnl ======================================================== |
---|
453 | AC_PROG_CPP |
---|
454 | AC_PROG_CXXCPP |
---|
455 | AC_PROG_INSTALL |
---|
456 | AC_PROG_LN_S |
---|
457 | AC_PATH_PROGS(PERL, $PERL perl5 perl ) |
---|
458 | if test -z "$PERL" || test "$PERL" = ":"; then |
---|
459 | AC_MSG_ERROR([perl not found in \$PATH]) |
---|
460 | fi |
---|
461 | |
---|
462 | AC_MSG_CHECKING([for minimum required perl version >= $PERL_VERSION]) |
---|
463 | _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5` |
---|
464 | _perl_res=$? |
---|
465 | AC_MSG_RESULT([$_perl_version]) |
---|
466 | |
---|
467 | if test "$_perl_res" != 0; then |
---|
468 | AC_MSG_ERROR([Perl $PERL_VERSION or higher is required.]) |
---|
469 | fi |
---|
470 | |
---|
471 | AC_MSG_CHECKING([for full perl installation]) |
---|
472 | _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5` |
---|
473 | _perl_res=$? |
---|
474 | if test "$_perl_res" != 0; then |
---|
475 | AC_MSG_RESULT([no]) |
---|
476 | AC_MSG_ERROR([Cannot find Config.pm or \$Config{archlib}. A full perl installation is required.]) |
---|
477 | else |
---|
478 | AC_MSG_RESULT([yes]) |
---|
479 | fi |
---|
480 | |
---|
481 | AC_PATH_PROG(DOXYGEN, doxygen, :) |
---|
482 | AC_PATH_PROG(WHOAMI, whoami, :) |
---|
483 | AC_PATH_PROG(AUTOCONF, autoconf, :) |
---|
484 | AC_PATH_PROG(UNZIP, unzip, :) |
---|
485 | AC_PATH_PROGS(ZIP, zip) |
---|
486 | if test -z "$ZIP" || test "$ZIP" = ":"; then |
---|
487 | AC_MSG_ERROR([zip not found in \$PATH]) |
---|
488 | fi |
---|
489 | AC_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) |
---|
490 | AC_PATH_PROG(XARGS, xargs) |
---|
491 | if test -z "$XARGS" || test "$XARGS" = ":"; then |
---|
492 | AC_MSG_ERROR([xargs not found in \$PATH .]) |
---|
493 | fi |
---|
494 | case "$target_os" in |
---|
495 | darwin*) |
---|
496 | AC_PATH_PROGS(PBBUILD, pbbuild xcodebuild pbxbuild) |
---|
497 | ;; |
---|
498 | esac |
---|
499 | |
---|
500 | dnl Be sure the make we use is GNU make. |
---|
501 | dnl on win32, gmake.exe is the generally the wrong version |
---|
502 | case "$target_os" in |
---|
503 | cygwin*|mingw*|mks*|msvc*) |
---|
504 | AC_PATH_PROGS(MAKE, $MAKE make gmake, :) |
---|
505 | ;; |
---|
506 | *) |
---|
507 | AC_PATH_PROGS(MAKE, $MAKE gmake make, :) |
---|
508 | ;; |
---|
509 | esac |
---|
510 | _make_try=`$MAKE --version 2>/dev/null | grep GNU` |
---|
511 | if test ! "$_make_try" |
---|
512 | then |
---|
513 | echo |
---|
514 | echo "*** $MAKE is not GNU Make. You will not be able to build Mozilla without GNU Make." |
---|
515 | echo |
---|
516 | exit 1 |
---|
517 | fi |
---|
518 | dnl Now exit if version if < MAKE_VERSION |
---|
519 | rm -f dummy.mk |
---|
520 | echo 'all: ; @echo $(MAKE_VERSION)' > dummy.mk |
---|
521 | _make_vers=`$MAKE --no-print-directory -f dummy.mk all 2>/dev/null` |
---|
522 | rm -f dummy.mk |
---|
523 | _MAKE_MAJOR_VERSION=`echo $_make_vers | $AWK -F\. '{ print $1 }'` |
---|
524 | _MAKE_MINOR_VERSION=`echo $_make_vers | $AWK -F\. '{ print $2 }'` |
---|
525 | MAKE_MAJOR_VERSION=`echo $MAKE_VERSION | $AWK -F\. '{ print $1 }'` |
---|
526 | MAKE_MINOR_VERSION=`echo $MAKE_VERSION | $AWK -F\. '{ print $2 }'` |
---|
527 | if test "$_MAKE_MAJOR_VERSION" -lt "$MAKE_MAJOR_VERSION" || \ |
---|
528 | test "$_MAKE_MAJOR_VERSION" = "$MAKE_MAJOR_VERSION" -a \ |
---|
529 | "$_MAKE_MINOR_VERSION" -lt "$MAKE_MINOR_VERSION"; then |
---|
530 | AC_MSG_ERROR([GNU Make $MAKE_VERSION or higher is required to build Mozilla.]) |
---|
531 | fi |
---|
532 | AC_SUBST(MAKE) |
---|
533 | |
---|
534 | AC_PATH_XTRA |
---|
535 | |
---|
536 | dnl Check in X11 include directory too. |
---|
537 | if test "$no_x" != "yes"; then |
---|
538 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
---|
539 | fi |
---|
540 | |
---|
541 | XCFLAGS="$X_CFLAGS" |
---|
542 | |
---|
543 | dnl ======================================================== |
---|
544 | dnl set the defaults first |
---|
545 | dnl ======================================================== |
---|
546 | AS_BIN=$AS |
---|
547 | AR_FLAGS='cr $@' |
---|
548 | AR_LIST='$(AR) t' |
---|
549 | AR_EXTRACT='$(AR) x' |
---|
550 | AR_DELETE='$(AR) d' |
---|
551 | AS='$(CC)' |
---|
552 | AS_DASH_C_FLAG='-c' |
---|
553 | DLL_PREFIX=lib |
---|
554 | LIB_PREFIX=lib |
---|
555 | DLL_SUFFIX=.so |
---|
556 | OBJ_SUFFIX=o |
---|
557 | LIB_SUFFIX=a |
---|
558 | ASM_SUFFIX=s |
---|
559 | IMPORT_LIB_SUFFIX= |
---|
560 | TARGET_MD_ARCH=unix |
---|
561 | DIRENT_INO=d_ino |
---|
562 | CYGWIN_WRAPPER= |
---|
563 | MOZ_USER_DIR=".mozilla" |
---|
564 | MOZ_APP_NAME=mozilla |
---|
565 | MOZ_APP_DISPLAYNAME=Mozilla |
---|
566 | |
---|
567 | MOZ_JPEG_CFLAGS= |
---|
568 | MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg' |
---|
569 | MOZ_ZLIB_CFLAGS= |
---|
570 | MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz' |
---|
571 | MOZ_PNG_CFLAGS= |
---|
572 | MOZ_PNG_LIBS='-L$(DIST)/lib -lmozpng' |
---|
573 | |
---|
574 | MOZ_JS_LIBS='-L$(DIST)/bin -lmozjs' |
---|
575 | XPCOM_LIBS='-L$(DIST)/bin -lxpcom' |
---|
576 | |
---|
577 | MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)' |
---|
578 | MOZ_COMPONENT_XPCOM_LIBS='$(XPCOM_LIBS)' |
---|
579 | MOZ_XPCOM_OBSOLETE_LIBS='-L$(DIST)/lib -lxpcom_compat' |
---|
580 | |
---|
581 | USE_DEPENDENT_LIBS=1 |
---|
582 | |
---|
583 | USE_GSSAPI=1 |
---|
584 | |
---|
585 | _PLATFORM_DEFAULT_TOOLKIT=gtk |
---|
586 | MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)' |
---|
587 | MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)' |
---|
588 | WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' |
---|
589 | GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' |
---|
590 | |
---|
591 | MOZ_ENABLE_POSTSCRIPT=1 |
---|
592 | |
---|
593 | if test -n "$CROSS_COMPILE"; then |
---|
594 | OS_TARGET="${target_os}" |
---|
595 | OS_ARCH=`echo $target_os | sed -e 's|/|_|g'` |
---|
596 | OS_RELEASE= |
---|
597 | OS_TEST="${target_cpu}" |
---|
598 | case "${target_os}" in |
---|
599 | linux*) OS_ARCH=Linux ;; |
---|
600 | solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; |
---|
601 | mingw*) OS_ARCH=WINNT ;; |
---|
602 | esac |
---|
603 | else |
---|
604 | OS_TARGET=`uname -s` |
---|
605 | OS_ARCH=`uname -s | sed -e 's|/|_|g'` |
---|
606 | OS_RELEASE=`uname -r` |
---|
607 | OS_TEST=`uname -m` |
---|
608 | fi |
---|
609 | _COMPILER_PREFIX= |
---|
610 | |
---|
611 | ####################################################################### |
---|
612 | # Master "Core Components" macros for getting the OS target # |
---|
613 | ####################################################################### |
---|
614 | |
---|
615 | # |
---|
616 | # Note: OS_TARGET should be specified on the command line for gmake. |
---|
617 | # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built. |
---|
618 | # The difference between the Win95 target and the WinNT target is that |
---|
619 | # the WinNT target uses Windows NT specific features not available |
---|
620 | # in Windows 95. The Win95 target will run on Windows NT, but (supposedly) |
---|
621 | # at lesser performance (the Win95 target uses threads; the WinNT target |
---|
622 | # uses fibers). |
---|
623 | # |
---|
624 | # When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target |
---|
625 | # is built. See: win16_3.11.mk for lots more about the Win16 target. |
---|
626 | # |
---|
627 | # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no |
---|
628 | # cross-compilation. |
---|
629 | # |
---|
630 | |
---|
631 | # |
---|
632 | # The following hack allows one to build on a WIN95 machine (as if |
---|
633 | # s/he were cross-compiling on a WINNT host for a WIN95 target). |
---|
634 | # It also accomodates for MKS's uname.exe. If you never intend |
---|
635 | # to do development on a WIN95 machine, you don't need this hack. |
---|
636 | # |
---|
637 | if test "$OS_ARCH" = "WIN95"; then |
---|
638 | OS_ARCH=WINNT |
---|
639 | OS_TARGET=WIN95 |
---|
640 | elif test "$OS_ARCH" = 'Windows_95'; then |
---|
641 | OS_ARCH=Windows_NT |
---|
642 | OS_TARGET=WIN95 |
---|
643 | elif test "$OS_ARCH" = 'Windows_98'; then |
---|
644 | OS_ARCH=Windows_NT |
---|
645 | OS_TARGET=WIN95 |
---|
646 | elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then |
---|
647 | OS_ARCH='CYGWIN_NT-4.0' |
---|
648 | OS_TARGET=WIN95 |
---|
649 | elif test "$OS_ARCH" = "OS_2"; then |
---|
650 | OS_ARCH=OS2 |
---|
651 | OS_TARGET=OS2 |
---|
652 | fi |
---|
653 | |
---|
654 | # |
---|
655 | # On WIN32, we also define the variable CPU_ARCH. |
---|
656 | # |
---|
657 | |
---|
658 | if test "$OS_ARCH" = "WINNT"; then |
---|
659 | CPU_ARCH=`uname -p` |
---|
660 | if test "$CPU_ARCH" = "I386"; then |
---|
661 | CPU_ARCH=x86 |
---|
662 | fi |
---|
663 | elif test "$OS_ARCH" = "Windows_NT"; then |
---|
664 | # |
---|
665 | # If uname -s returns "Windows_NT", we assume that we are using |
---|
666 | # the uname.exe in MKS toolkit. |
---|
667 | # |
---|
668 | # The -r option of MKS uname only returns the major version number. |
---|
669 | # So we need to use its -v option to get the minor version number. |
---|
670 | # Moreover, it doesn't have the -p option, so we need to use uname -m. |
---|
671 | # |
---|
672 | OS_ARCH=WINNT |
---|
673 | OS_TARGET=WINNT |
---|
674 | OS_MINOR_RELEASE=`uname -v` |
---|
675 | if test "$OS_MINOR_RELEASE" = "00"; then |
---|
676 | OS_MINOR_RELEASE=0 |
---|
677 | fi |
---|
678 | OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}" |
---|
679 | CPU_ARCH=`uname -m` |
---|
680 | # |
---|
681 | # MKS's uname -m returns "586" on a Pentium machine. |
---|
682 | # |
---|
683 | if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then |
---|
684 | CPU_ARCH=x86 |
---|
685 | fi |
---|
686 | elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then |
---|
687 | # |
---|
688 | # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using |
---|
689 | # the uname.exe in the Cygwin tools. |
---|
690 | # |
---|
691 | OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'` |
---|
692 | OS_ARCH=WINNT |
---|
693 | OS_TARGET=WINNT |
---|
694 | CPU_ARCH=`uname -m` |
---|
695 | # |
---|
696 | # Cygwin's uname -m returns "i686" on a Pentium Pro machine. |
---|
697 | # |
---|
698 | if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then |
---|
699 | CPU_ARCH=x86 |
---|
700 | fi |
---|
701 | elif test "$OS_ARCH" = "CYGWIN32_NT"; then |
---|
702 | # |
---|
703 | # Prior to the Beta 20 release, Cygwin was called GNU-Win32. |
---|
704 | # If uname -s returns "CYGWIN32/NT", we assume that we are using |
---|
705 | # the uname.exe in the GNU-Win32 tools. |
---|
706 | # |
---|
707 | OS_ARCH=WINNT |
---|
708 | OS_TARGET=WINNT |
---|
709 | CPU_ARCH=`uname -m` |
---|
710 | # |
---|
711 | # GNU-Win32's uname -m returns "i686" on a Pentium Pro machine. |
---|
712 | # |
---|
713 | if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then |
---|
714 | CPU_ARCH=x86 |
---|
715 | fi |
---|
716 | fi |
---|
717 | |
---|
718 | if test -z "$OS_TARGET"; then |
---|
719 | OS_TARGET=$OS_ARCH |
---|
720 | fi |
---|
721 | if test "$OS_TARGET" = "WIN95"; then |
---|
722 | OS_RELEASE="4.0" |
---|
723 | fi |
---|
724 | if test "$OS_TARGET" = "WIN16"; then |
---|
725 | OS_RELEASE= |
---|
726 | fi |
---|
727 | OS_CONFIG="${OS_TARGET}${OS_RELEASE}" |
---|
728 | |
---|
729 | dnl ======================================================== |
---|
730 | dnl GNU specific defaults |
---|
731 | dnl ======================================================== |
---|
732 | if test "$GNU_CC"; then |
---|
733 | MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
---|
734 | MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
---|
735 | DSO_LDOPTS='-shared -Wl,-h -Wl,$@' |
---|
736 | DSO_CFLAGS='' |
---|
737 | DSO_PIC_CFLAGS='-fPIC' |
---|
738 | _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti |
---|
739 | _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti |
---|
740 | _MOZ_EXCEPTIONS_FLAGS_ON='-fhandle-exceptions' |
---|
741 | _MOZ_EXCEPTIONS_FLAGS_OFF='-fno-handle-exceptions' |
---|
742 | |
---|
743 | # Turn on GNU specific features |
---|
744 | # -Wall - turn on all warnings |
---|
745 | # -pedantic - make compiler warn about non-ANSI stuff, and |
---|
746 | # be a little bit stricter |
---|
747 | # Warnings slamm took out for now (these were giving more noise than help): |
---|
748 | # -Wbad-function-cast - warns when casting a function to a new return type |
---|
749 | # -Wconversion - complained when char's or short's were used a function args |
---|
750 | # -Wshadow - removed because it generates more noise than help --pete |
---|
751 | _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith -Wcast-align" |
---|
752 | |
---|
753 | dnl Turn pedantic on but disable the warnings for long long |
---|
754 | _PEDANTIC=1 |
---|
755 | _IGNORE_LONG_LONG_WARNINGS=1 |
---|
756 | |
---|
757 | _DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT' |
---|
758 | _USE_CPP_INCLUDE_FLAG=1 |
---|
759 | else |
---|
760 | MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' |
---|
761 | MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@' |
---|
762 | DSO_LDOPTS='-shared -h $@' |
---|
763 | DSO_CFLAGS='' |
---|
764 | DSO_PIC_CFLAGS='-KPIC' |
---|
765 | _DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
---|
766 | fi |
---|
767 | |
---|
768 | if test "$GNU_CXX"; then |
---|
769 | # Turn on GNU specific features |
---|
770 | _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" |
---|
771 | |
---|
772 | _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/mozilla-config.h' |
---|
773 | _USE_CPP_INCLUDE_FLAG=1 |
---|
774 | else |
---|
775 | _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_MOZILLA_CONFIG_H_ $(ACDEFINES)' |
---|
776 | fi |
---|
777 | |
---|
778 | dnl gcc can come with its own linker so it is better to use the pass-thru calls |
---|
779 | dnl MKSHLIB_FORCE_ALL is used to force the linker to include all object |
---|
780 | dnl files present in an archive. MKSHLIB_UNFORCE_ALL reverts the linker to |
---|
781 | dnl normal behavior. |
---|
782 | dnl ======================================================== |
---|
783 | MKSHLIB_FORCE_ALL= |
---|
784 | MKSHLIB_UNFORCE_ALL= |
---|
785 | if test "$GNU_CC"; then |
---|
786 | AC_MSG_CHECKING(whether ld has archive extraction flags) |
---|
787 | AC_CACHE_VAL(ac_cv_mkshlib_force_and_unforce, |
---|
788 | [_SAVE_LDFLAGS=$LDFLAGS; _SAVE_LIBS=$LIBS |
---|
789 | ac_cv_mkshlib_force_and_unforce="no" |
---|
790 | exec 3<&0 <<LOOP_INPUT |
---|
791 | force="-Wl,--whole-archive"; unforce="-Wl,--no-whole-archive" |
---|
792 | force="-Wl,-z -Wl,allextract"; unforce="-Wl,-z -Wl,defaultextract" |
---|
793 | force="-Wl,-all"; unforce="-Wl,-none" |
---|
794 | LOOP_INPUT |
---|
795 | while read line |
---|
796 | do |
---|
797 | eval $line |
---|
798 | LDFLAGS=$force |
---|
799 | LIBS=$unforce |
---|
800 | AC_TRY_LINK(,, ac_cv_mkshlib_force_and_unforce=$line; break) |
---|
801 | done |
---|
802 | exec 0<&3 3<&- |
---|
803 | LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS |
---|
804 | ]) |
---|
805 | if test "$ac_cv_mkshlib_force_and_unforce" = "no"; then |
---|
806 | AC_MSG_RESULT(no) |
---|
807 | else |
---|
808 | AC_MSG_RESULT(yes) |
---|
809 | eval $ac_cv_mkshlib_force_and_unforce |
---|
810 | MKSHLIB_FORCE_ALL=$force |
---|
811 | MKSHLIB_UNFORCE_ALL=$unforce |
---|
812 | fi |
---|
813 | fi |
---|
814 | |
---|
815 | dnl ======================================================== |
---|
816 | dnl Checking for 64-bit OS |
---|
817 | dnl ======================================================== |
---|
818 | AC_LANG_SAVE |
---|
819 | AC_LANG_C |
---|
820 | AC_MSG_CHECKING(for 64-bit OS) |
---|
821 | AC_TRY_RUN([ int main () { |
---|
822 | if (sizeof(long) == 8) { return 0; } return 1; } ], |
---|
823 | result="yes", result="no", result="maybe" ) |
---|
824 | AC_MSG_RESULT("$result") |
---|
825 | if test "$result" = "yes"; then |
---|
826 | AC_DEFINE(HAVE_64BIT_OS) |
---|
827 | HAVE_64BIT_OS=1 |
---|
828 | fi |
---|
829 | AC_SUBST(HAVE_64BIT_OS) |
---|
830 | |
---|
831 | if test "$HAVE_64BIT_OS"; then |
---|
832 | case "$target_os" in |
---|
833 | solaris*) TARGET_NSPR_MDCPUCFG='\"md/_solaris64.cfg\"' ;; |
---|
834 | esac |
---|
835 | fi |
---|
836 | AC_LANG_RESTORE |
---|
837 | |
---|
838 | dnl ======================================================== |
---|
839 | dnl System overrides of the defaults for host |
---|
840 | dnl ======================================================== |
---|
841 | case "$host" in |
---|
842 | *-beos*) |
---|
843 | HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE -DNO_X11" |
---|
844 | HOST_NSPR_MDCPUCFG='\"md/_beos.cfg\"' |
---|
845 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" |
---|
846 | ;; |
---|
847 | |
---|
848 | *cygwin*|*mingw*|*mks*|*msvc*) |
---|
849 | if test -n "$_WIN32_MSVC"; then |
---|
850 | HOST_CFLAGS="$HOST_CFLAGS -TC -nologo" |
---|
851 | else |
---|
852 | HOST_CFLAGS="$HOST_CFLAGS -mno-cygwin" |
---|
853 | fi |
---|
854 | HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11" |
---|
855 | HOST_NSPR_MDCPUCFG='\"md/_winnt.cfg\"' |
---|
856 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" |
---|
857 | HOST_BIN_SUFFIX=.exe |
---|
858 | CYGWIN_WRAPPER="${srcdir}/build/cygwin-wrapper" |
---|
859 | if test "`echo ${srcdir} | grep -c ^/ 2>/dev/null`" = 0; then |
---|
860 | _pwd=`pwd` |
---|
861 | CYGWIN_WRAPPER="${_pwd}/${srcdir}/build/cygwin-wrapper" |
---|
862 | fi |
---|
863 | if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then |
---|
864 | _AS_PERL=1 |
---|
865 | PERL="${CYGWIN_WRAPPER} $PERL" |
---|
866 | fi |
---|
867 | ;; |
---|
868 | |
---|
869 | *-darwin*) |
---|
870 | HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" |
---|
871 | HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' |
---|
872 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" |
---|
873 | ;; |
---|
874 | |
---|
875 | *-linux*) |
---|
876 | HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" |
---|
877 | HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' |
---|
878 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" |
---|
879 | ;; |
---|
880 | |
---|
881 | *os2*) |
---|
882 | HOST_CFLAGS="$HOST_CFLAGS -DXP_OS2 -DNO_X11" |
---|
883 | HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"' |
---|
884 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" |
---|
885 | HOST_BIN_SUFFIX=.exe |
---|
886 | ;; |
---|
887 | |
---|
888 | *-osf*) |
---|
889 | HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" |
---|
890 | HOST_NSPR_MDCPUCFG='\"md/_osf1.cfg\"' |
---|
891 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" |
---|
892 | ;; |
---|
893 | |
---|
894 | *) |
---|
895 | HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" |
---|
896 | HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" |
---|
897 | ;; |
---|
898 | esac |
---|
899 | |
---|
900 | dnl Get mozilla version from central milestone file |
---|
901 | MOZILLA_VERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir` |
---|
902 | AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION") |
---|
903 | MOZ_APP_VERSION=$MOZILLA_VERSION |
---|
904 | |
---|
905 | dnl ======================================================== |
---|
906 | dnl System overrides of the defaults for target |
---|
907 | dnl ======================================================== |
---|
908 | case "$target" in |
---|
909 | *-aix*) |
---|
910 | AC_DEFINE(AIX) |
---|
911 | if test ! "$GNU_CC"; then |
---|
912 | if test ! "$HAVE_64BIT_OS"; then |
---|
913 | # Compiling with Visual Age C++ object model compat is the |
---|
914 | # default. To compile with object model ibm, add |
---|
915 | # AIX_OBJMODEL=ibm to .mozconfig. |
---|
916 | if test "$AIX_OBJMODEL" = "ibm"; then |
---|
917 | CXXFLAGS="$CXXFLAGS -qobjmodel=ibm" |
---|
918 | else |
---|
919 | AIX_OBJMODEL=compat |
---|
920 | fi |
---|
921 | else |
---|
922 | AIX_OBJMODEL=compat |
---|
923 | fi |
---|
924 | AC_SUBST(AIX_OBJMODEL) |
---|
925 | DSO_LDOPTS='-qmkshrobj=1' |
---|
926 | DSO_CFLAGS='-qflag=w:w' |
---|
927 | DSO_PIC_CFLAGS= |
---|
928 | LDFLAGS="$LDFLAGS -Wl,-brtl -blibpath:/usr/lib:/lib" |
---|
929 | MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' |
---|
930 | MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' |
---|
931 | AC_LANG_SAVE |
---|
932 | AC_LANG_CPLUSPLUS |
---|
933 | AC_MSG_CHECKING([for VisualAge C++ compiler version >= 5.0.2.0]) |
---|
934 | AC_TRY_COMPILE([], |
---|
935 | [#if (__IBMCPP__ < 502) |
---|
936 | #error "Bad compiler" |
---|
937 | #endif], |
---|
938 | _BAD_COMPILER=,_BAD_COMPILER=1) |
---|
939 | if test -n "$_BAD_COMPILER"; then |
---|
940 | AC_MSG_RESULT([no]) |
---|
941 | AC_MSG_ERROR([VisualAge C++ version 5.0.2.0 or higher is required to build.]) |
---|
942 | else |
---|
943 | AC_MSG_RESULT([yes]) |
---|
944 | fi |
---|
945 | AC_LANG_RESTORE |
---|
946 | CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'` |
---|
947 | CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'` |
---|
948 | fi |
---|
949 | case "${target_os}" in |
---|
950 | aix4.1*) |
---|
951 | DLL_SUFFIX='_shr.a' |
---|
952 | ;; |
---|
953 | esac |
---|
954 | AC_CHECK_HEADERS(sys/inttypes.h) |
---|
955 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
956 | ;; |
---|
957 | |
---|
958 | *-beos*) |
---|
959 | no_x=yes |
---|
960 | MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@' |
---|
961 | _PLATFORM_DEFAULT_TOOLKIT="beos" |
---|
962 | DSO_LDOPTS='-nostart -Wl,-h -Wl,$@' |
---|
963 | TK_LIBS='-lbe -lroot' |
---|
964 | LIBS="$LIBS -lbe" |
---|
965 | AC_CHECK_LIB(bind,main,LIBS="$LIBS -lbind") |
---|
966 | _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar" |
---|
967 | _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar" |
---|
968 | _MOZ_USE_RTTI=1 |
---|
969 | USE_DEPENDENT_LIBS= |
---|
970 | MOZ_USER_DIR="Mozilla" |
---|
971 | ;; |
---|
972 | |
---|
973 | *-bsdi*) |
---|
974 | dnl -pedantic doesn't play well with BSDI's _very_ modified gcc (shlicc2) |
---|
975 | _PEDANTIC= |
---|
976 | _IGNORE_LONG_LONG_WARNINGS= |
---|
977 | case $OS_RELEASE in |
---|
978 | 4.*|5.*) |
---|
979 | STRIP="$STRIP -d" |
---|
980 | ;; |
---|
981 | *) |
---|
982 | DSO_CFLAGS='' |
---|
983 | DSO_LDOPTS='-r' |
---|
984 | _WARNINGS_CFLAGS="-Wall" |
---|
985 | _WARNINGS_CXXFLAGS="-Wall" |
---|
986 | # The test above doesn't work properly, at least on 3.1. |
---|
987 | MKSHLIB_FORCE_ALL='' |
---|
988 | MKSHLIB_UNFORCE_ALL='' |
---|
989 | ;; |
---|
990 | esac |
---|
991 | ;; |
---|
992 | |
---|
993 | *-darwin*) |
---|
994 | _PEDANTIC= |
---|
995 | CFLAGS="$CFLAGS -fpascal-strings -no-cpp-precomp -fno-common" |
---|
996 | CXXFLAGS="$CXXFLAGS -fpascal-strings -no-cpp-precomp -fno-common" |
---|
997 | DLL_SUFFIX=".dylib" |
---|
998 | DSO_LDOPTS='' |
---|
999 | STRIP="$STRIP -x -S" |
---|
1000 | case "${target_cpu}" in |
---|
1001 | powerpc*) |
---|
1002 | _PLATFORM_DEFAULT_TOOLKIT='mac' |
---|
1003 | DSO_LDOPTS="$DSO_LDOPTS -arch ppc" |
---|
1004 | MOZ_ENABLE_POSTSCRIPT= |
---|
1005 | # set MACOSX to generate lib/mac/MoreFiles/Makefile |
---|
1006 | MACOSX=1 |
---|
1007 | ;; |
---|
1008 | esac |
---|
1009 | ;; |
---|
1010 | |
---|
1011 | *-freebsd*) |
---|
1012 | if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` != "elf"; then |
---|
1013 | DLL_SUFFIX=".so.1.0" |
---|
1014 | DSO_LDOPTS="-shared" |
---|
1015 | fi |
---|
1016 | if test ! "$GNU_CC"; then |
---|
1017 | DSO_LDOPTS="-Bshareable $DSO_LDOPTS" |
---|
1018 | fi |
---|
1019 | # Can't have force w/o an unforce. |
---|
1020 | # # Hack for FreeBSD 2.2 |
---|
1021 | # if test -z "$MKSHLIB_FORCE_ALL"; then |
---|
1022 | # MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive' |
---|
1023 | # MKSHLIB_UNFORCE_ALL='' |
---|
1024 | # fi |
---|
1025 | ;; |
---|
1026 | |
---|
1027 | *-hpux*) |
---|
1028 | DLL_SUFFIX=".sl" |
---|
1029 | if test ! "$GNU_CC"; then |
---|
1030 | DSO_LDOPTS='-b -Wl,+s -L$(DIST)/bin' |
---|
1031 | DSO_CFLAGS="" |
---|
1032 | DSO_PIC_CFLAGS="+Z" |
---|
1033 | MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@' |
---|
1034 | MKCSHLIB='$(LD) -b +s -L$(DIST)/bin -o $@' |
---|
1035 | CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on" |
---|
1036 | else |
---|
1037 | DSO_LDOPTS='-b -E +s -L$(DIST)/bin -L$(DIST)/lib' |
---|
1038 | MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' |
---|
1039 | MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@' |
---|
1040 | fi |
---|
1041 | MOZ_POST_PROGRAM_COMMAND='chatr +s enable' |
---|
1042 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1043 | ;; |
---|
1044 | |
---|
1045 | *-irix5*) |
---|
1046 | AC_DEFINE(IRIX) |
---|
1047 | DSO_LDOPTS='-elf -shared' |
---|
1048 | if test "$GNU_CC"; then |
---|
1049 | MKSHLIB_FORCE_ALL='-Wl,-all' |
---|
1050 | MKSHLIB_UNFORCE_ALL='-Wl,-none' |
---|
1051 | CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS" |
---|
1052 | else |
---|
1053 | MKSHLIB_FORCE_ALL='-all' |
---|
1054 | MKSHLIB_UNFORCE_ALL='-none' |
---|
1055 | fi |
---|
1056 | ;; |
---|
1057 | |
---|
1058 | *-irix6*) |
---|
1059 | AC_DEFINE(IRIX) |
---|
1060 | dnl the irix specific xptcinvoke code is written against the n32 ABI so we *must* |
---|
1061 | dnl compile and link using -n32 |
---|
1062 | USE_N32=1 |
---|
1063 | DSO_LDOPTS='-elf -shared' |
---|
1064 | MKSHLIB='$(CCC) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
---|
1065 | MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
---|
1066 | _MOZ_EXCEPTIONS_FLAGS_OFF="-LANG:exceptions=OFF" |
---|
1067 | _MOZ_EXCEPTIONS_FLAGS_ON="-LANG:exceptions=ON" |
---|
1068 | if test "$GNU_CC"; then |
---|
1069 | MKSHLIB_FORCE_ALL='-Wl,-all' |
---|
1070 | MKSHLIB_UNFORCE_ALL='-Wl,-none' |
---|
1071 | _WARNINGS_CFLAGS="-Wall" |
---|
1072 | _WARNINGS_CXXFLAGS="-Wall" |
---|
1073 | CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS" |
---|
1074 | else |
---|
1075 | MKSHLIB_FORCE_ALL='-all' |
---|
1076 | MKSHLIB_UNFORCE_ALL='-none' |
---|
1077 | AR_LIST="$AR t" |
---|
1078 | AR_EXTRACT="$AR x" |
---|
1079 | AR_DELETE="$AR d" |
---|
1080 | AR='$(CXX) -ar' |
---|
1081 | AR_FLAGS='-o $@' |
---|
1082 | CFLAGS="$CFLAGS -woff 3262 -G 4" |
---|
1083 | CXXFLAGS="$CXXFLAGS -woff 3262 -G 4" |
---|
1084 | if test -n "$USE_N32"; then |
---|
1085 | ASFLAGS="$ASFLAGS -n32" |
---|
1086 | CFLAGS="$CFLAGS -n32" |
---|
1087 | CXXFLAGS="$CXXFLAGS -n32" |
---|
1088 | LDFLAGS="$LDFLAGS -n32" |
---|
1089 | fi |
---|
1090 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1091 | fi |
---|
1092 | if test -z "$GNU_CXX"; then |
---|
1093 | MIPSPRO_CXX=1 |
---|
1094 | fi |
---|
1095 | ;; |
---|
1096 | |
---|
1097 | *-*linux*) |
---|
1098 | TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' |
---|
1099 | MOZ_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, |
---|
1100 | # and that combo is not yet good at |
---|
1101 | # debugging inlined functions (even |
---|
1102 | # when using DWARF2 as the debugging |
---|
1103 | # format) |
---|
1104 | |
---|
1105 | case "${target_cpu}" in |
---|
1106 | alpha*) |
---|
1107 | CFLAGS="$CFLAGS -mieee" |
---|
1108 | CXXFLAGS="$CXXFLAGS -mieee" |
---|
1109 | ;; |
---|
1110 | i*86) |
---|
1111 | USE_ELF_DYNSTR_GC=1 |
---|
1112 | MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1 |
---|
1113 | ;; |
---|
1114 | mips*) |
---|
1115 | CFLAGS="$CFLAGS -Wa,-xgot" |
---|
1116 | CXXFLAGS="$CXXFLAGS -Wa,-xgot" |
---|
1117 | ;; |
---|
1118 | esac |
---|
1119 | ;; |
---|
1120 | |
---|
1121 | *-mingw*|*-cygwin*|*-msvc*|*-mks*) |
---|
1122 | DSO_CFLAGS= |
---|
1123 | DSO_PIC_CFLAGS= |
---|
1124 | DLL_SUFFIX=.dll |
---|
1125 | RC=rc.exe |
---|
1126 | # certain versions of cygwin's makedepend barf on the |
---|
1127 | # #include <string> vs -I./dist/include/string issue so don't use it |
---|
1128 | SYSTEM_MAKEDEPEND= |
---|
1129 | if test -n "$GNU_CC"; then |
---|
1130 | CC="$CC -mno-cygwin" |
---|
1131 | CXX="$CXX -mno-cygwin" |
---|
1132 | CPP="$CPP -mno-cygwin" |
---|
1133 | CFLAGS="$CFLAGS -mms-bitfields" |
---|
1134 | CXXFLAGS="$CXXFLAGS -mms-bitfields" |
---|
1135 | DSO_LDOPTS='-shared' |
---|
1136 | MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' |
---|
1137 | MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' |
---|
1138 | RC='$(WINDRES)' |
---|
1139 | # Use temp file for windres (bug 213281) |
---|
1140 | RCFLAGS='-O coff --use-temp-file' |
---|
1141 | MOZ_JPEG_LIBS='-L$(DIST)/lib -ljpeg$(MOZ_BITS)$(VERSION_NUMBER)' |
---|
1142 | MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz' |
---|
1143 | MOZ_PNG_LIBS='-L$(DIST)/lib -lpng' |
---|
1144 | MOZ_JS_LIBS='-L$(DIST)/lib -ljs$(MOZ_BITS)$(VERSION_NUMBER)' |
---|
1145 | XPCOM_LIBS='-L$(DIST)/lib -lxpcom' |
---|
1146 | DLL_PREFIX= |
---|
1147 | IMPORT_LIB_SUFFIX=dll.a |
---|
1148 | else |
---|
1149 | HOST_CC='$(CC)' |
---|
1150 | HOST_CXX='$(CXX)' |
---|
1151 | HOST_LD='$(LD)' |
---|
1152 | AR='lib -NOLOGO -OUT:"$@"' |
---|
1153 | AR_FLAGS= |
---|
1154 | RANLIB='echo not_ranlib' |
---|
1155 | STRIP='echo not_strip' |
---|
1156 | XARGS=xargs |
---|
1157 | ZIP=zip |
---|
1158 | UNZIP=unzip |
---|
1159 | DOXYGEN=: |
---|
1160 | GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb' |
---|
1161 | OBJ_SUFFIX=obj |
---|
1162 | LIB_SUFFIX=lib |
---|
1163 | DLL_PREFIX= |
---|
1164 | LIB_PREFIX= |
---|
1165 | IMPORT_LIB_SUFFIX=lib |
---|
1166 | MKSHLIB='$(LD) /NOLOGO /DLL /OUT:$@ /PDB:$(PDBFILE) $(DSO_LDOPTS)' |
---|
1167 | MKCSHLIB='$(LD) /NOLOGO /DLL /OUT:$@ /PDB:$(PDBFILE) $(DSO_LDOPTS)' |
---|
1168 | MKSHLIB_FORCE_ALL= |
---|
1169 | MKSHLIB_UNFORCE_ALL= |
---|
1170 | DSO_LDOPTS=/SUBSYSTEM:WINDOWS |
---|
1171 | CFLAGS="$CFLAGS -W3 -nologo -Gy -Fd\$(PDBFILE)" |
---|
1172 | CXXFLAGS="$CXXFLAGS -W3 -nologo -Gy -Fd\$(PDBFILE)" |
---|
1173 | LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" |
---|
1174 | MOZ_DEBUG_FLAGS='-Zi' |
---|
1175 | MOZ_DEBUG_LDFLAGS='/DEBUG /DEBUGTYPE:CV' |
---|
1176 | MOZ_OPTIMIZE_FLAGS='-O1' |
---|
1177 | MOZ_JPEG_LIBS='$(DIST)/lib/jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib' |
---|
1178 | MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.lib' |
---|
1179 | MOZ_PNG_LIBS='$(DIST)/lib/png.lib' |
---|
1180 | MOZ_JS_LIBS='$(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib' |
---|
1181 | XPCOM_LIBS='$(DIST)/lib/xpcom.lib' |
---|
1182 | MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)' |
---|
1183 | MOZ_COMPONENT_XPCOM_LIBS='$(XPCOM_LIBS)' |
---|
1184 | MOZ_XPCOM_OBSOLETE_LIBS='$(DIST)/lib/xpcom_compat.lib' |
---|
1185 | fi |
---|
1186 | AC_DEFINE(HAVE_SNPRINTF) |
---|
1187 | AC_DEFINE(_WINDOWS) |
---|
1188 | AC_DEFINE(_WIN32) |
---|
1189 | AC_DEFINE(WIN32) |
---|
1190 | AC_DEFINE(XP_WIN) |
---|
1191 | AC_DEFINE(XP_WIN32) |
---|
1192 | AC_DEFINE(HW_THREADS) |
---|
1193 | AC_DEFINE_UNQUOTED(WINVER,0x400) |
---|
1194 | AC_DEFINE(STDC_HEADERS) |
---|
1195 | AC_DEFINE(NEW_H, <new>) |
---|
1196 | AC_DEFINE(WIN32_LEAN_AND_MEAN) |
---|
1197 | TARGET_MD_ARCH=win32 |
---|
1198 | _PLATFORM_DEFAULT_TOOLKIT='windows' |
---|
1199 | BIN_SUFFIX='.exe' |
---|
1200 | USE_SHORT_LIBNAME=1 |
---|
1201 | MOZ_ENABLE_COREXFONTS= |
---|
1202 | MOZ_ENABLE_POSTSCRIPT= |
---|
1203 | MOZ_USER_DIR="Mozilla" |
---|
1204 | |
---|
1205 | dnl Do not perform checks for GSSAPI. We're going to use SSPI instead. |
---|
1206 | USE_GSSAPI= |
---|
1207 | |
---|
1208 | dnl Hardcode to win95 for now - cls |
---|
1209 | TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"' |
---|
1210 | dnl set NO_X11 defines here as the general check is skipped on win32 |
---|
1211 | no_x=yes |
---|
1212 | AC_DEFINE(NO_X11) |
---|
1213 | |
---|
1214 | case "$host" in |
---|
1215 | *-mingw*|*-cygwin*|*-msvc*|*-mks*) |
---|
1216 | |
---|
1217 | dnl Remove cygwinism from MOZ_BUILD_ROOT |
---|
1218 | MOZ_BUILD_ROOT=`cygpath -w $MOZ_BUILD_ROOT | sed -e 's|\\\\|/|g'` |
---|
1219 | |
---|
1220 | if test -z "$MOZ_TOOLS"; then |
---|
1221 | AC_MSG_ERROR([MOZ_TOOLS is not set]) |
---|
1222 | fi |
---|
1223 | |
---|
1224 | MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd` |
---|
1225 | if test "$?" != "0" || test -z "$MOZ_TOOLS_DIR"; then |
---|
1226 | AC_MSG_ERROR([cd \$MOZ_TOOLS failed. MOZ_TOOLS ==? $MOZ_TOOLS]) |
---|
1227 | fi |
---|
1228 | if test `echo ${PATH}: | grep -ic "$MOZ_TOOLS_DIR/bin:"` = 0; then |
---|
1229 | AC_MSG_ERROR([\$MOZ_TOOLS\\bin must be in your path.]) |
---|
1230 | fi |
---|
1231 | MOZ_TOOLS_DIR=`cygpath -w $MOZ_TOOLS_DIR | sed -e 's|\\\\|/|g'` |
---|
1232 | |
---|
1233 | if test -n "$GLIB_PREFIX"; then |
---|
1234 | _GLIB_PREFIX_DIR=`cd $GLIB_PREFIX && pwd` |
---|
1235 | if test "$?" = "0"; then |
---|
1236 | if test `echo ${PATH}: | grep -ic "$_GLIB_PREFIX_DIR/bin:"` = 0; then |
---|
1237 | AC_MSG_ERROR([GLIB_PREFIX must be in your \$PATH.]) |
---|
1238 | fi |
---|
1239 | _GLIB_PREFIX_DIR=`cygpath -w $_GLIB_PREFIX_DIR | sed -e 's|\\\\|/|g'` |
---|
1240 | else |
---|
1241 | AC_MSG_ERROR([GLIB_PREFIX is set but "${GLIB_PREFIX}" is not a directory.]) |
---|
1242 | fi |
---|
1243 | else |
---|
1244 | _GLIB_PREFIX_DIR=$MOZ_TOOLS_DIR |
---|
1245 | fi |
---|
1246 | if test ! -f "${_GLIB_PREFIX_DIR}/include/glib.h"; then |
---|
1247 | AC_MSG_ERROR([Cannot find $_GLIB_PREFIX_DIR/include/glib.h .]) |
---|
1248 | fi |
---|
1249 | GLIB_CFLAGS="-I${_GLIB_PREFIX_DIR}/include" |
---|
1250 | GLIB_LIBS="${_GLIB_PREFIX_DIR}/lib/glib-1.2.lib" |
---|
1251 | |
---|
1252 | if test -n "$LIBIDL_PREFIX"; then |
---|
1253 | _LIBIDL_PREFIX_DIR=`cd $LIBIDL_PREFIX && pwd` |
---|
1254 | if test "$?" = "0"; then |
---|
1255 | if test `echo ${PATH}: | grep -ic "$_LIBIDL_PREFIX_DIR/bin:"` = 0; then |
---|
1256 | AC_MSG_ERROR([LIBIDL_PREFIX must be in your \$PATH.]) |
---|
1257 | fi |
---|
1258 | _LIBIDL_PREFIX_DIR=`cygpath -w $_LIBIDL_PREFIX_DIR | sed -e 's|\\\\|/|g'` |
---|
1259 | else |
---|
1260 | AC_MSG_ERROR([LIBIDL_PREFIX is set but "${LIBIDL_PREFIX}" is not a directory.]) |
---|
1261 | fi |
---|
1262 | else |
---|
1263 | _LIBIDL_PREFIX_DIR=$MOZ_TOOLS_DIR |
---|
1264 | fi |
---|
1265 | if test ! -f "${_LIBIDL_PREFIX_DIR}/include/libIDL/IDL.h"; then |
---|
1266 | AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/include/libIDL/IDL.h .]) |
---|
1267 | fi |
---|
1268 | LIBIDL_CFLAGS="-I${_LIBIDL_PREFIX_DIR}/include ${GLIB_CFLAGS}" |
---|
1269 | LIBIDL_LIBS="${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6.lib ${_GLIB_PREFIX_DIR}/lib/glib-1.2.lib" |
---|
1270 | ;; |
---|
1271 | *) # else cross-compiling |
---|
1272 | if test -n "$GLIB_PREFIX"; then |
---|
1273 | GLIB_CFLAGS="-I${GLIB_PREFIX}/include" |
---|
1274 | GLIB_LIBS="${GLIB_PREFIX}/lib/glib-1.2.lib" |
---|
1275 | fi |
---|
1276 | if test -n "$LIBIDL_PREFIX"; then |
---|
1277 | LIBIDL_CFLAGS="-I${LIBIDL_PREFIX}/include ${GLIB_CFLAGS}" |
---|
1278 | LIBIDL_LIBS="${LIBIDL_PREFIX}/lib/libIDL-0.6.lib ${GLIB_LIBS}" |
---|
1279 | fi |
---|
1280 | ;; |
---|
1281 | esac |
---|
1282 | |
---|
1283 | case "$target" in |
---|
1284 | i*86-*) |
---|
1285 | AC_DEFINE(_X86_) |
---|
1286 | ;; |
---|
1287 | alpha-*) |
---|
1288 | AC_DEFINE(_ALPHA_) |
---|
1289 | ;; |
---|
1290 | mips-*) |
---|
1291 | AC_DEFINE(_MIPS_) |
---|
1292 | ;; |
---|
1293 | *) |
---|
1294 | AC_DEFINE(_CPU_ARCH_NOT_DEFINED) |
---|
1295 | ;; |
---|
1296 | esac |
---|
1297 | ;; |
---|
1298 | |
---|
1299 | *-netbsd*) |
---|
1300 | DSO_CFLAGS='' |
---|
1301 | CFLAGS="$CFLAGS -Dunix" |
---|
1302 | CXXFLAGS="$CXXFLAGS -Dunix" |
---|
1303 | if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then |
---|
1304 | DLL_SUFFIX=".so" |
---|
1305 | DSO_PIC_CFLAGS='-fPIC -DPIC' |
---|
1306 | DSO_LDOPTS='-shared -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX)' |
---|
1307 | BIN_FLAGS='-Wl,--export-dynamic' |
---|
1308 | else |
---|
1309 | DSO_PIC_CFLAGS='-fPIC -DPIC' |
---|
1310 | DLL_SUFFIX=".so.1.0" |
---|
1311 | DSO_LDOPTS='-shared' |
---|
1312 | fi |
---|
1313 | # This will fail on a.out systems prior to 1.5.1_ALPHA. |
---|
1314 | MKSHLIB_FORCE_ALL='-Wl,--whole-archive' |
---|
1315 | MKSHLIB_UNFORCE_ALL='-Wl,--no-whole-archive' |
---|
1316 | if test "$LIBRUNPATH"; then |
---|
1317 | DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" |
---|
1318 | fi |
---|
1319 | ;; |
---|
1320 | |
---|
1321 | *-nto*) |
---|
1322 | AC_DEFINE(NTO) |
---|
1323 | AC_DEFINE(_QNX_SOURCE) |
---|
1324 | AC_DEFINE(_i386) |
---|
1325 | OS_TARGET=NTO |
---|
1326 | MOZ_OPTIMIZE_FLAGS="-O" |
---|
1327 | MOZ_DEBUG_FLAGS="-gstabs" |
---|
1328 | USE_PTHREADS=1 |
---|
1329 | _PEDANTIC= |
---|
1330 | LIBS="$LIBS -lsocket -lstdc++" |
---|
1331 | _DEFINES_CFLAGS='-Wp,-include -Wp,$(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506' |
---|
1332 | _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -Wp,-include -Wp,$(DEPTH)/mozilla-config.h -D_POSIX_C_SOURCE=199506' |
---|
1333 | if test "$with_x" != "yes" |
---|
1334 | then |
---|
1335 | _PLATFORM_DEFAULT_TOOLKIT="photon" |
---|
1336 | TK_CFLAGS='-I/usr/include/photon' |
---|
1337 | TK_LIBS='-lph' |
---|
1338 | fi |
---|
1339 | case "${target_cpu}" in |
---|
1340 | ppc*) |
---|
1341 | AC_DEFINE(HAVE_VA_LIST_AS_ARRAY) |
---|
1342 | ;; |
---|
1343 | esac |
---|
1344 | case "${host_cpu}" in |
---|
1345 | i*86) |
---|
1346 | USE_ELF_DYNSTR_GC=1 |
---|
1347 | ;; |
---|
1348 | esac |
---|
1349 | ;; |
---|
1350 | |
---|
1351 | *-openbsd*) |
---|
1352 | DLL_SUFFIX=".so.1.0" |
---|
1353 | DSO_CFLAGS='' |
---|
1354 | DSO_PIC_CFLAGS='-fPIC' |
---|
1355 | DSO_LDOPTS='-shared -fPIC' |
---|
1356 | if test "$LIBRUNPATH"; then |
---|
1357 | DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" |
---|
1358 | fi |
---|
1359 | ;; |
---|
1360 | |
---|
1361 | *-openvms*) |
---|
1362 | AC_DEFINE(NO_PW_GECOS) |
---|
1363 | AC_DEFINE(NO_UDSOCK) |
---|
1364 | AC_DEFINE(POLL_WITH_XCONNECTIONNUMBER) |
---|
1365 | USE_PTHREADS=1 |
---|
1366 | MKSHLIB_FORCE_ALL='-all' |
---|
1367 | MKSHLIB_UNFORCE_ALL='-none' |
---|
1368 | AS='as' |
---|
1369 | AS_DASH_C_FLAG='-Wc/names=as_is' |
---|
1370 | AR_FLAGS='c $@' |
---|
1371 | DSO_LDOPTS='-shared -auto_symvec' |
---|
1372 | DSO_PIC_CFLAGS= |
---|
1373 | MOZ_DEBUG_LDFLAGS='-g' |
---|
1374 | COMPAQ_CXX=1 |
---|
1375 | CC_VERSION=`$CC -V 2>&1 | awk '/ C / { print $3 }'` |
---|
1376 | CXX_VERSION=`$CXX -V 2>&1 | awk '/ C\+\+ / { print $3 }'` |
---|
1377 | ;; |
---|
1378 | |
---|
1379 | |
---|
1380 | *-os2*) |
---|
1381 | AC_DEFINE(XP_OS2) |
---|
1382 | USE_SHORT_LIBNAME=1 |
---|
1383 | DLL_PREFIX= |
---|
1384 | LIB_PREFIX= |
---|
1385 | LIB_SUFFIX=lib |
---|
1386 | BIN_SUFFIX=".exe" |
---|
1387 | DLL_SUFFIX=".dll" |
---|
1388 | IMPORT_LIB_SUFFIX=lib |
---|
1389 | DSO_PIC_CFLAGS= |
---|
1390 | TARGET_MD_ARCH=os2 |
---|
1391 | _PLATFORM_DEFAULT_TOOLKIT=os2 |
---|
1392 | WIDGET_DLL='\"wdgt$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' |
---|
1393 | GFXWIN_DLL='\"gfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' |
---|
1394 | MOZ_ENABLE_POSTSCRIPT= |
---|
1395 | RC=rc.exe |
---|
1396 | RCFLAGS='-n' |
---|
1397 | MOZ_USER_DIR="Mozilla" |
---|
1398 | |
---|
1399 | if test "$MOZTOOLS"; then |
---|
1400 | MOZ_TOOLS_DIR=`echo $MOZTOOLS | sed -e 's|\\\\|/|g'` |
---|
1401 | else |
---|
1402 | AC_MSG_ERROR([MOZTOOLS is not set]) |
---|
1403 | fi |
---|
1404 | |
---|
1405 | # EMX/GCC build |
---|
1406 | if test -n "$GNU_CC"; then |
---|
1407 | AC_DEFINE(OS2) |
---|
1408 | AC_DEFINE(XP_OS2_EMX) |
---|
1409 | AC_DEFINE(OS2EMX_PLAIN_CHAR) |
---|
1410 | AC_DEFINE(TCPV40HDRS) |
---|
1411 | AR=emxomfar |
---|
1412 | AR_FLAGS='r $@' |
---|
1413 | CFLAGS="$CFLAGS -Zomf" |
---|
1414 | CXXFLAGS="$CXXFLAGS -Zomf" |
---|
1415 | DSO_LDOPTS='-Zdll' |
---|
1416 | BIN_FLAGS='-Zlinker /ST:0x100000' |
---|
1417 | IMPLIB='emximp -o' |
---|
1418 | FILTER='emxexp -o' |
---|
1419 | LDFLAGS='-Zmap' |
---|
1420 | MOZ_DEBUG_FLAGS="-g -fno-inline" |
---|
1421 | MOZ_OPTIMIZE_FLAGS="-O2 -s" |
---|
1422 | MOZ_OPTIMIZE_LDFLAGS="-Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA" |
---|
1423 | MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwdgt$(MOZ_WIDGET_TOOLKIT)' |
---|
1424 | MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT)' |
---|
1425 | MOZ_XPCOM_OBSOLETE_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcomct.lib' |
---|
1426 | |
---|
1427 | # GCC for OS/2 currently predefines these, but we don't want them |
---|
1428 | _DEFINES_CFLAGS="$_DEFINES_CFLAGS -Uunix -U__unix -U__unix__" |
---|
1429 | _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__" |
---|
1430 | |
---|
1431 | # Visual Age C++ build |
---|
1432 | elif test "$VACPP" = "yes"; then |
---|
1433 | MOZ_BUILD_ROOT=`pwd -D` |
---|
1434 | OBJ_SUFFIX=obj |
---|
1435 | AR=-ilib |
---|
1436 | AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)' |
---|
1437 | AR_LIST='/L' |
---|
1438 | AR_EXTRACT='-*' |
---|
1439 | AR_DELETE='-' |
---|
1440 | AS=alp |
---|
1441 | ASFLAGS='-Mb' |
---|
1442 | AS_DASH_C_FLAG='' |
---|
1443 | ASM_SUFFIX=asm |
---|
1444 | LD='-ilink' |
---|
1445 | CFLAGS="/Q /qlibansi /Gm+ /Su4 /Mp /Tl9" |
---|
1446 | CXXFLAGS="/Q /qlibansi /Gm+ /Su4 /Mp /Tl9 /Gx+" |
---|
1447 | MOZ_DEBUG_FLAGS="/Ti+" |
---|
1448 | MOZ_OPTIMIZE_FLAGS="/O+ /Gl+ /G5 /qarch=pentium" |
---|
1449 | LDFLAGS="/NOL /M" |
---|
1450 | MOZ_DEBUG_LDFLAGS="/DE" |
---|
1451 | MOZ_OPTIMIZE_LDFLAGS="/OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA" |
---|
1452 | DSO_LDOPTS='' |
---|
1453 | DSO_PIC_CFLAGS= |
---|
1454 | IMPLIB='implib /NOL /NOI' |
---|
1455 | FILTER='cppfilt -q -B -P' |
---|
1456 | AC_DEFINE(NO_ANSI_KEYWORDS) |
---|
1457 | AC_DEFINE(OS2,4) |
---|
1458 | AC_DEFINE(_X86_) |
---|
1459 | AC_DEFINE(XP_OS2_VACPP) |
---|
1460 | AC_DEFINE(TCPV40HDRS) |
---|
1461 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1462 | AC_DEFINE(STDC_HEADERS) |
---|
1463 | MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)' |
---|
1464 | MKSHLIB='$(LD) $(DSO_LDOPTS)' |
---|
1465 | MKCSHLIB='$(LD) $(DSO_LDOPTS)' |
---|
1466 | MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib' |
---|
1467 | MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib' |
---|
1468 | MOZ_XPCOM_OBSOLETE_LIBS='$(DIST)/lib/xpcomct.lib' |
---|
1469 | XPCOM_LIBS='$(DIST)/lib/xpcom.lib' |
---|
1470 | MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)' |
---|
1471 | MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)' |
---|
1472 | MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)' |
---|
1473 | MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)' |
---|
1474 | MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_WIDGET_TOOLKIT)' |
---|
1475 | fi |
---|
1476 | ;; |
---|
1477 | |
---|
1478 | alpha*-*-osf*) |
---|
1479 | if test "$GNU_CC"; then |
---|
1480 | DSO_LDOPTS='-shared -Wl,-soname -Wl,$@' |
---|
1481 | else |
---|
1482 | MOZ_DEBUG_FLAGS='-g' |
---|
1483 | ASFLAGS='-I$(topsrcdir)/xpcom/reflect/xptcall/public -g' |
---|
1484 | CFLAGS="$CFLAGS -ieee" |
---|
1485 | CXXFLAGS="$CXXFLAGS "'-noexceptions -ieee -ptr $(DIST)/cxx_repository' |
---|
1486 | DSO_LDOPTS='-shared -msym -expect_unresolved \* -soname $@ -update_registry $(DIST)/so_locations' |
---|
1487 | DSO_CFLAGS= |
---|
1488 | DSO_PIC_CFLAGS= |
---|
1489 | MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
---|
1490 | MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
---|
1491 | MKSHLIB_FORCE_ALL='-all' |
---|
1492 | MKSHLIB_UNFORCE_ALL='-none' |
---|
1493 | dnl Might fix the libxpcom.so breakage on this platform as well.... |
---|
1494 | AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) |
---|
1495 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1496 | fi |
---|
1497 | if test -z "$GNU_CXX"; then |
---|
1498 | COMPAQ_CXX=1 |
---|
1499 | fi |
---|
1500 | AC_DEFINE(NEED_USLEEP_PROTOTYPE) |
---|
1501 | ;; |
---|
1502 | |
---|
1503 | *-qnx*) |
---|
1504 | DIRENT_INO=d_stat.st_ino |
---|
1505 | dnl Solves the problems the QNX compiler has with nsCOMPtr.h. |
---|
1506 | AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) |
---|
1507 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1508 | dnl Explicit set STDC_HEADERS to workaround QNX 6.0's failing of std test |
---|
1509 | AC_DEFINE(STDC_HEADERS) |
---|
1510 | if test "$no_x" = "yes"; then |
---|
1511 | _PLATFORM_DEFAULT_TOOLKIT='photon' |
---|
1512 | TK_CFLAGS='-I/usr/nto/include/photon' |
---|
1513 | TK_LIBS='-lphoton -lphrender' |
---|
1514 | fi |
---|
1515 | ;; |
---|
1516 | |
---|
1517 | *-sco*) |
---|
1518 | AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) |
---|
1519 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1520 | CXXFLAGS="$CXXFLAGS -I/usr/include/CC" |
---|
1521 | if test ! "$GNU_CC"; then |
---|
1522 | DSO_LDOPTS='-G -h $@' |
---|
1523 | fi |
---|
1524 | ;; |
---|
1525 | |
---|
1526 | dnl the qsort routine under solaris is faulty |
---|
1527 | *-solaris*) |
---|
1528 | AC_DEFINE(SOLARIS) |
---|
1529 | TARGET_NSPR_MDCPUCFG='\"md/_solaris32.cfg\"' |
---|
1530 | SYSTEM_MAKEDEPEND= |
---|
1531 | if test -z "$GNU_CC"; then |
---|
1532 | NS_USE_NATIVE=1 |
---|
1533 | AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) |
---|
1534 | CFLAGS="$CFLAGS -xstrconst -xbuiltin=%all" |
---|
1535 | CXXFLAGS="$CXXFLAGS -xbuiltin=%all -features=tmplife" |
---|
1536 | LDFLAGS="-xildoff -zlazyload -zcombreloc $LDFLAGS" |
---|
1537 | MOZ_OPTIMIZE_FLAGS="-xO4" |
---|
1538 | MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -o $@' |
---|
1539 | MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -Wl,-z -Wl,muldefs -o $@' |
---|
1540 | MKSHLIB_FORCE_ALL='-Qoption ld -z,allextract' |
---|
1541 | MKSHLIB_UNFORCE_ALL='' |
---|
1542 | DSO_LDOPTS='-G -Qoption ld -z,muldefs -h $@' |
---|
1543 | AR_LIST="$AR t" |
---|
1544 | AR_EXTRACT="$AR x" |
---|
1545 | AR_DELETE="$AR d" |
---|
1546 | AR='$(CXX) -xar' |
---|
1547 | AR_FLAGS='-o $@' |
---|
1548 | AS='/usr/ccs/bin/as' |
---|
1549 | ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0" |
---|
1550 | AS_DASH_C_FLAG='' |
---|
1551 | CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'` |
---|
1552 | CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'` |
---|
1553 | AC_MSG_CHECKING([for Forte compiler version >= WS6U2]) |
---|
1554 | AC_TRY_COMPILE([], |
---|
1555 | [#if (__SUNPRO_C < 0x530) |
---|
1556 | #error "Denied" |
---|
1557 | #endif], |
---|
1558 | _BAD_COMPILER=,_BAD_COMPILER=1) |
---|
1559 | if test -n "$_BAD_COMPILER"; then |
---|
1560 | _res="no" |
---|
1561 | AC_MSG_ERROR([Forte version WS6U2 or higher is required to build. Your compiler version is $CC_VERSION .]) |
---|
1562 | else |
---|
1563 | _res="yes" |
---|
1564 | fi |
---|
1565 | AC_MSG_RESULT([$_res]) |
---|
1566 | else |
---|
1567 | ASFLAGS="$ASFLAGS -fPIC" |
---|
1568 | DSO_LDOPTS='-G -h $@' |
---|
1569 | _WARNINGS_CFLAGS='' |
---|
1570 | _WARNINGS_CXXFLAGS='' |
---|
1571 | if test "$OS_RELEASE" = "5.3"; then |
---|
1572 | AC_DEFINE(MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES) |
---|
1573 | fi |
---|
1574 | fi |
---|
1575 | if test "$OS_RELEASE" = "5.5.1"; then |
---|
1576 | AC_DEFINE(NEED_USLEEP_PROTOTYPE) |
---|
1577 | fi |
---|
1578 | ;; |
---|
1579 | |
---|
1580 | *-sunos*) |
---|
1581 | DSO_LDOPTS='-Bdynamic' |
---|
1582 | MKSHLIB='-$(LD) $(DSO_LDOPTS) -o $@' |
---|
1583 | MKCSHLIB='-$(LD) $(DSO_LDOPTS) -o $@' |
---|
1584 | AC_DEFINE(SUNOS4) |
---|
1585 | AC_DEFINE(SPRINTF_RETURNS_STRING) |
---|
1586 | case "$(target_os)" in |
---|
1587 | sunos4.1*) |
---|
1588 | DLL_SUFFIX='.so.1.0' |
---|
1589 | ;; |
---|
1590 | esac |
---|
1591 | ;; |
---|
1592 | |
---|
1593 | *-sysv4.2uw7*) |
---|
1594 | NSPR_LIBS="-lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION -L/usr/ccs/lib -lcrt" |
---|
1595 | ;; |
---|
1596 | |
---|
1597 | *-os2*) |
---|
1598 | HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"' |
---|
1599 | ;; |
---|
1600 | |
---|
1601 | esac |
---|
1602 | |
---|
1603 | dnl Only one oddball right now (QNX), but this gives us flexibility |
---|
1604 | dnl if any other platforms need to override this in the future. |
---|
1605 | AC_DEFINE_UNQUOTED(D_INO,$DIRENT_INO) |
---|
1606 | |
---|
1607 | dnl ======================================================== |
---|
1608 | dnl Any platform that doesn't have MKSHLIB_FORCE_ALL defined |
---|
1609 | dnl by now will not have any way to link most binaries (tests |
---|
1610 | dnl as well as viewer, apprunner, etc.), because some symbols |
---|
1611 | dnl will be left out of the "composite" .so's by ld as unneeded. |
---|
1612 | dnl So, by defining NO_LD_ARCHIVE_FLAGS for these platforms, |
---|
1613 | dnl they can link in the static libs that provide the missing |
---|
1614 | dnl symbols. |
---|
1615 | dnl ======================================================== |
---|
1616 | NO_LD_ARCHIVE_FLAGS= |
---|
1617 | if test -z "$MKSHLIB_FORCE_ALL" || test -z "$MKSHLIB_UNFORCE_ALL"; then |
---|
1618 | NO_LD_ARCHIVE_FLAGS=1 |
---|
1619 | fi |
---|
1620 | case "$target" in |
---|
1621 | *-os2*) |
---|
1622 | NO_LD_ARCHIVE_FLAGS= |
---|
1623 | ;; |
---|
1624 | *-aix4.3*|*-aix5*) |
---|
1625 | NO_LD_ARCHIVE_FLAGS= |
---|
1626 | ;; |
---|
1627 | *-openvms*) |
---|
1628 | NO_LD_ARCHIVE_FLAGS= |
---|
1629 | ;; |
---|
1630 | *-msvc*|*-mks*|*-mingw*|*-cygwin*) |
---|
1631 | if test -z "$GNU_CC"; then |
---|
1632 | NO_LD_ARCHIVE_FLAGS= |
---|
1633 | fi |
---|
1634 | ;; |
---|
1635 | esac |
---|
1636 | AC_SUBST(NO_LD_ARCHIVE_FLAGS) |
---|
1637 | |
---|
1638 | dnl |
---|
1639 | dnl Indicate that platform requires special thread safe |
---|
1640 | dnl locking when starting up the OJI JVM |
---|
1641 | dnl (see mozilla/modules/oji/src/nsJVMManager.cpp) |
---|
1642 | dnl ======================================================== |
---|
1643 | case "$target" in |
---|
1644 | *-hpux*) |
---|
1645 | AC_DEFINE(MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP) |
---|
1646 | ;; |
---|
1647 | esac |
---|
1648 | |
---|
1649 | dnl ======================================================== |
---|
1650 | dnl = Flags to strip unused symbols from .so components |
---|
1651 | dnl ======================================================== |
---|
1652 | case "$target" in |
---|
1653 | *-linux*) |
---|
1654 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' |
---|
1655 | ;; |
---|
1656 | *-solaris*) |
---|
1657 | if test -z "$GNU_CC"; then |
---|
1658 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-M $(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile' |
---|
1659 | else |
---|
1660 | if test -z "$GCC_USE_GNU_LD"; then |
---|
1661 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-M -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile' |
---|
1662 | else |
---|
1663 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' |
---|
1664 | fi |
---|
1665 | fi |
---|
1666 | ;; |
---|
1667 | *-nto*) |
---|
1668 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' |
---|
1669 | ;; |
---|
1670 | *-darwin*) |
---|
1671 | AC_MSG_CHECKING(for -exported_symbols_list option to ld) |
---|
1672 | AC_CACHE_VAL(ac_cv_exported_symbols_list, |
---|
1673 | [ |
---|
1674 | if $LD -exported_symbols_list | grep "argument missing" >/dev/null; then |
---|
1675 | ac_cv_exported_symbols_list=true |
---|
1676 | else |
---|
1677 | ac_cv_exported_symbols_list=false |
---|
1678 | fi |
---|
1679 | ]) |
---|
1680 | if test "$ac_cv_exported_symbols_list" = true; then |
---|
1681 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list' |
---|
1682 | AC_MSG_RESULT(yes) |
---|
1683 | else |
---|
1684 | AC_MSG_RESULT(no) |
---|
1685 | fi |
---|
1686 | ;; |
---|
1687 | *-cygwin*|*-mingw*|*-mks*|*-msvc) |
---|
1688 | if test -n "$GNU_CC"; then |
---|
1689 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' |
---|
1690 | fi |
---|
1691 | ;; |
---|
1692 | esac |
---|
1693 | |
---|
1694 | if test -z "$SKIP_COMPILER_CHECKS"; then |
---|
1695 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
1696 | dnl ======================================================== |
---|
1697 | AC_LANG_C |
---|
1698 | AC_HEADER_STDC |
---|
1699 | AC_C_CONST |
---|
1700 | AC_TYPE_MODE_T |
---|
1701 | AC_TYPE_OFF_T |
---|
1702 | AC_TYPE_PID_T |
---|
1703 | AC_TYPE_SIZE_T |
---|
1704 | AC_TYPE_UID_T |
---|
1705 | AC_STRUCT_ST_BLKSIZE |
---|
1706 | AC_MSG_CHECKING(for siginfo_t) |
---|
1707 | AC_CACHE_VAL(ac_cv_siginfo_t, |
---|
1708 | [AC_TRY_COMPILE([#define _POSIX_C_SOURCE 199506L |
---|
1709 | #include <signal.h>], |
---|
1710 | [siginfo_t* info;], |
---|
1711 | [ac_cv_siginfo_t=true], |
---|
1712 | [ac_cv_siginfo_t=false])]) |
---|
1713 | if test "$ac_cv_siginfo_t" = true ; then |
---|
1714 | AC_DEFINE(HAVE_SIGINFO_T) |
---|
1715 | AC_MSG_RESULT(yes) |
---|
1716 | else |
---|
1717 | AC_MSG_RESULT(no) |
---|
1718 | fi |
---|
1719 | |
---|
1720 | dnl Visual Age for os/2 also defines size_t and off_t in certain |
---|
1721 | dnl header files. These defines make Visual Age use the mozilla |
---|
1722 | dnl defines types. |
---|
1723 | if test "$VACPP" = "yes"; then |
---|
1724 | AC_DEFINE(__size_t) |
---|
1725 | AC_DEFINE(__off_t) |
---|
1726 | fi |
---|
1727 | |
---|
1728 | dnl Check for int16_t, int32_t, int64_t, int64, uint, uint_t, and uint16_t. |
---|
1729 | dnl ======================================================== |
---|
1730 | AC_MSG_CHECKING(for int16_t) |
---|
1731 | AC_CACHE_VAL(ac_cv_int16_t, |
---|
1732 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1733 | #include <sys/types.h>], |
---|
1734 | [int16_t foo = 0;], |
---|
1735 | [ac_cv_int16_t=true], |
---|
1736 | [ac_cv_int16_t=false])]) |
---|
1737 | if test "$ac_cv_int16_t" = true ; then |
---|
1738 | AC_DEFINE(HAVE_INT16_T) |
---|
1739 | AC_MSG_RESULT(yes) |
---|
1740 | else |
---|
1741 | AC_MSG_RESULT(no) |
---|
1742 | fi |
---|
1743 | AC_MSG_CHECKING(for int32_t) |
---|
1744 | AC_CACHE_VAL(ac_cv_int32_t, |
---|
1745 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1746 | #include <sys/types.h>], |
---|
1747 | [int32_t foo = 0;], |
---|
1748 | [ac_cv_int32_t=true], |
---|
1749 | [ac_cv_int32_t=false])]) |
---|
1750 | if test "$ac_cv_int32_t" = true ; then |
---|
1751 | AC_DEFINE(HAVE_INT32_T) |
---|
1752 | AC_MSG_RESULT(yes) |
---|
1753 | else |
---|
1754 | AC_MSG_RESULT(no) |
---|
1755 | fi |
---|
1756 | AC_MSG_CHECKING(for int64_t) |
---|
1757 | AC_CACHE_VAL(ac_cv_int64_t, |
---|
1758 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1759 | #include <sys/types.h>], |
---|
1760 | [int64_t foo = 0;], |
---|
1761 | [ac_cv_int64_t=true], |
---|
1762 | [ac_cv_int64_t=false])]) |
---|
1763 | if test "$ac_cv_int64_t" = true ; then |
---|
1764 | AC_DEFINE(HAVE_INT64_T) |
---|
1765 | AC_MSG_RESULT(yes) |
---|
1766 | else |
---|
1767 | AC_MSG_RESULT(no) |
---|
1768 | fi |
---|
1769 | AC_MSG_CHECKING(for int64) |
---|
1770 | AC_CACHE_VAL(ac_cv_int64, |
---|
1771 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1772 | #include <sys/types.h>], |
---|
1773 | [int64 foo = 0;], |
---|
1774 | [ac_cv_int64=true], |
---|
1775 | [ac_cv_int64=false])]) |
---|
1776 | if test "$ac_cv_int64" = true ; then |
---|
1777 | AC_DEFINE(HAVE_INT64) |
---|
1778 | AC_MSG_RESULT(yes) |
---|
1779 | else |
---|
1780 | AC_MSG_RESULT(no) |
---|
1781 | fi |
---|
1782 | AC_MSG_CHECKING(for uint) |
---|
1783 | AC_CACHE_VAL(ac_cv_uint, |
---|
1784 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1785 | #include <sys/types.h>], |
---|
1786 | [uint foo = 0;], |
---|
1787 | [ac_cv_uint=true], |
---|
1788 | [ac_cv_uint=false])]) |
---|
1789 | if test "$ac_cv_uint" = true ; then |
---|
1790 | AC_DEFINE(HAVE_UINT) |
---|
1791 | AC_MSG_RESULT(yes) |
---|
1792 | else |
---|
1793 | AC_MSG_RESULT(no) |
---|
1794 | fi |
---|
1795 | AC_MSG_CHECKING(for uint_t) |
---|
1796 | AC_CACHE_VAL(ac_cv_uint_t, |
---|
1797 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1798 | #include <sys/types.h>], |
---|
1799 | [uint_t foo = 0;], |
---|
1800 | [ac_cv_uint_t=true], |
---|
1801 | [ac_cv_uint_t=false])]) |
---|
1802 | if test "$ac_cv_uint_t" = true ; then |
---|
1803 | AC_DEFINE(HAVE_UINT_T) |
---|
1804 | AC_MSG_RESULT(yes) |
---|
1805 | else |
---|
1806 | AC_MSG_RESULT(no) |
---|
1807 | fi |
---|
1808 | AC_MSG_CHECKING(for uint16_t) |
---|
1809 | AC_CACHE_VAL(ac_cv_uint16_t, |
---|
1810 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
1811 | #include <sys/types.h>], |
---|
1812 | [uint16_t foo = 0;], |
---|
1813 | [ac_cv_uint16_t=true], |
---|
1814 | [ac_cv_uint16_t=false])]) |
---|
1815 | if test "$ac_cv_uint16_t" = true ; then |
---|
1816 | AC_DEFINE(HAVE_UINT16_T) |
---|
1817 | AC_MSG_RESULT(yes) |
---|
1818 | else |
---|
1819 | AC_MSG_RESULT(no) |
---|
1820 | fi |
---|
1821 | |
---|
1822 | dnl On the gcc trunk (as of 2001-02-09) _GNU_SOURCE, and thus __USE_GNU, |
---|
1823 | dnl are defined when compiling C++ but not C. Since the result of this |
---|
1824 | dnl test is used only in C++, do it in C++. |
---|
1825 | AC_LANG_CPLUSPLUS |
---|
1826 | |
---|
1827 | AC_MSG_CHECKING(for uname.domainname) |
---|
1828 | AC_CACHE_VAL(ac_cv_have_uname_domainname_field, |
---|
1829 | [AC_TRY_COMPILE([#include <sys/utsname.h>], |
---|
1830 | [ struct utsname *res; char *domain; |
---|
1831 | (void)uname(res); if (res != 0) { domain = res->domainname; } ], |
---|
1832 | [ac_cv_have_uname_domainname_field=true], |
---|
1833 | [ac_cv_have_uname_domainname_field=false])]) |
---|
1834 | |
---|
1835 | if test "$ac_cv_have_uname_domainname_field" = "true"; then |
---|
1836 | AC_DEFINE(HAVE_UNAME_DOMAINNAME_FIELD) |
---|
1837 | AC_MSG_RESULT(yes) |
---|
1838 | else |
---|
1839 | AC_MSG_RESULT(no) |
---|
1840 | fi |
---|
1841 | |
---|
1842 | AC_MSG_CHECKING(for uname.__domainname) |
---|
1843 | AC_CACHE_VAL(ac_cv_have_uname_us_domainname_field, |
---|
1844 | [AC_TRY_COMPILE([#include <sys/utsname.h>], |
---|
1845 | [ struct utsname *res; char *domain; |
---|
1846 | (void)uname(res); if (res != 0) { domain = res->__domainname; } ], |
---|
1847 | [ac_cv_have_uname_us_domainname_field=true], |
---|
1848 | [ac_cv_have_uname_us_domainname_field=false])]) |
---|
1849 | |
---|
1850 | if test "$ac_cv_have_uname_us_domainname_field" = "true"; then |
---|
1851 | AC_DEFINE(HAVE_UNAME_US_DOMAINNAME_FIELD) |
---|
1852 | AC_MSG_RESULT(yes) |
---|
1853 | else |
---|
1854 | AC_MSG_RESULT(no) |
---|
1855 | fi |
---|
1856 | |
---|
1857 | AC_LANG_C |
---|
1858 | |
---|
1859 | dnl Check for usable wchar_t (2 bytes, unsigned) |
---|
1860 | dnl (we really don't need the unsignedness check anymore) |
---|
1861 | dnl ======================================================== |
---|
1862 | |
---|
1863 | AC_CACHE_CHECK(for usable wchar_t (2 bytes, unsigned), |
---|
1864 | ac_cv_have_usable_wchar, |
---|
1865 | [AC_TRY_RUN([#include <stddef.h> |
---|
1866 | int main () { |
---|
1867 | return (sizeof(wchar_t) != 2) || |
---|
1868 | (wchar_t)-1 < (wchar_t) 0 ; } ], |
---|
1869 | ac_cv_have_usable_wchar="yes", |
---|
1870 | ac_cv_have_usable_wchar="no", |
---|
1871 | ac_cv_have_usable_wchar="maybe")]) |
---|
1872 | if test "$ac_cv_have_usable_wchar" = "yes"; then |
---|
1873 | AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T) |
---|
1874 | HAVE_CPP_2BYTE_WCHAR_T=1 |
---|
1875 | else |
---|
1876 | dnl This is really gcc-only |
---|
1877 | dnl Do this test using CXX only since some versions of gcc |
---|
1878 | dnl 2.95-2.97 have a signed wchar_t in c++ only and some versions |
---|
1879 | dnl only have short-wchar support for c++. |
---|
1880 | dnl Note that we assume that mac & win32 have short wchar (see nscore.h) |
---|
1881 | |
---|
1882 | AC_LANG_SAVE |
---|
1883 | AC_LANG_CPLUSPLUS |
---|
1884 | _SAVE_CXXFLAGS=$CXXFLAGS |
---|
1885 | CXXFLAGS="$CXXFLAGS -fshort-wchar" |
---|
1886 | |
---|
1887 | AC_CACHE_CHECK(for compiler -fshort-wchar option, |
---|
1888 | ac_cv_have_usable_wchar_option, |
---|
1889 | [AC_TRY_RUN([#include <stddef.h> |
---|
1890 | int main () { |
---|
1891 | return (sizeof(wchar_t) != 2) || |
---|
1892 | (wchar_t)-1 < (wchar_t) 0 ; } ], |
---|
1893 | ac_cv_have_usable_wchar_option="yes", |
---|
1894 | ac_cv_have_usable_wchar_option="no", |
---|
1895 | ac_cv_have_usable_wchar_option="maybe")]) |
---|
1896 | |
---|
1897 | if test "$ac_cv_have_usable_wchar_option" = "yes"; then |
---|
1898 | AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T) |
---|
1899 | HAVE_CPP_2BYTE_WCHAR_T=1 |
---|
1900 | else |
---|
1901 | CXXFLAGS=$_SAVE_CXXFLAGS |
---|
1902 | fi |
---|
1903 | AC_LANG_RESTORE |
---|
1904 | fi |
---|
1905 | |
---|
1906 | dnl Check for .hidden assembler directive and visibility attribute. |
---|
1907 | dnl Borrowed from glibc configure.in |
---|
1908 | dnl =============================================================== |
---|
1909 | if test "$GNU_CC"; then |
---|
1910 | AC_CACHE_CHECK(for .hidden assembler directive, |
---|
1911 | ac_cv_asm_hidden_directive, [dnl |
---|
1912 | cat > conftest.s <<EOF |
---|
1913 | .hidden foo |
---|
1914 | foo: |
---|
1915 | EOF |
---|
1916 | if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&5); then |
---|
1917 | ac_cv_asm_hidden_directive=yes |
---|
1918 | else |
---|
1919 | ac_cv_asm_hidden_directive=no |
---|
1920 | fi |
---|
1921 | rm -f conftest*]) |
---|
1922 | |
---|
1923 | if test $ac_cv_asm_hidden_directive = yes; then |
---|
1924 | AC_CACHE_CHECK(whether __attribute__((visibility())) is supported, |
---|
1925 | ac_cv_visibility_attribute, |
---|
1926 | [cat > conftest.c <<EOF |
---|
1927 | int foo __attribute__ ((visibility ("hidden"))) = 1; |
---|
1928 | EOF |
---|
1929 | ac_cv_visibility_attribute=no |
---|
1930 | if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then |
---|
1931 | if grep '\.hidden.*foo' conftest.s >/dev/null; then |
---|
1932 | ac_cv_visibility_attribute=yes |
---|
1933 | fi |
---|
1934 | fi |
---|
1935 | rm -f conftest.[cs] |
---|
1936 | ]) |
---|
1937 | if test $ac_cv_visibility_attribute = yes; then |
---|
1938 | AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE) |
---|
1939 | fi |
---|
1940 | fi # have hidden directive |
---|
1941 | fi # GNU_CC |
---|
1942 | |
---|
1943 | dnl Checks for header files. |
---|
1944 | dnl ======================================================== |
---|
1945 | AC_HEADER_DIRENT |
---|
1946 | case "$target_os" in |
---|
1947 | freebsd*) |
---|
1948 | # for stuff like -lXshm |
---|
1949 | CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" |
---|
1950 | ;; |
---|
1951 | esac |
---|
1952 | AC_CHECK_HEADERS(sys/byteorder.h compat.h getopt.h) |
---|
1953 | AC_CHECK_HEADERS(sys/bitypes.h memory.h unistd.h) |
---|
1954 | AC_CHECK_HEADERS(gnu/libc-version.h nl_types.h) |
---|
1955 | AC_CHECK_HEADERS(malloc.h) |
---|
1956 | AC_CHECK_HEADERS(X11/XKBlib.h) |
---|
1957 | |
---|
1958 | dnl These are all the places some variant of statfs can be hiding. |
---|
1959 | AC_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h) |
---|
1960 | |
---|
1961 | dnl Try for MMX support |
---|
1962 | dnl NB - later gcc versions require -mmmx for this header to be successfully |
---|
1963 | dnl included (or another option which implies it, such as -march=pentium-mmx) |
---|
1964 | AC_CHECK_HEADERS(mmintrin.h) |
---|
1965 | |
---|
1966 | dnl Check whether the compiler supports the new-style C++ standard |
---|
1967 | dnl library headers (i.e. <new>) or needs the old "new.h" |
---|
1968 | AC_LANG_CPLUSPLUS |
---|
1969 | NEW_H=new.h |
---|
1970 | AC_CHECK_HEADER(new, [NEW_H=new]) |
---|
1971 | AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>) |
---|
1972 | AC_LANG_C |
---|
1973 | |
---|
1974 | case $target in |
---|
1975 | *-aix4.3*|*-aix5*) |
---|
1976 | ;; |
---|
1977 | *) |
---|
1978 | AC_CHECK_HEADERS(sys/cdefs.h) |
---|
1979 | ;; |
---|
1980 | esac |
---|
1981 | |
---|
1982 | dnl Checks for libraries. |
---|
1983 | dnl ======================================================== |
---|
1984 | case $target in |
---|
1985 | *-hpux11.*) |
---|
1986 | ;; |
---|
1987 | *) |
---|
1988 | AC_CHECK_LIB(c_r, gethostbyname_r) |
---|
1989 | ;; |
---|
1990 | esac |
---|
1991 | AC_CHECK_LIB(m, atan) |
---|
1992 | |
---|
1993 | dnl We don't want to link with libdl even if it's present on OS X, since |
---|
1994 | dnl it's not used and not part of the default installation. |
---|
1995 | |
---|
1996 | case $target in |
---|
1997 | *-darwin*) |
---|
1998 | ;; |
---|
1999 | *) |
---|
2000 | AC_CHECK_LIB(dl, dlopen, |
---|
2001 | AC_CHECK_HEADER(dlfcn.h, |
---|
2002 | LIBS="-ldl $LIBS" |
---|
2003 | AC_DEFINE(HAVE_LIBDL))) |
---|
2004 | ;; |
---|
2005 | esac |
---|
2006 | if test ! "$GNU_CXX"; then |
---|
2007 | |
---|
2008 | case $target in |
---|
2009 | *-aix*) |
---|
2010 | AC_CHECK_LIB(C_r, demangle) |
---|
2011 | ;; |
---|
2012 | *) |
---|
2013 | AC_CHECK_LIB(C, demangle) |
---|
2014 | ;; |
---|
2015 | esac |
---|
2016 | fi |
---|
2017 | AC_CHECK_LIB(socket, socket) |
---|
2018 | |
---|
2019 | XLDFLAGS="$X_LIBS" |
---|
2020 | XLIBS="$X_EXTRA_LIBS" |
---|
2021 | |
---|
2022 | dnl ======================================================== |
---|
2023 | dnl Checks for X libraries. |
---|
2024 | dnl Ordering is important. |
---|
2025 | dnl Xt is dependent upon SM as of X11R6 |
---|
2026 | dnl ======================================================== |
---|
2027 | if test "$no_x" = "yes"; then |
---|
2028 | AC_DEFINE(NO_X11) |
---|
2029 | else |
---|
2030 | AC_DEFINE_UNQUOTED(FUNCPROTO,15) |
---|
2031 | XLIBS="-lX11 $XLIBS" |
---|
2032 | _SAVE_LDFLAGS="$LDFLAGS" |
---|
2033 | LDFLAGS="$XLDFLAGS $LDFLAGS" |
---|
2034 | AC_CHECK_LIB(X11, XDrawLines, [X11_LIBS="-lX11"], |
---|
2035 | [MISSING_X="$MISSING_X -lX11"], $XLIBS) |
---|
2036 | AC_CHECK_LIB(Xext, XextAddDisplay, [XEXT_LIBS="-lXext"], |
---|
2037 | [MISSING_X="$MISSING_X -lXext"], $XLIBS) |
---|
2038 | |
---|
2039 | |
---|
2040 | AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt"], [ |
---|
2041 | unset ac_cv_lib_Xt_XtFree |
---|
2042 | AC_CHECK_LIB(ICE, IceFlush, [XT_LIBS="-lICE $XT_LIBS"],, $XT_LIBS $XLIBS) |
---|
2043 | AC_CHECK_LIB(SM, SmcCloseConnection, [XT_LIBS="-lSM $XT_LIBS"],, $XT_LIBS $XLIBS) |
---|
2044 | AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt $XT_LIBS"], |
---|
2045 | [MISSING_X="$MISSING_X -lXt"], $X_PRE_LIBS $XT_LIBS $XLIBS) |
---|
2046 | ]) |
---|
2047 | |
---|
2048 | # AIX needs the motif library linked before libXt to prevent |
---|
2049 | # crashes in plugins linked against Motif - Bug #98892 |
---|
2050 | case "${target_os}" in |
---|
2051 | aix*) |
---|
2052 | XT_LIBS="-lXm $XT_LIBS" |
---|
2053 | ;; |
---|
2054 | esac |
---|
2055 | |
---|
2056 | dnl ======================================================== |
---|
2057 | dnl = Check for Xinerama |
---|
2058 | dnl ======================================================== |
---|
2059 | AC_CHECK_LIB(Xinerama, XineramaIsActive, [MOZ_XINERAMA_LIBS="-lXinerama"],, |
---|
2060 | $XLIBS $XEXT_LIBS) |
---|
2061 | AC_CHECK_HEADER(X11/extensions/Xinerama.h) |
---|
2062 | |
---|
2063 | dnl ======================================================== |
---|
2064 | dnl = Check for XShm |
---|
2065 | dnl ======================================================== |
---|
2066 | AC_CHECK_LIB(Xext, XShmCreateImage, _HAVE_XSHM_XEXT=1,, |
---|
2067 | $XLIBS $XEXT_LIBS) |
---|
2068 | AC_CHECK_HEADER(X11/extensions/XShm.h) |
---|
2069 | if test -n "$ac_cv_header_X11_extensions_XShm_h" && |
---|
2070 | test -n "$_HAVE_XSHM_XEXT"; then |
---|
2071 | AC_DEFINE(HAVE_XSHM) |
---|
2072 | fi |
---|
2073 | |
---|
2074 | dnl ======================================================== |
---|
2075 | dnl = Check for XIE |
---|
2076 | dnl ======================================================== |
---|
2077 | AC_CHECK_LIB(XIE, XieFloGeometry, [MOZ_XIE_LIBS="-lXIE"],, |
---|
2078 | $XLIBS $XEXT_LIBS) |
---|
2079 | AC_CHECK_HEADER(X11/extensions/XIElib.h) |
---|
2080 | |
---|
2081 | if test "$MOZ_XIE_LIBS"; then |
---|
2082 | dnl ==================================================== |
---|
2083 | dnl = If XIE is present and is desired, turn it on |
---|
2084 | dnl ==================================================== |
---|
2085 | case $target in |
---|
2086 | *-hpux*) |
---|
2087 | ;; |
---|
2088 | *) |
---|
2089 | HAVE_XIE=1 |
---|
2090 | ;; |
---|
2091 | esac |
---|
2092 | fi |
---|
2093 | |
---|
2094 | LDFLAGS="$_SAVE_LDFLAGS" |
---|
2095 | |
---|
2096 | AC_CHECK_FT2(6.1.0, [_HAVE_FREETYPE2=1], [_HAVE_FREETYPE2=]) |
---|
2097 | |
---|
2098 | fi # $no_x |
---|
2099 | |
---|
2100 | AC_SUBST(XCFLAGS) |
---|
2101 | AC_SUBST(XLDFLAGS) |
---|
2102 | AC_SUBST(XLIBS) |
---|
2103 | AC_SUBST(XT_LIBS) |
---|
2104 | |
---|
2105 | dnl ======================================================== |
---|
2106 | dnl = pthread support |
---|
2107 | dnl = Start by checking whether the system support pthreads |
---|
2108 | dnl ======================================================== |
---|
2109 | MOZ_CHECK_PTHREADS(pthreads, |
---|
2110 | USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", |
---|
2111 | MOZ_CHECK_PTHREADS(pthread, |
---|
2112 | USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread", |
---|
2113 | MOZ_CHECK_PTHREADS(c_r, |
---|
2114 | USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r", |
---|
2115 | MOZ_CHECK_PTHREADS(c, |
---|
2116 | USE_PTHREADS=1 |
---|
2117 | ) |
---|
2118 | ) |
---|
2119 | ) |
---|
2120 | ) |
---|
2121 | |
---|
2122 | dnl ======================================================== |
---|
2123 | dnl Check the command line for --with-pthreads |
---|
2124 | dnl ======================================================== |
---|
2125 | MOZ_ARG_WITH_BOOL(pthreads, |
---|
2126 | [ --with-pthreads Force use of system pthread library with NSPR ], |
---|
2127 | [ if test "$USE_PTHREADS"x = x; then |
---|
2128 | AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]); |
---|
2129 | fi], |
---|
2130 | USE_PTHREADS= |
---|
2131 | _PTHREAD_LDFLAGS= |
---|
2132 | ) |
---|
2133 | |
---|
2134 | dnl ======================================================== |
---|
2135 | dnl Do the platform specific pthread hackery |
---|
2136 | dnl ======================================================== |
---|
2137 | if test "$USE_PTHREADS"x != x |
---|
2138 | then |
---|
2139 | dnl |
---|
2140 | dnl See if -pthread is supported. |
---|
2141 | dnl |
---|
2142 | rm -f conftest* |
---|
2143 | ac_cv_have_dash_pthread=no |
---|
2144 | AC_MSG_CHECKING(whether ${CC-cc} accepts -pthread) |
---|
2145 | echo 'int main() { return 0; }' | cat > conftest.c |
---|
2146 | ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 |
---|
2147 | if test $? -eq 0; then |
---|
2148 | if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then |
---|
2149 | ac_cv_have_dash_pthread=yes |
---|
2150 | case "$target_os" in |
---|
2151 | freebsd*) |
---|
2152 | # Freebsd doesn't use -pthread for compiles, it uses them for linking |
---|
2153 | ;; |
---|
2154 | *) |
---|
2155 | CFLAGS="$CFLAGS -pthread" |
---|
2156 | CXXFLAGS="$CXXFLAGS -pthread" |
---|
2157 | ;; |
---|
2158 | esac |
---|
2159 | fi |
---|
2160 | fi |
---|
2161 | rm -f conftest* |
---|
2162 | AC_MSG_RESULT($ac_cv_have_dash_pthread) |
---|
2163 | |
---|
2164 | dnl |
---|
2165 | dnl See if -pthreads is supported. |
---|
2166 | dnl |
---|
2167 | ac_cv_have_dash_pthreads=no |
---|
2168 | if test "$ac_cv_have_dash_pthread" = "no"; then |
---|
2169 | AC_MSG_CHECKING(whether ${CC-cc} accepts -pthreads) |
---|
2170 | echo 'int main() { return 0; }' | cat > conftest.c |
---|
2171 | ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 |
---|
2172 | if test $? -eq 0; then |
---|
2173 | if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then |
---|
2174 | ac_cv_have_dash_pthreads=yes |
---|
2175 | CFLAGS="$CFLAGS -pthreads" |
---|
2176 | CXXFLAGS="$CXXFLAGS -pthreads" |
---|
2177 | fi |
---|
2178 | fi |
---|
2179 | rm -f conftest* |
---|
2180 | AC_MSG_RESULT($ac_cv_have_dash_pthreads) |
---|
2181 | fi |
---|
2182 | |
---|
2183 | case "$target" in |
---|
2184 | *-*-freebsd*) |
---|
2185 | AC_DEFINE(_REENTRANT) |
---|
2186 | AC_DEFINE(_THREAD_SAFE) |
---|
2187 | dnl -pthread links in -lc_r, so don't specify it explicitly. |
---|
2188 | if test "$ac_cv_have_dash_pthread" = "yes"; then |
---|
2189 | _PTHREAD_LDFLAGS="-pthread" |
---|
2190 | else |
---|
2191 | _PTHREAD_LDFLAGS="-lc_r" |
---|
2192 | fi |
---|
2193 | ;; |
---|
2194 | |
---|
2195 | *-*-openbsd*|*-*-bsdi*) |
---|
2196 | AC_DEFINE(_REENTRANT) |
---|
2197 | AC_DEFINE(_THREAD_SAFE) |
---|
2198 | dnl -pthread links in -lc_r, so don't specify it explicitly. |
---|
2199 | if test "$ac_cv_have_dash_pthread" = "yes"; then |
---|
2200 | _PTHREAD_LDFLAGS="-pthread" |
---|
2201 | LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" |
---|
2202 | fi |
---|
2203 | ;; |
---|
2204 | |
---|
2205 | *-*-linux*) |
---|
2206 | AC_DEFINE(_REENTRANT) |
---|
2207 | ;; |
---|
2208 | |
---|
2209 | *-*-nto*) |
---|
2210 | AC_DEFINE(_REENTRANT) |
---|
2211 | ;; |
---|
2212 | |
---|
2213 | *-aix4.3*|*-aix5*) |
---|
2214 | AC_DEFINE(_REENTRANT) |
---|
2215 | ;; |
---|
2216 | |
---|
2217 | *-hpux11.*) |
---|
2218 | AC_DEFINE(_REENTRANT) |
---|
2219 | ;; |
---|
2220 | |
---|
2221 | alpha*-*-osf*) |
---|
2222 | AC_DEFINE(_REENTRANT) |
---|
2223 | ;; |
---|
2224 | |
---|
2225 | *-*-solaris*) |
---|
2226 | AC_DEFINE(_REENTRANT) |
---|
2227 | if test ! "$GNU_CC"; then |
---|
2228 | CFLAGS="$CFLAGS -mt" |
---|
2229 | CXXFLAGS="$CXXFLAGS -mt" |
---|
2230 | fi |
---|
2231 | ;; |
---|
2232 | esac |
---|
2233 | fi |
---|
2234 | |
---|
2235 | dnl ======================================================== |
---|
2236 | dnl Check for MacOS deployment target version |
---|
2237 | dnl ======================================================== |
---|
2238 | |
---|
2239 | MOZ_ARG_ENABLE_STRING(macos-target, |
---|
2240 | [ --enable-macos-target=VER (default=10.1) |
---|
2241 | Set the minimum MacOS version needed at runtime], |
---|
2242 | [MACOS_DEPLOYMENT_TARGET_STR=$enableval], |
---|
2243 | [MACOS_DEPLOYMENT_TARGET_STR=10.1]) |
---|
2244 | |
---|
2245 | case "$target" in |
---|
2246 | *-darwin*) |
---|
2247 | dnl The C preprocessor can only handle integers in comparisons, so convert |
---|
2248 | dnl the version to the form AABBCC where AA=major release, BB=minor release, |
---|
2249 | dnl and CC=point/micro release. |
---|
2250 | |
---|
2251 | MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1` |
---|
2252 | MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2` |
---|
2253 | MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3` |
---|
2254 | if test -z "$MACOS_VERSION_MINOR"; then |
---|
2255 | MACOS_VERSION_MINOR=0 |
---|
2256 | fi |
---|
2257 | if test -z "$MACOS_VERSION_MICRO"; then |
---|
2258 | MACOS_VERSION_MICRO=0 |
---|
2259 | fi |
---|
2260 | |
---|
2261 | MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"` |
---|
2262 | AC_DEFINE_UNQUOTED(MACOS_DEPLOYMENT_TARGET, $MACOS_DEPLOYMENT_TARGET) |
---|
2263 | ;; |
---|
2264 | *) |
---|
2265 | MACOS_DEPLOYMENT_TARGET= |
---|
2266 | ;; |
---|
2267 | esac |
---|
2268 | |
---|
2269 | AC_SUBST(MACOS_DEPLOYMENT_TARGET) |
---|
2270 | |
---|
2271 | dnl ======================================================== |
---|
2272 | dnl See if mmap sees writes |
---|
2273 | dnl For cross compiling, just define it as no, which is a safe default |
---|
2274 | dnl ======================================================== |
---|
2275 | AC_MSG_CHECKING(whether mmap() sees write()s) |
---|
2276 | |
---|
2277 | changequote(,) |
---|
2278 | mmap_test_prog=' |
---|
2279 | #include <stdlib.h> |
---|
2280 | #include <unistd.h> |
---|
2281 | #include <sys/mman.h> |
---|
2282 | #include <sys/types.h> |
---|
2283 | #include <sys/stat.h> |
---|
2284 | #include <fcntl.h> |
---|
2285 | |
---|
2286 | char fname[] = "conftest.file"; |
---|
2287 | char zbuff[1024]; /* Fractional page is probably worst case */ |
---|
2288 | |
---|
2289 | int main() { |
---|
2290 | char *map; |
---|
2291 | int fd; |
---|
2292 | int i; |
---|
2293 | unlink(fname); |
---|
2294 | fd = open(fname, O_RDWR | O_CREAT, 0660); |
---|
2295 | if(fd<0) return 1; |
---|
2296 | unlink(fname); |
---|
2297 | write(fd, zbuff, sizeof(zbuff)); |
---|
2298 | lseek(fd, 0, SEEK_SET); |
---|
2299 | map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0); |
---|
2300 | if(map==(char*)-1) return 2; |
---|
2301 | for(i=0; fname[i]; i++) { |
---|
2302 | int rc = write(fd, &fname[i], 1); |
---|
2303 | if(map[i]!=fname[i]) return 4; |
---|
2304 | } |
---|
2305 | return 0; |
---|
2306 | } |
---|
2307 | ' |
---|
2308 | changequote([,]) |
---|
2309 | |
---|
2310 | AC_TRY_RUN($mmap_test_prog , result="yes", result="no", result="yes") |
---|
2311 | |
---|
2312 | AC_MSG_RESULT("$result") |
---|
2313 | |
---|
2314 | if test "$result" = "no"; then |
---|
2315 | AC_DEFINE(MMAP_MISSES_WRITES) |
---|
2316 | fi |
---|
2317 | |
---|
2318 | |
---|
2319 | dnl Checks for library functions. |
---|
2320 | dnl ======================================================== |
---|
2321 | AC_PROG_GCC_TRADITIONAL |
---|
2322 | AC_FUNC_MEMCMP |
---|
2323 | AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint) |
---|
2324 | AC_CHECK_FUNCS(flockfile getpagesize) |
---|
2325 | |
---|
2326 | dnl localtime_r and strtok_r are only present on MacOS version 10.2 and higher |
---|
2327 | if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100200"; then |
---|
2328 | AC_CHECK_FUNCS(localtime_r strtok_r) |
---|
2329 | fi |
---|
2330 | |
---|
2331 | dnl check for wcrtomb/mbrtowc |
---|
2332 | dnl ======================================================================= |
---|
2333 | if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then |
---|
2334 | AC_LANG_SAVE |
---|
2335 | AC_LANG_CPLUSPLUS |
---|
2336 | AC_CACHE_CHECK(for wcrtomb, |
---|
2337 | ac_cv_have_wcrtomb, |
---|
2338 | [AC_TRY_LINK([#include <wchar.h>], |
---|
2339 | [mbstate_t ps={0};wcrtomb(0,'f',&ps);], |
---|
2340 | ac_cv_have_wcrtomb="yes", |
---|
2341 | ac_cv_have_wcrtomb="no")]) |
---|
2342 | if test "$ac_cv_have_wcrtomb" = "yes"; then |
---|
2343 | AC_DEFINE(HAVE_WCRTOMB) |
---|
2344 | fi |
---|
2345 | AC_CACHE_CHECK(for mbrtowc, |
---|
2346 | ac_cv_have_mbrtowc, |
---|
2347 | [AC_TRY_LINK([#include <wchar.h>], |
---|
2348 | [mbstate_t ps={0};mbrtowc(0,0,0,&ps);], |
---|
2349 | ac_cv_have_mbrtowc="yes", |
---|
2350 | ac_cv_have_mbrtowc="no")]) |
---|
2351 | if test "$ac_cv_have_mbrtowc" = "yes"; then |
---|
2352 | AC_DEFINE(HAVE_MBRTOWC) |
---|
2353 | fi |
---|
2354 | AC_LANG_RESTORE |
---|
2355 | fi |
---|
2356 | |
---|
2357 | AC_CACHE_CHECK( |
---|
2358 | [for res_ninit()], |
---|
2359 | ac_cv_func_res_ninit, |
---|
2360 | [AC_TRY_LINK([ |
---|
2361 | #ifdef linux |
---|
2362 | #define _BSD_SOURCE 1 |
---|
2363 | #endif |
---|
2364 | #include <resolv.h> |
---|
2365 | ], |
---|
2366 | [int foo = res_ninit(&_res);], |
---|
2367 | [ac_cv_func_res_ninit=yes], |
---|
2368 | [ac_cv_func_res_ninit=no]) |
---|
2369 | ]) |
---|
2370 | |
---|
2371 | if test "$ac_cv_func_res_ninit" = "yes"; then |
---|
2372 | AC_DEFINE(HAVE_RES_NINIT) |
---|
2373 | dnl must add the link line we do something as foolish as this... dougt |
---|
2374 | dnl else |
---|
2375 | dnl AC_CHECK_LIB(bind, res_ninit, AC_DEFINE(HAVE_RES_NINIT), |
---|
2376 | dnl AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT))) |
---|
2377 | fi |
---|
2378 | |
---|
2379 | AC_LANG_CPLUSPLUS |
---|
2380 | AC_CACHE_CHECK( |
---|
2381 | [for gnu_get_libc_version()], |
---|
2382 | ac_cv_func_gnu_get_libc_version, |
---|
2383 | [AC_TRY_LINK([ |
---|
2384 | #ifdef HAVE_GNU_LIBC_VERSION_H |
---|
2385 | #include <gnu/libc-version.h> |
---|
2386 | #endif |
---|
2387 | ], |
---|
2388 | [const char *glibc_version = gnu_get_libc_version();], |
---|
2389 | [ac_cv_func_gnu_get_libc_version=yes], |
---|
2390 | [ac_cv_func_gnu_get_libc_version=no] |
---|
2391 | )] |
---|
2392 | ) |
---|
2393 | |
---|
2394 | if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then |
---|
2395 | AC_DEFINE(HAVE_GNU_GET_LIBC_VERSION) |
---|
2396 | fi |
---|
2397 | |
---|
2398 | case $target_os in |
---|
2399 | os2*|msvc*|mks*|cygwin*|mingw*|darwin*) |
---|
2400 | ;; |
---|
2401 | *) |
---|
2402 | |
---|
2403 | AC_CHECK_LIB(c, iconv, [_ICONV_LIBS="$_ICONV_LIBS"], |
---|
2404 | AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"], |
---|
2405 | AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"]))) |
---|
2406 | _SAVE_LIBS=$LIBS |
---|
2407 | LIBS="$LIBS $_ICONV_LIBS" |
---|
2408 | AC_CACHE_CHECK( |
---|
2409 | [for iconv()], |
---|
2410 | ac_cv_func_iconv, |
---|
2411 | [AC_TRY_LINK([ |
---|
2412 | #include <stdlib.h> |
---|
2413 | #include <iconv.h> |
---|
2414 | ], |
---|
2415 | [ |
---|
2416 | iconv_t h = iconv_open("", ""); |
---|
2417 | iconv(h, NULL, NULL, NULL, NULL); |
---|
2418 | iconv_close(h); |
---|
2419 | ], |
---|
2420 | [ac_cv_func_iconv=yes], |
---|
2421 | [ac_cv_func_iconv=no] |
---|
2422 | )] |
---|
2423 | ) |
---|
2424 | if test "$ac_cv_func_iconv" = "yes"; then |
---|
2425 | AC_DEFINE(HAVE_ICONV) |
---|
2426 | XPCOM_LIBS="$XPCOM_LIBS $_ICONV_LIBS" |
---|
2427 | LIBICONV="$_ICONV_LIBS" |
---|
2428 | AC_CACHE_CHECK( |
---|
2429 | [for iconv() with const input], |
---|
2430 | ac_cv_func_const_iconv, |
---|
2431 | [AC_TRY_COMPILE([ |
---|
2432 | #include <stdlib.h> |
---|
2433 | #include <iconv.h> |
---|
2434 | ], |
---|
2435 | [ |
---|
2436 | const char *input = "testing"; |
---|
2437 | iconv_t h = iconv_open("", ""); |
---|
2438 | iconv(h, &input, NULL, NULL, NULL); |
---|
2439 | iconv_close(h); |
---|
2440 | ], |
---|
2441 | [ac_cv_func_const_iconv=yes], |
---|
2442 | [ac_cv_func_const_iconv=no] |
---|
2443 | )] |
---|
2444 | ) |
---|
2445 | if test "$ac_cv_func_const_iconv" = "yes"; then |
---|
2446 | AC_DEFINE(HAVE_ICONV_WITH_CONST_INPUT) |
---|
2447 | fi |
---|
2448 | fi |
---|
2449 | LIBS=$_SAVE_LIBS |
---|
2450 | |
---|
2451 | ;; |
---|
2452 | esac |
---|
2453 | |
---|
2454 | AM_LANGINFO_CODESET |
---|
2455 | |
---|
2456 | AC_LANG_C |
---|
2457 | |
---|
2458 | dnl ********************** |
---|
2459 | dnl *** va_copy checks *** |
---|
2460 | dnl ********************** |
---|
2461 | dnl we currently check for all three va_copy possibilities, so we get |
---|
2462 | dnl all results in config.log for bug reports. |
---|
2463 | AC_MSG_CHECKING(for an implementation of va_copy()) |
---|
2464 | AC_CACHE_VAL(ac_cv_va_copy,[ |
---|
2465 | AC_TRY_RUN([ |
---|
2466 | #include <stdarg.h> |
---|
2467 | void f (int i, ...) { |
---|
2468 | va_list args1, args2; |
---|
2469 | va_start (args1, i); |
---|
2470 | va_copy (args2, args1); |
---|
2471 | if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
---|
2472 | exit (1); |
---|
2473 | va_end (args1); va_end (args2); |
---|
2474 | } |
---|
2475 | int main() { f (0, 42); return 0; }], |
---|
2476 | ac_cv_va_copy=yes, |
---|
2477 | ac_cv_va_copy=no, |
---|
2478 | ac_cv_va_copy=no |
---|
2479 | ) |
---|
2480 | ]) |
---|
2481 | AC_MSG_RESULT($ac_cv_va_copy) |
---|
2482 | AC_MSG_CHECKING(for an implementation of __va_copy()) |
---|
2483 | AC_CACHE_VAL(ac_cv___va_copy,[ |
---|
2484 | AC_TRY_RUN([ |
---|
2485 | #include <stdarg.h> |
---|
2486 | void f (int i, ...) { |
---|
2487 | va_list args1, args2; |
---|
2488 | va_start (args1, i); |
---|
2489 | __va_copy (args2, args1); |
---|
2490 | if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
---|
2491 | exit (1); |
---|
2492 | va_end (args1); va_end (args2); |
---|
2493 | } |
---|
2494 | int main() { f (0, 42); return 0; }], |
---|
2495 | ac_cv___va_copy=yes, |
---|
2496 | ac_cv___va_copy=no, |
---|
2497 | ac_cv___va_copy=no |
---|
2498 | ) |
---|
2499 | ]) |
---|
2500 | AC_MSG_RESULT($ac_cv___va_copy) |
---|
2501 | AC_MSG_CHECKING(whether va_lists can be copied by value) |
---|
2502 | AC_CACHE_VAL(ac_cv_va_val_copy,[ |
---|
2503 | AC_TRY_RUN([ |
---|
2504 | #include <stdarg.h> |
---|
2505 | void f (int i, ...) { |
---|
2506 | va_list args1, args2; |
---|
2507 | va_start (args1, i); |
---|
2508 | args2 = args1; |
---|
2509 | if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
---|
2510 | exit (1); |
---|
2511 | va_end (args1); va_end (args2); |
---|
2512 | } |
---|
2513 | int main() { f (0, 42); return 0; }], |
---|
2514 | ac_cv_va_val_copy=yes, |
---|
2515 | ac_cv_va_val_copy=no, |
---|
2516 | ac_cv_va_val_copy=yes |
---|
2517 | ) |
---|
2518 | ]) |
---|
2519 | if test "x$ac_cv_va_copy" = "xyes"; then |
---|
2520 | AC_DEFINE(VA_COPY, va_copy) |
---|
2521 | AC_DEFINE(HAVE_VA_COPY) |
---|
2522 | elif test "x$ac_cv___va_copy" = "xyes"; then |
---|
2523 | AC_DEFINE(VA_COPY, __va_copy) |
---|
2524 | AC_DEFINE(HAVE_VA_COPY) |
---|
2525 | fi |
---|
2526 | |
---|
2527 | if test "x$ac_cv_va_val_copy" = "xno"; then |
---|
2528 | AC_DEFINE(HAVE_VA_LIST_AS_ARRAY) |
---|
2529 | fi |
---|
2530 | AC_MSG_RESULT($ac_cv_va_val_copy) |
---|
2531 | |
---|
2532 | dnl Check for dll-challenged libc's. |
---|
2533 | dnl This check is apparently only needed for Linux. |
---|
2534 | case "$target" in |
---|
2535 | *-linux*) |
---|
2536 | dnl =================================================================== |
---|
2537 | _curdir=`pwd` |
---|
2538 | export _curdir |
---|
2539 | rm -rf conftest* _conftest |
---|
2540 | mkdir _conftest |
---|
2541 | cat >> conftest.C <<\EOF |
---|
2542 | #include <stdio.h> |
---|
2543 | #include <link.h> |
---|
2544 | #include <dlfcn.h> |
---|
2545 | #ifdef _dl_loaded |
---|
2546 | void __dump_link_map(void) { |
---|
2547 | struct link_map *map = _dl_loaded; |
---|
2548 | while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;} |
---|
2549 | } |
---|
2550 | int main() { |
---|
2551 | dlopen("./conftest1.so",RTLD_LAZY); |
---|
2552 | dlopen("./../_conftest/conftest1.so",RTLD_LAZY); |
---|
2553 | dlopen("CURDIR/_conftest/conftest1.so",RTLD_LAZY); |
---|
2554 | dlopen("CURDIR/_conftest/../_conftest/conftest1.so",RTLD_LAZY); |
---|
2555 | __dump_link_map(); |
---|
2556 | } |
---|
2557 | #else |
---|
2558 | /* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/ |
---|
2559 | int main() { printf("./conftest1.so\n"); } |
---|
2560 | #endif |
---|
2561 | EOF |
---|
2562 | |
---|
2563 | $PERL -p -i -e "s/CURDIR/\$ENV{_curdir}/g;" conftest.C |
---|
2564 | |
---|
2565 | cat >> conftest1.C <<\EOF |
---|
2566 | #include <stdio.h> |
---|
2567 | void foo(void) {printf("foo in dll called\n");} |
---|
2568 | EOF |
---|
2569 | ${CXX-g++} -fPIC -c -g conftest1.C |
---|
2570 | ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o |
---|
2571 | ${CXX-g++} -g conftest.C -o conftest -ldl |
---|
2572 | cp -f conftest1.so conftest _conftest |
---|
2573 | cd _conftest |
---|
2574 | if test `./conftest | grep conftest1.so | wc -l` -gt 1 |
---|
2575 | then |
---|
2576 | echo |
---|
2577 | echo "*** Your libc has a bug that can result in loading the same dynamic" |
---|
2578 | echo "*** library multiple times. This bug is known to be fixed in glibc-2.0.7-32" |
---|
2579 | echo "*** or later. However, if you choose not to upgrade, the only effect" |
---|
2580 | echo "*** will be excessive memory usage at runtime." |
---|
2581 | echo |
---|
2582 | fi |
---|
2583 | cd ${_curdir} |
---|
2584 | rm -rf conftest* _conftest |
---|
2585 | dnl =================================================================== |
---|
2586 | ;; |
---|
2587 | esac |
---|
2588 | |
---|
2589 | dnl =================================================================== |
---|
2590 | dnl ======================================================== |
---|
2591 | dnl By default, turn rtti and exceptions off on g++/egcs |
---|
2592 | dnl ======================================================== |
---|
2593 | if test "$GNU_CXX"; then |
---|
2594 | |
---|
2595 | AC_MSG_CHECKING(for C++ exceptions flag) |
---|
2596 | |
---|
2597 | dnl They changed -f[no-]handle-exceptions to -f[no-]exceptions in g++ 2.8 |
---|
2598 | AC_CACHE_VAL(ac_cv_cxx_exceptions_flags, |
---|
2599 | [echo "int main() { return 0; }" | cat > conftest.C |
---|
2600 | |
---|
2601 | ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1 |
---|
2602 | |
---|
2603 | if egrep "warning.*renamed" conftest.out >/dev/null; then |
---|
2604 | ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions |
---|
2605 | else |
---|
2606 | ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions |
---|
2607 | fi |
---|
2608 | |
---|
2609 | rm -f conftest*]) |
---|
2610 | |
---|
2611 | AC_MSG_RESULT($ac_cv_cxx_exceptions_flags) |
---|
2612 | _MOZ_EXCEPTIONS_FLAGS_OFF=$ac_cv_cxx_exceptions_flags |
---|
2613 | _MOZ_EXCEPTIONS_FLAGS_ON=`echo $ac_cv_cxx_exceptions_flags | sed 's|no-||'` |
---|
2614 | fi |
---|
2615 | |
---|
2616 | dnl ======================================================== |
---|
2617 | dnl Put your C++ language/feature checks below |
---|
2618 | dnl ======================================================== |
---|
2619 | AC_LANG_CPLUSPLUS |
---|
2620 | |
---|
2621 | HAVE_GCC3_ABI= |
---|
2622 | if test "$GNU_CC"; then |
---|
2623 | AC_CACHE_CHECK(for gcc 3.0 ABI, |
---|
2624 | ac_cv_gcc_three_abi, |
---|
2625 | [AC_TRY_COMPILE([], |
---|
2626 | [ |
---|
2627 | #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ |
---|
2628 | return 0; |
---|
2629 | #else |
---|
2630 | #error Not gcc3. |
---|
2631 | #endif |
---|
2632 | ], |
---|
2633 | ac_cv_gcc_three_abi="yes", |
---|
2634 | ac_cv_gcc_three_abi="no")]) |
---|
2635 | if test "$ac_cv_gcc_three_abi" = "yes"; then |
---|
2636 | HAVE_GCC3_ABI=1 |
---|
2637 | fi |
---|
2638 | fi |
---|
2639 | AC_SUBST(HAVE_GCC3_ABI) |
---|
2640 | |
---|
2641 | |
---|
2642 | AC_CACHE_CHECK(for C++ \"explicit\" keyword, |
---|
2643 | ac_cv_cpp_explicit, |
---|
2644 | [AC_TRY_COMPILE(class X { |
---|
2645 | public: explicit X(int i) : i_(i) {} |
---|
2646 | private: int i_; |
---|
2647 | };, |
---|
2648 | X x(3);, |
---|
2649 | ac_cv_cpp_explicit=yes, |
---|
2650 | ac_cv_cpp_explicit=no)]) |
---|
2651 | if test "$ac_cv_cpp_explicit" = yes ; then |
---|
2652 | AC_DEFINE(HAVE_CPP_EXPLICIT) |
---|
2653 | fi |
---|
2654 | |
---|
2655 | AC_CACHE_CHECK(for C++ \"typename\" keyword, |
---|
2656 | ac_cv_cpp_typename, |
---|
2657 | [AC_TRY_COMPILE(class param { |
---|
2658 | public: |
---|
2659 | typedef unsigned long num_type; |
---|
2660 | }; |
---|
2661 | |
---|
2662 | template <class T> class tplt { |
---|
2663 | public: |
---|
2664 | typedef typename T::num_type t_num_type; |
---|
2665 | t_num_type foo(typename T::num_type num) { |
---|
2666 | return num; |
---|
2667 | } |
---|
2668 | };, |
---|
2669 | tplt<param> A; |
---|
2670 | A.foo(0);, |
---|
2671 | ac_cv_cpp_typename=yes, |
---|
2672 | ac_cv_cpp_typename=no)]) |
---|
2673 | if test "$ac_cv_cpp_typename" = yes ; then |
---|
2674 | AC_DEFINE(HAVE_CPP_TYPENAME) |
---|
2675 | fi |
---|
2676 | |
---|
2677 | dnl Check for support of modern template specialization syntax |
---|
2678 | dnl Test code and requirement from scc@netscape.com. |
---|
2679 | dnl Autoconf cut-and-paste job by waterson@netscape.com |
---|
2680 | AC_CACHE_CHECK(for modern C++ template specialization syntax support, |
---|
2681 | ac_cv_cpp_modern_specialize_template_syntax, |
---|
2682 | [AC_TRY_COMPILE(template <class T> struct X { int a; }; |
---|
2683 | class Y {}; |
---|
2684 | template <> struct X<Y> { double a; };, |
---|
2685 | X<int> int_x; |
---|
2686 | X<Y> y_x;, |
---|
2687 | ac_cv_cpp_modern_specialize_template_syntax=yes, |
---|
2688 | ac_cv_cpp_modern_specialize_template_syntax=no)]) |
---|
2689 | if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then |
---|
2690 | AC_DEFINE(HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX) |
---|
2691 | fi |
---|
2692 | |
---|
2693 | |
---|
2694 | dnl Some compilers support only full specialization, and some don't. |
---|
2695 | AC_CACHE_CHECK(whether partial template specialization works, |
---|
2696 | ac_cv_cpp_partial_specialization, |
---|
2697 | [AC_TRY_COMPILE(template <class T> class Foo {}; |
---|
2698 | template <class T> class Foo<T*> {};, |
---|
2699 | return 0;, |
---|
2700 | ac_cv_cpp_partial_specialization=yes, |
---|
2701 | ac_cv_cpp_partial_specialization=no)]) |
---|
2702 | if test "$ac_cv_cpp_partial_specialization" = yes ; then |
---|
2703 | AC_DEFINE(HAVE_CPP_PARTIAL_SPECIALIZATION) |
---|
2704 | fi |
---|
2705 | |
---|
2706 | dnl Some compilers have limited support for operators with templates; |
---|
2707 | dnl specifically, it is necessary to define derived operators when a base |
---|
2708 | dnl class's operator declaration should suffice. |
---|
2709 | AC_CACHE_CHECK(whether operators must be re-defined for templates derived from templates, |
---|
2710 | ac_cv_need_derived_template_operators, |
---|
2711 | [AC_TRY_COMPILE([template <class T> class Base { }; |
---|
2712 | template <class T> |
---|
2713 | Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; } |
---|
2714 | template <class T> class Derived : public Base<T> { };], |
---|
2715 | [Derived<char> a, b; |
---|
2716 | Base<char> c = a + b; |
---|
2717 | return 0;], |
---|
2718 | ac_cv_need_derived_template_operators=no, |
---|
2719 | ac_cv_need_derived_template_operators=yes)]) |
---|
2720 | if test "$ac_cv_need_derived_template_operators" = yes ; then |
---|
2721 | AC_DEFINE(NEED_CPP_DERIVED_TEMPLATE_OPERATORS) |
---|
2722 | fi |
---|
2723 | |
---|
2724 | |
---|
2725 | dnl Some compilers have trouble detecting that a template class |
---|
2726 | dnl that derives from another template is actually an instance |
---|
2727 | dnl of the base class. This test checks for that. |
---|
2728 | AC_CACHE_CHECK(whether we need to cast a derived template to pass as its base class, |
---|
2729 | ac_cv_need_cpp_template_cast_to_base, |
---|
2730 | [AC_TRY_COMPILE([template <class T> class Base { }; |
---|
2731 | template <class T> class Derived : public Base<T> { }; |
---|
2732 | template <class T> int foo(const Base<T>&) { return 0; }], |
---|
2733 | [Derived<char> bar; return foo(bar);], |
---|
2734 | ac_cv_need_cpp_template_cast_to_base=no, |
---|
2735 | ac_cv_need_cpp_template_cast_to_base=yes)]) |
---|
2736 | if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then |
---|
2737 | AC_DEFINE(NEED_CPP_TEMPLATE_CAST_TO_BASE) |
---|
2738 | fi |
---|
2739 | |
---|
2740 | dnl Some compilers have trouble resolving the ambiguity between two |
---|
2741 | dnl functions whose arguments differ only by cv-qualifications. |
---|
2742 | AC_CACHE_CHECK(whether the compiler can resolve const ambiguities for templates, |
---|
2743 | ac_cv_can_resolve_const_ambiguity, |
---|
2744 | [AC_TRY_COMPILE([ |
---|
2745 | template <class T> class ptrClass { |
---|
2746 | public: T* ptr; |
---|
2747 | }; |
---|
2748 | |
---|
2749 | template <class T> T* a(ptrClass<T> *arg) { |
---|
2750 | return arg->ptr; |
---|
2751 | } |
---|
2752 | |
---|
2753 | template <class T> |
---|
2754 | const T* a(const ptrClass<T> *arg) { |
---|
2755 | return arg->ptr; |
---|
2756 | } |
---|
2757 | ], |
---|
2758 | [ ptrClass<int> i; |
---|
2759 | a(&i); ], |
---|
2760 | ac_cv_can_resolve_const_ambiguity=yes, |
---|
2761 | ac_cv_can_resolve_const_ambiguity=no)]) |
---|
2762 | if test "$ac_cv_can_resolve_const_ambiguity" = no ; then |
---|
2763 | AC_DEFINE(CANT_RESOLVE_CPP_CONST_AMBIGUITY) |
---|
2764 | fi |
---|
2765 | |
---|
2766 | dnl |
---|
2767 | dnl We dont do exceptions on unix. The only reason this used to be here |
---|
2768 | dnl is that mozilla/xpcom/tests/TestCOMPtr.cpp has a test which uses |
---|
2769 | dnl exceptions. But, we turn exceptions off by default and this test breaks. |
---|
2770 | dnl So im commenting this out until someone writes some artificial |
---|
2771 | dnl intelligence to detect not only if the compiler has exceptions, but if |
---|
2772 | dnl they are enabled as well. |
---|
2773 | dnl |
---|
2774 | dnl AC_CACHE_CHECK(for C++ \"exceptions\", |
---|
2775 | dnl ac_cv_cpp_exceptions, |
---|
2776 | dnl [AC_TRY_COMPILE(class X { public: X() {} }; |
---|
2777 | dnl static void F() { throw X(); }, |
---|
2778 | dnl try { F(); } catch(X & e) { }, |
---|
2779 | dnl ac_cv_cpp_exceptions=yes, |
---|
2780 | dnl ac_cv_cpp_exceptions=no)]) |
---|
2781 | dnl if test $ac_cv_cpp_exceptions = yes ; then |
---|
2782 | dnl AC_DEFINE(HAVE_CPP_EXCEPTIONS) |
---|
2783 | dnl fi |
---|
2784 | |
---|
2785 | dnl Some compilers have marginal |using| support; for example, gcc-2.7.2.3 |
---|
2786 | dnl supports it well enough to allow us to use it to change access, but not |
---|
2787 | dnl to resolve ambiguity. The next two tests determine how well the |using| |
---|
2788 | dnl keyword is supported. |
---|
2789 | dnl |
---|
2790 | dnl Check to see if we can change access with |using|. Test both a |
---|
2791 | dnl legal and an illegal example. |
---|
2792 | AC_CACHE_CHECK(whether the C++ \"using\" keyword can change access, |
---|
2793 | ac_cv_cpp_access_changing_using2, |
---|
2794 | [AC_TRY_COMPILE( |
---|
2795 | class A { protected: int foo() { return 0; } }; |
---|
2796 | class B : public A { public: using A::foo; };, |
---|
2797 | B b; return b.foo();, |
---|
2798 | [AC_TRY_COMPILE( |
---|
2799 | class A { public: int foo() { return 1; } }; |
---|
2800 | class B : public A { private: using A::foo; };, |
---|
2801 | B b; return b.foo();, |
---|
2802 | ac_cv_cpp_access_changing_using2=no, |
---|
2803 | ac_cv_cpp_access_changing_using2=yes)], |
---|
2804 | ac_cv_cpp_access_changing_using2=no)]) |
---|
2805 | if test "$ac_cv_cpp_access_changing_using2" = yes ; then |
---|
2806 | AC_DEFINE(HAVE_CPP_ACCESS_CHANGING_USING) |
---|
2807 | fi |
---|
2808 | |
---|
2809 | dnl Check to see if we can resolve ambiguity with |using|. |
---|
2810 | AC_CACHE_CHECK(whether the C++ \"using\" keyword resolves ambiguity, |
---|
2811 | ac_cv_cpp_ambiguity_resolving_using, |
---|
2812 | [AC_TRY_COMPILE(class X { |
---|
2813 | public: int go(const X&) {return 3;} |
---|
2814 | int jo(const X&) {return 3;} |
---|
2815 | }; |
---|
2816 | class Y : public X { |
---|
2817 | public: int go(int) {return 2;} |
---|
2818 | int jo(int) {return 2;} |
---|
2819 | using X::jo; |
---|
2820 | private: using X::go; |
---|
2821 | };, |
---|
2822 | X x; Y y; y.jo(x);, |
---|
2823 | ac_cv_cpp_ambiguity_resolving_using=yes, |
---|
2824 | ac_cv_cpp_ambiguity_resolving_using=no)]) |
---|
2825 | if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then |
---|
2826 | AC_DEFINE(HAVE_CPP_AMBIGUITY_RESOLVING_USING) |
---|
2827 | fi |
---|
2828 | |
---|
2829 | dnl Check to see if the |std| namespace is supported. If so, we'll want |
---|
2830 | dnl to qualify any standard library calls with "std::" to ensure that |
---|
2831 | dnl those functions can be resolved. |
---|
2832 | AC_CACHE_CHECK(for \"std::\" namespace, |
---|
2833 | ac_cv_cpp_namespace_std, |
---|
2834 | [AC_TRY_COMPILE([#include <algorithm>], |
---|
2835 | [return std::min(0, 1);], |
---|
2836 | ac_cv_cpp_namespace_std=yes, |
---|
2837 | ac_cv_cpp_namespace_std=no)]) |
---|
2838 | if test "$ac_cv_cpp_namespace_std" = yes ; then |
---|
2839 | AC_DEFINE(HAVE_CPP_NAMESPACE_STD) |
---|
2840 | fi |
---|
2841 | |
---|
2842 | dnl Older compilers are overly ambitious with respect to using the standard |
---|
2843 | dnl template library's |operator!=()| when |operator==()| is defined. In |
---|
2844 | dnl which case, defining |operator!=()| in addition to |operator==()| causes |
---|
2845 | dnl ambiguity at compile-time. This test checks for that case. |
---|
2846 | AC_CACHE_CHECK(whether standard template operator!=() is ambiguous, |
---|
2847 | ac_cv_cpp_unambiguous_std_notequal, |
---|
2848 | [AC_TRY_COMPILE([#include <algorithm> |
---|
2849 | struct T1 {}; |
---|
2850 | int operator==(const T1&, const T1&) { return 0; } |
---|
2851 | int operator!=(const T1&, const T1&) { return 0; }], |
---|
2852 | [T1 a,b; return a != b;], |
---|
2853 | ac_cv_cpp_unambiguous_std_notequal=unambiguous, |
---|
2854 | ac_cv_cpp_unambiguous_std_notequal=ambiguous)]) |
---|
2855 | if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then |
---|
2856 | AC_DEFINE(HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL) |
---|
2857 | fi |
---|
2858 | |
---|
2859 | |
---|
2860 | AC_CACHE_CHECK(for C++ reinterpret_cast, |
---|
2861 | ac_cv_cpp_reinterpret_cast, |
---|
2862 | [AC_TRY_COMPILE(struct X { int i; }; |
---|
2863 | struct Y { int i; };, |
---|
2864 | X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);, |
---|
2865 | ac_cv_cpp_reinterpret_cast=yes, |
---|
2866 | ac_cv_cpp_reinterpret_cast=no)]) |
---|
2867 | if test "$ac_cv_cpp_reinterpret_cast" = yes ; then |
---|
2868 | AC_DEFINE(HAVE_CPP_NEW_CASTS) |
---|
2869 | fi |
---|
2870 | |
---|
2871 | dnl See if a dynamic_cast to void* gives the most derived object. |
---|
2872 | AC_CACHE_CHECK(for C++ dynamic_cast to void*, |
---|
2873 | ac_cv_cpp_dynamic_cast_void_ptr, |
---|
2874 | [AC_TRY_RUN([class X { int i; public: virtual ~X() { } }; |
---|
2875 | class Y { int j; public: virtual ~Y() { } }; |
---|
2876 | class Z : public X, public Y { int k; }; |
---|
2877 | |
---|
2878 | int main() { |
---|
2879 | Z mdo; |
---|
2880 | X *subx = (X*)&mdo; |
---|
2881 | Y *suby = (Y*)&mdo; |
---|
2882 | return !((((void*)&mdo != (void*)subx) && |
---|
2883 | ((void*)&mdo == dynamic_cast<void*>(subx))) || |
---|
2884 | (((void*)&mdo != (void*)suby) && |
---|
2885 | ((void*)&mdo == dynamic_cast<void*>(suby)))); |
---|
2886 | }], |
---|
2887 | ac_cv_cpp_dynamic_cast_void_ptr=yes, |
---|
2888 | ac_cv_cpp_dynamic_cast_void_ptr=no, |
---|
2889 | ac_cv_cpp_dynamic_cast_void_ptr=no)]) |
---|
2890 | if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then |
---|
2891 | AC_DEFINE(HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR) |
---|
2892 | fi |
---|
2893 | |
---|
2894 | |
---|
2895 | dnl note that this one is reversed - if the test fails, then |
---|
2896 | dnl we require implementations of unused virtual methods. Which |
---|
2897 | dnl really blows because it means we'll have useless vtable |
---|
2898 | dnl bloat. |
---|
2899 | AC_CACHE_CHECK(whether C++ requires implementation of unused virtual methods, |
---|
2900 | ac_cv_cpp_unused_required, |
---|
2901 | [AC_TRY_LINK(class X {private: virtual void never_called();};, |
---|
2902 | X x;, |
---|
2903 | ac_cv_cpp_unused_required=no, |
---|
2904 | ac_cv_cpp_unused_required=yes)]) |
---|
2905 | if test "$ac_cv_cpp_unused_required" = yes ; then |
---|
2906 | AC_DEFINE(NEED_CPP_UNUSED_IMPLEMENTATIONS) |
---|
2907 | fi |
---|
2908 | |
---|
2909 | |
---|
2910 | dnl Some compilers have trouble comparing a constant reference to a templatized |
---|
2911 | dnl class to zero, and require an explicit operator==() to be defined that takes |
---|
2912 | dnl an int. This test separates the strong from the weak. |
---|
2913 | |
---|
2914 | AC_CACHE_CHECK(for trouble comparing to zero near std::operator!=(), |
---|
2915 | ac_cv_trouble_comparing_to_zero, |
---|
2916 | [AC_TRY_COMPILE([#include <algorithm> |
---|
2917 | template <class T> class Foo {}; |
---|
2918 | class T2; |
---|
2919 | template <class T> int operator==(const T2*, const T&) { return 0; } |
---|
2920 | template <class T> int operator!=(const T2*, const T&) { return 0; }], |
---|
2921 | [Foo<int> f; return (0 != f);], |
---|
2922 | ac_cv_trouble_comparing_to_zero=no, |
---|
2923 | ac_cv_trouble_comparing_to_zero=yes)]) |
---|
2924 | if test "$ac_cv_trouble_comparing_to_zero" = yes ; then |
---|
2925 | AC_DEFINE(HAVE_CPP_TROUBLE_COMPARING_TO_ZERO) |
---|
2926 | fi |
---|
2927 | |
---|
2928 | |
---|
2929 | |
---|
2930 | dnl End of C++ language/feature checks |
---|
2931 | AC_LANG_C |
---|
2932 | |
---|
2933 | dnl ======================================================== |
---|
2934 | dnl = Internationalization checks |
---|
2935 | dnl ======================================================== |
---|
2936 | dnl |
---|
2937 | dnl Internationalization and Locale support is different |
---|
2938 | dnl on various UNIX platforms. Checks for specific i18n |
---|
2939 | dnl features go here. |
---|
2940 | |
---|
2941 | dnl check for LC_MESSAGES |
---|
2942 | AC_CACHE_CHECK(for LC_MESSAGES, |
---|
2943 | ac_cv_i18n_lc_messages, |
---|
2944 | [AC_TRY_COMPILE([#include <locale.h>], |
---|
2945 | [int category = LC_MESSAGES;], |
---|
2946 | ac_cv_i18n_lc_messages=yes, |
---|
2947 | ac_cv_i18n_lc_messages=no)]) |
---|
2948 | if test "$ac_cv_i18n_lc_messages" = yes; then |
---|
2949 | AC_DEFINE(HAVE_I18N_LC_MESSAGES) |
---|
2950 | fi |
---|
2951 | |
---|
2952 | fi # SKIP_COMPILER_CHECKS |
---|
2953 | |
---|
2954 | dnl Mozilla specific options |
---|
2955 | dnl ======================================================== |
---|
2956 | dnl The macros used for command line options |
---|
2957 | dnl are defined in build/autoconf/altoptions.m4. |
---|
2958 | |
---|
2959 | |
---|
2960 | dnl ======================================================== |
---|
2961 | dnl = |
---|
2962 | dnl = Check for external package dependencies |
---|
2963 | dnl = |
---|
2964 | dnl ======================================================== |
---|
2965 | MOZ_ARG_HEADER(External Packages) |
---|
2966 | |
---|
2967 | dnl ======================================================== |
---|
2968 | dnl = If NSPR was not detected in the system, |
---|
2969 | dnl = use the one in the source tree (mozilla/nsprpub) |
---|
2970 | dnl ======================================================== |
---|
2971 | MOZ_ARG_WITH_BOOL(system-nspr, |
---|
2972 | [ --with-system-nspr Use system installed NSPR], |
---|
2973 | _USE_SYSTEM_NSPR=1 ) |
---|
2974 | |
---|
2975 | if test -n "$_USE_SYSTEM_NSPR"; then |
---|
2976 | AM_PATH_NSPR(4.0.0, [MOZ_NATIVE_NSPR=1], [MOZ_NATIVE_NSPR=]) |
---|
2977 | fi |
---|
2978 | |
---|
2979 | if test -z "$MOZ_NATIVE_NSPR"; then |
---|
2980 | NSPR_CFLAGS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --cflags`' |
---|
2981 | # explicitly set libs for Visual Age C++ for OS/2 |
---|
2982 | if test "$OS_ARCH" = "OS2" -a "$VACPP" = "yes"; then |
---|
2983 | NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib '$_PTHREAD_LDFLAGS'' |
---|
2984 | elif test "$OS_ARCH" = "WINNT"; then |
---|
2985 | NSPR_CFLAGS='-I$(DIST)/include/nspr' |
---|
2986 | if test -n "$GNU_CC"; then |
---|
2987 | NSPR_LIBS="-L\$(DIST)/lib -lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION" |
---|
2988 | else |
---|
2989 | NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib ' |
---|
2990 | fi |
---|
2991 | else |
---|
2992 | NSPR_LIBS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --libs`' |
---|
2993 | fi |
---|
2994 | fi |
---|
2995 | |
---|
2996 | if test -z "$SKIP_LIBRARY_CHECKS"; then |
---|
2997 | dnl system JPEG support |
---|
2998 | dnl ======================================================== |
---|
2999 | MOZ_ARG_WITH_STRING(system-jpeg, |
---|
3000 | [ --with-system-jpeg[=PFX] |
---|
3001 | Use system libjpeg [installed at prefix PFX]], |
---|
3002 | JPEG_DIR=$withval) |
---|
3003 | |
---|
3004 | _SAVE_CFLAGS=$CFLAGS |
---|
3005 | _SAVE_LDFLAGS=$LDFLAGS |
---|
3006 | _SAVE_LIBS=$LIBS |
---|
3007 | if test -n "${JPEG_DIR}"; then |
---|
3008 | CFLAGS="-I${JPEG_DIR}/include $CFLAGS" |
---|
3009 | LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS" |
---|
3010 | fi |
---|
3011 | if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then |
---|
3012 | SYSTEM_JPEG= |
---|
3013 | else |
---|
3014 | AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"], SYSTEM_JPEG=, $JPEG_LIBS) |
---|
3015 | fi |
---|
3016 | |
---|
3017 | if test "$SYSTEM_JPEG" = 1; then |
---|
3018 | LIBS="$JPEG_LIBS $LIBS" |
---|
3019 | AC_TRY_RUN( |
---|
3020 | #include <stdio.h> |
---|
3021 | #include <sys/types.h> |
---|
3022 | #include <jpeglib.h> |
---|
3023 | int main () { |
---|
3024 | #if JPEG_LIB_VERSION >= $MOZJPEG |
---|
3025 | exit(0); |
---|
3026 | #else |
---|
3027 | exit(1); |
---|
3028 | #endif |
---|
3029 | } |
---|
3030 | , SYSTEM_JPEG=1, [SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=], SYSTEM_JPEG= ) |
---|
3031 | rm -f core |
---|
3032 | fi |
---|
3033 | CFLAGS=$_SAVE_CFLAGS |
---|
3034 | LDFLAGS=$_SAVE_LDFLAGS |
---|
3035 | LIBS=$_SAVE_LIBS |
---|
3036 | |
---|
3037 | if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then |
---|
3038 | JPEG_CFLAGS="-I${JPEG_DIR}/include" |
---|
3039 | JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}" |
---|
3040 | fi |
---|
3041 | |
---|
3042 | dnl system ZLIB support |
---|
3043 | dnl ======================================================== |
---|
3044 | MOZ_ARG_WITH_STRING(system-zlib, |
---|
3045 | [ --with-system-zlib[=PFX] |
---|
3046 | Use system libz [installed at prefix PFX]], |
---|
3047 | ZLIB_DIR=$withval) |
---|
3048 | |
---|
3049 | _SAVE_CFLAGS=$CFLAGS |
---|
3050 | _SAVE_LDFLAGS=$LDFLAGS |
---|
3051 | _SAVE_LIBS=$LIBS |
---|
3052 | if test -n "${ZLIB_DIR}"; then |
---|
3053 | CFLAGS="-I${ZLIB_DIR}/include $CFLAGS" |
---|
3054 | LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS" |
---|
3055 | fi |
---|
3056 | if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then |
---|
3057 | SYSTEM_ZLIB= |
---|
3058 | else |
---|
3059 | AC_CHECK_LIB(z, gzread, [SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"], |
---|
3060 | [SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=], $ZLIB_LIBS) |
---|
3061 | fi |
---|
3062 | if test "$SYSTEM_ZLIB" = 1; then |
---|
3063 | LIBS="$ZLIB_LIBS $LIBS" |
---|
3064 | AC_TRY_RUN([ |
---|
3065 | #include <stdio.h> |
---|
3066 | #include <string.h> |
---|
3067 | #include <zlib.h> |
---|
3068 | int parse_version(const char *str, int *ver) { |
---|
3069 | return (sscanf(str, "%d.%d.%d", ver, ver+1, ver+2)==3?0:1); |
---|
3070 | } |
---|
3071 | int main() { |
---|
3072 | int sys[3], req[3]; |
---|
3073 | if (parse_version(zlib_version, sys) || parse_version("$MOZZLIB", req)) |
---|
3074 | exit(1); |
---|
3075 | if ((sys[0] == req[0]) && |
---|
3076 | ((sys[1] > req[1]) || ((sys[1] == req[1]) && (sys[2] >= req[2])))) |
---|
3077 | exit(0); |
---|
3078 | else |
---|
3079 | exit(1); |
---|
3080 | } |
---|
3081 | ], SYSTEM_ZLIB=1, [SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=], SYSTEM_ZLIB= ) |
---|
3082 | rm -f core |
---|
3083 | fi |
---|
3084 | CFLAGS=$_SAVE_CFLAGS |
---|
3085 | LDFLAGS=$_SAVE_LDFLAGS |
---|
3086 | LIBS=$_SAVE_LIBS |
---|
3087 | |
---|
3088 | if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then |
---|
3089 | ZLIB_CFLAGS="-I${ZLIB_DIR}/include" |
---|
3090 | ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" |
---|
3091 | fi |
---|
3092 | |
---|
3093 | dnl system PNG Support |
---|
3094 | dnl ======================================================== |
---|
3095 | MOZ_ARG_WITH_STRING(system-png, |
---|
3096 | [ --with-system-png[=PFX] |
---|
3097 | Use system libpng [installed at prefix PFX]], |
---|
3098 | PNG_DIR=$withval) |
---|
3099 | |
---|
3100 | _SAVE_CFLAGS=$CFLAGS |
---|
3101 | _SAVE_LDFLAGS=$LDFLAGS |
---|
3102 | _SAVE_LIBS=$LIBS |
---|
3103 | CFLAGS="$ZLIB_CFLAGS $CFLAGS" |
---|
3104 | LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" |
---|
3105 | if test -n "${PNG_DIR}"; then |
---|
3106 | CFLAGS="-I${PNG_DIR}/include $CFLAGS" |
---|
3107 | LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" |
---|
3108 | fi |
---|
3109 | if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then |
---|
3110 | SYSTEM_PNG= |
---|
3111 | else |
---|
3112 | AC_CHECK_LIB(png, png_get_valid, [SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS"], |
---|
3113 | SYSTEM_PNG=, $PNG_LIBS) |
---|
3114 | fi |
---|
3115 | if test "$SYSTEM_PNG" = 1; then |
---|
3116 | LIBS="$PNG_LIBS $LIBS" |
---|
3117 | AC_TRY_RUN( |
---|
3118 | #include <stdio.h> |
---|
3119 | #include <sys/types.h> |
---|
3120 | #include <png.h> |
---|
3121 | int main () { |
---|
3122 | #if PNG_LIBPNG_VER >= $MOZPNG |
---|
3123 | exit(0); |
---|
3124 | #else |
---|
3125 | exit(1); |
---|
3126 | #endif |
---|
3127 | } |
---|
3128 | , SYSTEM_PNG=1, [SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS=], SYSTEM_PNG= ) |
---|
3129 | rm -f core |
---|
3130 | fi |
---|
3131 | CFLAGS=$_SAVE_CFLAGS |
---|
3132 | LDFLAGS=$_SAVE_LDFLAGS |
---|
3133 | LIBS=$_SAVE_LIBS |
---|
3134 | |
---|
3135 | if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then |
---|
3136 | PNG_CFLAGS="-I${PNG_DIR}/include" |
---|
3137 | PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}" |
---|
3138 | fi |
---|
3139 | |
---|
3140 | fi # SKIP_LIBRARY_CHECKS |
---|
3141 | |
---|
3142 | dnl ======================================================== |
---|
3143 | dnl = |
---|
3144 | dnl = Toolkit Options |
---|
3145 | dnl = |
---|
3146 | dnl ======================================================== |
---|
3147 | MOZ_ARG_HEADER(Toolkit Options) |
---|
3148 | |
---|
3149 | dnl ======================================================== |
---|
3150 | dnl = Select the default toolkit |
---|
3151 | dnl ======================================================== |
---|
3152 | MOZ_ARG_ENABLE_STRING(default-toolkit, |
---|
3153 | [ --enable-default-toolkit=TK |
---|
3154 | Select default toolkit |
---|
3155 | Platform specific defaults: |
---|
3156 | BeOS - beos |
---|
3157 | Mac OS X - mac (carbon) |
---|
3158 | Neutrino/QNX - photon |
---|
3159 | OS/2 - os2 |
---|
3160 | Win32 - windows |
---|
3161 | * - gtk], |
---|
3162 | [ _DEFAULT_TOOLKIT=$enableval ], |
---|
3163 | [ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT]) |
---|
3164 | |
---|
3165 | if test "$_DEFAULT_TOOLKIT" = "gtk" \ |
---|
3166 | -o "$_DEFAULT_TOOLKIT" = "gtk2" \ |
---|
3167 | -o "$_DEFAULT_TOOLKIT" = "xlib" \ |
---|
3168 | -o "$_DEFAULT_TOOLKIT" = "os2" \ |
---|
3169 | -o "$_DEFAULT_TOOLKIT" = "beos" \ |
---|
3170 | -o "$_DEFAULT_TOOLKIT" = "photon" \ |
---|
3171 | -o "$_DEFAULT_TOOLKIT" = "mac" \ |
---|
3172 | -o "$_DEFAULT_TOOLKIT" = "windows" \ |
---|
3173 | -o "$_DEFAULT_TOOLKIT" = "cocoa" |
---|
3174 | then |
---|
3175 | dnl nglayout only supports building with one toolkit, |
---|
3176 | dnl so ignore everything after the first comma (","). |
---|
3177 | MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"` |
---|
3178 | else |
---|
3179 | if test "$no_x" != "yes"; then |
---|
3180 | AC_MSG_ERROR([Toolkit must be xlib, gtk or gtk2.]) |
---|
3181 | else |
---|
3182 | AC_MSG_ERROR([Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT.]) |
---|
3183 | fi |
---|
3184 | fi |
---|
3185 | |
---|
3186 | AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_TOOLKIT") |
---|
3187 | |
---|
3188 | dnl ======================================================== |
---|
3189 | dnl = Enable the toolkit as needed = |
---|
3190 | dnl ======================================================== |
---|
3191 | |
---|
3192 | case "$MOZ_WIDGET_TOOLKIT" in |
---|
3193 | gtk) |
---|
3194 | MOZ_ENABLE_GTK=1 |
---|
3195 | MOZ_ENABLE_XREMOTE=1 |
---|
3196 | TK_CFLAGS='$(MOZ_GTK_CFLAGS)' |
---|
3197 | TK_LIBS='$(MOZ_GTK_LDFLAGS)' |
---|
3198 | AC_DEFINE(MOZ_WIDGET_GTK) |
---|
3199 | ;; |
---|
3200 | |
---|
3201 | gtk2) |
---|
3202 | MOZ_ENABLE_GTK2=1 |
---|
3203 | MOZ_ENABLE_XREMOTE=1 |
---|
3204 | TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' |
---|
3205 | TK_LIBS='$(MOZ_GTK2_LIBS)' |
---|
3206 | AC_DEFINE(MOZ_WIDGET_GTK2) |
---|
3207 | ;; |
---|
3208 | |
---|
3209 | xlib) |
---|
3210 | MOZ_ENABLE_XLIB=1 |
---|
3211 | |
---|
3212 | TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' |
---|
3213 | TK_LIBS='$(MOZ_XLIB_LDFLAGS)' |
---|
3214 | AC_DEFINE(MOZ_WIDGET_XLIB) |
---|
3215 | ;; |
---|
3216 | |
---|
3217 | photon) |
---|
3218 | MOZ_ENABLE_PHOTON=1 |
---|
3219 | AC_DEFINE(MOZ_WIDGET_PHOTON) |
---|
3220 | ;; |
---|
3221 | mac|cocoa) |
---|
3222 | TK_LIBS='-framework Carbon' |
---|
3223 | TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" |
---|
3224 | CFLAGS="$CFLAGS $TK_CFLAGS" |
---|
3225 | CXXFLAGS="$CXXFLAGS $TK_CFLAGS" |
---|
3226 | MOZ_USER_DIR="Mozilla" |
---|
3227 | AC_DEFINE(XP_MACOSX) |
---|
3228 | AC_DEFINE(TARGET_CARBON) |
---|
3229 | AC_DEFINE(TARGET_API_MAC_CARBON) |
---|
3230 | if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then |
---|
3231 | MOZ_ENABLE_COCOA=1 |
---|
3232 | AC_DEFINE(MOZ_WIDGET_COCOA) |
---|
3233 | fi |
---|
3234 | ;; |
---|
3235 | esac |
---|
3236 | |
---|
3237 | if test "$MOZ_ENABLE_XREMOTE"; then |
---|
3238 | AC_DEFINE(MOZ_ENABLE_XREMOTE) |
---|
3239 | fi |
---|
3240 | |
---|
3241 | if test "$MOZ_ENABLE_GTK" |
---|
3242 | then |
---|
3243 | AM_PATH_GTK($GTK_VERSION,, |
---|
3244 | AC_MSG_ERROR(Test for GTK failed.)) |
---|
3245 | |
---|
3246 | MOZ_GTK_LDFLAGS=$GTK_LIBS |
---|
3247 | MOZ_GTK_CFLAGS=$GTK_CFLAGS |
---|
3248 | fi |
---|
3249 | |
---|
3250 | if test "$MOZ_ENABLE_GTK2" |
---|
3251 | then |
---|
3252 | PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7) |
---|
3253 | fi |
---|
3254 | |
---|
3255 | if test "$MOZ_ENABLE_XLIB" |
---|
3256 | then |
---|
3257 | MOZ_XLIB_CFLAGS="$X_CFLAGS" |
---|
3258 | MOZ_XLIB_LDFLAGS="$XLDFLAGS" |
---|
3259 | MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" |
---|
3260 | fi |
---|
3261 | |
---|
3262 | AC_SUBST(MOZ_DEFAULT_TOOLKIT) |
---|
3263 | |
---|
3264 | AC_SUBST(GTK_CONFIG) |
---|
3265 | AC_SUBST(TK_CFLAGS) |
---|
3266 | AC_SUBST(TK_LIBS) |
---|
3267 | |
---|
3268 | AC_SUBST(MOZ_ENABLE_GTK) |
---|
3269 | AC_SUBST(MOZ_ENABLE_XLIB) |
---|
3270 | AC_SUBST(MOZ_ENABLE_GTK2) |
---|
3271 | AC_SUBST(MOZ_ENABLE_PHOTON) |
---|
3272 | AC_SUBST(MOZ_ENABLE_COCOA) |
---|
3273 | AC_SUBST(MOZ_ENABLE_XREMOTE) |
---|
3274 | AC_SUBST(MOZ_GTK_CFLAGS) |
---|
3275 | AC_SUBST(MOZ_GTK_LDFLAGS) |
---|
3276 | AC_SUBST(MOZ_GTK2_CFLAGS) |
---|
3277 | AC_SUBST(MOZ_GTK2_LIBS) |
---|
3278 | AC_SUBST(MOZ_XLIB_CFLAGS) |
---|
3279 | AC_SUBST(MOZ_XLIB_LDFLAGS) |
---|
3280 | |
---|
3281 | AC_SUBST(MOC) |
---|
3282 | |
---|
3283 | if test "$MOZ_ENABLE_GTK" \ |
---|
3284 | || test "$MOZ_ENABLE_XLIB" \ |
---|
3285 | || test "$MOZ_ENABLE_GTK2" |
---|
3286 | then |
---|
3287 | AC_DEFINE(MOZ_X11) |
---|
3288 | MOZ_X11=1 |
---|
3289 | fi |
---|
3290 | AC_SUBST(MOZ_X11) |
---|
3291 | |
---|
3292 | dnl ======================================================== |
---|
3293 | dnl = |
---|
3294 | dnl = Components & Features |
---|
3295 | dnl = |
---|
3296 | dnl ======================================================== |
---|
3297 | MOZ_ARG_HEADER(Components and Features) |
---|
3298 | |
---|
3299 | dnl ========================================================= |
---|
3300 | dnl = Localization |
---|
3301 | dnl ========================================================= |
---|
3302 | |
---|
3303 | MOZ_ARG_ENABLE_STRING(ui-locale, |
---|
3304 | [ --enable-ui-locale=ab-CD |
---|
3305 | Select the default UI locale], |
---|
3306 | MOZ_UI_LOCALE=$enableval, |
---|
3307 | MOZ_UI_LOCALE=en-US) |
---|
3308 | AC_SUBST(MOZ_UI_LOCALE) |
---|
3309 | |
---|
3310 | dnl ========================================================= |
---|
3311 | dnl = Calendar client |
---|
3312 | dnl ========================================================= |
---|
3313 | MOZ_ARG_ENABLE_BOOL(calendar, |
---|
3314 | [ --enable-calendar Enable building of the calendar client], |
---|
3315 | MOZ_CALENDAR=1, |
---|
3316 | MOZ_CALENDAR= ) |
---|
3317 | AC_SUBST(MOZ_CALENDAR) |
---|
3318 | |
---|
3319 | dnl ========================================================= |
---|
3320 | dnl = Mail & News |
---|
3321 | dnl ========================================================= |
---|
3322 | MOZ_MAIL_NEWS=1 |
---|
3323 | MOZ_ARG_DISABLE_BOOL(mailnews, |
---|
3324 | [ --disable-mailnews Disable building of mail & news components], |
---|
3325 | MOZ_MAIL_NEWS= ) |
---|
3326 | AC_SUBST(MOZ_MAIL_NEWS) |
---|
3327 | |
---|
3328 | dnl ======================================================== |
---|
3329 | dnl static mail build off by default |
---|
3330 | dnl ======================================================== |
---|
3331 | MOZ_ARG_ENABLE_BOOL(static-mail, |
---|
3332 | [ --enable-static-mail Enable static mail build support], |
---|
3333 | MOZ_STATIC_MAIL_BUILD=1, |
---|
3334 | MOZ_STATIC_MAIL_BUILD= ) |
---|
3335 | |
---|
3336 | if test "$MOZ_STATIC_MAIL_BUILD"; then |
---|
3337 | AC_DEFINE(MOZ_STATIC_MAIL_BUILD) |
---|
3338 | fi |
---|
3339 | |
---|
3340 | AC_SUBST(MOZ_STATIC_MAIL_BUILD) |
---|
3341 | |
---|
3342 | dnl ========================================================= |
---|
3343 | dnl = LDAP |
---|
3344 | dnl ========================================================= |
---|
3345 | MOZ_LDAP_XPCOM=1 |
---|
3346 | MOZ_ARG_DISABLE_BOOL(ldap, |
---|
3347 | [ --disable-ldap Disable LDAP support], |
---|
3348 | MOZ_LDAP_XPCOM=, |
---|
3349 | MOZ_LDAP_XPCOM=1) |
---|
3350 | |
---|
3351 | dnl ======================================================== |
---|
3352 | dnl = Trademarked Branding |
---|
3353 | dnl ======================================================== |
---|
3354 | MOZ_ARG_ENABLE_BOOL(official-branding, |
---|
3355 | [ --enable-official-branding Enable Official mozilla.org Branding |
---|
3356 | Do not distribute builds with |
---|
3357 | --enable-official-branding unless you have |
---|
3358 | permission to use trademarks per |
---|
3359 | http://www.mozilla.org/foundation/trademarks/ .], |
---|
3360 | MOZ_USE_OFFICIAL_BRANDING=1, |
---|
3361 | MOZ_USE_OFFICIAL_BRANDING= ) |
---|
3362 | |
---|
3363 | AC_SUBST(MOZ_USE_OFFICIAL_BRANDING) |
---|
3364 | |
---|
3365 | dnl ======================================================== |
---|
3366 | dnl = Distribution ID |
---|
3367 | dnl ======================================================== |
---|
3368 | MOZ_ARG_WITH_STRING(distribution-id, |
---|
3369 | [ --with-distribution-id=ID Set distribution-specific id (default=org.mozilla)], |
---|
3370 | [ val=`echo $withval` |
---|
3371 | MOZ_DISTRIBUTION_ID="$val"]) |
---|
3372 | |
---|
3373 | if test -z "$MOZ_DISTRIBUTION_ID"; then |
---|
3374 | MOZ_DISTRIBUTION_ID=org.mozilla |
---|
3375 | fi |
---|
3376 | |
---|
3377 | AC_DEFINE_UNQUOTED(MOZ_DISTRIBUTION_ID_UNQUOTED, $MOZ_DISTRIBUTION_ID) |
---|
3378 | AC_DEFINE_UNQUOTED(MOZ_DISTRIBUTION_ID,"$MOZ_DISTRIBUTION_ID") |
---|
3379 | AC_SUBST(MOZ_DISTRIBUTION_ID_UNQUOTED) |
---|
3380 | AC_SUBST(MOZ_DISTRIBUTION_ID) |
---|
3381 | |
---|
3382 | dnl ======================================================== |
---|
3383 | dnl = Phoenix |
---|
3384 | dnl ======================================================== |
---|
3385 | MOZ_XUL_APP= |
---|
3386 | if test "$MOZ_PHOENIX"; then |
---|
3387 | AC_DEFINE(MOZ_PHOENIX) |
---|
3388 | MOZ_XUL_APP=1 |
---|
3389 | AC_DEFINE(MOZ_XUL_APP) |
---|
3390 | MOZ_APP_NAME=firefox |
---|
3391 | MOZ_APP_DISPLAYNAME=Firefox |
---|
3392 | MOZ_APP_VERSION=`cat $topsrcdir/browser/config/version.txt` |
---|
3393 | fi |
---|
3394 | |
---|
3395 | AC_SUBST(MOZ_PHOENIX) |
---|
3396 | |
---|
3397 | dnl ======================================================== |
---|
3398 | dnl = Thunderbird |
---|
3399 | dnl ======================================================== |
---|
3400 | if test "$MOZ_THUNDERBIRD"; then |
---|
3401 | AC_DEFINE(MOZ_THUNDERBIRD) |
---|
3402 | |
---|
3403 | MOZ_STATIC_MAIL_BUILD=1 |
---|
3404 | AC_DEFINE(MOZ_STATIC_MAIL_BUILD) |
---|
3405 | |
---|
3406 | MOZ_XUL_APP=1 |
---|
3407 | AC_DEFINE(MOZ_XUL_APP) |
---|
3408 | MOZ_APP_NAME=thunderbird |
---|
3409 | MOZ_APP_DISPLAYNAME=Thunderbird |
---|
3410 | MOZ_APP_VERSION=`cat $topsrcdir/mail/config/version.txt` |
---|
3411 | fi |
---|
3412 | |
---|
3413 | AC_SUBST(MOZ_THUNDERBIRD) |
---|
3414 | AC_SUBST(MOZ_XUL_APP) |
---|
3415 | |
---|
3416 | dnl ======================================================== |
---|
3417 | dnl = Standalone Composer |
---|
3418 | dnl ======================================================== |
---|
3419 | if test "$MOZ_STANDALONE_COMPOSER"; then |
---|
3420 | AC_DEFINE(MOZ_STANDALONE_COMPOSER) |
---|
3421 | |
---|
3422 | MOZ_XUL_APP=1 |
---|
3423 | AC_DEFINE(MOZ_XUL_APP) |
---|
3424 | MOZ_APP_NAME=nvu |
---|
3425 | MOZ_APP_DISPLAYNAME=NVU |
---|
3426 | MOZ_APP_VERSION=0.17+ |
---|
3427 | fi |
---|
3428 | |
---|
3429 | AC_SUBST(MOZ_STANDALONE_COMPOSER) |
---|
3430 | AC_SUBST(MOZ_XUL_APP) |
---|
3431 | AC_DEFINE_UNQUOTED(MOZ_APP_NAME, "$MOZ_APP_NAME") |
---|
3432 | |
---|
3433 | dnl ======================================================== |
---|
3434 | dnl = FreeType2 |
---|
3435 | dnl = Enable freetype by default if building against X11 |
---|
3436 | dnl = and freetype is available |
---|
3437 | dnl ======================================================== |
---|
3438 | MOZ_ARG_DISABLE_BOOL(freetype2, |
---|
3439 | [ --disable-freetype2 Disable FreeType2 support ], |
---|
3440 | MOZ_ENABLE_FREETYPE2=, |
---|
3441 | MOZ_ENABLE_FREETYPE2=1, |
---|
3442 | [if test "$MOZ_X11" -a "$_HAVE_FREETYPE2"; then |
---|
3443 | MOZ_ENABLE_FREETYPE2=1 |
---|
3444 | fi]) |
---|
3445 | |
---|
3446 | if test "$MOZ_ENABLE_FREETYPE2" && test -z "$MOZ_X11" -o -z "$_HAVE_FREETYPE2"; then |
---|
3447 | AC_MSG_ERROR([Cannot enable FreeType2 support for non-X11 toolkits or if FreeType2 is not detected.]) |
---|
3448 | fi |
---|
3449 | |
---|
3450 | if test "$MOZ_ENABLE_FREETYPE2"; then |
---|
3451 | AC_DEFINE(MOZ_ENABLE_FREETYPE2) |
---|
3452 | _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES MOZ_ENABLE_FREETYPE2" |
---|
3453 | fi |
---|
3454 | AC_SUBST(MOZ_ENABLE_FREETYPE2) |
---|
3455 | |
---|
3456 | dnl ======================================================== |
---|
3457 | dnl = Xft |
---|
3458 | dnl ======================================================== |
---|
3459 | MOZ_ARG_ENABLE_BOOL(xft, |
---|
3460 | [ --enable-xft Enable Xft support ], |
---|
3461 | MOZ_ENABLE_XFT=1, |
---|
3462 | MOZ_ENABLE_XFT= ) |
---|
3463 | |
---|
3464 | if test "$MOZ_ENABLE_XFT" |
---|
3465 | then |
---|
3466 | AC_DEFINE(MOZ_ENABLE_XFT) |
---|
3467 | PKG_CHECK_MODULES(MOZ_XFT, xft) |
---|
3468 | if test "$MOZ_ENABLE_GTK2"; then |
---|
3469 | PKG_CHECK_MODULES(_PANGOCHK, pango >= 1.1.0) |
---|
3470 | fi |
---|
3471 | fi |
---|
3472 | |
---|
3473 | AC_SUBST(MOZ_ENABLE_XFT) |
---|
3474 | AC_SUBST(MOZ_XFT_CFLAGS) |
---|
3475 | AC_SUBST(MOZ_XFT_LIBS) |
---|
3476 | |
---|
3477 | dnl ======================================================== |
---|
3478 | dnl = disabling x11 core support, enabled by default |
---|
3479 | dnl ======================================================== |
---|
3480 | MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-1} |
---|
3481 | if test "$MOZ_ENABLE_COREXFONTS" |
---|
3482 | then |
---|
3483 | AC_DEFINE(MOZ_ENABLE_COREXFONTS) |
---|
3484 | fi |
---|
3485 | |
---|
3486 | AC_SUBST(MOZ_ENABLE_COREXFONTS) |
---|
3487 | |
---|
3488 | dnl ======================================================== |
---|
3489 | dnl = PostScript print module |
---|
3490 | dnl ======================================================== |
---|
3491 | MOZ_ARG_DISABLE_BOOL(postscript, |
---|
3492 | [ --disable-postscript Disable PostScript printing support ], |
---|
3493 | MOZ_ENABLE_POSTSCRIPT=, |
---|
3494 | MOZ_ENABLE_POSTSCRIPT=1 ) |
---|
3495 | |
---|
3496 | dnl ======================================================== |
---|
3497 | dnl = Xprint print module |
---|
3498 | dnl ======================================================== |
---|
3499 | if test "$MOZ_X11" |
---|
3500 | then |
---|
3501 | MOZ_ENABLE_XPRINT=1 |
---|
3502 | |
---|
3503 | _SAVE_LDFLAGS="$LDFLAGS" |
---|
3504 | LDFLAGS="$XLDFLAGS $LDFLAGS" |
---|
3505 | AC_CHECK_LIB(Xp, XpGetPrinterList, [XPRINT_LIBS="-lXp"], |
---|
3506 | MOZ_ENABLE_XPRINT=, $XEXT_LIBS $XLIBS) |
---|
3507 | LDFLAGS="$_SAVE_LDFLAGS" |
---|
3508 | |
---|
3509 | MOZ_XPRINT_CFLAGS="$X_CFLAGS" |
---|
3510 | MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS" |
---|
3511 | MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS" |
---|
3512 | |
---|
3513 | MOZ_ARG_DISABLE_BOOL(xprint, |
---|
3514 | [ --disable-xprint Disable Xprint printing support ], |
---|
3515 | MOZ_ENABLE_XPRINT=, |
---|
3516 | MOZ_ENABLE_XPRINT=1 ) |
---|
3517 | fi |
---|
3518 | |
---|
3519 | dnl ======================================================== |
---|
3520 | dnl = GnomeVFS support module |
---|
3521 | dnl ======================================================== |
---|
3522 | |
---|
3523 | if test "$MOZ_X11" |
---|
3524 | then |
---|
3525 | dnl build the gnomevfs extension by default only when the |
---|
3526 | dnl GTK2 toolkit is in use. |
---|
3527 | if test "$MOZ_ENABLE_GTK2" |
---|
3528 | then |
---|
3529 | MOZ_ENABLE_GNOMEVFS=1 |
---|
3530 | MOZ_ENABLE_GCONF=1 |
---|
3531 | MOZ_ENABLE_LIBGNOME=1 |
---|
3532 | fi |
---|
3533 | |
---|
3534 | MOZ_ARG_DISABLE_BOOL(gnomevfs, |
---|
3535 | [ --disable-gnomevfs Disable GnomeVFS support ], |
---|
3536 | MOZ_ENABLE_GNOMEVFS=, |
---|
3537 | MOZ_ENABLE_GNOMEVFS=force) |
---|
3538 | |
---|
3539 | if test "$MOZ_ENABLE_GNOMEVFS" |
---|
3540 | then |
---|
3541 | PKG_CHECK_MODULES(MOZ_GNOMEVFS, gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION,[ |
---|
3542 | MOZ_ENABLE_GNOMEVFS=1 |
---|
3543 | ],[ |
---|
3544 | if test "$MOZ_ENABLE_GNOMEVFS" = "force" |
---|
3545 | then |
---|
3546 | AC_MSG_ERROR([* * * Could not find gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION]) |
---|
3547 | fi |
---|
3548 | MOZ_ENABLE_GNOMEVFS= |
---|
3549 | ]) |
---|
3550 | fi |
---|
3551 | |
---|
3552 | AC_SUBST(MOZ_GNOMEVFS_CFLAGS) |
---|
3553 | AC_SUBST(MOZ_GNOMEVFS_LIBS) |
---|
3554 | |
---|
3555 | if test "$MOZ_ENABLE_GCONF" |
---|
3556 | then |
---|
3557 | PKG_CHECK_MODULES(MOZ_GCONF, gconf-2.0 >= $GCONF_VERSION,[ |
---|
3558 | MOZ_ENABLE_GCONF=1 |
---|
3559 | ],[ |
---|
3560 | MOZ_ENABLE_GCONF= |
---|
3561 | ]) |
---|
3562 | fi |
---|
3563 | |
---|
3564 | AC_SUBST(MOZ_GCONF_CFLAGS) |
---|
3565 | AC_SUBST(MOZ_GCONF_LIBS) |
---|
3566 | |
---|
3567 | if test "$MOZ_ENABLE_LIBGNOME" |
---|
3568 | then |
---|
3569 | PKG_CHECK_MODULES(MOZ_LIBGNOME, libgnome-2.0 >= $LIBGNOME_VERSION,[ |
---|
3570 | MOZ_ENABLE_LIBGNOME=1 |
---|
3571 | ],[ |
---|
3572 | MOZ_ENABLE_LIBGNOME= |
---|
3573 | ]) |
---|
3574 | fi |
---|
3575 | |
---|
3576 | AC_SUBST(MOZ_LIBGNOME_CFLAGS) |
---|
3577 | AC_SUBST(MOZ_LIBGNOME_LIBS) |
---|
3578 | |
---|
3579 | # The GNOME component is built if gtk2, gconf, gnome-vfs, and libgnome |
---|
3580 | # are all available. |
---|
3581 | |
---|
3582 | if test "$MOZ_ENABLE_GTK2" -a "$MOZ_ENABLE_GCONF" -a \ |
---|
3583 | "$MOZ_ENABLE_GNOMEVFS" -a "$MOZ_ENABLE_LIBGNOME"; then |
---|
3584 | MOZ_ENABLE_GNOME_COMPONENT=1 |
---|
3585 | else |
---|
3586 | MOZ_ENABLE_GNOME_COMPONENT= |
---|
3587 | fi |
---|
3588 | |
---|
3589 | AC_SUBST(MOZ_ENABLE_GNOME_COMPONENT) |
---|
3590 | fi |
---|
3591 | |
---|
3592 | dnl ======================================================== |
---|
3593 | dnl = Setting MOZ_EXTRA_X11CONVERTERS turns on additional |
---|
3594 | dnl = converters in intl/uconv that are used only by X11 gfx |
---|
3595 | dnl = implementations. By default, it's undefined so that |
---|
3596 | dnl = those converters are not built on other platforms/toolkits. |
---|
3597 | dnl = (see bug 180851) |
---|
3598 | dnl ======================================================== |
---|
3599 | |
---|
3600 | if (test "$MOZ_ENABLE_GTK" || test "$MOZ_ENABLE_GTK2") \ |
---|
3601 | && test "$MOZ_ENABLE_COREXFONTS" \ |
---|
3602 | || test "$MOZ_ENABLE_XLIB" \ |
---|
3603 | || test "$MOZ_ENABLE_XPRINT" |
---|
3604 | then |
---|
3605 | AC_DEFINE(MOZ_EXTRA_X11CONVERTERS) |
---|
3606 | MOZ_EXTRA_X11CONVERTERS=1 |
---|
3607 | fi |
---|
3608 | AC_SUBST(MOZ_EXTRA_X11CONVERTERS) |
---|
3609 | |
---|
3610 | dnl ======================================================== |
---|
3611 | dnl = Build Personal Security Manager |
---|
3612 | dnl ======================================================== |
---|
3613 | MOZ_ARG_ENABLE_BOOL(crypto, |
---|
3614 | [ --enable-crypto Enable crypto support (Personal Security Manager)], |
---|
3615 | MOZ_PSM=1, |
---|
3616 | MOZ_PSM= ) |
---|
3617 | case $target in |
---|
3618 | *-cygwin*|*-mingw*|*-msvc*|*-mks*) |
---|
3619 | if test -n "$MOZ_PSM" -a ! -e "$AS_BIN"; then |
---|
3620 | AC_MSG_ERROR([Building crypto support requires a valid version of the standalone assembler (ml.exe for MSVC).]) |
---|
3621 | fi |
---|
3622 | ;; |
---|
3623 | esac |
---|
3624 | |
---|
3625 | dnl ======================================================== |
---|
3626 | dnl = JS Debugger XPCOM component (js/jsd) |
---|
3627 | dnl ======================================================== |
---|
3628 | MOZ_JSDEBUGGER=1 |
---|
3629 | MOZ_ARG_DISABLE_BOOL(jsd, |
---|
3630 | [ --disable-jsd Disable JavaScript debug library], |
---|
3631 | MOZ_JSDEBUGGER=, |
---|
3632 | MOZ_JSDEBUGGER=1) |
---|
3633 | |
---|
3634 | |
---|
3635 | dnl ======================================================== |
---|
3636 | dnl = Disable plugin support |
---|
3637 | dnl ======================================================== |
---|
3638 | MOZ_PLUGINS=1 |
---|
3639 | MOZ_ARG_DISABLE_BOOL(plugins, |
---|
3640 | [ --disable-plugins Disable plugins support], |
---|
3641 | MOZ_PLUGINS=, |
---|
3642 | MOZ_PLUGINS=1) |
---|
3643 | |
---|
3644 | dnl ======================================================== |
---|
3645 | dnl = Open JVM Interface (OJI) support |
---|
3646 | dnl ======================================================== |
---|
3647 | MOZ_OJI=1 |
---|
3648 | MOZ_ARG_DISABLE_BOOL(oji, |
---|
3649 | [ --disable-oji Disable Open JVM Integration support], |
---|
3650 | MOZ_OJI=, |
---|
3651 | MOZ_OJI=1) |
---|
3652 | if test -n "$MOZ_OJI"; then |
---|
3653 | AC_DEFINE(OJI) |
---|
3654 | fi |
---|
3655 | |
---|
3656 | dnl ======================================================== |
---|
3657 | dnl = This turns on xinerama support. We just can't use the |
---|
3658 | dnl = autodetection of the libraries since on Red Hat 7 linking with |
---|
3659 | dnl = Xinerama crashes the dynamic loader. Make people turn it on |
---|
3660 | dnl = explicitly. The autodetection is done above in the Xlib |
---|
3661 | dnl = detection routines. |
---|
3662 | dnl ======================================================== |
---|
3663 | MOZ_ARG_ENABLE_BOOL(xinerama, |
---|
3664 | [ --enable-xinerama Enable Xinerama support |
---|
3665 | ( not safe for Red Hat 7.0 ) ], |
---|
3666 | _ENABLE_XINERAMA=1, |
---|
3667 | _ENABLE_XINERAMA= ) |
---|
3668 | |
---|
3669 | if test -n "$_ENABLE_XINERAMA" -a -n "$MOZ_XINERAMA_LIBS" -a \ |
---|
3670 | -n "$ac_cv_header_X11_extensions_Xinerama_h"; then |
---|
3671 | MOZ_ENABLE_XINERAMA=1 |
---|
3672 | AC_DEFINE(MOZ_ENABLE_XINERAMA) |
---|
3673 | fi |
---|
3674 | |
---|
3675 | dnl bi-directional support always on |
---|
3676 | IBMBIDI=1 |
---|
3677 | AC_DEFINE(IBMBIDI) |
---|
3678 | |
---|
3679 | dnl ======================================================== |
---|
3680 | dnl complex text support off by default |
---|
3681 | dnl ======================================================== |
---|
3682 | SUNCTL= |
---|
3683 | MOZ_ARG_ENABLE_BOOL(ctl, |
---|
3684 | [ --enable-ctl Enable Thai Complex Script support], |
---|
3685 | SUNCTL=1, |
---|
3686 | SUNCTL= ) |
---|
3687 | |
---|
3688 | dnl ======================================================== |
---|
3689 | dnl view source support on by default |
---|
3690 | dnl ======================================================== |
---|
3691 | MOZ_VIEW_SOURCE=1 |
---|
3692 | MOZ_ARG_DISABLE_BOOL(view-source, |
---|
3693 | [ --disable-view-source Disable view source support], |
---|
3694 | MOZ_VIEW_SOURCE=, |
---|
3695 | MOZ_VIEW_SOURCE=1 ) |
---|
3696 | if test "$MOZ_VIEW_SOURCE"; then |
---|
3697 | AC_DEFINE(MOZ_VIEW_SOURCE) |
---|
3698 | fi |
---|
3699 | |
---|
3700 | |
---|
3701 | dnl ======================================================== |
---|
3702 | dnl accessibility support on by default |
---|
3703 | dnl ======================================================== |
---|
3704 | ACCESSIBILITY=1 |
---|
3705 | MOZ_ARG_DISABLE_BOOL(accessibility, |
---|
3706 | [ --disable-accessibility Disable accessibility support], |
---|
3707 | ACCESSIBILITY=, |
---|
3708 | ACCESSIBILITY=1 ) |
---|
3709 | if test "$ACCESSIBILITY"; then |
---|
3710 | AC_DEFINE(ACCESSIBILITY) |
---|
3711 | fi |
---|
3712 | |
---|
3713 | dnl ======================================================== |
---|
3714 | dnl xpfe/components on by default |
---|
3715 | dnl ======================================================== |
---|
3716 | MOZ_XPFE_COMPONENTS=1 |
---|
3717 | MOZ_ARG_DISABLE_BOOL(xpfe-components, |
---|
3718 | [ --disable-xpfe-components |
---|
3719 | Disable xpfe components], |
---|
3720 | MOZ_XPFE_COMPONENTS=, |
---|
3721 | MOZ_XPFE_COMPONENTS=1 ) |
---|
3722 | |
---|
3723 | dnl ======================================================== |
---|
3724 | dnl xpinstall support on by default |
---|
3725 | dnl ======================================================== |
---|
3726 | MOZ_XPINSTALL=1 |
---|
3727 | MOZ_ARG_DISABLE_BOOL(xpinstall, |
---|
3728 | [ --disable-xpinstall Disable xpinstall support], |
---|
3729 | MOZ_XPINSTALL=, |
---|
3730 | MOZ_XPINSTALL=1 ) |
---|
3731 | if test "$MOZ_XPINSTALL"; then |
---|
3732 | AC_DEFINE(MOZ_XPINSTALL) |
---|
3733 | fi |
---|
3734 | |
---|
3735 | dnl ======================================================== |
---|
3736 | dnl Single profile support off by default |
---|
3737 | dnl ======================================================== |
---|
3738 | MOZ_SINGLE_PROFILE= |
---|
3739 | MOZ_ARG_ENABLE_BOOL(single-profile, |
---|
3740 | [ --enable-single-profile Enable single profile support ], |
---|
3741 | MOZ_SINGLE_PROFILE=1, |
---|
3742 | MOZ_SINGLE_PROFILE= ) |
---|
3743 | |
---|
3744 | dnl ======================================================== |
---|
3745 | dnl xpcom js loader support on by default |
---|
3746 | dnl ======================================================== |
---|
3747 | MOZ_JSLOADER=1 |
---|
3748 | MOZ_ARG_DISABLE_BOOL(jsloader, |
---|
3749 | [ --disable-jsloader Disable xpcom js loader support], |
---|
3750 | MOZ_JSLOADER=, |
---|
3751 | MOZ_JSLOADER=1 ) |
---|
3752 | if test "$MOZ_JSLOADER"; then |
---|
3753 | AC_DEFINE(MOZ_JSLOADER) |
---|
3754 | fi |
---|
3755 | |
---|
3756 | dnl ======================================================== |
---|
3757 | dnl use native unicode converters |
---|
3758 | dnl ======================================================== |
---|
3759 | MOZ_USE_NATIVE_UCONV= |
---|
3760 | MOZ_ARG_ENABLE_BOOL(native-uconv, |
---|
3761 | [ --enable-native-uconv Enable iconv support], |
---|
3762 | MOZ_USE_NATIVE_UCONV=1, |
---|
3763 | MOZ_USE_NATIVE_UCONV= ) |
---|
3764 | if test "$MOZ_USE_NATIVE_UCONV"; then |
---|
3765 | AC_DEFINE(MOZ_USE_NATIVE_UCONV) |
---|
3766 | fi |
---|
3767 | if test "$MOZ_USE_NATIVE_UCONV" -a "$ac_cv_func_iconv" != "yes"; then |
---|
3768 | AC_MSG_ERROR([iconv() not found. Cannot enable native uconv support.]) |
---|
3769 | fi |
---|
3770 | |
---|
3771 | dnl ======================================================== |
---|
3772 | dnl Libeditor can be build as plaintext-only, |
---|
3773 | dnl or as a full html and text editing component. |
---|
3774 | dnl We build both by default. |
---|
3775 | dnl ======================================================== |
---|
3776 | MOZ_PLAINTEXT_EDITOR_ONLY= |
---|
3777 | MOZ_ARG_ENABLE_BOOL(plaintext-editor-only, |
---|
3778 | [ --enable-plaintext-editor-only |
---|
3779 | Allow only plaintext editing], |
---|
3780 | MOZ_PLAINTEXT_EDITOR_ONLY=1, |
---|
3781 | MOZ_PLAINTEXT_EDITOR_ONLY= ) |
---|
3782 | dnl Note the #define is MOZILLA, not MOZ, for compat with the Mac build. |
---|
3783 | AC_SUBST(MOZ_PLAINTEXT_EDITOR_ONLY) |
---|
3784 | |
---|
3785 | dnl ======================================================== |
---|
3786 | dnl Composer is on by default. |
---|
3787 | dnl ======================================================== |
---|
3788 | MOZ_COMPOSER=1 |
---|
3789 | MOZ_ARG_DISABLE_BOOL(composer, |
---|
3790 | [ --disable-composer Disable building of Composer], |
---|
3791 | MOZ_COMPOSER=, |
---|
3792 | MOZ_COMPOSER=1 ) |
---|
3793 | AC_SUBST(MOZ_COMPOSER) |
---|
3794 | |
---|
3795 | dnl ======================================================== |
---|
3796 | dnl = Enable compilation of specific extension modules |
---|
3797 | dnl ======================================================== |
---|
3798 | |
---|
3799 | MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs negotiateauth" |
---|
3800 | |
---|
3801 | MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT xmlterm datetime finger cview layout-debug tasks" |
---|
3802 | |
---|
3803 | MOZ_ARG_ENABLE_STRING(extensions, |
---|
3804 | [ --enable-extensions Enable extensions], |
---|
3805 | [ for option in `echo $enableval | sed 's/,/ /g'`; do |
---|
3806 | if test "$option" = "yes" || test "$option" = "all"; then |
---|
3807 | MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL" |
---|
3808 | elif test "$option" = "no" || test "$option" = "none"; then |
---|
3809 | MOZ_EXTENSIONS="" |
---|
3810 | elif test "$option" = "default"; then |
---|
3811 | MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT" |
---|
3812 | elif test `echo "$option" | grep -c \^-` != 0; then |
---|
3813 | option=`echo $option | sed 's/^-//'` |
---|
3814 | MOZ_EXTENSIONS=`echo "$MOZ_EXTENSIONS" | sed "s/ ${option}//"` |
---|
3815 | else |
---|
3816 | MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option" |
---|
3817 | fi |
---|
3818 | done], |
---|
3819 | MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT") |
---|
3820 | |
---|
3821 | if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then |
---|
3822 | AC_MSG_WARN([Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS.]) |
---|
3823 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'` |
---|
3824 | fi |
---|
3825 | |
---|
3826 | if test -z "$MOZ_ENABLE_GNOMEVFS" && test `echo "$MOZ_EXTENSIONS" | grep -c gnomevfs` -ne 0; then |
---|
3827 | # Suppress warning on non-X11 platforms |
---|
3828 | if test -n "$MOZ_X11"; then |
---|
3829 | AC_MSG_WARN([Cannot build gnomevfs without required libraries. Removing gnomevfs from MOZ_EXTENSIONS.]) |
---|
3830 | fi |
---|
3831 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gnomevfs||'` |
---|
3832 | fi |
---|
3833 | |
---|
3834 | if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then |
---|
3835 | AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.]) |
---|
3836 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'` |
---|
3837 | fi |
---|
3838 | |
---|
3839 | dnl This might be temporary: build tridentprofile only on Windows |
---|
3840 | if test `echo "$MOZ_EXTENSIONS" | grep -c tridentprofile` -ne 0 && test "$OS_ARCH" != "WINNT"; then |
---|
3841 | AC_MSG_WARN([tridentprofile extension works only on Windows at this time. Removing tridentprofile from MOZ_EXTENSIONS.]) |
---|
3842 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|tridentprofile||'` |
---|
3843 | fi |
---|
3844 | |
---|
3845 | dnl cookie must be built before tridentprofile. put it at list's end. |
---|
3846 | if test `echo "$MOZ_EXTENSIONS" | grep -c tridentprofile` -ne 0; then |
---|
3847 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|tridentprofile||'` |
---|
3848 | if test `echo "$MOZ_EXTENSIONS" | grep -c cookie` -eq 0; then |
---|
3849 | AC_MSG_WARN([tridentprofile extension requires cookie. Removing tridentprofile.]) |
---|
3850 | else |
---|
3851 | MOZ_EXTENSIONS="$MOZ_EXTENSIONS tridentprofile" |
---|
3852 | fi |
---|
3853 | fi |
---|
3854 | |
---|
3855 | dnl ======================================================== |
---|
3856 | dnl Check for GSSAPI libraries and headers needed for |
---|
3857 | dnl integrated windows authentication support (disable |
---|
3858 | dnl negotiateauth extension if GSSAPI is not available). |
---|
3859 | dnl |
---|
3860 | dnl If we are not using GSSAPI to implement this extension, |
---|
3861 | dnl then we can obviously skip these checks. |
---|
3862 | dnl ======================================================== |
---|
3863 | |
---|
3864 | if test -n "$USE_GSSAPI" && test `echo "$MOZ_EXTENSIONS" | grep -c negotiateauth` -ne 0; then |
---|
3865 | dnl |
---|
3866 | dnl Check for alternative location for GSSAPI libraries. |
---|
3867 | dnl |
---|
3868 | MOZ_ARG_WITH_STRING(gssapi, |
---|
3869 | [ --with-gssapi=PFX Location of GSSAPI libraries], |
---|
3870 | GSSAPI_DIR=$withval) |
---|
3871 | |
---|
3872 | dnl |
---|
3873 | dnl If not specified, assume GSSAPI lives under /usr |
---|
3874 | dnl |
---|
3875 | if test -z "$GSSAPI_DIR"; then |
---|
3876 | dnl |
---|
3877 | dnl RedHat Linux 7, 8, and 9 install GSSAPI headers and libraries under |
---|
3878 | dnl /usr/kerberos -- perhaps other platforms do the same. If not, then |
---|
3879 | dnl we count on the default search paths. Fedora Core 1, at least, |
---|
3880 | dnl puts the headers and libraries under /usr, but it still has |
---|
3881 | dnl /usr/kerberos for the other KRB5 components. |
---|
3882 | dnl |
---|
3883 | if test -d "/usr/kerberos/include"; then |
---|
3884 | GSSAPI_DIR="/usr/kerberos" |
---|
3885 | else |
---|
3886 | GSSAPI_DIR="/usr" |
---|
3887 | fi |
---|
3888 | fi |
---|
3889 | |
---|
3890 | _SAVE_CPPFLAGS="$CPPFLAGS" |
---|
3891 | _SAVE_LDFLAGS="$LDFLAGS" |
---|
3892 | _SAVE_LIBS="$LIBS" |
---|
3893 | |
---|
3894 | CPPFLAGS="$CPPFLAGS -I$GSSAPI_DIR/include" |
---|
3895 | LDFLAGS="$LDFLAGS -L$GSSAPI_DIR/lib" |
---|
3896 | |
---|
3897 | dnl |
---|
3898 | dnl Try to set GSSAPI_INCLUDES ... |
---|
3899 | dnl |
---|
3900 | AC_CHECK_HEADERS(gssapi.h, |
---|
3901 | [GSSAPI_INCLUDES="-I$GSSAPI_DIR/include"]) |
---|
3902 | if test -z "$GSSAPI_INCLUDES" ; then |
---|
3903 | AC_CHECK_HEADERS(gssapi/gssapi.h, |
---|
3904 | [GSSAPI_INCLUDES="-I$GSSAPI_DIR/include"]) |
---|
3905 | fi |
---|
3906 | CPPFLAGS="$_SAVE_CPPFLAGS $GSSAPI_INCLUDES" |
---|
3907 | |
---|
3908 | dnl |
---|
3909 | dnl Try to set GSSAPI_LIBS ... |
---|
3910 | dnl |
---|
3911 | dnl Athena mod: First look for the MIT Kerberos V5 GSSAPI libraries. |
---|
3912 | dnl |
---|
3913 | dnl We only need to link to libgssapi_krb5.so |
---|
3914 | dnl |
---|
3915 | _GSS_LIBS="-L$GSSAPI_DIR/lib -lgssapi_krb5" |
---|
3916 | LIBS="$LIBS $_GSS_LIBS" |
---|
3917 | AC_CHECK_FUNC(gss_init_sec_context, |
---|
3918 | [GSSAPI_LIBS="$_GSS_LIBS"],) |
---|
3919 | LIBS="$_SAVE_LIBS" |
---|
3920 | |
---|
3921 | dnl |
---|
3922 | dnl If the MIT Kerberos V5 GSSAPI libraries were not found, |
---|
3923 | dnl look for libgss. |
---|
3924 | dnl |
---|
3925 | if test -z "$GSSAPI_LIBS" ; then |
---|
3926 | AC_CHECK_LIB(gss, gss_init_sec_context, |
---|
3927 | [GSSAPI_LIBS="-L$GSSAPI_DIR/lib -lgss"],) |
---|
3928 | fi |
---|
3929 | |
---|
3930 | dnl |
---|
3931 | dnl If GSS libs were STILL not found, try looking for Heimdal |
---|
3932 | dnl Kerberos V5 libraries. |
---|
3933 | dnl |
---|
3934 | if test -z "$GSSAPI_LIBS" ; then |
---|
3935 | if test -x "$GSSAPI_DIR/bin/krb5-config" ; then |
---|
3936 | krb5cfg="$GSSAPI_DIR/bin/krb5-config" |
---|
3937 | TMP_GSSAPI_LIBS=`$krb5cfg --libs gssapi 2>/dev/null` |
---|
3938 | TMP_GSSAPI_INCLUDES=`$krb5cfg --cflags gssapi 2>/dev/null` |
---|
3939 | |
---|
3940 | LIBS="$LIBS $TMP_GSSAPI_LIBS" |
---|
3941 | AC_CHECK_LIB(gssapi, gss_init_sec_context, |
---|
3942 | [GSSAPI_LIBS="$TMP_GSSAPI_LIBS" |
---|
3943 | GSSAPI_INCLUDES="$TMP_GSSAPI_INCLUDES"], |
---|
3944 | [GSSAPI_LIBS=""]) |
---|
3945 | |
---|
3946 | CPPFLAGS="$_SAVE_CPPFLAGS $GSSAPI_INCLUDES" |
---|
3947 | fi |
---|
3948 | fi |
---|
3949 | |
---|
3950 | dnl |
---|
3951 | dnl If GSSAPI libs were not found, remove extension from the list to be |
---|
3952 | dnl built. |
---|
3953 | dnl |
---|
3954 | if test -z "$GSSAPI_LIBS" ; then |
---|
3955 | AC_MSG_WARN([Cannot build negotiateauth without GSSAPI. Removing negotatiate from MOZ_EXTENSIONS.]) |
---|
3956 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|negotiateauth||'` |
---|
3957 | GSSAPI_INCLUDES= |
---|
3958 | else |
---|
3959 | dnl |
---|
3960 | dnl Try to determine if the GSS_C_NT_HOSTBASED_SERVICE value is |
---|
3961 | dnl defined. Older MIT releases did not define this correctly. |
---|
3962 | dnl |
---|
3963 | AC_CHECK_HEADERS([gssapi_generic.h]) |
---|
3964 | AC_CHECK_HEADERS([gssapi/gssapi_generic.h]) |
---|
3965 | |
---|
3966 | AC_TRY_COMPILE([ #if defined(HAVE_GSSAPI_H) |
---|
3967 | #include <gssapi.h> |
---|
3968 | #elif defined(HAVE_GSSAPI_GSSAPI_H) |
---|
3969 | #include <gssapi/gssapi.h> |
---|
3970 | #endif ], |
---|
3971 | [ gss_OID oid = GSS_C_NT_HOSTBASED_SERVICE; ], |
---|
3972 | [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)],[ |
---|
3973 | AC_MSG_WARN([GSS_C_NT_HOSTBASED_SERVICE not found]) |
---|
3974 | ]) |
---|
3975 | fi |
---|
3976 | |
---|
3977 | LIBS="$_SAVE_LIBS" |
---|
3978 | LDFLAGS="$_SAVE_LDFLAGS" |
---|
3979 | CPPFLAGS="$_SAVE_CPPFLAGS" |
---|
3980 | |
---|
3981 | AC_SUBST(GSSAPI_INCLUDES) |
---|
3982 | AC_SUBST(GSSAPI_LIBS) |
---|
3983 | fi |
---|
3984 | |
---|
3985 | |
---|
3986 | dnl Remove dupes |
---|
3987 | MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_EXTENSIONS}` |
---|
3988 | |
---|
3989 | dnl ======================================================== |
---|
3990 | dnl Image decoders |
---|
3991 | dnl ======================================================== |
---|
3992 | MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm" |
---|
3993 | case "$target_os" in |
---|
3994 | cygwin*|mingw*|msvc*|mks*|os2*) |
---|
3995 | MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon" |
---|
3996 | ;; |
---|
3997 | darwin*) |
---|
3998 | if test "$MOZ_WIDGET_TOOLKIT" = "mac" -o "$MOZ_WIDGET_TOOLKIT" = "cocoa"; |
---|
3999 | then |
---|
4000 | MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon" |
---|
4001 | fi |
---|
4002 | ;; |
---|
4003 | esac |
---|
4004 | |
---|
4005 | MOZ_ARG_ENABLE_STRING(image-decoders, |
---|
4006 | [ --enable-image-decoders[={mod1,mod2,default,all,none}] |
---|
4007 | Enable specific image decoders], |
---|
4008 | [ for option in `echo $enableval | sed 's/,/ /g'`; do |
---|
4009 | if test "$option" = "yes" || test "$option" = "all"; then |
---|
4010 | MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS $MOZ_IMG_DECODERS_DEFAULT" |
---|
4011 | elif test "$option" = "no" || test "$option" = "none"; then |
---|
4012 | MOZ_IMG_DECODERS="" |
---|
4013 | elif test "$option" = "default"; then |
---|
4014 | MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS $MOZ_IMG_DECODERS_DEFAULT" |
---|
4015 | elif test `echo "$option" | grep -c \^-` != 0; then |
---|
4016 | option=`echo $option | sed 's/^-//'` |
---|
4017 | MOZ_IMG_DECODERS=`echo "$MOZ_IMG_DECODERS" | sed "s/ ${option}//"` |
---|
4018 | else |
---|
4019 | MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS $option" |
---|
4020 | fi |
---|
4021 | done], |
---|
4022 | MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS_DEFAULT") |
---|
4023 | |
---|
4024 | dnl Remove dupes |
---|
4025 | MOZ_IMG_DECODERS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_IMG_DECODERS}` |
---|
4026 | |
---|
4027 | dnl ======================================================== |
---|
4028 | dnl experimental ldap features |
---|
4029 | dnl ======================================================== |
---|
4030 | MOZ_ARG_ENABLE_BOOL(ldap-experimental, |
---|
4031 | [ --enable-ldap-experimental |
---|
4032 | Enable LDAP experimental features], |
---|
4033 | MOZ_LDAP_XPCOM_EXPERIMENTAL=1, |
---|
4034 | MOZ_LDAP_XPCOM_EXPERIMENTAL=) |
---|
4035 | |
---|
4036 | dnl ======================================================== |
---|
4037 | dnl MathML on by default |
---|
4038 | dnl ======================================================== |
---|
4039 | MOZ_MATHML=1 |
---|
4040 | MOZ_ARG_DISABLE_BOOL(mathml, |
---|
4041 | [ --disable-mathml Disable MathML support], |
---|
4042 | MOZ_MATHML=, |
---|
4043 | MOZ_MATHML=1 ) |
---|
4044 | if test "$MOZ_MATHML"; then |
---|
4045 | AC_DEFINE(MOZ_MATHML) |
---|
4046 | fi |
---|
4047 | |
---|
4048 | dnl ======================================================== |
---|
4049 | dnl SVG |
---|
4050 | dnl ======================================================== |
---|
4051 | MOZ_ARG_ENABLE_BOOL(svg, |
---|
4052 | [ --enable-svg Enable SVG support], |
---|
4053 | MOZ_SVG=1, |
---|
4054 | MOZ_SVG= ) |
---|
4055 | if test -n "$MOZ_SVG"; then |
---|
4056 | AC_DEFINE(MOZ_SVG) |
---|
4057 | fi |
---|
4058 | |
---|
4059 | MOZ_ARG_ENABLE_BOOL(svg-renderer-gdiplus, |
---|
4060 | [ --enable-svg-renderer-gdiplus Enable SVG gdi+ renderer], |
---|
4061 | MOZ_SVG_RENDERER_GDIPLUS=1, |
---|
4062 | MOZ_SVG_RENDERER_GDIPLUS= ) |
---|
4063 | if test -n "$MOZ_SVG_RENDERER_GDIPLUS"; then |
---|
4064 | dnl XXX This is the test we'd like to perform but it isn't working |
---|
4065 | dnl under Windows for some reason: |
---|
4066 | dnl AC_CHECK_HEADER(Gdiplus.h,, |
---|
4067 | dnl AC_MSG_ERROR([Gdiplus.h not found!])) |
---|
4068 | dnl So do this instead: |
---|
4069 | AC_MSG_CHECKING(for Gdiplus.h) |
---|
4070 | AC_LANG_SAVE |
---|
4071 | AC_LANG_CPLUSPLUS |
---|
4072 | AC_TRY_COMPILE([#include <windows.h> |
---|
4073 | #include <unknwn.h> |
---|
4074 | #include <Gdiplus.h>],,AC_MSG_RESULT(yes), |
---|
4075 | AC_MSG_ERROR([Building the SVG GDI+ renderer requires an appropriate Microsoft SDK.])) |
---|
4076 | AC_LANG_RESTORE |
---|
4077 | AC_DEFINE(MOZ_SVG_RENDERER_GDIPLUS) |
---|
4078 | fi |
---|
4079 | |
---|
4080 | MOZ_ARG_ENABLE_BOOL(svg-renderer-libart, |
---|
4081 | [ --enable-svg-renderer-libart Enable SVG libart renderer], |
---|
4082 | MOZ_SVG_RENDERER_LIBART=1, |
---|
4083 | MOZ_SVG_RENDERER_LIBART= ) |
---|
4084 | if test -n "$MOZ_SVG_RENDERER_LIBART"; then |
---|
4085 | AC_DEFINE(MOZ_SVG_RENDERER_LIBART) |
---|
4086 | fi |
---|
4087 | |
---|
4088 | MOZ_ARG_ENABLE_BOOL(svg-renderer-cairo, |
---|
4089 | [ --enable-svg-renderer-cairo Enable SVG cairo renderer ], |
---|
4090 | MOZ_SVG_RENDERER_CAIRO=1, |
---|
4091 | MOZ_SVG_RENDERER_CAIRO= ) |
---|
4092 | if test -n "$MOZ_SVG_RENDERER_CAIRO"; then |
---|
4093 | AC_DEFINE(MOZ_SVG_RENDERER_CAIRO) |
---|
4094 | fi |
---|
4095 | AC_SUBST(MOZ_SVG_RENDERER_CAIRO) |
---|
4096 | |
---|
4097 | dnl To build transformiix standalone, set TX_EXE while configuring |
---|
4098 | if test "$TX_EXE"; then |
---|
4099 | AC_DEFINE(TX_EXE) |
---|
4100 | fi |
---|
4101 | |
---|
4102 | dnl ======================================================== |
---|
4103 | dnl Installer |
---|
4104 | dnl ======================================================== |
---|
4105 | case "$target_os" in |
---|
4106 | aix*|solaris*|linux*|msvc*|mks*|cygwin*|mingw*|os2*) |
---|
4107 | MOZ_INSTALLER=1 |
---|
4108 | ;; |
---|
4109 | esac |
---|
4110 | |
---|
4111 | MOZ_ARG_DISABLE_BOOL(installer, |
---|
4112 | [ --disable-installer Disable building of installer], |
---|
4113 | MOZ_INSTALLER=, |
---|
4114 | MOZ_INSTALLER=1 ) |
---|
4115 | # Automatically disable installer if xpinstall isn't built |
---|
4116 | if test -z "$MOZ_XPINSTALL"; then |
---|
4117 | MOZ_INSTALLER= |
---|
4118 | fi |
---|
4119 | AC_SUBST(MOZ_INSTALLER) |
---|
4120 | |
---|
4121 | dnl ======================================================== |
---|
4122 | dnl ActiveX |
---|
4123 | dnl ======================================================== |
---|
4124 | MOZ_NO_ACTIVEX_SUPPORT=1 |
---|
4125 | MOZ_ACTIVEX_SCRIPTING_SUPPORT= |
---|
4126 | case "$target_os" in |
---|
4127 | msvc*|mks*|cygwin*|mingw*) |
---|
4128 | if test -z "$GNU_CC"; then |
---|
4129 | MOZ_NO_ACTIVEX_SUPPORT= |
---|
4130 | MOZ_ACTIVEX_SCRIPTING_SUPPORT=1 |
---|
4131 | fi |
---|
4132 | ;; |
---|
4133 | esac |
---|
4134 | |
---|
4135 | MOZ_ARG_DISABLE_BOOL(activex, |
---|
4136 | [ --disable-activex Disable building of ActiveX control (win32 only)], |
---|
4137 | MOZ_NO_ACTIVEX_SUPPORT=1, |
---|
4138 | MOZ_NO_ACTIVEX_SUPPORT= ) |
---|
4139 | AC_SUBST(MOZ_NO_ACTIVEX_SUPPORT) |
---|
4140 | |
---|
4141 | MOZ_ARG_DISABLE_BOOL(activex-scripting, |
---|
4142 | [ --disable-activex-scripting |
---|
4143 | Disable building of ActiveX scripting support (win32)], |
---|
4144 | MOZ_ACTIVEX_SCRIPTING_SUPPORT=, |
---|
4145 | MOZ_ACTIVEX_SCRIPTING_SUPPORT=1) |
---|
4146 | AC_SUBST(MOZ_ACTIVEX_SCRIPTING_SUPPORT) |
---|
4147 | |
---|
4148 | if test -n "$MOZ_NO_ACTIVEX_SUPPORT" -a -n "$MOZ_ACTIVEX_SCRIPTING_SUPPORT"; |
---|
4149 | then |
---|
4150 | AC_MSG_ERROR([Cannot enable ActiveX scripting support when ActiveX support is disabled.]) |
---|
4151 | fi |
---|
4152 | |
---|
4153 | |
---|
4154 | dnl ======================================================== |
---|
4155 | dnl leaky |
---|
4156 | dnl ======================================================== |
---|
4157 | MOZ_ARG_ENABLE_BOOL(leaky, |
---|
4158 | [ --enable-leaky Build leaky memory tool], |
---|
4159 | MOZ_LEAKY=1, |
---|
4160 | MOZ_LEAKY=) |
---|
4161 | |
---|
4162 | |
---|
4163 | dnl ======================================================== |
---|
4164 | dnl xpctools |
---|
4165 | dnl ======================================================== |
---|
4166 | MOZ_ARG_ENABLE_BOOL(xpctools, |
---|
4167 | [ --enable-xpctools Build JS profiling tool], |
---|
4168 | MOZ_XPCTOOLS=1, |
---|
4169 | MOZ_XPCTOOLS= ) |
---|
4170 | |
---|
4171 | |
---|
4172 | dnl ======================================================== |
---|
4173 | dnl build the tests by default |
---|
4174 | dnl ======================================================== |
---|
4175 | ENABLE_TESTS=1 |
---|
4176 | MOZ_ARG_DISABLE_BOOL(tests, |
---|
4177 | [ --disable-tests Do not build test libraries & programs], |
---|
4178 | ENABLE_TESTS=, |
---|
4179 | ENABLE_TESTS=1 ) |
---|
4180 | |
---|
4181 | dnl ======================================================== |
---|
4182 | dnl = |
---|
4183 | dnl = Module specific options |
---|
4184 | dnl = |
---|
4185 | dnl ======================================================== |
---|
4186 | MOZ_ARG_HEADER(Individual module options) |
---|
4187 | |
---|
4188 | dnl ======================================================== |
---|
4189 | dnl = Enable Lea malloc in xpcom. OFF by default. |
---|
4190 | dnl ======================================================== |
---|
4191 | MOZ_ARG_ENABLE_BOOL(xpcom-lea, |
---|
4192 | [ --enable-xpcom-lea Use Lea malloc in xpcom ], |
---|
4193 | XPCOM_USE_LEA=1, |
---|
4194 | XPCOM_USE_LEA= ) |
---|
4195 | if test -n "$XPCOM_USE_LEA"; then |
---|
4196 | AC_DEFINE(XPCOM_USE_LEA) |
---|
4197 | fi |
---|
4198 | |
---|
4199 | dnl ======================================================== |
---|
4200 | dnl = Enable Ultrasparc specific optimizations for JS |
---|
4201 | dnl ======================================================== |
---|
4202 | MOZ_ARG_ENABLE_BOOL(js-ultrasparc, |
---|
4203 | [ --enable-js-ultrasparc Use UltraSPARC optimizations in JS], |
---|
4204 | JS_ULTRASPARC_OPTS=1, |
---|
4205 | JS_ULTRASPARC_OPTS= ) |
---|
4206 | |
---|
4207 | dnl only enable option for ultrasparcs |
---|
4208 | if test `echo "$target_os" | grep -c \^solaris 2>/dev/null` = 0 -o \ |
---|
4209 | "$OS_TEST" != "sun4u"; then |
---|
4210 | JS_ULTRASPARC_OPTS= |
---|
4211 | fi |
---|
4212 | AC_SUBST(JS_ULTRASPARC_OPTS) |
---|
4213 | |
---|
4214 | dnl ======================================================== |
---|
4215 | dnl = |
---|
4216 | dnl = Feature options that require extra sources to be pulled |
---|
4217 | dnl = |
---|
4218 | dnl ======================================================== |
---|
4219 | dnl MOZ_ARG_HEADER(Features that require extra sources) |
---|
4220 | |
---|
4221 | dnl ======================================================== |
---|
4222 | dnl = |
---|
4223 | dnl = Debugging Options |
---|
4224 | dnl = |
---|
4225 | dnl ======================================================== |
---|
4226 | MOZ_ARG_HEADER(Debugging and Optimizations) |
---|
4227 | |
---|
4228 | dnl ======================================================== |
---|
4229 | dnl = Disable building with debug info. |
---|
4230 | dnl = Debugging is ON by default so that we get more useful |
---|
4231 | dnl = bug reports. |
---|
4232 | dnl ======================================================== |
---|
4233 | MOZ_DEBUG=1 |
---|
4234 | |
---|
4235 | if test -z "$MOZ_DEBUG_FLAGS" |
---|
4236 | then |
---|
4237 | case "$target" in |
---|
4238 | *-irix*) |
---|
4239 | if test "$GNU_CC"; then |
---|
4240 | GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'` |
---|
4241 | case "$GCC_VERSION" in |
---|
4242 | 2.95.*) |
---|
4243 | MOZ_DEBUG_FLAGS="" |
---|
4244 | ;; |
---|
4245 | *) |
---|
4246 | MOZ_DEBUG_FLAGS="-g" |
---|
4247 | ;; |
---|
4248 | esac |
---|
4249 | else |
---|
4250 | MOZ_DEBUG_FLAGS="-g" |
---|
4251 | fi |
---|
4252 | ;; |
---|
4253 | *) |
---|
4254 | MOZ_DEBUG_FLAGS="-g" |
---|
4255 | ;; |
---|
4256 | esac |
---|
4257 | fi |
---|
4258 | |
---|
4259 | MOZ_ARG_DISABLE_BOOL(debug, |
---|
4260 | [ --disable-debug Disable building with debug info], |
---|
4261 | MOZ_DEBUG=) |
---|
4262 | |
---|
4263 | MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG" |
---|
4264 | case "${target_os}" in |
---|
4265 | beos*) |
---|
4266 | MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}" |
---|
4267 | ;; |
---|
4268 | msvc*|mks*|cygwin*|mingw*|os2*) |
---|
4269 | MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" |
---|
4270 | ;; |
---|
4271 | *) |
---|
4272 | MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`" |
---|
4273 | ;; |
---|
4274 | esac |
---|
4275 | MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DTRACING" |
---|
4276 | |
---|
4277 | MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED" |
---|
4278 | |
---|
4279 | dnl ======================================================== |
---|
4280 | dnl = Enable code optimization. OFF by default. |
---|
4281 | dnl ======================================================== |
---|
4282 | MOZ_OPTIMIZE= |
---|
4283 | if test -z "$MOZ_OPTIMIZE_FLAGS"; then |
---|
4284 | MOZ_OPTIMIZE_FLAGS="-O" |
---|
4285 | fi |
---|
4286 | |
---|
4287 | MOZ_ARG_ENABLE_STRING(optimize, |
---|
4288 | [ --enable-optimize[=OPT] Enable optimizations using compiler flags [OPT=-O]], |
---|
4289 | [ if test "$enableval" != "no"; then |
---|
4290 | MOZ_OPTIMIZE=1 |
---|
4291 | if test -n "$enableval" && test "$enableval" != "yes"; then |
---|
4292 | MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` |
---|
4293 | MOZ_OPTIMIZE=2 |
---|
4294 | fi |
---|
4295 | fi ]) |
---|
4296 | |
---|
4297 | if test -n "$MOZ_OPTIMIZE"; then |
---|
4298 | AC_MSG_CHECKING([for valid optimization flags]) |
---|
4299 | _SAVE_CFLAGS=$CFLAGS |
---|
4300 | CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" |
---|
4301 | AC_TRY_COMPILE([#include <stdio.h>], |
---|
4302 | [printf("Hello World\n");], |
---|
4303 | _results=yes, |
---|
4304 | _results=no) |
---|
4305 | AC_MSG_RESULT([$_results]) |
---|
4306 | if test "$_results" = "no"; then |
---|
4307 | AC_MSG_ERROR([These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS]) |
---|
4308 | fi |
---|
4309 | CFLAGS=$_SAVE_CFLAGS |
---|
4310 | fi |
---|
4311 | |
---|
4312 | AC_SUBST(MOZ_OPTIMIZE) |
---|
4313 | AC_SUBST(MOZ_OPTIMIZE_FLAGS) |
---|
4314 | AC_SUBST(MOZ_OPTIMIZE_LDFLAGS) |
---|
4315 | |
---|
4316 | dnl ======================================================== |
---|
4317 | dnl = Enable/disable debug for specific modules only |
---|
4318 | dnl = module names beginning with ^ will be disabled |
---|
4319 | dnl ======================================================== |
---|
4320 | MOZ_ARG_ENABLE_STRING(debug-modules, |
---|
4321 | [ --enable-debug-modules Enable/disable debug info for specific modules], |
---|
4322 | [ MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'` ] ) |
---|
4323 | |
---|
4324 | dnl ======================================================== |
---|
4325 | dnl = Enable/disable generation of debugger info for specific modules only |
---|
4326 | dnl = the special module name ALL_MODULES can be used to denote all modules |
---|
4327 | dnl = module names beginning with ^ will be disabled |
---|
4328 | dnl ======================================================== |
---|
4329 | MOZ_DBGRINFO_MODULES= |
---|
4330 | MOZ_ARG_ENABLE_STRING(debugger-info-modules, |
---|
4331 | [ --enable-debugger-info-modules |
---|
4332 | Enable/disable debugger info for specific modules], |
---|
4333 | [ for i in `echo $enableval | sed 's/,/ /g'`; do |
---|
4334 | dnl note that the list of module names is reversed as it is copied |
---|
4335 | dnl this is important, as it will allow config.mk to interpret stuff like |
---|
4336 | dnl "^ALL_MODULES xpcom" properly |
---|
4337 | if test "$i" = "no"; then |
---|
4338 | i="^ALL_MODULES" |
---|
4339 | fi |
---|
4340 | if test "$i" = "yes"; then |
---|
4341 | i="ALL_MODULES" |
---|
4342 | fi |
---|
4343 | MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES"; |
---|
4344 | done ]) |
---|
4345 | |
---|
4346 | dnl ======================================================== |
---|
4347 | dnl Enable garbage collector |
---|
4348 | dnl ======================================================== |
---|
4349 | MOZ_ARG_ENABLE_BOOL(boehm, |
---|
4350 | [ --enable-boehm Enable the Boehm Garbage Collector], |
---|
4351 | GC_LEAK_DETECTOR=1, |
---|
4352 | GC_LEAK_DETECTOR= ) |
---|
4353 | if test -n "$GC_LEAK_DETECTOR"; then |
---|
4354 | AC_DEFINE(GC_LEAK_DETECTOR) |
---|
4355 | fi |
---|
4356 | |
---|
4357 | dnl ======================================================== |
---|
4358 | dnl Disable runtime logging checks |
---|
4359 | dnl ======================================================== |
---|
4360 | MOZ_ARG_DISABLE_BOOL(logging, |
---|
4361 | [ --disable-logging Disable logging facilities], |
---|
4362 | NS_DISABLE_LOGGING=1, |
---|
4363 | NS_DISABLE_LOGGING= ) |
---|
4364 | if test "$NS_DISABLE_LOGGING"; then |
---|
4365 | AC_DEFINE(NS_DISABLE_LOGGING) |
---|
4366 | else |
---|
4367 | AC_DEFINE(MOZ_LOGGING) |
---|
4368 | fi |
---|
4369 | |
---|
4370 | dnl ======================================================== |
---|
4371 | dnl Crash on assert |
---|
4372 | dnl ======================================================== |
---|
4373 | MOZ_ARG_ENABLE_BOOL(crash-on-assert, |
---|
4374 | [ --enable-crash-on-assert |
---|
4375 | Make NS_ASSERTION crash on Unix], |
---|
4376 | _CRASH_ON_ASSERT=1, |
---|
4377 | _CRASH_ON_ASSERT= ) |
---|
4378 | if test "$_CRASH_ON_ASSERT"; then |
---|
4379 | AC_DEFINE(UNIX_CRASH_ON_ASSERT) |
---|
4380 | fi |
---|
4381 | |
---|
4382 | dnl ======================================================== |
---|
4383 | dnl = Enable function reordering. Off by default |
---|
4384 | dnl ======================================================== |
---|
4385 | MOZ_REORDER= |
---|
4386 | MOZ_ARG_ENABLE_BOOL(reorder, |
---|
4387 | [ --enable-reorder Enable function reordering (requires GNU ld) ], |
---|
4388 | _ENABLE_REORDER=1, |
---|
4389 | _ENABLE_REORDER= ) |
---|
4390 | if test -n "$_ENABLE_REORDER"; then |
---|
4391 | if test -z "$GNU_LD"; then |
---|
4392 | AC_MSG_WARN([Reordering only works with GNU ld. Not reordering.]) |
---|
4393 | else |
---|
4394 | MOZ_REORDER=1 |
---|
4395 | fi |
---|
4396 | fi |
---|
4397 | |
---|
4398 | dnl ======================================================== |
---|
4399 | dnl = dnl This will enable logging of addref, release, ctor, dtor. |
---|
4400 | dnl ======================================================== |
---|
4401 | _ENABLE_LOGREFCNT=42 |
---|
4402 | MOZ_ARG_ENABLE_BOOL(logrefcnt, |
---|
4403 | [ --enable-logrefcnt Enable logging of refcounts (default=debug) ], |
---|
4404 | _ENABLE_LOGREFCNT=1, |
---|
4405 | _ENABLE_LOGREFCNT= ) |
---|
4406 | if test "$_ENABLE_LOGREFCNT" = "1"; then |
---|
4407 | AC_DEFINE(FORCE_BUILD_REFCNT_LOGGING) |
---|
4408 | elif test -z "$_ENABLE_LOGREFCNT"; then |
---|
4409 | AC_DEFINE(NO_BUILD_REFCNT_LOGGING) |
---|
4410 | fi |
---|
4411 | |
---|
4412 | dnl ======================================================== |
---|
4413 | dnl = detect webshell leaks |
---|
4414 | dnl ======================================================== |
---|
4415 | MOZ_ARG_ENABLE_BOOL(detect-webshell-leaks, |
---|
4416 | [ --enable-detect-webshell-leaks |
---|
4417 | Enable detection of webshell leaks |
---|
4418 | (default=debug)], |
---|
4419 | _DETECT_WEBSHELL_LEAKS=1, |
---|
4420 | _DETECT_WEBSHELL_LEAKS=, |
---|
4421 | [ if test "$MOZ_DEBUG"; then |
---|
4422 | _DETECT_WEBSHELL_LEAKS=1 |
---|
4423 | fi]) |
---|
4424 | |
---|
4425 | if test "$_DETECT_WEBSHELL_LEAKS"; then |
---|
4426 | AC_DEFINE(DETECT_WEBSHELL_LEAKS) |
---|
4427 | AC_SUBST(DETECT_WEBSHELL_LEAKS) |
---|
4428 | fi |
---|
4429 | |
---|
4430 | dnl ======================================================== |
---|
4431 | dnl = Use malloc wrapper lib |
---|
4432 | dnl ======================================================== |
---|
4433 | MOZ_ARG_ENABLE_BOOL(wrap-malloc, |
---|
4434 | [ --enable-wrap-malloc Wrap malloc calls (gnu linker only)], |
---|
4435 | _WRAP_MALLOC=1, |
---|
4436 | _WRAP_MALLOC= ) |
---|
4437 | |
---|
4438 | if test -n "$_WRAP_MALLOC"; then |
---|
4439 | if test "$GNU_CC"; then |
---|
4440 | WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc" |
---|
4441 | MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@' |
---|
4442 | fi |
---|
4443 | fi |
---|
4444 | |
---|
4445 | dnl ======================================================== |
---|
4446 | dnl = Location of malloc wrapper lib |
---|
4447 | dnl ======================================================== |
---|
4448 | MOZ_ARG_WITH_STRING(wrap-malloc, |
---|
4449 | [ --with-wrap-malloc=DIR Location of malloc wrapper library], |
---|
4450 | WRAP_MALLOC_LIB=$withval) |
---|
4451 | |
---|
4452 | dnl ======================================================== |
---|
4453 | dnl = Use Electric Fence |
---|
4454 | dnl ======================================================== |
---|
4455 | MOZ_ARG_ENABLE_BOOL(efence, |
---|
4456 | [ --enable-efence Link with Electric Fence], |
---|
4457 | _ENABLE_EFENCE=1, |
---|
4458 | _ENABLE_EFENCE= ) |
---|
4459 | if test -n "$_ENABLE_EFENCE"; then |
---|
4460 | AC_CHECK_LIB(efence,malloc) |
---|
4461 | fi |
---|
4462 | |
---|
4463 | dnl ======================================================== |
---|
4464 | dnl jprof |
---|
4465 | dnl ======================================================== |
---|
4466 | MOZ_ARG_ENABLE_BOOL(jprof, |
---|
4467 | [ --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof)], |
---|
4468 | MOZ_JPROF=1, |
---|
4469 | MOZ_JPROF= ) |
---|
4470 | if test -n "$MOZ_JPROF"; then |
---|
4471 | AC_DEFINE(MOZ_JPROF) |
---|
4472 | fi |
---|
4473 | |
---|
4474 | |
---|
4475 | dnl ======================================================== |
---|
4476 | dnl = Enable stripping of libs & executables |
---|
4477 | dnl ======================================================== |
---|
4478 | MOZ_ARG_ENABLE_BOOL(strip, |
---|
4479 | [ --enable-strip Enable stripping of libs & executables ], |
---|
4480 | ENABLE_STRIP=1, |
---|
4481 | ENABLE_STRIP= ) |
---|
4482 | |
---|
4483 | dnl ======================================================== |
---|
4484 | dnl = --enable-elf-dynstr-gc |
---|
4485 | dnl ======================================================== |
---|
4486 | MOZ_ARG_ENABLE_BOOL(elf-dynstr-gc, |
---|
4487 | [ --enable-elf-dynstr-gc Enable elf dynstr garbage collector (opt builds only)], |
---|
4488 | USE_ELF_DYNSTR_GC=1, |
---|
4489 | USE_ELF_DYNSTR_GC= ) |
---|
4490 | |
---|
4491 | dnl ======================================================== |
---|
4492 | dnl = --enable-old-abi-compat-wrappers |
---|
4493 | dnl ======================================================== |
---|
4494 | dnl on x86 linux, the current builds of some popular plugins (notably |
---|
4495 | dnl flashplayer and real) expect a few builtin symbols from libgcc |
---|
4496 | dnl which were available in some older versions of gcc. However, |
---|
4497 | dnl they're _NOT_ available in newer versions of gcc (eg 3.1), so if |
---|
4498 | dnl we want those plugin to work with a gcc-3.1 built binary, we need |
---|
4499 | dnl to provide these symbols. MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS defaults |
---|
4500 | dnl to true on x86 linux, and false everywhere else. |
---|
4501 | dnl |
---|
4502 | |
---|
4503 | MOZ_ARG_ENABLE_BOOL(old-abi-compat-wrappers, |
---|
4504 | [ --enable-old-abi-compat-wrappers |
---|
4505 | Support old GCC ABI symbols to ease the pain |
---|
4506 | of the linux compiler change], |
---|
4507 | MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1, |
---|
4508 | MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS= ) |
---|
4509 | if test "$MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS"; then |
---|
4510 | AC_LANG_SAVE |
---|
4511 | AC_LANG_CPLUSPLUS |
---|
4512 | AC_CHECK_FUNCS(__builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual) |
---|
4513 | AC_LANG_RESTORE |
---|
4514 | AC_DEFINE(MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS) |
---|
4515 | fi |
---|
4516 | |
---|
4517 | dnl ======================================================== |
---|
4518 | dnl = --enable-prebinding |
---|
4519 | dnl ======================================================== |
---|
4520 | MOZ_ARG_ENABLE_BOOL(prebinding, |
---|
4521 | [ --enable-prebinding Enable prebinding (Mac OS X only)], |
---|
4522 | USE_PREBINDING=1, |
---|
4523 | USE_PREBINDING= ) |
---|
4524 | |
---|
4525 | dnl ======================================================== |
---|
4526 | dnl = |
---|
4527 | dnl = Profiling and Instrumenting |
---|
4528 | dnl = |
---|
4529 | dnl ======================================================== |
---|
4530 | MOZ_ARG_HEADER(Profiling and Instrumenting) |
---|
4531 | |
---|
4532 | dnl ======================================================== |
---|
4533 | dnl = Enable timeline service, which provides lightweight |
---|
4534 | dnl = instrumentation of mozilla for performance measurement. |
---|
4535 | dnl = Timeline is off by default. |
---|
4536 | dnl ======================================================== |
---|
4537 | MOZ_TIMELINE= |
---|
4538 | MOZ_ARG_ENABLE_BOOL(timeline, |
---|
4539 | [ --enable-timeline Enable timeline services ], |
---|
4540 | MOZ_TIMELINE=1, |
---|
4541 | MOZ_TIMELINE= ) |
---|
4542 | if test -n "$MOZ_TIMELINE"; then |
---|
4543 | AC_DEFINE(MOZ_TIMELINE) |
---|
4544 | fi |
---|
4545 | |
---|
4546 | dnl ======================================================== |
---|
4547 | dnl Turn on reflow counting |
---|
4548 | dnl ======================================================== |
---|
4549 | MOZ_REFLOW_PERF= |
---|
4550 | MOZ_ARG_ENABLE_BOOL(reflow-perf, |
---|
4551 | [ --enable-reflow-perf Enable reflow performance tracing], |
---|
4552 | MOZ_REFLOW_PERF=1, |
---|
4553 | MOZ_REFLOW_PERF= ) |
---|
4554 | if test -n "$MOZ_REFLOW_PREF"; then |
---|
4555 | AC_DEFINE(MOZ_REFLOW_PREF) |
---|
4556 | fi |
---|
4557 | AC_SUBST(MOZ_REFLOW_PERF) |
---|
4558 | |
---|
4559 | dnl ======================================================== |
---|
4560 | dnl Enable performance metrics. |
---|
4561 | dnl ======================================================== |
---|
4562 | MOZ_ARG_ENABLE_BOOL(perf-metrics, |
---|
4563 | [ --enable-perf-metrics Enable performance metrics], |
---|
4564 | MOZ_PERF_METRICS=1, |
---|
4565 | MOZ_PERF_METRICS= ) |
---|
4566 | if test -n "$MOZ_PERF_METRICS"; then |
---|
4567 | AC_DEFINE(MOZ_PERF_METRICS) |
---|
4568 | fi |
---|
4569 | |
---|
4570 | dnl ======================================================== |
---|
4571 | dnl Enable code size metrics. |
---|
4572 | dnl ======================================================== |
---|
4573 | MOZ_ARG_ENABLE_BOOL(codesighs, |
---|
4574 | [ --enable-codesighs Enable code size analysis tools], |
---|
4575 | _ENABLE_CODESIGHS=1, |
---|
4576 | _ENABLE_CODESIGHS= ) |
---|
4577 | if test -n "$_ENABLE_CODESIGHS"; then |
---|
4578 | if test -d $srcdir/tools/codesighs; then |
---|
4579 | MOZ_MAPINFO=1 |
---|
4580 | else |
---|
4581 | AC_MSG_ERROR([Codesighs directory $srcdir/tools/codesighs required.]) |
---|
4582 | fi |
---|
4583 | fi |
---|
4584 | |
---|
4585 | dnl ======================================================== |
---|
4586 | dnl = Enable trace malloc |
---|
4587 | dnl ======================================================== |
---|
4588 | NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC} |
---|
4589 | MOZ_ARG_ENABLE_BOOL(trace-malloc, |
---|
4590 | [ --enable-trace-malloc Enable malloc tracing], |
---|
4591 | NS_TRACE_MALLOC=1, |
---|
4592 | NS_TRACE_MALLOC= ) |
---|
4593 | if test "$NS_TRACE_MALLOC"; then |
---|
4594 | # Please, Mr. Linker Man, don't take away our symbol names |
---|
4595 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= |
---|
4596 | USE_ELF_DYNSTR_GC= |
---|
4597 | AC_DEFINE(NS_TRACE_MALLOC) |
---|
4598 | fi |
---|
4599 | AC_SUBST(NS_TRACE_MALLOC) |
---|
4600 | |
---|
4601 | dnl ======================================================== |
---|
4602 | dnl = Add support for Eazel profiler |
---|
4603 | dnl ======================================================== |
---|
4604 | MOZ_ARG_ENABLE_BOOL(eazel-profiler-support, |
---|
4605 | [ --enable-eazel-profiler-support |
---|
4606 | Enable Corel/Eazel profiler support], |
---|
4607 | ENABLE_EAZEL_PROFILER=1, |
---|
4608 | ENABLE_EAZEL_PROFILER= ) |
---|
4609 | if test -n "$ENABLE_EAZEL_PROFILER"; then |
---|
4610 | AC_DEFINE(ENABLE_EAZEL_PROFILER) |
---|
4611 | USE_ELF_DYNSTR_GC= |
---|
4612 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= |
---|
4613 | EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES" |
---|
4614 | EAZEL_PROFILER_LIBS="-lprofiler -lpthread" |
---|
4615 | fi |
---|
4616 | |
---|
4617 | MOZ_ARG_ENABLE_STRING(profile-modules, |
---|
4618 | [ --enable-profile-modules |
---|
4619 | Enable/disable profiling for specific modules], |
---|
4620 | [ MOZ_PROFILE_MODULES=`echo $enableval| sed 's/,/ /g'` ] ) |
---|
4621 | |
---|
4622 | MOZ_ARG_ENABLE_BOOL(insure, |
---|
4623 | [ --enable-insure Enable insure++ instrumentation (linux only)], |
---|
4624 | _ENABLE_INSURE=1, |
---|
4625 | _ENABLE_INSURE= ) |
---|
4626 | if test -n "$_ENABLE_INSURE"; then |
---|
4627 | MOZ_INSURE="insure" |
---|
4628 | MOZ_INSURIFYING=1 |
---|
4629 | MOZ_INSURE_DIRS="." |
---|
4630 | MOZ_INSURE_EXCLUDE_DIRS="config" |
---|
4631 | fi |
---|
4632 | |
---|
4633 | MOZ_ARG_WITH_STRING(insure-dirs, |
---|
4634 | [ --with-insure-dirs=DIRS |
---|
4635 | Dirs to instrument with insure ], |
---|
4636 | MOZ_INSURE_DIRS=$withval ) |
---|
4637 | |
---|
4638 | MOZ_ARG_WITH_STRING(insure-exclude-dirs, |
---|
4639 | [ --with-insure-exclude-dirs=DIRS |
---|
4640 | Dirs to not instrument with insure ], |
---|
4641 | MOZ_INSURE_EXCLUDE_DIRS="config $withval" ) |
---|
4642 | |
---|
4643 | dnl ======================================================== |
---|
4644 | dnl = Support for Quantify (Windows) |
---|
4645 | dnl ======================================================== |
---|
4646 | MOZ_ARG_ENABLE_BOOL(quantify, |
---|
4647 | [ --enable-quantify Enable Quantify support (Windows only) ], |
---|
4648 | MOZ_QUANTIFY=1, |
---|
4649 | MOZ_QUANTIFY= ) |
---|
4650 | |
---|
4651 | dnl ======================================================== |
---|
4652 | dnl = Support for demangling undefined symbols |
---|
4653 | dnl ======================================================== |
---|
4654 | if test -z "$SKIP_LIBRARY_CHECKS"; then |
---|
4655 | AC_LANG_SAVE |
---|
4656 | AC_LANG_CPLUSPLUS |
---|
4657 | AC_CHECK_FUNCS(__cxa_demangle, HAVE_DEMANGLE=1, HAVE_DEMANGLE=) |
---|
4658 | AC_LANG_RESTORE |
---|
4659 | fi |
---|
4660 | |
---|
4661 | # Demangle only for debug or trace-malloc builds |
---|
4662 | MOZ_DEMANGLE_SYMBOLS= |
---|
4663 | if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then |
---|
4664 | MOZ_DEMANGLE_SYMBOLS=1 |
---|
4665 | AC_DEFINE(MOZ_DEMANGLE_SYMBOLS) |
---|
4666 | fi |
---|
4667 | AC_SUBST(MOZ_DEMANGLE_SYMBOLS) |
---|
4668 | |
---|
4669 | |
---|
4670 | dnl ======================================================== |
---|
4671 | dnl = |
---|
4672 | dnl = Misc. Options |
---|
4673 | dnl = |
---|
4674 | dnl ======================================================== |
---|
4675 | MOZ_ARG_HEADER(Misc. Options) |
---|
4676 | |
---|
4677 | dnl ======================================================== |
---|
4678 | dnl update xterm title |
---|
4679 | dnl ======================================================== |
---|
4680 | MOZ_ARG_ENABLE_BOOL(xterm-updates, |
---|
4681 | [ --enable-xterm-updates Update XTERM titles with current command.], |
---|
4682 | MOZ_UPDATE_XTERM=1, |
---|
4683 | MOZ_UPDATE_XTERM= ) |
---|
4684 | |
---|
4685 | dnl ========================================================= |
---|
4686 | dnl = Chrome format |
---|
4687 | dnl ========================================================= |
---|
4688 | MOZ_ARG_ENABLE_STRING([chrome-format], |
---|
4689 | [ --enable-chrome-format=jar|flat|both|symlink |
---|
4690 | Select FORMAT of chrome files (default=jar)], |
---|
4691 | MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`) |
---|
4692 | |
---|
4693 | if test -z "$MOZ_CHROME_FILE_FORMAT"; then |
---|
4694 | MOZ_CHROME_FILE_FORMAT=jar |
---|
4695 | fi |
---|
4696 | |
---|
4697 | if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && |
---|
4698 | test "$MOZ_CHROME_FILE_FORMAT" != "flat" && |
---|
4699 | test "$MOZ_CHROME_FILE_FORMAT" != "symlink" && |
---|
4700 | test "$MOZ_CHROME_FILE_FORMAT" != "both"; then |
---|
4701 | AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, both, or symlink]) |
---|
4702 | fi |
---|
4703 | |
---|
4704 | dnl ======================================================== |
---|
4705 | dnl = Define default location for MOZILLA_FIVE_HOME |
---|
4706 | dnl ======================================================== |
---|
4707 | MOZ_ARG_WITH_STRING(default-mozilla-five-home, |
---|
4708 | [ --with-default-mozilla-five-home |
---|
4709 | Set the default value for MOZILLA_FIVE_HOME], |
---|
4710 | [ val=`echo $withval` |
---|
4711 | AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val") ]) |
---|
4712 | |
---|
4713 | dnl ======================================================== |
---|
4714 | dnl = Location of the mozilla user directory (default is ~/.mozilla).], |
---|
4715 | dnl ======================================================== |
---|
4716 | MOZ_ARG_WITH_STRING(user-appdir, |
---|
4717 | [ --with-user-appdir=DIR Set user-specific appdir (default=.mozilla)], |
---|
4718 | [ val=`echo $withval` |
---|
4719 | if echo "$val" | grep "\/" >/dev/null; then |
---|
4720 | AC_MSG_ERROR("Homedir must be single relative path.") |
---|
4721 | else |
---|
4722 | MOZ_USER_DIR="$val" |
---|
4723 | fi]) |
---|
4724 | |
---|
4725 | AC_DEFINE_UNQUOTED(MOZ_USER_DIR,"$MOZ_USER_DIR") |
---|
4726 | |
---|
4727 | dnl ======================================================== |
---|
4728 | dnl = Doxygen configuration |
---|
4729 | dnl ======================================================== |
---|
4730 | dnl Use commas to specify multiple dirs to this arg |
---|
4731 | MOZ_DOC_INPUT_DIRS='./dist/include ./dist/idl' |
---|
4732 | MOZ_ARG_WITH_STRING(doc-input-dirs, |
---|
4733 | [ --with-doc-input-dirs=DIRS |
---|
4734 | Header/idl dirs to create docs from], |
---|
4735 | [ MOZ_DOC_INPUT_DIRS=`echo "$withval" | sed "s/,/ /g"` ] ) |
---|
4736 | AC_SUBST(MOZ_DOC_INPUT_DIRS) |
---|
4737 | |
---|
4738 | dnl Use commas to specify multiple dirs to this arg |
---|
4739 | MOZ_DOC_INCLUDE_DIRS='./dist/include ./dist/include/nspr' |
---|
4740 | MOZ_ARG_WITH_STRING(doc-include-dirs, |
---|
4741 | [ --with-doc-include-dirs=DIRS |
---|
4742 | Include dirs to preprocess doc headers], |
---|
4743 | [ MOZ_DOC_INCLUDE_DIRS=`echo "$withval" | sed "s/,/ /g"` ] ) |
---|
4744 | AC_SUBST(MOZ_DOC_INCLUDE_DIRS) |
---|
4745 | |
---|
4746 | MOZ_DOC_OUTPUT_DIR='./dist/docs' |
---|
4747 | MOZ_ARG_WITH_STRING(doc-output-dir, |
---|
4748 | [ --with-doc-output-dir=DIR |
---|
4749 | Dir to generate docs into], |
---|
4750 | [ MOZ_DOC_OUTPUT_DIR=$withval ] ) |
---|
4751 | AC_SUBST(MOZ_DOC_OUTPUT_DIR) |
---|
4752 | |
---|
4753 | if test -z "$SKIP_COMPILER_CHECKS"; then |
---|
4754 | dnl ======================================================== |
---|
4755 | dnl = |
---|
4756 | dnl = Compiler Options |
---|
4757 | dnl = |
---|
4758 | dnl ======================================================== |
---|
4759 | MOZ_ARG_HEADER(Compiler Options) |
---|
4760 | |
---|
4761 | dnl ======================================================== |
---|
4762 | dnl Check for gcc -pipe support |
---|
4763 | dnl ======================================================== |
---|
4764 | AC_MSG_CHECKING([for gcc -pipe support]) |
---|
4765 | if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then |
---|
4766 | echo '#include <stdio.h>' > dummy-hello.c |
---|
4767 | echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c |
---|
4768 | ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 |
---|
4769 | cat dummy-hello.s | ${AS_BIN} -o dummy-hello.S - 2>&5 |
---|
4770 | if test $? = 0; then |
---|
4771 | _res_as_stdin="yes" |
---|
4772 | else |
---|
4773 | _res_as_stdin="no" |
---|
4774 | fi |
---|
4775 | if test "$_res_as_stdin" = "yes"; then |
---|
4776 | _SAVE_CFLAGS=$CFLAGS |
---|
4777 | CFLAGS="$CFLAGS -pipe" |
---|
4778 | AC_TRY_COMPILE( [ #include <stdio.h> ], |
---|
4779 | [printf("Hello World\n");], |
---|
4780 | [_res_gcc_pipe="yes"], |
---|
4781 | [_res_gcc_pipe="no"] ) |
---|
4782 | CFLAGS=$_SAVE_CFLAGS |
---|
4783 | fi |
---|
4784 | if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then |
---|
4785 | _res="yes"; |
---|
4786 | CFLAGS="$CFLAGS -pipe" |
---|
4787 | CXXFLAGS="$CXXFLAGS -pipe" |
---|
4788 | else |
---|
4789 | _res="no" |
---|
4790 | fi |
---|
4791 | rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out |
---|
4792 | AC_MSG_RESULT([$_res]) |
---|
4793 | else |
---|
4794 | AC_MSG_RESULT([no]) |
---|
4795 | fi |
---|
4796 | |
---|
4797 | dnl pass -Wno-long-long to the compiler |
---|
4798 | MOZ_ARG_ENABLE_BOOL(long-long-warning, |
---|
4799 | [ --enable-long-long-warning |
---|
4800 | Warn about use of non-ANSI long long type], |
---|
4801 | _IGNORE_LONG_LONG_WARNINGS=, |
---|
4802 | _IGNORE_LONG_LONG_WARNINGS=1) |
---|
4803 | |
---|
4804 | if test "$_IGNORE_LONG_LONG_WARNINGS"; then |
---|
4805 | _SAVE_CFLAGS="$CFLAGS" |
---|
4806 | CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" |
---|
4807 | AC_MSG_CHECKING([whether compiler supports -Wno-long-long]) |
---|
4808 | AC_TRY_COMPILE([], [return(0);], |
---|
4809 | [ _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" |
---|
4810 | _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" |
---|
4811 | result="yes" ], result="no") |
---|
4812 | AC_MSG_RESULT([$result]) |
---|
4813 | CFLAGS="$_SAVE_CFLAGS" |
---|
4814 | fi |
---|
4815 | |
---|
4816 | dnl Test for profiling options |
---|
4817 | dnl Under gcc 3.3, use -fprofile-arcs/-fbranch-probabilities |
---|
4818 | dnl Under gcc 3.4+, use -fprofile-generate/-fprofile-use |
---|
4819 | |
---|
4820 | _SAVE_CFLAGS="$CFLAGS" |
---|
4821 | CFLAGS="$CFLAGS -fprofile-generate" |
---|
4822 | |
---|
4823 | AC_MSG_CHECKING([whether C compiler supports -fprofile-generate]) |
---|
4824 | AC_TRY_COMPILE([], [return 0;], |
---|
4825 | [ PROFILE_GEN_CFLAGS="-fprofile-generate" |
---|
4826 | result="yes" ], result="no") |
---|
4827 | AC_MSG_RESULT([$result]) |
---|
4828 | |
---|
4829 | if test $result = "yes"; then |
---|
4830 | PROFILE_USE_CFLAGS="-fprofile-use" |
---|
4831 | else |
---|
4832 | CFLAGS="$_SAVE_CFLAGS -fprofile-arcs" |
---|
4833 | AC_MSG_CHECKING([whether C compiler supports -fprofile-arcs]) |
---|
4834 | AC_TRY_COMPILE([], [return 0;], |
---|
4835 | [ PROFILE_GEN_CFLAGS="-fprofile-arcs" |
---|
4836 | result="yes" ], result="no") |
---|
4837 | AC_MSG_RESULT([$result]) |
---|
4838 | if test $result = "yes"; then |
---|
4839 | PROFILE_USE_CFLAGS="-fbranch-probabilities" |
---|
4840 | fi |
---|
4841 | fi |
---|
4842 | |
---|
4843 | CFLAGS="$_SAVE_CFLAGS" |
---|
4844 | |
---|
4845 | AC_SUBST(PROFILE_GEN_CFLAGS) |
---|
4846 | AC_SUBST(PROFILE_USE_CFLAGS) |
---|
4847 | |
---|
4848 | AC_LANG_CPLUSPLUS |
---|
4849 | |
---|
4850 | dnl ======================================================== |
---|
4851 | dnl Test for -pedantic bustage |
---|
4852 | dnl ======================================================== |
---|
4853 | MOZ_ARG_DISABLE_BOOL(pedantic, |
---|
4854 | [ --disable-pedantic Issue all warnings demanded by strict ANSI C ], |
---|
4855 | _PEDANTIC= ) |
---|
4856 | if test "$_PEDANTIC"; then |
---|
4857 | _SAVE_CXXFLAGS=$CXXFLAGS |
---|
4858 | CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" |
---|
4859 | AC_MSG_CHECKING([whether C++ compiler has -pedantic long long bug]) |
---|
4860 | AC_TRY_RUN([ int main () { |
---|
4861 | if (sizeof(long long) != 8) { return 1; } |
---|
4862 | return 0; } ], |
---|
4863 | result="no", result="yes", result="maybe" ) |
---|
4864 | AC_MSG_RESULT([$result]) |
---|
4865 | CXXFLAGS="$_SAVE_CXXFLAGS" |
---|
4866 | |
---|
4867 | case "$result" in |
---|
4868 | no) |
---|
4869 | _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic" |
---|
4870 | _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" |
---|
4871 | ;; |
---|
4872 | yes) |
---|
4873 | AC_MSG_ERROR([Your compiler appears to have a known bug where long long is miscompiled when using -pedantic. Reconfigure using --disable-pedantic. ]) |
---|
4874 | ;; |
---|
4875 | maybe) |
---|
4876 | AC_MSG_WARN([Cannot test -pedantic long long bug when cross-compiling.]) |
---|
4877 | ;; |
---|
4878 | esac |
---|
4879 | fi |
---|
4880 | |
---|
4881 | dnl ======================================================== |
---|
4882 | dnl Test for correct temporary object destruction order |
---|
4883 | dnl ======================================================== |
---|
4884 | dnl We want to make sure the compiler follows the C++ spec here as |
---|
4885 | dnl xpcom and the string classes depend on it (bug 235381). |
---|
4886 | AC_MSG_CHECKING([for correct temporary object destruction order]) |
---|
4887 | AC_TRY_RUN([ class A { |
---|
4888 | public: A(int& x) : mValue(x) {} |
---|
4889 | ~A() { mValue--; } |
---|
4890 | operator char**() { return 0; } |
---|
4891 | private: int& mValue; |
---|
4892 | }; |
---|
4893 | void func(char **arg) {} |
---|
4894 | int m=2; |
---|
4895 | void test() { |
---|
4896 | func(A(m)); |
---|
4897 | if (m==1) m = 0; |
---|
4898 | } |
---|
4899 | int main() { |
---|
4900 | test(); |
---|
4901 | return(m); |
---|
4902 | } |
---|
4903 | ], |
---|
4904 | result="yes", result="no", result="maybe") |
---|
4905 | AC_MSG_RESULT([$result]) |
---|
4906 | |
---|
4907 | if test "$result" = "no"; then |
---|
4908 | AC_MSG_ERROR([Your compiler does not follow the C++ specification for temporary object destruction order.]) |
---|
4909 | fi |
---|
4910 | |
---|
4911 | dnl ======================================================== |
---|
4912 | dnl Autoconf test for gcc 2.7.2.x (and maybe others?) so that we don't |
---|
4913 | dnl provide non-const forms of the operator== for comparing nsCOMPtrs to |
---|
4914 | dnl raw pointers in nsCOMPtr.h. (VC++ has the same bug.) |
---|
4915 | dnl ======================================================== |
---|
4916 | _SAVE_CXXFLAGS=$CXXFLAGS |
---|
4917 | CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" |
---|
4918 | AC_CACHE_CHECK(for correct overload resolution with const and templates, |
---|
4919 | ac_nscap_nonconst_opeq_bug, |
---|
4920 | [AC_TRY_COMPILE([ |
---|
4921 | template <class T> |
---|
4922 | class Pointer |
---|
4923 | { |
---|
4924 | public: |
---|
4925 | T* myPtr; |
---|
4926 | }; |
---|
4927 | |
---|
4928 | template <class T, class U> |
---|
4929 | int operator==(const Pointer<T>& rhs, U* lhs) |
---|
4930 | { |
---|
4931 | return rhs.myPtr == lhs; |
---|
4932 | } |
---|
4933 | |
---|
4934 | template <class T, class U> |
---|
4935 | int operator==(const Pointer<T>& rhs, const U* lhs) |
---|
4936 | { |
---|
4937 | return rhs.myPtr == lhs; |
---|
4938 | } |
---|
4939 | ], |
---|
4940 | [ |
---|
4941 | Pointer<int> foo; |
---|
4942 | const int* bar; |
---|
4943 | return foo == bar; |
---|
4944 | ], |
---|
4945 | ac_nscap_nonconst_opeq_bug="no", |
---|
4946 | ac_nscap_nonconst_opeq_bug="yes")]) |
---|
4947 | CXXFLAGS="$_SAVE_CXXFLAGS" |
---|
4948 | |
---|
4949 | if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then |
---|
4950 | AC_DEFINE(NSCAP_DONT_PROVIDE_NONCONST_OPEQ) |
---|
4951 | fi |
---|
4952 | fi |
---|
4953 | |
---|
4954 | dnl ======================================================== |
---|
4955 | dnl C++ rtti |
---|
4956 | dnl Should be smarter and check that the compiler does indeed have rtti |
---|
4957 | dnl ======================================================== |
---|
4958 | MOZ_ARG_ENABLE_BOOL(cpp-rtti, |
---|
4959 | [ --enable-cpp-rtti Enable C++ RTTI ], |
---|
4960 | [ _MOZ_USE_RTTI=1 ], |
---|
4961 | [ _MOZ_USE_RTTI= ]) |
---|
4962 | |
---|
4963 | if test "$_MOZ_USE_RTTI"; then |
---|
4964 | _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_ON |
---|
4965 | else |
---|
4966 | _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_OFF |
---|
4967 | fi |
---|
4968 | |
---|
4969 | dnl ======================================================== |
---|
4970 | dnl C++ exceptions (g++/egcs only - for now) |
---|
4971 | dnl Should be smarter and check that the compiler does indeed have exceptions |
---|
4972 | dnl ======================================================== |
---|
4973 | MOZ_ARG_ENABLE_BOOL(cpp-exceptions, |
---|
4974 | [ --enable-cpp-exceptions Enable C++ exceptions ], |
---|
4975 | [ _MOZ_CPP_EXCEPTIONS=1 ], |
---|
4976 | [ _MOZ_CPP_EXCEPTIONS= ]) |
---|
4977 | |
---|
4978 | if test "$_MOZ_CPP_EXCEPTIONS"; then |
---|
4979 | _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_ON |
---|
4980 | else |
---|
4981 | _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF |
---|
4982 | fi |
---|
4983 | |
---|
4984 | # Irix & OSF native compilers do not like exception declarations |
---|
4985 | # when exceptions are disabled |
---|
4986 | if test "$_MOZ_CPP_EXCEPTIONS" -o -n "$MIPSPRO_CXX" -o -n "$COMPAQ_CXX" -o -n "$VACPP"; then |
---|
4987 | AC_DEFINE(CPP_THROW_NEW, []) |
---|
4988 | else |
---|
4989 | AC_DEFINE(CPP_THROW_NEW, [throw()]) |
---|
4990 | fi |
---|
4991 | AC_LANG_C |
---|
4992 | |
---|
4993 | dnl ======================================================== |
---|
4994 | dnl = |
---|
4995 | dnl = Build depencency options |
---|
4996 | dnl = |
---|
4997 | dnl ======================================================== |
---|
4998 | MOZ_ARG_HEADER(Build dependencies) |
---|
4999 | |
---|
5000 | dnl ======================================================== |
---|
5001 | dnl = Do not auto generate dependency info |
---|
5002 | dnl ======================================================== |
---|
5003 | MOZ_AUTO_DEPS=1 |
---|
5004 | MOZ_ARG_DISABLE_BOOL(auto-deps, |
---|
5005 | [ --disable-auto-deps Do not automatically generate dependency info], |
---|
5006 | MOZ_AUTO_DEPS=, |
---|
5007 | MOZ_AUTO_DEPS=1) |
---|
5008 | |
---|
5009 | if test -n "$MOZ_AUTO_DEPS"; then |
---|
5010 | dnl ======================================================== |
---|
5011 | dnl = Use mkdepend instead of $CC -MD for dependency generation |
---|
5012 | dnl ======================================================== |
---|
5013 | _cpp_md_flag= |
---|
5014 | MOZ_ARG_DISABLE_BOOL(md, |
---|
5015 | [ --disable-md Do not use compiler-based dependencies ], |
---|
5016 | [_cpp_md_flag=], |
---|
5017 | [_cpp_md_flag=1], |
---|
5018 | [dnl Default is to turn on -MD if using GNU-compatible compilers |
---|
5019 | if test "$GNU_CC" -a "$GNU_CXX" -a "$OS_ARCH" != "WINNT"; then |
---|
5020 | _cpp_md_flag=1 |
---|
5021 | fi]) |
---|
5022 | if test "$_cpp_md_flag"; then |
---|
5023 | COMPILER_DEPEND=1 |
---|
5024 | if test "$OS_ARCH" = "OpenVMS"; then |
---|
5025 | _DEPEND_CFLAGS='$(subst =, ,$(filter-out %/.pp,-MM=-MD=-MF=$(MDDEPDIR)/$(*F).pp))' |
---|
5026 | else |
---|
5027 | _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)' |
---|
5028 | fi |
---|
5029 | else |
---|
5030 | COMPILER_DEPEND= |
---|
5031 | _USE_CPP_INCLUDE_FLAG= |
---|
5032 | _DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
---|
5033 | _DEFINES_CXXFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
---|
5034 | fi |
---|
5035 | fi # MOZ_AUTO_DEPS |
---|
5036 | MDDEPDIR='.deps' |
---|
5037 | AC_SUBST(MOZ_AUTO_DEPS) |
---|
5038 | AC_SUBST(COMPILER_DEPEND) |
---|
5039 | AC_SUBST(MDDEPDIR) |
---|
5040 | |
---|
5041 | |
---|
5042 | dnl ======================================================== |
---|
5043 | dnl = |
---|
5044 | dnl = Static Build Options |
---|
5045 | dnl = |
---|
5046 | dnl ======================================================== |
---|
5047 | MOZ_ARG_HEADER(Static build options) |
---|
5048 | |
---|
5049 | BUILD_SHARED_LIBS=1 |
---|
5050 | BUILD_STATIC_LIBS= |
---|
5051 | MOZ_STATIC_COMPONENT_LIBS= |
---|
5052 | |
---|
5053 | MOZ_ARG_DISABLE_BOOL(shared, |
---|
5054 | [ --disable-shared Disable building of internal shared libs], |
---|
5055 | BUILD_SHARED_LIBS=) |
---|
5056 | |
---|
5057 | MOZ_ARG_ENABLE_BOOL(static, |
---|
5058 | [ --enable-static Enable building of internal static libs], |
---|
5059 | BUILD_STATIC_LIBS=1 |
---|
5060 | MOZ_STATIC_COMPONENT_LIBS=1) |
---|
5061 | |
---|
5062 | if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") || |
---|
5063 | (test -n "$BUILD_SHARED_LIBS" && test -n "$BUILD_STATIC_LIBS") ; then |
---|
5064 | AC_MSG_ERROR([Only one of --enable-shared or --enable-static must be specified.]) |
---|
5065 | fi |
---|
5066 | |
---|
5067 | dnl ======================================================== |
---|
5068 | dnl static component loader |
---|
5069 | dnl ======================================================== |
---|
5070 | MOZ_STATIC_COMPONENT_LOADER=1 |
---|
5071 | MOZ_ARG_DISABLE_BOOL(static-component-loader, |
---|
5072 | [ --disable-static-component-loader |
---|
5073 | Disable the static component loader], |
---|
5074 | MOZ_STATIC_COMPONENT_LOADER=) |
---|
5075 | |
---|
5076 | if test -n "$MOZ_STATIC_COMPONENT_LOADER"; then |
---|
5077 | AC_DEFINE(ENABLE_STATIC_COMPONENT_LOADER) |
---|
5078 | fi |
---|
5079 | |
---|
5080 | dnl ======================================================== |
---|
5081 | dnl Generate static component from list of modules |
---|
5082 | dnl ======================================================== |
---|
5083 | MOZ_ARG_ENABLE_STRING(meta-component-modules, |
---|
5084 | [ --enable-meta-component-modules=mod1[,mod2] |
---|
5085 | Build single meta-component from specified modules], |
---|
5086 | [ MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'` ] ) |
---|
5087 | |
---|
5088 | dnl ======================================================== |
---|
5089 | dnl Enable the use of predefined meta components |
---|
5090 | dnl ======================================================== |
---|
5091 | MOZ_ARG_ENABLE_STRING(meta-components, |
---|
5092 | [ --enable-meta-components |
---|
5093 | Build predefined meta-components], |
---|
5094 | [ MOZ_META_COMPONENTS=`echo $enableval | sed 's/,/ /g'` ] ) |
---|
5095 | |
---|
5096 | if test -n "$MOZ_STATIC_COMPONENTS" && test -n "$MOZ_META_COMPONENTS"; then |
---|
5097 | AC_MSG_ERROR([Simultaneous use of meta-module-components & meta-components is not supported.]) |
---|
5098 | fi |
---|
5099 | |
---|
5100 | MOZ_COMPONENTLIB= |
---|
5101 | MOZ_ARG_ENABLE_BOOL(componentlib, |
---|
5102 | [ --enable-componentlib Build a shared library containing all of the components], |
---|
5103 | MOZ_COMPONENTLIB=1, |
---|
5104 | MOZ_COMPONENTLIB= ) |
---|
5105 | |
---|
5106 | AC_SUBST(MOZ_COMPONENTLIB) |
---|
5107 | if test "$MOZ_COMPONENTLIB"; then |
---|
5108 | BUILD_SHARED_LIBS= |
---|
5109 | BUILD_STATIC_LIBS=1 |
---|
5110 | MOZ_STATIC_COMPONENT_LIBS=1 |
---|
5111 | MOZ_META_COMPONENTS=mozcomps |
---|
5112 | fi |
---|
5113 | |
---|
5114 | dnl ======================================================== |
---|
5115 | dnl = |
---|
5116 | dnl = Standalone module options |
---|
5117 | dnl = |
---|
5118 | dnl ======================================================== |
---|
5119 | MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla)) |
---|
5120 | |
---|
5121 | dnl ======================================================== |
---|
5122 | dnl = Only selectively build modules |
---|
5123 | dnl ======================================================== |
---|
5124 | BUILD_MODULES=all |
---|
5125 | MOZ_ARG_ENABLE_STRING(standalone-modules, |
---|
5126 | [ --enable-standalone-modules=mod1[,mod2] |
---|
5127 | Enable standalone build of specific modules], |
---|
5128 | [ BUILD_MODULES=`echo $enableval | sed 's/,/ /g'` ] ) |
---|
5129 | |
---|
5130 | dnl Disable ldap if LDAP is not building all of Mozilla |
---|
5131 | dnl and ldap isn't in the standalone list |
---|
5132 | if test "$BUILD_MODULES" != "all" && |
---|
5133 | test `echo "$BUILD_MODULES" | grep -c ldap` = 0 && |
---|
5134 | test "$enable_ldap" != "yes"; then |
---|
5135 | MOZ_LDAP_XPCOM= |
---|
5136 | fi |
---|
5137 | |
---|
5138 | dnl Check for GLib and libIDL. |
---|
5139 | dnl ======================================================== |
---|
5140 | case "$target_os" in |
---|
5141 | msvc*|mks*|cygwin*|mingw*) |
---|
5142 | SKIP_IDL_CHECK="yes" |
---|
5143 | ;; |
---|
5144 | *) |
---|
5145 | SKIP_IDL_CHECK="no" |
---|
5146 | ;; |
---|
5147 | esac |
---|
5148 | |
---|
5149 | dnl = Allow users to disable libIDL checking for standalone modules |
---|
5150 | MOZ_ARG_WITHOUT_BOOL(libIDL, |
---|
5151 | [ --without-libIDL Skip check for libIDL (standalone modules only)], |
---|
5152 | SKIP_IDL_CHECK="yes") |
---|
5153 | |
---|
5154 | if test "$SKIP_IDL_CHECK" = "no" |
---|
5155 | then |
---|
5156 | _LIBIDL_FOUND= |
---|
5157 | if test "$MACOS_SDK_DIR"; then |
---|
5158 | changequote(,) |
---|
5159 | LIBS=`echo $LIBS|sed -e "s?-L${MACOS_SDK_DIR}/usr/lib[^ ]*??g"` |
---|
5160 | changequote([,]) |
---|
5161 | unset NEXT_ROOT |
---|
5162 | fi |
---|
5163 | |
---|
5164 | if test "$MOZ_ENABLE_GTK2"; then |
---|
5165 | PKG_CHECK_MODULES(LIBIDL, libIDL-2.0 >= 0.8.0,_LIBIDL_FOUND=1) |
---|
5166 | fi |
---|
5167 | if test -z "$_LIBIDL_FOUND"; then |
---|
5168 | AM_PATH_LIBIDL($LIBIDL_VERSION,_LIBIDL_FOUND=1) |
---|
5169 | fi |
---|
5170 | dnl |
---|
5171 | dnl If we don't have a libIDL config program & not cross-compiling, |
---|
5172 | dnl look for orbit-config instead. |
---|
5173 | dnl |
---|
5174 | if test -z "$_LIBIDL_FOUND" && test -z "$CROSS_COMPILE"; then |
---|
5175 | AC_PATH_PROGS(ORBIT_CONFIG, $ORBIT_CONFIG orbit-config) |
---|
5176 | if test -n "$ORBIT_CONFIG"; then |
---|
5177 | _ORBIT_CFLAGS=`${ORBIT_CONFIG} client --cflags` |
---|
5178 | _ORBIT_LIBS=`${ORBIT_CONFIG} client --libs` |
---|
5179 | _ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}` |
---|
5180 | _ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}` |
---|
5181 | LIBIDL_CFLAGS="$_ORBIT_INC_PATH" |
---|
5182 | LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib" |
---|
5183 | LIBIDL_CONFIG= |
---|
5184 | _LIBIDL_FOUND=1 |
---|
5185 | fi |
---|
5186 | fi |
---|
5187 | if test -z "$_LIBIDL_FOUND"; then |
---|
5188 | AC_MSG_ERROR([libIDL not found. |
---|
5189 | libIDL $LIBIDL_VERSION or higher is required.]) |
---|
5190 | fi |
---|
5191 | if test "$MACOS_SDK_DIR"; then |
---|
5192 | LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOS_SDK_DIR}/usr/lib $LIBS" |
---|
5193 | export NEXT_ROOT=$MACOS_SDK_DIR |
---|
5194 | fi |
---|
5195 | fi |
---|
5196 | |
---|
5197 | if test -n "$CROSS_COMPILE"; then |
---|
5198 | if test -z "$HOST_LIBIDL_CONFIG"; then |
---|
5199 | HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG" |
---|
5200 | fi |
---|
5201 | if test -n "$HOST_LIBIDL_CONFIG"; then |
---|
5202 | HOST_LIBIDL_CFLAGS=`${HOST_LIBIDL_CONFIG} --cflags` |
---|
5203 | HOST_LIBIDL_LIBS=`${HOST_LIBIDL_CONFIG} --libs` |
---|
5204 | else |
---|
5205 | HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS" |
---|
5206 | HOST_LIBIDL_LIBS="$LIBIDL_LIBS" |
---|
5207 | fi |
---|
5208 | fi |
---|
5209 | |
---|
5210 | if test -z "$SKIP_PATH_CHECKS"; then |
---|
5211 | if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then |
---|
5212 | if test "$MOZ_ENABLE_GTK2"; then |
---|
5213 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.7) |
---|
5214 | else |
---|
5215 | AM_PATH_GLIB(${GLIB_VERSION}) |
---|
5216 | fi |
---|
5217 | fi |
---|
5218 | fi |
---|
5219 | |
---|
5220 | if test -z "${GLIB_GMODULE_LIBS}" -a -n "${GLIB_CONFIG}"; then |
---|
5221 | GLIB_GMODULE_LIBS=`$GLIB_CONFIG gmodule --libs` |
---|
5222 | fi |
---|
5223 | |
---|
5224 | AC_SUBST(LIBIDL_CFLAGS) |
---|
5225 | AC_SUBST(LIBIDL_LIBS) |
---|
5226 | AC_SUBST(GLIB_CFLAGS) |
---|
5227 | AC_SUBST(GLIB_LIBS) |
---|
5228 | AC_SUBST(GLIB_GMODULE_LIBS) |
---|
5229 | AC_SUBST(HOST_LIBIDL_CONFIG) |
---|
5230 | AC_SUBST(HOST_LIBIDL_CFLAGS) |
---|
5231 | AC_SUBST(HOST_LIBIDL_LIBS) |
---|
5232 | |
---|
5233 | dnl ======================================================== |
---|
5234 | dnl Check for libart |
---|
5235 | dnl ======================================================== |
---|
5236 | MOZ_LIBART_CFLAGS= |
---|
5237 | MOZ_LIBART_LIBS= |
---|
5238 | |
---|
5239 | if test "$MOZ_SVG_RENDERER_LIBART"; then |
---|
5240 | if test "$MOZ_INTERNAL_LIBART_LGPL"; then |
---|
5241 | dnl libart's configure hasn't been run yet, but we know what the |
---|
5242 | dnl answer should be anyway |
---|
5243 | MOZ_LIBART_CFLAGS='-I${DIST}/include/libart_lgpl' |
---|
5244 | case "$target_os" in |
---|
5245 | msvc*|mks*|cygwin*|mingw*) |
---|
5246 | MOZ_LIBART_LIBS='$(DIST)/lib/$(LIB_PREFIX)moz_art_lgpl.$(IMPORT_LIB_SUFFIX)' |
---|
5247 | ;; |
---|
5248 | beos*) |
---|
5249 | MOZ_LIBART_LIBS='-lmoz_art_lgpl -lroot -lbe' |
---|
5250 | ;; |
---|
5251 | *) |
---|
5252 | MOZ_LIBART_LIBS='-lmoz_art_lgpl -lm' |
---|
5253 | ;; |
---|
5254 | esac |
---|
5255 | AC_FUNC_ALLOCA |
---|
5256 | else |
---|
5257 | dnl Disable system libart until the pixel format changes are merged upstream |
---|
5258 | AC_MSG_ERROR([SVG requires a modified version of libart. To pull and build |
---|
5259 | this LGPL library, set MOZ_INTERNAL_LIBART_LGPL, and then rerun the |
---|
5260 | checkout stage]) |
---|
5261 | dnl AM_PATH_LIBART($LIBART_VERSION, |
---|
5262 | dnl AC_MSG_ERROR(SVG requires at least version $LIBART_VERSION of libart)) |
---|
5263 | dnl |
---|
5264 | dnl MOZ_LIBART_CFLAGS=$LIBART_CFLAGS |
---|
5265 | dnl MOZ_LIBART_LIBS=$LIBART_LIBS |
---|
5266 | fi |
---|
5267 | fi |
---|
5268 | |
---|
5269 | AC_SUBST(MOZ_LIBART_CFLAGS) |
---|
5270 | AC_SUBST(MOZ_LIBART_LIBS) |
---|
5271 | AC_SUBST(MOZ_INTERNAL_LIBART_LGPL) |
---|
5272 | |
---|
5273 | dnl ======================================================== |
---|
5274 | dnl Check for cairo |
---|
5275 | dnl ======================================================== |
---|
5276 | MOZ_CAIRO_CFLAGS= |
---|
5277 | MOZ_CAIRO_LIBS= |
---|
5278 | |
---|
5279 | if test "$MOZ_SVG_RENDERER_CAIRO"; then |
---|
5280 | PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION) |
---|
5281 | MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS |
---|
5282 | MOZ_CAIRO_LIBS=$CAIRO_LIBS |
---|
5283 | fi |
---|
5284 | |
---|
5285 | AC_SUBST(MOZ_CAIRO_CFLAGS) |
---|
5286 | AC_SUBST(MOZ_CAIRO_LIBS) |
---|
5287 | |
---|
5288 | dnl ======================================================== |
---|
5289 | dnl disable xul |
---|
5290 | dnl ======================================================== |
---|
5291 | MOZ_XUL=1 |
---|
5292 | MOZ_ARG_DISABLE_BOOL(xul, |
---|
5293 | [ --disable-xul Disable XUL], |
---|
5294 | MOZ_XUL= ) |
---|
5295 | if test "$MOZ_XUL"; then |
---|
5296 | AC_DEFINE(MOZ_XUL) |
---|
5297 | else |
---|
5298 | dnl remove extensions that require XUL |
---|
5299 | MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//' -e 's/tasks//'` |
---|
5300 | fi |
---|
5301 | |
---|
5302 | AC_SUBST(MOZ_XUL) |
---|
5303 | |
---|
5304 | dnl ======================================================== |
---|
5305 | dnl disable profile sharing |
---|
5306 | dnl ======================================================== |
---|
5307 | MOZ_PROFILESHARING=1 |
---|
5308 | MOZ_IPCD= |
---|
5309 | MOZ_ARG_DISABLE_BOOL(profilesharing, |
---|
5310 | [ --disable-profilesharing Disable profile sharing], |
---|
5311 | MOZ_PROFILESHARING=, |
---|
5312 | MOZ_PROFILESHARING=1 ) |
---|
5313 | if test "$MOZ_PROFILESHARING"; then |
---|
5314 | MOZ_IPCD=1 |
---|
5315 | AC_DEFINE(MOZ_PROFILESHARING) |
---|
5316 | fi |
---|
5317 | |
---|
5318 | dnl ======================================================== |
---|
5319 | dnl disable profile locking |
---|
5320 | dnl do no use this in applications that can have more than |
---|
5321 | dnl one process accessing the profile directory. |
---|
5322 | dnl ======================================================== |
---|
5323 | MOZ_PROFILELOCKING=1 |
---|
5324 | MOZ_ARG_DISABLE_BOOL(profilelocking, |
---|
5325 | [ --disable-profilelocking Disable profile locking], |
---|
5326 | MOZ_PROFILELOCKING=, |
---|
5327 | MOZ_PROFILELOCKING=1 ) |
---|
5328 | if test "$MOZ_PROFILELOCKING"; then |
---|
5329 | AC_DEFINE(MOZ_PROFILELOCKING) |
---|
5330 | fi |
---|
5331 | |
---|
5332 | |
---|
5333 | dnl ======================================================== |
---|
5334 | dnl necko configuration options |
---|
5335 | dnl ======================================================== |
---|
5336 | |
---|
5337 | dnl |
---|
5338 | dnl option to disable various necko protocols |
---|
5339 | dnl |
---|
5340 | NECKO_PROTOCOLS_DEFAULT="about data file ftp gopher http jar keyword res viewsource" |
---|
5341 | MOZ_ARG_ENABLE_STRING(necko-protocols, |
---|
5342 | [ --enable-necko-protocols[={http,ftp,default,all,none}] |
---|
5343 | Enable/disable specific protocol handlers], |
---|
5344 | [ for option in `echo $enableval | sed 's/,/ /g'`; do |
---|
5345 | if test "$option" = "yes" || test "$option" = "all"; then |
---|
5346 | NECKO_PROTOCOLS="$NECKO_PROTOCOLS $NECKO_PROTOCOLS_DEFAULT" |
---|
5347 | elif test "$option" = "no" || test "$option" = "none"; then |
---|
5348 | NECKO_PROTOCOLS="" |
---|
5349 | elif test "$option" = "default"; then |
---|
5350 | NECKO_PROTOCOLS="$NECKO_PROTOCOLS $NECKO_PROTOCOLS_DEFAULT" |
---|
5351 | elif test `echo "$option" | grep -c \^-` != 0; then |
---|
5352 | option=`echo $option | sed 's/^-//'` |
---|
5353 | NECKO_PROTOCOLS=`echo "$NECKO_PROTOCOLS" | sed "s/ ${option}//"` |
---|
5354 | else |
---|
5355 | NECKO_PROTOCOLS="$NECKO_PROTOCOLS $option" |
---|
5356 | fi |
---|
5357 | done], |
---|
5358 | NECKO_PROTOCOLS="$NECKO_PROTOCOLS_DEFAULT") |
---|
5359 | dnl Remove dupes |
---|
5360 | NECKO_PROTOCOLS=`${PERL} ${srcdir}/build/unix/uniq.pl ${NECKO_PROTOCOLS}` |
---|
5361 | AC_SUBST(NECKO_PROTOCOLS) |
---|
5362 | for p in $NECKO_PROTOCOLS; do |
---|
5363 | AC_DEFINE_UNQUOTED(NECKO_PROTOCOL_$p) |
---|
5364 | done |
---|
5365 | |
---|
5366 | dnl |
---|
5367 | dnl option to disable necko's disk cache |
---|
5368 | dnl |
---|
5369 | NECKO_DISK_CACHE=1 |
---|
5370 | MOZ_ARG_DISABLE_BOOL(necko-disk-cache, |
---|
5371 | [ --disable-necko-disk-cache |
---|
5372 | Disable necko disk cache], |
---|
5373 | NECKO_DISK_CACHE=, |
---|
5374 | NECKO_DISK_CACHE=1) |
---|
5375 | AC_SUBST(NECKO_DISK_CACHE) |
---|
5376 | if test "$NECKO_DISK_CACHE"; then |
---|
5377 | AC_DEFINE(NECKO_DISK_CACHE) |
---|
5378 | fi |
---|
5379 | |
---|
5380 | dnl |
---|
5381 | dnl option to minimize size of necko's i/o buffers |
---|
5382 | dnl |
---|
5383 | NECKO_SMALL_BUFFERS= |
---|
5384 | MOZ_ARG_ENABLE_BOOL(necko-small-buffers, |
---|
5385 | [ --enable-necko-small-buffers |
---|
5386 | Minimize size of necko's i/o buffers], |
---|
5387 | NECKO_SMALL_BUFFERS=1, |
---|
5388 | NECKO_SMALL_BUFFERS=) |
---|
5389 | AC_SUBST(NECKO_SMALL_BUFFERS) |
---|
5390 | if test "$NECKO_SMALL_BUFFERS"; then |
---|
5391 | AC_DEFINE(NECKO_SMALL_BUFFERS) |
---|
5392 | fi |
---|
5393 | |
---|
5394 | dnl |
---|
5395 | dnl option to disable cookies |
---|
5396 | dnl |
---|
5397 | NECKO_COOKIES=1 |
---|
5398 | MOZ_ARG_DISABLE_BOOL(cookies, |
---|
5399 | [ --disable-cookies Disable cookie support], |
---|
5400 | NECKO_COOKIES=, |
---|
5401 | NECKO_COOKIES=1) |
---|
5402 | AC_SUBST(NECKO_COOKIES) |
---|
5403 | if test "$NECKO_COOKIES"; then |
---|
5404 | AC_DEFINE(NECKO_COOKIES) |
---|
5405 | fi |
---|
5406 | |
---|
5407 | dnl NECKO_ configuration options are not global |
---|
5408 | _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_" |
---|
5409 | |
---|
5410 | dnl ======================================================== |
---|
5411 | dnl = |
---|
5412 | dnl = Cleanup section for misc ordering snafus |
---|
5413 | dnl = |
---|
5414 | if test "$OS_ARCH" = "WINNT" -a -z "$GNU_CC"; then |
---|
5415 | XPCOM_GLUE_LIBS='$(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) $(DIST)/lib/$(LIB_PREFIX)string_s.$(LIB_SUFFIX)' |
---|
5416 | else |
---|
5417 | XPCOM_GLUE_LIBS='-L${DIST}/bin -L${DIST}/lib -lxpcomglue -lstring_s' |
---|
5418 | fi |
---|
5419 | |
---|
5420 | dnl ======================================================== |
---|
5421 | if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"; then |
---|
5422 | MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= |
---|
5423 | fi |
---|
5424 | |
---|
5425 | if test "$MOZ_LDAP_XPCOM"; then |
---|
5426 | LDAP_CFLAGS='-I${DIST}/public/ldap' |
---|
5427 | if test "$OS_ARCH" = "WINNT"; then |
---|
5428 | if test -n "$GNU_CC"; then |
---|
5429 | LDAP_LIBS='-L$(DIST)/lib -lnsldap32v50 -lnsldappr32v50' |
---|
5430 | else |
---|
5431 | LDAP_LIBS='$(DIST)/lib/$(LIB_PREFIX)nsldap32v50.${IMPORT_LIB_SUFFIX} $(DIST)/lib/$(LIB_PREFIX)nsldappr32v50.${IMPORT_LIB_SUFFIX}' |
---|
5432 | fi |
---|
5433 | elif test "$VACPP"; then |
---|
5434 | LDAP_LIBS='$(DIST)/lib/$(LIB_PREFIX)ldap50.${IMPORT_LIB_SUFFIX} $(DIST)/lib/$(LIB_PREFIX)prldap50.${IMPORT_LIB_SUFFIX}' |
---|
5435 | else |
---|
5436 | LDAP_LIBS='-L${DIST}/bin -L${DIST}/lib -lldap50 -llber50 -lprldap50' |
---|
5437 | fi |
---|
5438 | fi |
---|
5439 | |
---|
5440 | if test "$SUNCTL"; then |
---|
5441 | dnl older versions of glib do not seem to have gmodule which ctl needs |
---|
5442 | _SAVE_CFLAGS=$CFLAGS |
---|
5443 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
5444 | AC_LANG_SAVE |
---|
5445 | AC_LANG_C |
---|
5446 | AC_TRY_COMPILE([#include <gmodule.h>], |
---|
5447 | [ int x = 1; x++; ],, |
---|
5448 | [AC_MSG_ERROR([Cannot build ctl without gmodule support in glib.])]) |
---|
5449 | AC_LANG_RESTORE |
---|
5450 | CFLAGS=$_SAVE_CFLAGS |
---|
5451 | AC_DEFINE(SUNCTL) |
---|
5452 | fi |
---|
5453 | |
---|
5454 | dnl ======================================================== |
---|
5455 | dnl = |
---|
5456 | dnl = Maintainer debug option (no --enable equivalent) |
---|
5457 | dnl = |
---|
5458 | dnl ======================================================== |
---|
5459 | |
---|
5460 | AC_SUBST(AR) |
---|
5461 | AC_SUBST(AR_FLAGS) |
---|
5462 | AC_SUBST(AR_LIST) |
---|
5463 | AC_SUBST(AR_EXTRACT) |
---|
5464 | AC_SUBST(AR_DELETE) |
---|
5465 | AC_SUBST(AS) |
---|
5466 | AC_SUBST(ASFLAGS) |
---|
5467 | AC_SUBST(AS_DASH_C_FLAG) |
---|
5468 | AC_SUBST(LD) |
---|
5469 | AC_SUBST(RC) |
---|
5470 | AC_SUBST(RCFLAGS) |
---|
5471 | AC_SUBST(WINDRES) |
---|
5472 | AC_SUBST(USE_SHORT_LIBNAME) |
---|
5473 | AC_SUBST(IMPLIB) |
---|
5474 | AC_SUBST(FILTER) |
---|
5475 | AC_SUBST(BIN_FLAGS) |
---|
5476 | AC_SUBST(NS_USE_NATIVE) |
---|
5477 | AC_SUBST(MOZ_WIDGET_TOOLKIT) |
---|
5478 | AC_SUBST(MOZ_WIDGET_TOOLKIT_LDFLAGS) |
---|
5479 | AC_SUBST(WIDGET_DLL) |
---|
5480 | AC_SUBST(GFXWIN_DLL) |
---|
5481 | AC_SUBST(MOZ_GFX_TOOLKIT) |
---|
5482 | AC_SUBST(MOZ_GFX_TOOLKIT_LDFLAGS) |
---|
5483 | AC_SUBST(MOZ_UPDATE_XTERM) |
---|
5484 | AC_SUBST(MINIMO) |
---|
5485 | AC_SUBST(MOZ_MATHML) |
---|
5486 | AC_SUBST(MOZ_SVG) |
---|
5487 | AC_SUBST(MOZ_SVG_RENDERER_GDIPLUS) |
---|
5488 | AC_SUBST(MOZ_SVG_RENDERER_LIBART) |
---|
5489 | AC_SUBST(TX_EXE) |
---|
5490 | AC_SUBST(MOZ_JS_LIBS) |
---|
5491 | AC_SUBST(MOZ_PSM) |
---|
5492 | AC_SUBST(BUILD_MODULES) |
---|
5493 | AC_SUBST(MOZ_DEBUG) |
---|
5494 | AC_SUBST(MOZ_DEBUG_MODULES) |
---|
5495 | AC_SUBST(MOZ_PROFILE_MODULES) |
---|
5496 | AC_SUBST(MOZ_DEBUG_ENABLE_DEFS) |
---|
5497 | AC_SUBST(MOZ_DEBUG_DISABLE_DEFS) |
---|
5498 | AC_SUBST(MOZ_DEBUG_FLAGS) |
---|
5499 | AC_SUBST(MOZ_DEBUG_LDFLAGS) |
---|
5500 | AC_SUBST(MOZ_DBGRINFO_MODULES) |
---|
5501 | AC_SUBST(MOZ_EXTENSIONS) |
---|
5502 | AC_SUBST(MOZ_IMG_DECODERS) |
---|
5503 | AC_SUBST(MOZ_JSDEBUGGER) |
---|
5504 | AC_SUBST(MOZ_OJI) |
---|
5505 | AC_SUBST(MOZ_PLUGINS) |
---|
5506 | AC_SUBST(ENABLE_EAZEL_PROFILER) |
---|
5507 | AC_SUBST(EAZEL_PROFILER_CFLAGS) |
---|
5508 | AC_SUBST(EAZEL_PROFILER_LIBS) |
---|
5509 | AC_SUBST(XPCOM_GLUE_LIBS) |
---|
5510 | AC_SUBST(MOZ_PERF_METRICS) |
---|
5511 | AC_SUBST(GC_LEAK_DETECTOR) |
---|
5512 | AC_SUBST(MOZ_LOG_REFCNT) |
---|
5513 | AC_SUBST(MOZ_LEAKY) |
---|
5514 | AC_SUBST(MOZ_JPROF) |
---|
5515 | AC_SUBST(MOZ_XPCTOOLS) |
---|
5516 | AC_SUBST(MOZ_JSLOADER) |
---|
5517 | AC_SUBST(MOZ_USE_NATIVE_UCONV) |
---|
5518 | AC_SUBST(MOZ_INSURE) |
---|
5519 | AC_SUBST(MOZ_INSURE_DIRS) |
---|
5520 | AC_SUBST(MOZ_INSURE_EXCLUDE_DIRS) |
---|
5521 | AC_SUBST(MOZ_QUANTIFY) |
---|
5522 | AC_SUBST(MOZ_INSURIFYING) |
---|
5523 | AC_SUBST(MOZ_LDAP_XPCOM) |
---|
5524 | AC_SUBST(MOZ_LDAP_XPCOM_EXPERIMENTAL) |
---|
5525 | AC_SUBST(LDAP_CFLAGS) |
---|
5526 | AC_SUBST(LDAP_LIBS) |
---|
5527 | AC_SUBST(LIBICONV) |
---|
5528 | |
---|
5529 | AC_SUBST(MOZ_PROFILESHARING) |
---|
5530 | AC_SUBST(MOZ_PROFILELOCKING) |
---|
5531 | |
---|
5532 | AC_SUBST(MOZ_IPCD) |
---|
5533 | |
---|
5534 | AC_SUBST(HAVE_XIE) |
---|
5535 | AC_SUBST(MOZ_XIE_LIBS) |
---|
5536 | AC_SUBST(MOZ_XPRINT_CFLAGS) |
---|
5537 | AC_SUBST(MOZ_XPRINT_LDFLAGS) |
---|
5538 | AC_SUBST(MOZ_ENABLE_XPRINT) |
---|
5539 | AC_SUBST(MOZ_ENABLE_POSTSCRIPT) |
---|
5540 | AC_SUBST(MOZ_XINERAMA_LIBS) |
---|
5541 | AC_SUBST(MOZ_ENABLE_XINERAMA) |
---|
5542 | |
---|
5543 | AC_SUBST(XPCOM_USE_LEA) |
---|
5544 | AC_SUBST(BUILD_SHARED_LIBS) |
---|
5545 | AC_SUBST(BUILD_STATIC_LIBS) |
---|
5546 | AC_SUBST(MOZ_STATIC_COMPONENT_LOADER) |
---|
5547 | AC_SUBST(MOZ_STATIC_COMPONENT_LIBS) |
---|
5548 | AC_SUBST(MOZ_STATIC_COMPONENTS) |
---|
5549 | AC_SUBST(MOZ_META_COMPONENTS) |
---|
5550 | AC_SUBST(ENABLE_TESTS) |
---|
5551 | AC_SUBST(IBMBIDI) |
---|
5552 | AC_SUBST(SUNCTL) |
---|
5553 | AC_SUBST(ACCESSIBILITY) |
---|
5554 | AC_SUBST(MOZ_XPINSTALL) |
---|
5555 | AC_SUBST(MOZ_VIEW_SOURCE) |
---|
5556 | AC_SUBST(MOZ_SINGLE_PROFILE) |
---|
5557 | AC_SUBST(MOZ_XPFE_COMPONENTS) |
---|
5558 | AC_SUBST(MOZ_USER_DIR) |
---|
5559 | |
---|
5560 | AC_SUBST(ENABLE_STRIP) |
---|
5561 | AC_SUBST(USE_ELF_DYNSTR_GC) |
---|
5562 | AC_SUBST(USE_PREBINDING) |
---|
5563 | AC_SUBST(INCREMENTAL_LINKER) |
---|
5564 | AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS) |
---|
5565 | AC_SUBST(MOZ_COMPONENT_NSPR_LIBS) |
---|
5566 | AC_SUBST(MOZ_COMPONENT_XPCOM_LIBS) |
---|
5567 | AC_SUBST(MOZ_XPCOM_OBSOLETE_LIBS) |
---|
5568 | AC_SUBST(XPCOM_LIBS) |
---|
5569 | AC_SUBST(USE_DEPENDENT_LIBS) |
---|
5570 | |
---|
5571 | AC_SUBST(MOZ_BUILD_ROOT) |
---|
5572 | AC_SUBST(MOZ_OS2_TOOLS) |
---|
5573 | AC_SUBST(MOZ_OS2_EMX_OBJECTFORMAT) |
---|
5574 | |
---|
5575 | AC_SUBST(MOZ_POST_DSO_LIB_COMMAND) |
---|
5576 | AC_SUBST(MOZ_POST_PROGRAM_COMMAND) |
---|
5577 | AC_SUBST(MOZ_REORDER) |
---|
5578 | AC_SUBST(MOZ_TIMELINE) |
---|
5579 | |
---|
5580 | AC_SUBST(MOZ_APP_NAME) |
---|
5581 | AC_SUBST(MOZ_APP_VERSION) |
---|
5582 | AC_SUBST(MOZ_APP_DISPLAYNAME) |
---|
5583 | |
---|
5584 | dnl win32 options |
---|
5585 | AC_SUBST(MOZ_PROFILE) |
---|
5586 | AC_SUBST(MOZ_DEBUG_SYMBOLS) |
---|
5587 | AC_SUBST(MOZ_COVERAGE) |
---|
5588 | AC_SUBST(MOZ_MAPINFO) |
---|
5589 | AC_SUBST(MOZ_BROWSE_INFO) |
---|
5590 | AC_SUBST(MOZ_TOOLS_DIR) |
---|
5591 | AC_SUBST(CYGWIN_WRAPPER) |
---|
5592 | |
---|
5593 | dnl Disable profile at startup, hack for tinderbox. |
---|
5594 | if test "$MOZ_BYPASS_PROFILE_AT_STARTUP"; then |
---|
5595 | AC_DEFINE(MOZ_BYPASS_PROFILE_AT_STARTUP) |
---|
5596 | fi |
---|
5597 | |
---|
5598 | dnl Echo the CFLAGS to remove extra whitespace. |
---|
5599 | CFLAGS=`echo \ |
---|
5600 | $_WARNINGS_CFLAGS \ |
---|
5601 | $CFLAGS` |
---|
5602 | |
---|
5603 | CXXFLAGS=`echo \ |
---|
5604 | $_MOZ_RTTI_FLAGS \ |
---|
5605 | $_MOZ_EXCEPTIONS_FLAGS \ |
---|
5606 | $_WARNINGS_CXXFLAGS \ |
---|
5607 | $CXXFLAGS` |
---|
5608 | |
---|
5609 | COMPILE_CFLAGS=`echo \ |
---|
5610 | $_DEFINES_CFLAGS \ |
---|
5611 | $_DEPEND_CFLAGS \ |
---|
5612 | $COMPILE_CFLAGS` |
---|
5613 | |
---|
5614 | COMPILE_CXXFLAGS=`echo \ |
---|
5615 | $_DEFINES_CXXFLAGS \ |
---|
5616 | $_DEPEND_CFLAGS \ |
---|
5617 | $COMPILE_CXXFLAGS` |
---|
5618 | |
---|
5619 | dnl |
---|
5620 | dnl It is perfectly legal to build with both -O and -g even though |
---|
5621 | dnl some compilers/platforms might not support this. |
---|
5622 | dnl |
---|
5623 | |
---|
5624 | dnl # Clean out '-O' flags if doing a debug build. |
---|
5625 | dnl if test "$MOZ_DEBUG" |
---|
5626 | dnl then |
---|
5627 | dnl changequote(,)dnl |
---|
5628 | dnl CFLAGS=` echo $CFLAGS | sed 's/ *-O[^ ]*//g;'` |
---|
5629 | dnl CXXFLAGS=`echo $CXXFLAGS | sed 's/ *-O[^ ]*//g;'` |
---|
5630 | dnl LDFLAGS=`echo $LDFLAGS | sed 's/ *-O[^ ]*//g;'` |
---|
5631 | dnl changequote([,])dnl |
---|
5632 | dnl fi |
---|
5633 | |
---|
5634 | AC_SUBST(SYSTEM_MAKEDEPEND) |
---|
5635 | AC_SUBST(SYSTEM_JPEG) |
---|
5636 | AC_SUBST(SYSTEM_PNG) |
---|
5637 | AC_SUBST(SYSTEM_ZLIB) |
---|
5638 | |
---|
5639 | AC_SUBST(JPEG_CFLAGS) |
---|
5640 | AC_SUBST(JPEG_LIBS) |
---|
5641 | AC_SUBST(ZLIB_CFLAGS) |
---|
5642 | AC_SUBST(ZLIB_LIBS) |
---|
5643 | AC_SUBST(PNG_CFLAGS) |
---|
5644 | AC_SUBST(PNG_LIBS) |
---|
5645 | |
---|
5646 | AC_SUBST(MOZ_JPEG_CFLAGS) |
---|
5647 | AC_SUBST(MOZ_JPEG_LIBS) |
---|
5648 | AC_SUBST(MOZ_ZLIB_CFLAGS) |
---|
5649 | AC_SUBST(MOZ_ZLIB_LIBS) |
---|
5650 | AC_SUBST(MOZ_PNG_CFLAGS) |
---|
5651 | AC_SUBST(MOZ_PNG_LIBS) |
---|
5652 | |
---|
5653 | AC_SUBST(NSPR_CFLAGS) |
---|
5654 | AC_SUBST(NSPR_LIBS) |
---|
5655 | AC_SUBST(MOZ_NATIVE_NSPR) |
---|
5656 | |
---|
5657 | AC_SUBST(CFLAGS) |
---|
5658 | AC_SUBST(CXXFLAGS) |
---|
5659 | AC_SUBST(CPPFLAGS) |
---|
5660 | AC_SUBST(COMPILE_CFLAGS) |
---|
5661 | AC_SUBST(COMPILE_CXXFLAGS) |
---|
5662 | AC_SUBST(LDFLAGS) |
---|
5663 | AC_SUBST(LIBS) |
---|
5664 | AC_SUBST(CROSS_COMPILE) |
---|
5665 | |
---|
5666 | AC_SUBST(HOST_CC) |
---|
5667 | AC_SUBST(HOST_CXX) |
---|
5668 | AC_SUBST(HOST_CFLAGS) |
---|
5669 | AC_SUBST(HOST_CXXFLAGS) |
---|
5670 | AC_SUBST(HOST_OPTIMIZE_FLAGS) |
---|
5671 | AC_SUBST(HOST_AR) |
---|
5672 | AC_SUBST(HOST_LD) |
---|
5673 | AC_SUBST(HOST_RANLIB) |
---|
5674 | AC_SUBST(HOST_NSPR_MDCPUCFG) |
---|
5675 | AC_SUBST(HOST_BIN_SUFFIX) |
---|
5676 | |
---|
5677 | AC_SUBST(TARGET_CPU) |
---|
5678 | AC_SUBST(TARGET_VENDOR) |
---|
5679 | AC_SUBST(TARGET_OS) |
---|
5680 | AC_SUBST(TARGET_NSPR_MDCPUCFG) |
---|
5681 | AC_SUBST(TARGET_MD_ARCH) |
---|
5682 | AC_SUBST(OS_TARGET) |
---|
5683 | AC_SUBST(OS_ARCH) |
---|
5684 | AC_SUBST(OS_RELEASE) |
---|
5685 | AC_SUBST(OS_TEST) |
---|
5686 | |
---|
5687 | AC_SUBST(MOZ_DISABLE_JAR_PACKAGING) |
---|
5688 | AC_SUBST(MOZ_CHROME_FILE_FORMAT) |
---|
5689 | |
---|
5690 | AC_SUBST(WRAP_MALLOC_CFLAGS) |
---|
5691 | AC_SUBST(WRAP_MALLOC_LIB) |
---|
5692 | AC_SUBST(MKSHLIB) |
---|
5693 | AC_SUBST(MKCSHLIB) |
---|
5694 | AC_SUBST(MKSHLIB_FORCE_ALL) |
---|
5695 | AC_SUBST(MKSHLIB_UNFORCE_ALL) |
---|
5696 | AC_SUBST(DSO_CFLAGS) |
---|
5697 | AC_SUBST(DSO_PIC_CFLAGS) |
---|
5698 | AC_SUBST(DSO_LDOPTS) |
---|
5699 | AC_SUBST(LIB_PREFIX) |
---|
5700 | AC_SUBST(DLL_PREFIX) |
---|
5701 | AC_SUBST(DLL_SUFFIX) |
---|
5702 | AC_DEFINE_UNQUOTED(MOZ_DLL_SUFFIX, "$DLL_SUFFIX") |
---|
5703 | AC_SUBST(LIB_SUFFIX) |
---|
5704 | AC_SUBST(OBJ_SUFFIX) |
---|
5705 | AC_SUBST(BIN_SUFFIX) |
---|
5706 | AC_SUBST(ASM_SUFFIX) |
---|
5707 | AC_SUBST(IMPORT_LIB_SUFFIX) |
---|
5708 | AC_SUBST(USE_N32) |
---|
5709 | AC_SUBST(CC_VERSION) |
---|
5710 | AC_SUBST(CXX_VERSION) |
---|
5711 | |
---|
5712 | if test "$USING_HCC"; then |
---|
5713 | CC='${topsrcdir}/build/hcc' |
---|
5714 | CC="$CC '$_OLDCC'" |
---|
5715 | CXX='${topsrcdir}/build/hcpp' |
---|
5716 | CXX="$CXX '$_OLDCXX'" |
---|
5717 | AC_SUBST(CC) |
---|
5718 | AC_SUBST(CXX) |
---|
5719 | fi |
---|
5720 | |
---|
5721 | dnl Check for missing components |
---|
5722 | if test -n "$MOZ_X11"; then |
---|
5723 | dnl ==================================================== |
---|
5724 | dnl = Check if X headers exist |
---|
5725 | dnl ==================================================== |
---|
5726 | _SAVE_CFLAGS=$CFLAGS |
---|
5727 | CFLAGS="$CFLAGS $XCFLAGS" |
---|
5728 | AC_TRY_COMPILE([ |
---|
5729 | #include <stdio.h> |
---|
5730 | #include <X11/Xlib.h> |
---|
5731 | ], |
---|
5732 | [ |
---|
5733 | Display *dpy = 0; |
---|
5734 | if ((dpy = XOpenDisplay(NULL)) == NULL) { |
---|
5735 | fprintf(stderr, ": can't open %s\n", XDisplayName(NULL)); |
---|
5736 | exit(1); |
---|
5737 | } |
---|
5738 | ], [], |
---|
5739 | [ AC_MSG_ERROR([Could not compile basic X program.]) ]) |
---|
5740 | CFLAGS="$_SAVE_CFLAGS" |
---|
5741 | |
---|
5742 | if test ! -z "$MISSING_X"; then |
---|
5743 | AC_MSG_ERROR([ Could not find the following X libraries: $MISSING_X ]); |
---|
5744 | fi |
---|
5745 | |
---|
5746 | fi # MOZ_X11 |
---|
5747 | |
---|
5748 | dnl Set various defines and substitutions |
---|
5749 | dnl ======================================================== |
---|
5750 | |
---|
5751 | if test "$OS_ARCH" = "OS2" -a "$VACPP" = "yes"; then |
---|
5752 | LIBS='so32dll.lib tcp32dll.lib' |
---|
5753 | elif test "$OS_ARCH" = "BeOS"; then |
---|
5754 | AC_DEFINE(XP_BEOS) |
---|
5755 | MOZ_MOVEMAIL=1 |
---|
5756 | elif test "$OS_ARCH" = "Darwin"; then |
---|
5757 | AC_DEFINE(XP_UNIX) |
---|
5758 | AC_DEFINE(UNIX_ASYNC_DNS) |
---|
5759 | elif test "$OS_ARCH" = "OpenVMS"; then |
---|
5760 | AC_DEFINE(XP_UNIX) |
---|
5761 | elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2"; then |
---|
5762 | AC_DEFINE(XP_UNIX) |
---|
5763 | AC_DEFINE(UNIX_ASYNC_DNS) |
---|
5764 | MOZ_MOVEMAIL=1 |
---|
5765 | fi |
---|
5766 | AC_SUBST(MOZ_MOVEMAIL) |
---|
5767 | |
---|
5768 | AC_DEFINE(JS_THREADSAFE) |
---|
5769 | AC_DEFINE(NS_PRINT_PREVIEW) |
---|
5770 | AC_DEFINE(NS_PRINTING) |
---|
5771 | |
---|
5772 | if test "$MOZ_DEBUG"; then |
---|
5773 | AC_DEFINE(MOZ_REFLOW_PERF) |
---|
5774 | AC_DEFINE(MOZ_REFLOW_PERF_DSP) |
---|
5775 | fi |
---|
5776 | |
---|
5777 | if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK2" ; then |
---|
5778 | AC_DEFINE(MOZ_ACCESSIBILITY_ATK) |
---|
5779 | fi |
---|
5780 | |
---|
5781 | # Used for LD_LIBRARY_PATH of run_viewer target |
---|
5782 | LIBS_PATH= |
---|
5783 | for lib_arg in $NSPR_LIBS $TK_LIBS; do |
---|
5784 | case $lib_arg in |
---|
5785 | -L* ) LIBS_PATH="${LIBS_PATH:+$LIBS_PATH:}"`expr $lib_arg : "-L\(.*\)"` ;; |
---|
5786 | * ) ;; |
---|
5787 | esac |
---|
5788 | done |
---|
5789 | AC_SUBST(LIBS_PATH) |
---|
5790 | |
---|
5791 | dnl ======================================================== |
---|
5792 | dnl Use cygwin wrapper for win32 builds |
---|
5793 | dnl ======================================================== |
---|
5794 | case "$host_os" in |
---|
5795 | mingw*|cygwin*|msvc*|mks*) |
---|
5796 | HOST_CC="\$(CYGWIN_WRAPPER) $HOST_CC" |
---|
5797 | HOST_CXX="\$(CYGWIN_WRAPPER) $HOST_CXX" |
---|
5798 | CC="\$(CYGWIN_WRAPPER) $CC" |
---|
5799 | CXX="\$(CYGWIN_WRAPPER) $CXX" |
---|
5800 | CPP="\$(CYGWIN_WRAPPER) $CPP" |
---|
5801 | LD="\$(CYGWIN_WRAPPER) $LD" |
---|
5802 | AS="\$(CYGWIN_WRAPPER) $AS" |
---|
5803 | RC="\$(CYGWIN_WRAPPER) $RC" |
---|
5804 | MIDL="\$(CYGWIN_WRAPPER) $MIDL" |
---|
5805 | CYGDRIVE_MOUNT=`mount -p | awk '{ if (/^\//) { print $1; exit } }'` |
---|
5806 | ;; |
---|
5807 | esac |
---|
5808 | |
---|
5809 | AC_SUBST(CYGDRIVE_MOUNT) |
---|
5810 | |
---|
5811 | AC_SUBST(MOZILLA_VERSION) |
---|
5812 | |
---|
5813 | . ${srcdir}/config/chrome-versions.sh |
---|
5814 | AC_SUBST(MOZILLA_LOCALE_VERSION) |
---|
5815 | AC_SUBST(MOZILLA_REGION_VERSION) |
---|
5816 | AC_DEFINE_UNQUOTED(MOZILLA_LOCALE_VERSION,"$MOZILLA_LOCALE_VERSION") |
---|
5817 | AC_DEFINE_UNQUOTED(MOZILLA_REGION_VERSION,"$MOZILLA_REGION_VERSION") |
---|
5818 | AC_DEFINE_UNQUOTED(MOZILLA_SKIN_VERSION,"$MOZILLA_SKIN_VERSION") |
---|
5819 | |
---|
5820 | AC_SUBST(ac_configure_args) |
---|
5821 | |
---|
5822 | dnl Spit out some output |
---|
5823 | dnl ======================================================== |
---|
5824 | |
---|
5825 | dnl The following defines are used by xpcom |
---|
5826 | _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES |
---|
5827 | CPP_THROW_NEW |
---|
5828 | HAVE_CPP_2BYTE_WCHAR_T |
---|
5829 | HAVE_CPP_ACCESS_CHANGING_USING |
---|
5830 | HAVE_CPP_AMBIGUITY_RESOLVING_USING |
---|
5831 | HAVE_CPP_BOOL |
---|
5832 | HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR |
---|
5833 | HAVE_CPP_EXPLICIT |
---|
5834 | HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX |
---|
5835 | HAVE_CPP_NAMESPACE_STD |
---|
5836 | HAVE_CPP_NEW_CASTS |
---|
5837 | HAVE_CPP_PARTIAL_SPECIALIZATION |
---|
5838 | HAVE_CPP_TROUBLE_COMPARING_TO_ZERO |
---|
5839 | HAVE_CPP_TYPENAME |
---|
5840 | HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL |
---|
5841 | HAVE_STATVFS |
---|
5842 | NEED_CPP_UNUSED_IMPLEMENTATIONS |
---|
5843 | NEW_H |
---|
5844 | HAVE_GETPAGESIZE |
---|
5845 | HAVE_ICONV |
---|
5846 | HAVE_ICONV_WITH_CONST_INPUT |
---|
5847 | HAVE_MBRTOWC |
---|
5848 | HAVE_SYS_MOUNT_H |
---|
5849 | HAVE_SYS_VFS_H |
---|
5850 | HAVE_WCRTOMB |
---|
5851 | ENABLE_STATIC_COMPONENT_LOADER |
---|
5852 | " |
---|
5853 | |
---|
5854 | AC_CONFIG_HEADER( |
---|
5855 | gfx/gfx-config.h |
---|
5856 | netwerk/necko-config.h |
---|
5857 | xpcom/xpcom-config.h |
---|
5858 | xpcom/xpcom-private.h |
---|
5859 | ) |
---|
5860 | |
---|
5861 | # Save the defines header file before autoconf removes it. |
---|
5862 | # (Do not add AC_DEFINE calls after this line.) |
---|
5863 | _CONFIG_TMP=confdefs-tmp.h |
---|
5864 | _CONFIG_DEFS_H=mozilla-config.h |
---|
5865 | |
---|
5866 | cat > $_CONFIG_TMP <<\EOF |
---|
5867 | /* List of defines generated by configure. Included with preprocessor flag, |
---|
5868 | * -include, to avoid long list of -D defines on the compile command-line. |
---|
5869 | * Do not edit. |
---|
5870 | */ |
---|
5871 | |
---|
5872 | #ifndef _MOZILLA_CONFIG_H_ |
---|
5873 | #define _MOZILLA_CONFIG_H_ |
---|
5874 | EOF |
---|
5875 | |
---|
5876 | _EGREP_PATTERN='^#define (' |
---|
5877 | if test -n "$_NON_GLOBAL_ACDEFINES"; then |
---|
5878 | for f in $_NON_GLOBAL_ACDEFINES; do |
---|
5879 | _EGREP_PATTERN="${_EGREP_PATTERN}$f|" |
---|
5880 | done |
---|
5881 | fi |
---|
5882 | _EGREP_PATTERN="${_EGREP_PATTERN}dummy_never_defined)" |
---|
5883 | |
---|
5884 | sort confdefs.h | egrep -v "$_EGREP_PATTERN" >> $_CONFIG_TMP |
---|
5885 | |
---|
5886 | cat >> $_CONFIG_TMP <<\EOF |
---|
5887 | |
---|
5888 | #endif /* _MOZILLA_CONFIG_H_ */ |
---|
5889 | |
---|
5890 | EOF |
---|
5891 | |
---|
5892 | # Only write mozilla-config.h when something changes (or it doesn't exist) |
---|
5893 | if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then |
---|
5894 | rm $_CONFIG_TMP |
---|
5895 | else |
---|
5896 | AC_MSG_RESULT("creating $_CONFIG_DEFS_H") |
---|
5897 | mv -f $_CONFIG_TMP $_CONFIG_DEFS_H |
---|
5898 | |
---|
5899 | echo ==== $_CONFIG_DEFS_H ================================= |
---|
5900 | cat $_CONFIG_DEFS_H |
---|
5901 | fi |
---|
5902 | |
---|
5903 | dnl Probably shouldn't call this manually but we always want the output of DEFS |
---|
5904 | rm -f confdefs.h.save |
---|
5905 | mv confdefs.h confdefs.h.save |
---|
5906 | egrep -v "$_EGREP_PATTERN" confdefs.h.save > confdefs.h |
---|
5907 | AC_OUTPUT_MAKE_DEFS() |
---|
5908 | MOZ_DEFINES=$DEFS |
---|
5909 | AC_SUBST(MOZ_DEFINES) |
---|
5910 | rm -f confdefs.h |
---|
5911 | mv confdefs.h.save confdefs.h |
---|
5912 | |
---|
5913 | dnl Load the list of Makefiles to generate. |
---|
5914 | dnl To add new Makefiles, edit allmakefiles.sh. |
---|
5915 | dnl allmakefiles.sh sets the variable, MAKEFILES. |
---|
5916 | . ${srcdir}/allmakefiles.sh |
---|
5917 | dnl |
---|
5918 | dnl Run a perl script to quickly create the makefiles. |
---|
5919 | dnl If it succeeds, it outputs a shell command to set CONFIG_FILES |
---|
5920 | dnl for the files it cannot handle correctly. This way, config.status |
---|
5921 | dnl will handle these files. |
---|
5922 | dnl If it fails, nothing is set and config.status will run as usual. |
---|
5923 | dnl |
---|
5924 | dnl This does not change the $MAKEFILES variable. |
---|
5925 | dnl |
---|
5926 | dnl OpenVMS gets a line overflow on the long eval command, so use a temp file. |
---|
5927 | dnl |
---|
5928 | if test -z "${_AS_PERL}"; then |
---|
5929 | echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh |
---|
5930 | else |
---|
5931 | echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh |
---|
5932 | fi |
---|
5933 | . ./conftest.sh |
---|
5934 | rm conftest.sh |
---|
5935 | |
---|
5936 | echo $MAKEFILES > unallmakefiles |
---|
5937 | |
---|
5938 | AC_OUTPUT($MAKEFILES) |
---|
5939 | |
---|
5940 | dnl ======================================================== |
---|
5941 | dnl = Setup a nice relatively clean build environment for |
---|
5942 | dnl = sub-configures. |
---|
5943 | dnl ======================================================== |
---|
5944 | CC="$_SUBDIR_CC" |
---|
5945 | CXX="$_SUBDIR_CXX" |
---|
5946 | CFLAGS="$_SUBDIR_CFLAGS" |
---|
5947 | CPPFLAGS="$_SUBDIR_CPPFLAGS" |
---|
5948 | CXXFLAGS="$_SUBDIR_CXXFLAGS" |
---|
5949 | LDFLAGS="$_SUBDIR_LDFLAGS" |
---|
5950 | HOST_CC="$_SUBDIR_HOST_CC" |
---|
5951 | HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS" |
---|
5952 | HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS" |
---|
5953 | RC= |
---|
5954 | |
---|
5955 | unset MAKEFILES |
---|
5956 | unset CONFIG_FILES |
---|
5957 | |
---|
5958 | if test -z "$MOZ_NATIVE_NSPR" || test "$MOZ_LDAP_XPCOM"; then |
---|
5959 | ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla" |
---|
5960 | if test "$OS_ARCH" = "WINNT" && test "$NS_TRACE_MALLOC"; then |
---|
5961 | ac_configure_args="$ac_configure_args --enable-debug --disable-optimize" |
---|
5962 | fi |
---|
5963 | if test -n "$HAVE_64BIT_OS"; then |
---|
5964 | ac_configure_args="$ac_configure_args --enable-64bit" |
---|
5965 | fi |
---|
5966 | AC_OUTPUT_SUBDIRS(nsprpub) |
---|
5967 | ac_configure_args="$_SUBDIR_CONFIG_ARGS" |
---|
5968 | fi |
---|
5969 | |
---|
5970 | if test -z "$MOZ_NATIVE_NSPR"; then |
---|
5971 | # Hack to deal with the fact that we use NSPR_CFLAGS everywhere |
---|
5972 | AC_MSG_WARN([Recreating autoconf.mk with updated nspr-config output]) |
---|
5973 | if test ! "$VACPP" && test "$OS_ARCH" != "WINNT"; then |
---|
5974 | NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$MOZ_BUILD_ROOT/dist --exec-prefix=$MOZ_BUILD_ROOT/dist --libs` |
---|
5975 | $PERL -pi.bak -e "s {^NSPR_LIBS\s*=.*} {NSPR_LIBS = $NSPR_LIBS }" config/autoconf.mk |
---|
5976 | fi |
---|
5977 | if test "$OS_ARCH" != "WINNT"; then |
---|
5978 | NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$MOZ_BUILD_ROOT/dist --exec-prefix=$MOZ_BUILD_ROOT/dist --cflags` |
---|
5979 | $PERL -pi.bak -e "s {^NSPR_CFLAGS\s*=.*} {NSPR_CFLAGS = $NSPR_CFLAGS }" config/autoconf.mk |
---|
5980 | fi |
---|
5981 | rm -f config/autoconf.mk.bak |
---|
5982 | fi |
---|
5983 | |
---|
5984 | # if we're building the LDAP XPCOM component, we need to build |
---|
5985 | # the c-sdk first. |
---|
5986 | # |
---|
5987 | if test "$MOZ_LDAP_XPCOM"; then |
---|
5988 | |
---|
5989 | # these subdirs may not yet have been created in the build tree. |
---|
5990 | # don't use the "-p" switch to mkdir, since not all platforms have it |
---|
5991 | # |
---|
5992 | if test ! -d "directory"; then |
---|
5993 | mkdir "directory" |
---|
5994 | fi |
---|
5995 | if test ! -d "directory/c-sdk"; then |
---|
5996 | mkdir "directory/c-sdk" |
---|
5997 | fi |
---|
5998 | if test ! -d "directory/c-sdk/ldap"; then |
---|
5999 | mkdir "directory/c-sdk/ldap" |
---|
6000 | fi |
---|
6001 | |
---|
6002 | ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist --with-dist-prefix=$MOZ_BUILD_ROOT/dist --without-nss --with-mozilla" |
---|
6003 | if test -n "$HAVE_64BIT_OS"; then |
---|
6004 | ac_configure_args="$ac_configure_args --enable-64bit" |
---|
6005 | fi |
---|
6006 | AC_OUTPUT_SUBDIRS(directory/c-sdk) |
---|
6007 | ac_configure_args="$_SUBDIR_CONFIG_ARGS" |
---|
6008 | fi |
---|