108 |
dnl Set the minimum version of toolkit libs used by mozilla |
dnl Set the minimum version of toolkit libs used by mozilla |
109 |
dnl ======================================================== |
dnl ======================================================== |
110 |
PERL_VERSION=5.006 |
PERL_VERSION=5.006 |
|
MAKE_VERSION=3.78 |
|
111 |
WINDRES_VERSION=2.14.90 |
WINDRES_VERSION=2.14.90 |
112 |
W32API_VERSION=3.8 |
W32API_VERSION=3.8 |
113 |
|
|
175 |
if test -z "$CROSS_COMPILE"; then |
if test -z "$CROSS_COMPILE"; then |
176 |
case "$target" in |
case "$target" in |
177 |
*-cygwin*|*-mingw*|*-msvc*|*-mks*) |
*-cygwin*|*-mingw*|*-msvc*|*-mks*) |
|
MAKE_VERSION=3.79 |
|
178 |
if test -z "$CC"; then CC=cl; fi |
if test -z "$CC"; then CC=cl; fi |
179 |
if test -z "$CXX"; then CXX=cl; fi |
if test -z "$CXX"; then CXX=cl; fi |
180 |
if test -z "$CPP"; then CPP="cl -E -nologo"; fi |
if test -z "$CPP"; then CPP="cl -E -nologo"; fi |
264 |
;; |
;; |
265 |
esac |
esac |
266 |
|
|
267 |
|
case "$target" in |
268 |
|
*symbian*) |
269 |
|
AC_ARG_WITH(symbian-sdk, |
270 |
|
[ --with-symbian-sdk=SYMBIAN_SDK_DIR |
271 |
|
The path to the Symbian SDK], |
272 |
|
SYMBIAN_SDK_DIR=$withval) |
273 |
|
|
274 |
|
OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__" |
275 |
|
CFLAGS="-MD -nostdinc" |
276 |
|
SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis" |
277 |
|
|
278 |
|
case "$target" in |
279 |
|
*-symbianelf) |
280 |
|
OS_TARGET=GCCE |
281 |
|
CC=arm-none-symbianelf-gcc.exe |
282 |
|
CXX=arm-none-symbianelf-g++.exe |
283 |
|
LD=arm-none-symbianelf-ld.exe |
284 |
|
AR=arm-none-symbianelf-ar.exe |
285 |
|
CPP=arm-none-symbianelf-cpp.exe |
286 |
|
CFLAGS="$CFLAGS -c -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -msoft-float" |
287 |
|
CXXFLAGS="$CFLAGS -Wno-ctor-dtor-privacy" |
288 |
|
GCCE_INCLUDE="-include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh" |
289 |
|
CFLAGS="$CFLAGS ${GCCE_INCLUDE} -x c" |
290 |
|
CXXFLAGS="$CXXFLAGS ${GCCE_INCLUDE} -x c++" |
291 |
|
CPPFLAGS="$CPPFLAGS ${SYMBIAN_SYS_INCLUDE}" |
292 |
|
;; |
293 |
|
*-symbianwinscw) |
294 |
|
dnl TODO: add emulator build code |
295 |
|
OS_TARGET=WINSCW |
296 |
|
;; |
297 |
|
esac |
298 |
|
;; |
299 |
|
esac |
300 |
|
|
301 |
AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :) |
AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :) |
302 |
unset ac_cv_prog_CC |
unset ac_cv_prog_CC |
303 |
AC_PROG_CC |
AC_PROG_CC |
317 |
|
|
318 |
AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :) |
AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :) |
319 |
AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :) |
AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :) |
320 |
AC_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :) |
MOZ_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :) |
321 |
AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", :) |
AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", :) |
322 |
AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :) |
AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :) |
323 |
AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :) |
AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :) |
332 |
AC_PROG_CC |
AC_PROG_CC |
333 |
AC_PROG_CXX |
AC_PROG_CXX |
334 |
AC_PROG_RANLIB |
AC_PROG_RANLIB |
335 |
AC_PATH_PROGS(AS, $AS as, $CC) |
MOZ_PATH_PROGS(AS, $AS as, $CC) |
336 |
AC_CHECK_PROGS(AR, ar, :) |
AC_CHECK_PROGS(AR, ar, :) |
337 |
AC_CHECK_PROGS(LD, ld, :) |
AC_CHECK_PROGS(LD, ld, :) |
338 |
AC_CHECK_PROGS(STRIP, strip, :) |
AC_CHECK_PROGS(STRIP, strip, :) |
415 |
;; |
;; |
416 |
esac |
esac |
417 |
|
|
|
MOZ_ARG_WITH_STRING(windows-version, |
|
|
[ --with-windows-version=WINVER |
|
|
Minimum Windows version (WINVER) to support |
|
|
400: Windows 95 |
|
|
500: Windows 2000 |
|
|
501: Windows XP], |
|
|
WINVER=$withval) |
|
|
|
|
|
case "$WINVER" in |
|
|
400|500|501) |
|
|
;; |
|
|
|
|
|
*) |
|
|
AC_MSG_ERROR([Invalid value --with-windows-version, must be 400, 500 or 501]); |
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
418 |
case "$target" in |
case "$target" in |
419 |
*-cygwin*|*-mingw*|*-msvc*|*-mks*|*-wince) |
*-cygwin*|*-mingw*|*-msvc*|*-mks*|*-wince) |
420 |
if test "$GCC" != "yes"; then |
if test "$GCC" != "yes"; then |
454 |
if test "$_CC_MAJOR_VERSION" != "$_CXX_MAJOR_VERSION"; then |
if test "$_CC_MAJOR_VERSION" != "$_CXX_MAJOR_VERSION"; then |
455 |
AC_MSG_ERROR([The major versions of \$CC and \$CXX do not match.]) |
AC_MSG_ERROR([The major versions of \$CC and \$CXX do not match.]) |
456 |
fi |
fi |
457 |
if test "$_CC_MAJOR_VERSION" = "12"; then |
if test "$_CC_MAJOR_VERSION" = "13"; then |
|
_CC_SUITE=6 |
|
|
elif test "$_CC_MAJOR_VERSION" = "13"; then |
|
458 |
_CC_SUITE=7 |
_CC_SUITE=7 |
459 |
elif test "$_CC_MAJOR_VERSION" = "14"; then |
elif test "$_CC_MAJOR_VERSION" = "14"; then |
460 |
_CC_SUITE=8 |
_CC_SUITE=8 |
586 |
# Since we're skipping compiler and library checks, hard-code |
# Since we're skipping compiler and library checks, hard-code |
587 |
# some facts here. |
# some facts here. |
588 |
|
|
589 |
|
# Common to all MSVC environments: |
590 |
# Windows lacks <stdint.h>, but has __int8, and so on. |
# Windows lacks <stdint.h>, but has __int8, and so on. |
591 |
AC_DEFINE(JS_HAVE___INTN) |
AC_DEFINE(JS_HAVE___INTN) |
592 |
# Windows <stddef.h> defines intptr_t and uintptr_t. |
|
593 |
# VS2005: http://msdn.microsoft.com/en-us/library/323b6b3k(VS.80).aspx |
case "$target" in |
594 |
# VS2008: http://msdn.microsoft.com/en-us/library/323b6b3k.aspx |
*-wince) |
595 |
AC_DEFINE(JS_STDDEF_H_HAS_INTPTR_T) |
AC_DEFINE(HAVE_SYSTEMTIMETOFILETIME) |
596 |
|
AC_DEFINE(JS_CRTDEFS_H_HAS_INTPTR_T) |
597 |
|
;; |
598 |
|
*) |
599 |
|
AC_DEFINE(HAVE_SYSTEMTIMETOFILETIME) |
600 |
|
AC_DEFINE(HAVE_GETSYSTEMTIMEASFILETIME) |
601 |
|
# Windows <stddef.h> defines intptr_t and uintptr_t. |
602 |
|
# VS2005: http://msdn.microsoft.com/en-us/library/323b6b3k(VS.80).aspx |
603 |
|
# VS2008: http://msdn.microsoft.com/en-us/library/323b6b3k.aspx |
604 |
|
AC_DEFINE(JS_STDDEF_H_HAS_INTPTR_T) |
605 |
|
;; |
606 |
|
esac |
607 |
fi |
fi |
608 |
|
|
609 |
fi # COMPILE_ENVIRONMENT |
fi # COMPILE_ENVIRONMENT |
628 |
dnl ======================================================== |
dnl ======================================================== |
629 |
AC_PROG_INSTALL |
AC_PROG_INSTALL |
630 |
AC_PROG_LN_S |
AC_PROG_LN_S |
631 |
AC_PATH_PROGS(PERL, $PERL perl5 perl ) |
MOZ_PATH_PROGS(PERL, $PERL perl5 perl ) |
632 |
if test -z "$PERL" || test "$PERL" = ":"; then |
if test -z "$PERL" || test "$PERL" = ":"; then |
633 |
AC_MSG_ERROR([perl not found in \$PATH]) |
AC_MSG_ERROR([perl not found in \$PATH]) |
634 |
fi |
fi |
654 |
AC_MSG_RESULT([yes]) |
AC_MSG_RESULT([yes]) |
655 |
fi |
fi |
656 |
|
|
657 |
AC_PATH_PROGS(PYTHON, $PYTHON python) |
MOZ_PATH_PROGS(PYTHON, $PYTHON python) |
658 |
if test -z "$PYTHON"; then |
if test -z "$PYTHON"; then |
659 |
AC_MSG_ERROR([python was not found in \$PATH]) |
AC_MSG_ERROR([python was not found in \$PATH]) |
660 |
fi |
fi |
661 |
|
|
|
AC_PATH_PROGS(NSINSTALL_BIN, nsinstall ) |
|
662 |
if test -z "$COMPILE_ENVIRONMENT"; then |
if test -z "$COMPILE_ENVIRONMENT"; then |
|
if test -z "$NSINSTALL_BIN" || test "$NSINSTALL_BIN" = ":"; then |
|
663 |
NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py' |
NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py' |
664 |
fi |
fi |
|
fi |
|
665 |
AC_SUBST(NSINSTALL_BIN) |
AC_SUBST(NSINSTALL_BIN) |
666 |
|
|
667 |
AC_PATH_PROG(DOXYGEN, doxygen, :) |
MOZ_PATH_PROG(DOXYGEN, doxygen, :) |
668 |
AC_PATH_PROG(WHOAMI, whoami, :) |
MOZ_PATH_PROG(WHOAMI, whoami, :) |
669 |
AC_PATH_PROG(AUTOCONF, autoconf, :) |
MOZ_PATH_PROG(AUTOCONF, autoconf, :) |
670 |
AC_PATH_PROG(UNZIP, unzip, :) |
MOZ_PATH_PROG(UNZIP, unzip, :) |
671 |
AC_PATH_PROGS(ZIP, zip) |
MOZ_PATH_PROGS(ZIP, zip) |
672 |
if test -z "$ZIP" || test "$ZIP" = ":"; then |
if test -z "$ZIP" || test "$ZIP" = ":"; then |
673 |
AC_MSG_ERROR([zip not found in \$PATH]) |
AC_MSG_ERROR([zip not found in \$PATH]) |
674 |
fi |
fi |
675 |
AC_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) |
MOZ_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) |
676 |
AC_PATH_PROG(XARGS, xargs) |
MOZ_PATH_PROG(XARGS, xargs) |
677 |
if test -z "$XARGS" || test "$XARGS" = ":"; then |
if test -z "$XARGS" || test "$XARGS" = ":"; then |
678 |
AC_MSG_ERROR([xargs not found in \$PATH .]) |
AC_MSG_ERROR([xargs not found in \$PATH .]) |
679 |
fi |
fi |
710 |
dnl xcodebuild needs GCC_VERSION defined in the environment, since it |
dnl xcodebuild needs GCC_VERSION defined in the environment, since it |
711 |
dnl doesn't respect the CC/CXX setting. With GCC_VERSION set, it will use |
dnl doesn't respect the CC/CXX setting. With GCC_VERSION set, it will use |
712 |
dnl /usr/bin/g(cc|++)-$GCC_VERSION. |
dnl /usr/bin/g(cc|++)-$GCC_VERSION. |
713 |
AC_PATH_PROGS(PBBUILD, pbbuild xcodebuild pbxbuild) |
MOZ_PATH_PROGS(PBBUILD, pbbuild xcodebuild pbxbuild) |
714 |
|
|
715 |
case "$PBBUILD" in |
case "$PBBUILD" in |
716 |
*xcodebuild*) |
*xcodebuild*) |
725 |
|
|
726 |
dnl sdp was formerly in /Developer/Tools. As of Mac OS X 10.4 (Darwin 8), |
dnl sdp was formerly in /Developer/Tools. As of Mac OS X 10.4 (Darwin 8), |
727 |
dnl it has moved into /usr/bin. |
dnl it has moved into /usr/bin. |
728 |
AC_PATH_PROG(SDP, sdp, :, [$PATH:/usr/bin:/Developer/Tools]) |
MOZ_PATH_PROG(SDP, sdp, :, [$PATH:/usr/bin:/Developer/Tools]) |
729 |
;; |
;; |
730 |
esac |
esac |
731 |
|
|
790 |
|
|
791 |
GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'` |
GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'` |
792 |
if test "$GCC_VERSION_MAJOR" -lt "4" ; then |
if test "$GCC_VERSION_MAJOR" -lt "4" ; then |
793 |
SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include -F${MACOS_SDK_DIR}/System/Library/Frameworks" |
AC_MSG_ERROR([You need to upgrade the compiler version to 4.x]) |
|
if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then |
|
|
SDK_C_INCLUDE="$SDK_C_INCLUDE -F${MACOS_SDK_DIR}/Library/Frameworks" |
|
|
fi |
|
|
SDK_CXX_INCLUDE="-I${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION}/c++ -I${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION}/c++/ppc-darwin -I${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION}/c++/backward" |
|
|
|
|
|
CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}" |
|
|
CXXFLAGS="$CXXFLAGS -nostdinc -nostdinc++ ${SDK_CXX_INCLUDE} ${SDK_C_INCLUDE}" |
|
|
|
|
|
dnl CPP/CXXCPP needs to be set for AC_CHECK_HEADER. |
|
|
CPP="$CPP -nostdinc ${SDK_C_INCLUDE}" |
|
|
CXXCPP="$CXXCPP -nostdinc -nostdinc++ ${SDK_CXX_INCLUDE} ${SDK_C_INCLUDE}" |
|
|
|
|
|
dnl ld support for -syslibroot is compiler-agnostic, but only available |
|
|
dnl on Tiger. Although it's possible to switch on the build host's |
|
|
dnl OS release to use ld -syslibroot when available, ld -syslibroot will |
|
|
dnl cause warnings as long as NEXT_ROOT is set. NEXT_ROOT should be |
|
|
dnl set because both the compiler and linker use it. |
|
|
LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib $LIBS" |
|
|
export NEXT_ROOT=$MACOS_SDK_DIR |
|
|
|
|
|
if test -n "$CROSS_COMPILE" ; then |
|
|
dnl NEXT_ROOT will be in the environment, but it shouldn't be set for |
|
|
dnl the build host. HOST_CXX is presently unused. |
|
|
HOST_CC="NEXT_ROOT= $HOST_CC" |
|
|
HOST_CXX="NEXT_ROOT= $HOST_CXX" |
|
|
fi |
|
794 |
else |
else |
|
dnl gcc >= 4.0 uses different paths than above, but knows how to find |
|
|
dnl them itself. |
|
795 |
CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}" |
CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}" |
796 |
CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}" |
CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}" |
797 |
|
|
826 |
|
|
827 |
fi # COMPILE_ENVIRONMENT |
fi # COMPILE_ENVIRONMENT |
828 |
|
|
|
dnl Be sure the make we use is GNU make. |
|
|
dnl on win32, gmake.exe is the generally the wrong version |
|
829 |
case "$host_os" in |
case "$host_os" in |
830 |
cygwin*|mingw*|mks*|msvc*) |
cygwin*|mingw*|mks*|msvc*) |
831 |
AC_PATH_PROGS(MAKE, $MAKE make gmake, :) |
MOZ_PATH_PROGS(MAKE, $MAKE make gmake, :) |
832 |
;; |
;; |
833 |
*) |
*) |
834 |
AC_PATH_PROGS(MAKE, $MAKE gmake make, :) |
MOZ_PATH_PROGS(MAKE, $MAKE gmake make, :) |
835 |
;; |
;; |
836 |
esac |
esac |
|
_make_try=`$MAKE --version 2>/dev/null | grep GNU` |
|
|
if test ! "$_make_try" |
|
|
then |
|
|
echo |
|
|
echo "*** $MAKE is not GNU Make. You will not be able to build Mozilla without GNU Make." |
|
|
echo |
|
|
exit 1 |
|
|
fi |
|
|
dnl Now exit if version if < MAKE_VERSION |
|
|
rm -f dummy.mk |
|
|
echo 'all: ; @echo $(MAKE_VERSION)' > dummy.mk |
|
|
_make_vers=`$MAKE --no-print-directory -f dummy.mk all 2>/dev/null` |
|
|
rm -f dummy.mk |
|
|
_MAKE_MAJOR_VERSION=`echo $_make_vers | $AWK -F\. '{ print $1 }'` |
|
|
_MAKE_MINOR_VERSION=`echo $_make_vers | $AWK -F\. '{ print $2 }'` |
|
|
MAKE_MAJOR_VERSION=`echo $MAKE_VERSION | $AWK -F\. '{ print $1 }'` |
|
|
MAKE_MINOR_VERSION=`echo $MAKE_VERSION | $AWK -F\. '{ print $2 }'` |
|
|
if test "$_MAKE_MAJOR_VERSION" -lt "$MAKE_MAJOR_VERSION" || \ |
|
|
test "$_MAKE_MAJOR_VERSION" = "$MAKE_MAJOR_VERSION" -a \ |
|
|
"$_MAKE_MINOR_VERSION" -lt "$MAKE_MINOR_VERSION"; then |
|
|
AC_MSG_ERROR([GNU Make $MAKE_VERSION or higher is required to build Mozilla.]) |
|
|
fi |
|
|
AC_SUBST(MAKE) |
|
837 |
|
|
838 |
if test "$COMPILE_ENVIRONMENT"; then |
if test "$COMPILE_ENVIRONMENT"; then |
839 |
|
|
917 |
####################################################################### |
####################################################################### |
918 |
|
|
919 |
# |
# |
|
# Note: OS_TARGET should be specified on the command line for gmake. |
|
|
# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built. |
|
|
# The difference between the Win95 target and the WinNT target is that |
|
|
# the WinNT target uses Windows NT specific features not available |
|
|
# in Windows 95. The Win95 target will run on Windows NT, but (supposedly) |
|
|
# at lesser performance (the Win95 target uses threads; the WinNT target |
|
|
# uses fibers). |
|
|
# |
|
920 |
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no |
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no |
921 |
# cross-compilation. |
# cross-compilation. |
922 |
# |
# |
923 |
|
|
924 |
# |
# |
|
# The following hack allows one to build on a WIN95 machine (as if |
|
|
# s/he were cross-compiling on a WINNT host for a WIN95 target). |
|
|
# It also accomodates for MKS's uname.exe. If you never intend |
|
|
# to do development on a WIN95 machine, you don't need this hack. |
|
|
# |
|
|
case "$OS_ARCH" in |
|
|
WIN95) |
|
|
OS_ARCH=WINNT |
|
|
OS_TARGET=WIN95 |
|
|
;; |
|
|
Windows_95) |
|
|
OS_ARCH=Windows_NT |
|
|
OS_TARGET=WIN95 |
|
|
;; |
|
|
Windows_98) |
|
|
OS_ARCH=Windows_NT |
|
|
OS_TARGET=WIN95 |
|
|
;; |
|
|
CYGWIN_9*|CYGWIN_ME*) |
|
|
OS_ARCH='CYGWIN_NT-4.0' |
|
|
OS_TARGET=WIN95 |
|
|
;; |
|
|
esac |
|
|
|
|
|
# |
|
925 |
# Define and override various archtecture-specific variables, including |
# Define and override various archtecture-specific variables, including |
926 |
# HOST_OS_ARCH |
# HOST_OS_ARCH |
927 |
# OS_ARCH |
# OS_ARCH |
1117 |
i*86*) |
i*86*) |
1118 |
OS_TEST=i386 |
OS_TEST=i386 |
1119 |
;; |
;; |
1120 |
|
x86_64) |
1121 |
|
OS_TEST=x86_64 |
1122 |
|
;; |
1123 |
*) |
*) |
1124 |
if test -z "$CROSS_COMPILE" ; then |
if test -z "$CROSS_COMPILE" ; then |
1125 |
OS_TEST=`uname -p` |
OS_TEST=`uname -p` |
1161 |
x86_64 | ia64) |
x86_64 | ia64) |
1162 |
CPU_ARCH="$OS_TEST" |
CPU_ARCH="$OS_TEST" |
1163 |
;; |
;; |
1164 |
|
|
1165 |
|
arm) |
1166 |
|
if test "$OS_TARGET" = "WINCE"; then |
1167 |
|
CPU_ARCH="$OS_TEST" |
1168 |
|
fi |
1169 |
|
;; |
1170 |
esac |
esac |
1171 |
|
|
1172 |
if test -z "$OS_TARGET"; then |
if test -z "$OS_TARGET"; then |
1173 |
OS_TARGET=$OS_ARCH |
OS_TARGET=$OS_ARCH |
1174 |
fi |
fi |
|
if test "$OS_TARGET" = "WIN95"; then |
|
|
OS_RELEASE="4.0" |
|
|
fi |
|
1175 |
OS_CONFIG="${OS_TARGET}${OS_RELEASE}" |
OS_CONFIG="${OS_TARGET}${OS_RELEASE}" |
1176 |
|
|
1177 |
dnl ======================================================== |
dnl ======================================================== |
1227 |
fi |
fi |
1228 |
|
|
1229 |
|
|
1230 |
_DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT' |
_DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT' |
1231 |
_USE_CPP_INCLUDE_FLAG=1 |
_USE_CPP_INCLUDE_FLAG=1 |
1232 |
elif test "$SOLARIS_SUNPRO_CC"; then |
elif test "$SOLARIS_SUNPRO_CC"; then |
1233 |
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@' |
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@' |
1246 |
else |
else |
1247 |
DSO_PIC_CFLAGS='-KPIC' |
DSO_PIC_CFLAGS='-KPIC' |
1248 |
fi |
fi |
1249 |
_DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
1250 |
else |
else |
1251 |
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@' |
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@' |
1252 |
MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@' |
MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@' |
1259 |
|
|
1260 |
DSO_CFLAGS='' |
DSO_CFLAGS='' |
1261 |
DSO_PIC_CFLAGS='-KPIC' |
DSO_PIC_CFLAGS='-KPIC' |
1262 |
_DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
1263 |
fi |
fi |
1264 |
|
|
1265 |
if test "$GNU_CXX"; then |
if test "$GNU_CXX"; then |
1279 |
esac |
esac |
1280 |
fi |
fi |
1281 |
|
|
1282 |
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/mozilla-config.h' |
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/js-confdefs.h' |
1283 |
_USE_CPP_INCLUDE_FLAG=1 |
_USE_CPP_INCLUDE_FLAG=1 |
1284 |
|
|
1285 |
AC_CACHE_CHECK(whether the compiler supports -Wno-invalid-offsetof, |
AC_CACHE_CHECK(whether the compiler supports -Wno-invalid-offsetof, |
1299 |
if test "$ac_has_wno_invalid_offsetof" = "yes"; then |
if test "$ac_has_wno_invalid_offsetof" = "yes"; then |
1300 |
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-invalid-offsetof" |
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-invalid-offsetof" |
1301 |
fi |
fi |
1302 |
|
|
1303 |
|
AC_CACHE_CHECK(whether the compiler supports -Wno-variadic-macros, |
1304 |
|
ac_has_wno_variadic_macros, |
1305 |
|
[ |
1306 |
|
AC_LANG_SAVE |
1307 |
|
AC_LANG_CPLUSPLUS |
1308 |
|
_SAVE_CXXFLAGS="$CXXFLAGS" |
1309 |
|
CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-variadic-macros" |
1310 |
|
AC_TRY_COMPILE([], |
1311 |
|
[return(0);], |
1312 |
|
ac_has_wno_variadic_macros="yes", |
1313 |
|
ac_has_wno_variadic_macros="no") |
1314 |
|
CXXFLAGS="$_SAVE_CXXFLAGS" |
1315 |
|
AC_LANG_RESTORE |
1316 |
|
]) |
1317 |
|
if test "$ac_has_wno_variadic_macros" = "yes"; then |
1318 |
|
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-variadic-macros" |
1319 |
|
fi |
1320 |
else |
else |
1321 |
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_MOZILLA_CONFIG_H_ $(ACDEFINES)' |
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)' |
1322 |
fi |
fi |
1323 |
|
|
1324 |
dnl gcc can come with its own linker so it is better to use the pass-thru calls |
dnl gcc can come with its own linker so it is better to use the pass-thru calls |
1613 |
*-darwin*) |
*-darwin*) |
1614 |
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
1615 |
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
1616 |
MOZ_OPTIMIZE_FLAGS="-O2" |
MOZ_OPTIMIZE_FLAGS="-O3" |
1617 |
_PEDANTIC= |
_PEDANTIC= |
1618 |
CFLAGS="$CFLAGS -fpascal-strings -fno-common" |
CFLAGS="$CFLAGS -fpascal-strings -fno-common" |
1619 |
CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common" |
CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common" |
1785 |
;; |
;; |
1786 |
|
|
1787 |
*-wince*) |
*-wince*) |
1788 |
|
TARGET_COMPILER_ABI=msvc |
1789 |
MOZ_TOOLS_DIR=`echo $MOZ_TOOLS` |
MOZ_TOOLS_DIR=`echo $MOZ_TOOLS` |
1790 |
AR_LIST="$AR -list" |
AR_LIST="$AR -list" |
1791 |
AR_EXTRACT="$AR -extract" |
AR_EXTRACT="$AR -extract" |
1851 |
AC_DEFINE(WINCE) |
AC_DEFINE(WINCE) |
1852 |
AC_DEFINE(HAVE_SNPRINTF) |
AC_DEFINE(HAVE_SNPRINTF) |
1853 |
AC_DEFINE(_WINDOWS) |
AC_DEFINE(_WINDOWS) |
|
AC_DEFINE(_WIN32) |
|
1854 |
AC_DEFINE(WIN32) |
AC_DEFINE(WIN32) |
1855 |
AC_DEFINE(XP_WIN) |
AC_DEFINE(XP_WIN) |
1856 |
AC_DEFINE(XP_WIN32) |
AC_DEFINE(XP_WIN32) |
1865 |
USE_SHORT_LIBNAME=1 |
USE_SHORT_LIBNAME=1 |
1866 |
MOZ_ENABLE_POSTSCRIPT= |
MOZ_ENABLE_POSTSCRIPT= |
1867 |
MOZ_USER_DIR="Mozilla" |
MOZ_USER_DIR="Mozilla" |
1868 |
|
|
1869 |
|
dnl Default to Windows Mobile components enabled |
1870 |
|
WINCE_WINDOWS_MOBILE=1 |
1871 |
|
|
1872 |
|
MOZ_ARG_DISABLE_BOOL(windows-mobile-components, |
1873 |
|
[ --disable-windows-mobile-components |
1874 |
|
Disable Windows Mobile specific components from CE build], |
1875 |
|
WINCE_WINDOWS_MOBILE=, |
1876 |
|
WINCE_WINDOWS_MOBILE=1) |
1877 |
|
|
1878 |
|
if test "$WINCE_WINDOWS_MOBILE"; then |
1879 |
|
AC_DEFINE(WINCE_WINDOWS_MOBILE) |
1880 |
|
fi |
1881 |
;; |
;; |
1882 |
|
|
1883 |
|
*-symbian*) |
1884 |
|
|
1885 |
|
AC_DEFINE(XP_UNIX) |
1886 |
|
AC_DEFINE(SYMBIAN) |
1887 |
|
AC_DEFINE(__arm__) |
1888 |
|
AC_DEFINE(__SYMBIAN32__) |
1889 |
|
AC_DEFINE(_UNICODE) |
1890 |
|
AC_DEFINE(NDEBUG) |
1891 |
|
AC_DEFINE(__SUPPORT_CPP_EXCEPTIONS__) |
1892 |
|
AC_DEFINE(MOZ_STDERR_TO_STDOUT) |
1893 |
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) |
1894 |
|
AC_DEFINE(HAVE_SOCKLEN_T) |
1895 |
|
AC_DEFINE(__GCCE__) |
1896 |
|
|
1897 |
|
CPU_ARCH=ARM |
1898 |
|
OS_RELEASE=9.2 |
1899 |
|
OS_ARCH=SYMBIAN |
1900 |
|
USE_PTHREADS=1 |
1901 |
|
LIB_SUFFIX=lib |
1902 |
|
DLL_SUFFIX=dll |
1903 |
|
MKSHLIB= |
1904 |
|
DSO_LDOPTS= |
1905 |
|
DSO_CFLAGS= |
1906 |
|
VISIBILITY_FLAGS= |
1907 |
|
TARGET_NSPR_MDCPUCFG='\"md/_symbian.cfg\"' |
1908 |
|
RANLIB='echo no ranlib ' |
1909 |
|
;; |
1910 |
|
|
1911 |
*-mingw*|*-cygwin*|*-msvc*|*-mks*) |
*-mingw*|*-cygwin*|*-msvc*|*-mks*) |
1912 |
DSO_CFLAGS= |
DSO_CFLAGS= |
1997 |
fi |
fi |
1998 |
AC_DEFINE(HAVE_SNPRINTF) |
AC_DEFINE(HAVE_SNPRINTF) |
1999 |
AC_DEFINE(_WINDOWS) |
AC_DEFINE(_WINDOWS) |
|
AC_DEFINE(_WIN32) |
|
2000 |
AC_DEFINE(WIN32) |
AC_DEFINE(WIN32) |
2001 |
AC_DEFINE(XP_WIN) |
AC_DEFINE(XP_WIN) |
2002 |
AC_DEFINE(XP_WIN32) |
AC_DEFINE(XP_WIN32) |
2116 |
USE_PTHREADS=1 |
USE_PTHREADS=1 |
2117 |
_PEDANTIC= |
_PEDANTIC= |
2118 |
LIBS="$LIBS -lsocket -lstdc++" |
LIBS="$LIBS -lsocket -lstdc++" |
2119 |
_DEFINES_CFLAGS='-Wp,-include -Wp,$(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506' |
_DEFINES_CFLAGS='-Wp,-include -Wp,$(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506' |
2120 |
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -Wp,-include -Wp,$(DEPTH)/mozilla-config.h -D_POSIX_C_SOURCE=199506' |
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -Wp,-include -Wp,$(DEPTH)/js-confdefs.h -D_POSIX_C_SOURCE=199506' |
2121 |
if test "$with_x" != "yes" |
if test "$with_x" != "yes" |
2122 |
then |
then |
2123 |
_PLATFORM_DEFAULT_TOOLKIT="photon" |
_PLATFORM_DEFAULT_TOOLKIT="photon" |
2280 |
*-solaris*) |
*-solaris*) |
2281 |
AC_DEFINE(SOLARIS) |
AC_DEFINE(SOLARIS) |
2282 |
TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"' |
TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"' |
2283 |
|
if test -z "$CROSS_COMPILE" && pkginfo -q SUNWpr && pkginfo -q SUNWprd; then |
2284 |
|
NO_NSPR_CONFIG_SYSTEM_LDFLAGS="-L/usr/lib/mps -R/usr/lib/mps -lnspr4" |
2285 |
|
NO_NSPR_CONFIG_SYSTEM_CFLAGS="-I/usr/include/mps" |
2286 |
|
NO_NSPR_CONFIG_SYSTEM_VERSION=["`pkgparam SUNWpr SUNW_PRODVERS | sed -e 's/^[1-9][0-9]*\.[0-9][0-9]*$/&.0/'`"] |
2287 |
|
fi |
2288 |
SYSTEM_MAKEDEPEND= |
SYSTEM_MAKEDEPEND= |
2289 |
# $ORIGIN/.. is for shared libraries under components/ to locate shared |
# $ORIGIN/.. is for shared libraries under components/ to locate shared |
2290 |
# libraries one level up (e.g. libnspr4.so) |
# libraries one level up (e.g. libnspr4.so) |
2481 |
|
|
2482 |
if test "$ENABLE_JIT"; then |
if test "$ENABLE_JIT"; then |
2483 |
|
|
2484 |
|
AC_DEFINE(FEATURE_NANOJIT) |
2485 |
|
AC_DEFINE(JS_TRACER) |
2486 |
|
|
2487 |
case "$target" in |
case "$target" in |
2488 |
i?86-*) |
i?86-*) |
2489 |
AC_DEFINE(AVMPLUS_IA32) |
AC_DEFINE(AVMPLUS_IA32) |
2492 |
arm*-*) |
arm*-*) |
2493 |
AC_DEFINE(AVMPLUS_ARM) |
AC_DEFINE(AVMPLUS_ARM) |
2494 |
;; |
;; |
|
|
|
2495 |
sparc-*) |
sparc-*) |
2496 |
AC_DEFINE(AVMPLUS_SPARC) |
AC_DEFINE(AVMPLUS_SPARC) |
2497 |
;; |
;; |
2519 |
;; |
;; |
2520 |
*) |
*) |
2521 |
AC_MSG_ERROR([Unrecognized nanojit platform. Use --disable-jit to build without JIT support.]) |
AC_MSG_ERROR([Unrecognized nanojit platform. Use --disable-jit to build without JIT support.]) |
|
;; |
|
2522 |
esac |
esac |
2523 |
|
|
2524 |
fi # ENABLE_JIT |
fi # ENABLE_JIT |
2716 |
|
|
2717 |
AC_LANG_C |
AC_LANG_C |
2718 |
|
|
|
dnl Check for usable wchar_t (2 bytes, unsigned) |
|
|
dnl (we really don't need the unsignedness check anymore) |
|
|
dnl ======================================================== |
|
|
|
|
|
AC_CACHE_CHECK(for usable wchar_t (2 bytes, unsigned), |
|
|
ac_cv_have_usable_wchar_v2, |
|
|
[AC_TRY_COMPILE([#include <stddef.h> |
|
|
$configure_static_assert_macros], |
|
|
[CONFIGURE_STATIC_ASSERT(sizeof(wchar_t) == 2); |
|
|
CONFIGURE_STATIC_ASSERT((wchar_t)-1 > (wchar_t) 0)], |
|
|
ac_cv_have_usable_wchar_v2="yes", |
|
|
ac_cv_have_usable_wchar_v2="no")]) |
|
|
if test "$ac_cv_have_usable_wchar_v2" = "yes"; then |
|
|
AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T) |
|
|
HAVE_CPP_2BYTE_WCHAR_T=1 |
|
|
else |
|
|
dnl This is really gcc-only |
|
|
dnl Do this test using CXX only since some versions of gcc |
|
|
dnl 2.95-2.97 have a signed wchar_t in c++ only and some versions |
|
|
dnl only have short-wchar support for c++. |
|
|
dnl Note that we assume that mac & win32 have short wchar (see nscore.h) |
|
|
|
|
|
AC_LANG_SAVE |
|
|
AC_LANG_CPLUSPLUS |
|
|
_SAVE_CXXFLAGS=$CXXFLAGS |
|
|
CXXFLAGS="$CXXFLAGS -fshort-wchar" |
|
|
|
|
|
AC_CACHE_CHECK(for compiler -fshort-wchar option, |
|
|
ac_cv_have_usable_wchar_option_v2, |
|
|
[AC_TRY_LINK([#include <stddef.h> |
|
|
$configure_static_assert_macros], |
|
|
[CONFIGURE_STATIC_ASSERT(sizeof(wchar_t) == 2); |
|
|
CONFIGURE_STATIC_ASSERT((wchar_t)-1 > (wchar_t) 0)], |
|
|
ac_cv_have_usable_wchar_option_v2="yes", |
|
|
ac_cv_have_usable_wchar_option_v2="no")]) |
|
|
|
|
|
if test "$ac_cv_have_usable_wchar_option_v2" = "yes"; then |
|
|
AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T) |
|
|
HAVE_CPP_2BYTE_WCHAR_T=1 |
|
|
WCHAR_CFLAGS="-fshort-wchar" |
|
|
else |
|
|
CXXFLAGS=$_SAVE_CXXFLAGS |
|
|
fi |
|
|
AC_LANG_RESTORE |
|
|
fi |
|
|
|
|
2719 |
dnl Check for .hidden assembler directive and visibility attribute. |
dnl Check for .hidden assembler directive and visibility attribute. |
2720 |
dnl Borrowed from glibc configure.in |
dnl Borrowed from glibc configure.in |
2721 |
dnl =============================================================== |
dnl =============================================================== |
2818 |
]) |
]) |
2819 |
if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \ |
if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \ |
2820 |
"$ac_cv_have_visibility_class_bug" = "no"; then |
"$ac_cv_have_visibility_class_bug" = "no"; then |
2821 |
VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h' |
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h' |
2822 |
WRAP_SYSTEM_INCLUDES=1 |
WRAP_SYSTEM_INCLUDES=1 |
2823 |
else |
else |
2824 |
VISIBILITY_FLAGS='-fvisibility=hidden' |
VISIBILITY_FLAGS='-fvisibility=hidden' |
2936 |
fi |
fi |
2937 |
AC_CHECK_LIB(socket, socket) |
AC_CHECK_LIB(socket, socket) |
2938 |
|
|
|
AC_MSG_CHECKING(for ARM SIMD support) |
|
|
AC_TRY_COMPILE([], |
|
|
[asm("uqadd8 r1, r1, r2");], |
|
|
result="yes", result="no") |
|
|
AC_MSG_RESULT("$result") |
|
|
if test "$result" = "yes"; then |
|
|
AC_DEFINE(HAVE_ARM_SIMD) |
|
|
HAVE_ARM_SIMD=1 |
|
|
fi |
|
|
AC_SUBST(HAVE_ARM_SIMD) |
|
|
|
|
2939 |
dnl ======================================================== |
dnl ======================================================== |
2940 |
dnl = pthread support |
dnl = pthread support |
2941 |
dnl = Start by checking whether the system support pthreads |
dnl = Start by checking whether the system support pthreads |
3125 |
dnl ======================================================== |
dnl ======================================================== |
3126 |
AC_PROG_GCC_TRADITIONAL |
AC_PROG_GCC_TRADITIONAL |
3127 |
AC_FUNC_MEMCMP |
AC_FUNC_MEMCMP |
3128 |
AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat64 lstat64 truncate64 statvfs64) |
|
3129 |
AC_CHECK_FUNCS(flockfile getpagesize) |
AC_CHECK_FUNCS([fchmod flockfile getc_unlocked _getc_nolock getpagesize \ |
3130 |
AC_CHECK_FUNCS(localtime_r strtok_r) |
lchown localtime_r lstat64 memmove random rint sbrk snprintf \ |
3131 |
|
stat64 statvfs statvfs64 strerror strtok_r truncate64]) |
3132 |
|
|
3133 |
|
dnl Windows functions, for mingw. |
3134 |
|
AC_TRY_LINK([#include <windows.h>], |
3135 |
|
[SYSTEMTIME st;FILETIME ft;SystemTimeToFileTime(&st,&ft);], |
3136 |
|
ac_cv_have_systemtimetofiletime="yes", |
3137 |
|
ac_cv_have_systemtimetofiletime="no") |
3138 |
|
if test "$ac_cv_have_systemtimetofiletime" = "yes"; then |
3139 |
|
AC_DEFINE(HAVE_SYSTEMTIMETOFILETIME) |
3140 |
|
fi |
3141 |
|
AC_TRY_LINK([#include <windows.h>], |
3142 |
|
[FILETIME ft;GetSystemTimeAsFileTime(&ft);], |
3143 |
|
ac_cv_have_getsystemtimeasfiletime="yes", |
3144 |
|
ac_cv_have_getsystemtimeasfiletime="no") |
3145 |
|
if test "$ac_cv_have_getsystemtimeasfiletime" = "yes"; then |
3146 |
|
AC_DEFINE(HAVE_GETSYSTEMTIMEASFILETIME) |
3147 |
|
fi |
3148 |
|
|
3149 |
dnl check for wcrtomb/mbrtowc |
dnl check for wcrtomb/mbrtowc |
3150 |
dnl ======================================================================= |
dnl ======================================================================= |
3796 |
[ --with-system-nspr Use an NSPR that is already built and installed. |
[ --with-system-nspr Use an NSPR that is already built and installed. |
3797 |
Use the 'nspr-config' script in the current path, |
Use the 'nspr-config' script in the current path, |
3798 |
or look for the script in the directories given with |
or look for the script in the directories given with |
3799 |
--with-nspr-exec-prefix or --with-nspr-prefix.], |
--with-nspr-exec-prefix or --with-nspr-prefix. |
3800 |
|
(Those flags are only checked if you specify |
3801 |
|
--with-system-nspr.)], |
3802 |
_USE_SYSTEM_NSPR=1 ) |
_USE_SYSTEM_NSPR=1 ) |
3803 |
|
|
3804 |
MOZ_ARG_WITH_STRING(nspr-cflags, |
MOZ_ARG_WITH_STRING(nspr-cflags, |
3868 |
BUILD_STATIC_LIBS= |
BUILD_STATIC_LIBS= |
3869 |
ENABLE_TESTS=1 |
ENABLE_TESTS=1 |
3870 |
MOZ_DBGRINFO_MODULES= |
MOZ_DBGRINFO_MODULES= |
|
JS_STATIC_BUILD= |
|
3871 |
|
|
3872 |
dnl ======================================================== |
dnl ======================================================== |
3873 |
dnl = |
dnl = |
3877 |
MOZ_ARG_HEADER(Components and Features) |
MOZ_ARG_HEADER(Components and Features) |
3878 |
|
|
3879 |
dnl ======================================================== |
dnl ======================================================== |
3880 |
|
dnl = Enable obsolete Open JVM Interface (OJI) support on OS X |
3881 |
|
dnl ======================================================== |
3882 |
|
case $target in |
3883 |
|
*-darwin*) |
3884 |
|
MOZ_OJI=1 |
3885 |
|
AC_DEFINE(OJI) |
3886 |
|
;; |
3887 |
|
*) |
3888 |
|
MOZ_OJI= |
3889 |
|
;; |
3890 |
|
esac |
3891 |
|
|
3892 |
|
AC_SUBST(MOZ_OJI) |
3893 |
|
|
3894 |
|
dnl ======================================================== |
3895 |
dnl = Localization |
dnl = Localization |
3896 |
dnl ======================================================== |
dnl ======================================================== |
3897 |
MOZ_ARG_ENABLE_STRING(ui-locale, |
MOZ_ARG_ENABLE_STRING(ui-locale, |
3916 |
MOZ_ARG_HEADER(Individual module options) |
MOZ_ARG_HEADER(Individual module options) |
3917 |
|
|
3918 |
dnl ======================================================== |
dnl ======================================================== |
|
dnl = Enable Ultrasparc specific optimizations for JS |
|
|
dnl ======================================================== |
|
|
MOZ_ARG_ENABLE_BOOL(js-ultrasparc, |
|
|
[ --enable-js-ultrasparc Use UltraSPARC optimizations in JS], |
|
|
JS_ULTRASPARC_OPTS=1, |
|
|
JS_ULTRASPARC_OPTS= ) |
|
|
|
|
|
dnl only enable option for ultrasparcs |
|
|
if test `echo "$target_os" | grep -c \^solaris 2>/dev/null` = 0 -o \ |
|
|
"$OS_TEST" != "sun4u"; then |
|
|
JS_ULTRASPARC_OPTS= |
|
|
fi |
|
|
AC_SUBST(JS_ULTRASPARC_OPTS) |
|
|
|
|
|
dnl ======================================================== |
|
3919 |
dnl = |
dnl = |
3920 |
dnl = Debugging Options |
dnl = Debugging Options |
3921 |
dnl = |
dnl = |
4163 |
;; |
;; |
4164 |
msvc*|mks*|cygwin*|mingw*) |
msvc*|mks*|cygwin*|mingw*) |
4165 |
AC_DEFINE(MOZ_MEMORY_WINDOWS) |
AC_DEFINE(MOZ_MEMORY_WINDOWS) |
4166 |
dnl XXX: should test for vc8sp1 here, otherwise patching the crt src |
# the interesting bits will get passed down in MOZ_MEMORY_LDFLAGS |
|
dnl will fail miserably |
|
|
if test "$_CC_SUITE" -lt "8"; then |
|
|
AC_MSG_ERROR([Building jemalloc requires Visual C++ 2005 or better]) |
|
|
fi |
|
|
if test -z "$WIN32_CRT_SRC_DIR" -a -z "$WIN32_CUSTOM_CRT_DIR"; then |
|
|
if test -z "$VCINSTALLDIR" -o ! -d "$VCINSTALLDIR"; then |
|
|
AC_MSG_ERROR([When building jemalloc, either set WIN32_CRT_SRC_DIR to the path to the Visual C++ CRT source (usually VCINSTALLDIR\crt\src), or set WIN32_CUSTOM_CRT_DIR to the path to a folder containing a pre-built CRT DLL.]) |
|
|
else |
|
|
WIN32_CRT_SRC_DIR="$VCINSTALLDIR\crt\src" |
|
|
fi |
|
|
fi |
|
|
if test -z "$WIN32_CRT_SRC_DIR"; then |
|
|
# pre-built dll |
|
|
WIN32_CUSTOM_CRT_DIR=`cd "$WIN32_CUSTOM_CRT_DIR" && pwd` |
|
|
_WIN_UNIX_CRT_PATH="$WIN32_CUSTOM_CRT_DIR" |
|
|
else |
|
|
# CRT source directory |
|
|
WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd` |
|
|
_CRT_BASE_DIR=`basename "$WIN32_CRT_SRC_DIR"` |
|
|
_WIN_UNIX_CRT_PATH="$_objdir/memory/jemalloc/$_CRT_BASE_DIR/build/intel" |
|
|
fi |
|
|
dnl need win32 paths in LIB, hence this python abuse. extra brackets |
|
|
dnl are to avoid m4 |
|
|
_WIN_CRT_PATH=[`$PYTHON -c 'import sys, os.path; print os.path.normpath(sys.argv[1])' "$_WIN_UNIX_CRT_PATH"`] |
|
|
MOZ_LIB="$_WIN_CRT_PATH;$LIB" |
|
|
dnl Needs to be in PATH too, since our tools will wind up linked against it. |
|
|
dnl This needs to be unix style. |
|
|
MOZ_PATH="$PATH:$_WIN_UNIX_CRT_PATH" |
|
|
dnl Statically link the C++ stdlib. We only use this for Breakpad anyway. |
|
|
AC_DEFINE(_STATIC_CPPLIB) |
|
|
dnl Don't generate a manifest, since we're linking to a custom CRT. |
|
|
LDFLAGS="$LDFLAGS -MANIFEST:NO" |
|
|
dnl Also pass this to NSPR/NSS |
|
|
DLLFLAGS="$DLLFLAGS -MANIFEST:NO" |
|
|
export DLLFLAGS |
|
4167 |
;; |
;; |
4168 |
*wince) |
*wince) |
4169 |
AC_DEFINE(MOZ_MEMORY_WINCE) |
AC_DEFINE(MOZ_MEMORY_WINCE) |
4175 |
esac |
esac |
4176 |
fi |
fi |
4177 |
AC_SUBST(MOZ_MEMORY) |
AC_SUBST(MOZ_MEMORY) |
4178 |
AC_SUBST(WIN32_CRT_SRC_DIR) |
AC_SUBST(MOZ_MEMORY_LDFLAGS) |
|
AC_SUBST(WIN32_CUSTOM_CRT_DIR) |
|
|
AC_SUBST(MOZ_LIB) |
|
|
AC_SUBST(MOZ_PATH) |
|
|
dnl Need to set this for make because NSS doesn't have configure |
|
|
AC_SUBST(DLLFLAGS) |
|
4179 |
|
|
4180 |
dnl ======================================================== |
dnl ======================================================== |
4181 |
dnl = Use malloc wrapper lib |
dnl = Use malloc wrapper lib |
4200 |
WRAP_MALLOC_LIB=$withval) |
WRAP_MALLOC_LIB=$withval) |
4201 |
|
|
4202 |
dnl ======================================================== |
dnl ======================================================== |
4203 |
|
dnl = Use TraceVis |
4204 |
|
dnl ======================================================== |
4205 |
|
MOZ_ARG_ENABLE_BOOL(tracevis, |
4206 |
|
[ --enable-tracevis Enable TraceVis tracing tool (default=no)], |
4207 |
|
MOZ_TRACEVIS=1, |
4208 |
|
MOZ_TRACEVIS= ) |
4209 |
|
if test -n "$MOZ_TRACEVIS"; then |
4210 |
|
AC_DEFINE(MOZ_TRACEVIS) |
4211 |
|
if test -z "$ENABLE_JIT"; then |
4212 |
|
AC_MSG_ERROR([--enable-tracevis is incompatible with --disable-jit]) |
4213 |
|
fi |
4214 |
|
fi |
4215 |
|
|
4216 |
|
|
4217 |
|
dnl ======================================================== |
4218 |
dnl = Use Valgrind |
dnl = Use Valgrind |
4219 |
dnl ======================================================== |
dnl ======================================================== |
4220 |
MOZ_ARG_ENABLE_BOOL(valgrind, |
MOZ_ARG_ENABLE_BOOL(valgrind, |
4284 |
fi |
fi |
4285 |
|
|
4286 |
dnl ======================================================== |
dnl ======================================================== |
4287 |
|
dnl Zealous GC |
4288 |
|
dnl ======================================================== |
4289 |
|
MOZ_ARG_ENABLE_BOOL(gczeal, |
4290 |
|
[ --enable-gczeal Enable zealous GCing], |
4291 |
|
JS_GC_ZEAL=1, |
4292 |
|
JS_GC_ZEAL= ) |
4293 |
|
if test -n "$JS_GC_ZEAL"; then |
4294 |
|
AC_DEFINE(JS_GC_ZEAL) |
4295 |
|
fi |
4296 |
|
|
4297 |
|
dnl ======================================================== |
4298 |
dnl = Enable static checking using gcc-dehydra |
dnl = Enable static checking using gcc-dehydra |
4299 |
dnl ======================================================== |
dnl ======================================================== |
4300 |
|
|
4481 |
echo '#include <stdio.h>' > dummy-hello.c |
echo '#include <stdio.h>' > dummy-hello.c |
4482 |
echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c |
echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c |
4483 |
${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 |
${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 |
4484 |
cat dummy-hello.s | ${AS_BIN} -o dummy-hello.S - 2>&5 |
cat dummy-hello.s 2> /dev/null | ${AS_BIN} -o dummy-hello.S - 2>&5 |
4485 |
if test $? = 0; then |
if test $? = 0; then |
4486 |
_res_as_stdin="yes" |
_res_as_stdin="yes" |
4487 |
else |
else |
4747 |
_MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF |
_MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF |
4748 |
fi |
fi |
4749 |
|
|
4750 |
|
AC_SUBST(_MOZ_EXCEPTIONS_FLAGS_ON) |
4751 |
|
|
4752 |
# Irix & OSF native compilers do not like exception declarations |
# Irix & OSF native compilers do not like exception declarations |
4753 |
# when exceptions are disabled |
# when exceptions are disabled |
4754 |
if test -n "$MIPSPRO_CXX" -o -n "$COMPAQ_CXX" -o -n "$VACPP"; then |
if test -n "$MIPSPRO_CXX" -o -n "$COMPAQ_CXX" -o -n "$VACPP"; then |
4805 |
else |
else |
4806 |
COMPILER_DEPEND= |
COMPILER_DEPEND= |
4807 |
_USE_CPP_INCLUDE_FLAG= |
_USE_CPP_INCLUDE_FLAG= |
4808 |
_DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
4809 |
_DEFINES_CXXFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT' |
_DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
4810 |
fi |
fi |
4811 |
fi # MOZ_AUTO_DEPS |
fi # MOZ_AUTO_DEPS |
4812 |
MDDEPDIR='.deps' |
MDDEPDIR='.deps' |
4828 |
BUILD_STATIC_LIBS=) |
BUILD_STATIC_LIBS=) |
4829 |
|
|
4830 |
dnl ======================================================== |
dnl ======================================================== |
4831 |
dnl = Force JS to be a static lib |
dnl = Link js shell to system readline |
4832 |
dnl ======================================================== |
dnl ======================================================== |
4833 |
MOZ_ARG_ENABLE_BOOL(js-static-build, |
MOZ_ARG_ENABLE_BOOL(readline, |
4834 |
[ --enable-js-static-build Force js to be a static lib], |
[ --enable-readline Link js shell to system readline library], |
4835 |
JS_STATIC_BUILD=1, |
JS_WANT_READLINE=1, |
4836 |
JS_STATIC_BUILD= ) |
JS_WANT_READLINE= ) |
4837 |
|
|
4838 |
|
JS_NATIVE_EDITLINE= |
4839 |
|
EDITLINE_LIBS= |
4840 |
|
JS_DISABLE_SHELL= |
4841 |
|
|
4842 |
AC_SUBST(JS_STATIC_BUILD) |
case "$target" in |
4843 |
|
*-wince*|*-mingw*|*-cygwin*|*-msvc*|*-mks*) |
4844 |
if test -n "$JS_STATIC_BUILD"; then |
NO_EDITLINE=1 |
4845 |
AC_DEFINE(EXPORT_JS_API) |
;; |
4846 |
|
*-symbian*) |
4847 |
|
NO_EDITLINE=1 |
4848 |
|
JS_DISABLE_SHELL=1 |
4849 |
|
;; |
4850 |
|
*) |
4851 |
|
;; |
4852 |
|
esac |
4853 |
|
|
4854 |
if test -z "$BUILD_STATIC_LIBS"; then |
if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then |
4855 |
AC_MSG_ERROR([--enable-js-static-build is only compatible with --enable-static]) |
if test -n "$JS_WANT_READLINE"; then |
4856 |
fi |
AC_CHECK_LIB(readline, readline, |
4857 |
|
EDITLINE_LIBS="-lreadline", |
4858 |
|
AC_MSG_ERROR([No system readline library found.])) |
4859 |
|
else |
4860 |
|
dnl By default, we use editline |
4861 |
|
JS_NATIVE_EDITLINE=1 |
4862 |
|
EDITLINE_LIBS='$(DEPTH)/editline/$(LIB_PREFIX)editline.$(LIB_SUFFIX)' |
4863 |
|
fi |
4864 |
|
|
4865 |
|
dnl Either way, we want to build with line editing support. |
4866 |
|
AC_DEFINE(EDITLINE) |
4867 |
fi |
fi |
4868 |
|
AC_SUBST(JS_NATIVE_EDITLINE) |
4869 |
|
AC_SUBST(JS_DISABLE_SHELL) |
4870 |
|
AC_SUBST(EDITLINE_LIBS) |
4871 |
|
|
4872 |
dnl ======================================================== |
dnl ======================================================== |
4873 |
dnl = |
dnl = |
4964 |
AC_SUBST(MOZ_POST_PROGRAM_COMMAND) |
AC_SUBST(MOZ_POST_PROGRAM_COMMAND) |
4965 |
AC_SUBST(MOZ_TIMELINE) |
AC_SUBST(MOZ_TIMELINE) |
4966 |
AC_SUBST(WINCE) |
AC_SUBST(WINCE) |
4967 |
AC_SUBST(TARGET_DEVICE) |
AC_SUBST(WINCE_WINDOWS_MOBILE) |
4968 |
|
|
4969 |
AC_SUBST(MOZ_APP_NAME) |
AC_SUBST(MOZ_APP_NAME) |
4970 |
AC_SUBST(MOZ_APP_DISPLAYNAME) |
AC_SUBST(MOZ_APP_DISPLAYNAME) |
4973 |
AC_SUBST(MOZ_PKG_SPECIAL) |
AC_SUBST(MOZ_PKG_SPECIAL) |
4974 |
|
|
4975 |
AC_SUBST(MOZILLA_OFFICIAL) |
AC_SUBST(MOZILLA_OFFICIAL) |
|
AC_SUBST(BUILD_OFFICIAL) |
|
|
AC_SUBST(MOZ_MILESTONE_RELEASE) |
|
4976 |
|
|
4977 |
dnl win32 options |
dnl win32 options |
|
AC_SUBST(MOZ_PROFILE) |
|
4978 |
AC_SUBST(MOZ_DEBUG_SYMBOLS) |
AC_SUBST(MOZ_DEBUG_SYMBOLS) |
4979 |
AC_SUBST(MOZ_MAPINFO) |
AC_SUBST(MOZ_MAPINFO) |
4980 |
AC_SUBST(MOZ_BROWSE_INFO) |
AC_SUBST(MOZ_BROWSE_INFO) |
5019 |
AC_SUBST(LDFLAGS) |
AC_SUBST(LDFLAGS) |
5020 |
AC_SUBST(LIBS) |
AC_SUBST(LIBS) |
5021 |
AC_SUBST(CROSS_COMPILE) |
AC_SUBST(CROSS_COMPILE) |
|
AC_SUBST(WCHAR_CFLAGS) |
|
5022 |
|
|
5023 |
AC_SUBST(HOST_CC) |
AC_SUBST(HOST_CC) |
5024 |
AC_SUBST(HOST_CXX) |
AC_SUBST(HOST_CXX) |
5146 |
AC_DEFINE_UNQUOTED(ATK_REV_VERSION, $ATK_REV_VERSION) |
AC_DEFINE_UNQUOTED(ATK_REV_VERSION, $ATK_REV_VERSION) |
5147 |
fi |
fi |
5148 |
|
|
5149 |
# Used for LD_LIBRARY_PATH of run_viewer target |
dnl ======================================================== |
5150 |
LIBS_PATH= |
dnl JavaScript shell |
5151 |
for lib_arg in $NSPR_LIBS $TK_LIBS; do |
dnl ======================================================== |
5152 |
case $lib_arg in |
|
5153 |
-L* ) LIBS_PATH="${LIBS_PATH:+$LIBS_PATH:}"`expr $lib_arg : "-L\(.*\)"` ;; |
AC_HAVE_FUNCS(setlocale) |
|
* ) ;; |
|
|
esac |
|
|
done |
|
|
AC_SUBST(LIBS_PATH) |
|
5154 |
|
|
5155 |
dnl ======================================================== |
dnl ======================================================== |
5156 |
dnl Use cygwin wrapper for win32 builds, except MSYS/MinGW |
dnl Use cygwin wrapper for win32 builds, except MSYS/MinGW |
5186 |
# Save the defines header file before autoconf removes it. |
# Save the defines header file before autoconf removes it. |
5187 |
# (Do not add AC_DEFINE calls after this line.) |
# (Do not add AC_DEFINE calls after this line.) |
5188 |
_CONFIG_TMP=confdefs-tmp.h |
_CONFIG_TMP=confdefs-tmp.h |
5189 |
_CONFIG_DEFS_H=mozilla-config.h |
_CONFIG_DEFS_H=js-confdefs.h |
5190 |
|
|
5191 |
cat > $_CONFIG_TMP <<\EOF |
cat > $_CONFIG_TMP <<\EOF |
5192 |
/* List of defines generated by configure. Included with preprocessor flag, |
/* List of defines generated by configure. Included with preprocessor flag, |
5194 |
* Do not edit. |
* Do not edit. |
5195 |
*/ |
*/ |
5196 |
|
|
5197 |
#ifndef _MOZILLA_CONFIG_H_ |
#ifndef _JS_CONFDEFS_H_ |
5198 |
#define _MOZILLA_CONFIG_H_ |
#define _JS_CONFDEFS_H_ |
5199 |
EOF |
EOF |
5200 |
|
|
5201 |
_EGREP_PATTERN='^#define (' |
_EGREP_PATTERN='^#define (' |
5210 |
|
|
5211 |
cat >> $_CONFIG_TMP <<\EOF |
cat >> $_CONFIG_TMP <<\EOF |
5212 |
|
|
5213 |
#endif /* _MOZILLA_CONFIG_H_ */ |
#endif /* _JS_CONFDEFS_H_ */ |
5214 |
|
|
5215 |
EOF |
EOF |
5216 |
|
|
5217 |
# Only write mozilla-config.h when something changes (or it doesn't exist) |
# Only write js-confdefs.h when something changes (or it doesn't exist) |
5218 |
if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then |
if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then |
5219 |
rm $_CONFIG_TMP |
rm $_CONFIG_TMP |
5220 |
else |
else |
5237 |
|
|
5238 |
MAKEFILES=" |
MAKEFILES=" |
5239 |
Makefile |
Makefile |
5240 |
|
shell/Makefile |
5241 |
|
lirasm/Makefile |
5242 |
|
jsapi-tests/Makefile |
5243 |
|
tests/Makefile |
5244 |
config/Makefile |
config/Makefile |
5245 |
config/autoconf.mk |
config/autoconf.mk |
5246 |
config/mkdepend/Makefile |
config/mkdepend/Makefile |
5247 |
" |
" |
5248 |
|
|
5249 |
|
if test -n "$JS_NATIVE_EDITLINE"; then |
5250 |
|
MAKEFILES="$MAKEFILES |
5251 |
|
editline/Makefile |
5252 |
|
" |
5253 |
|
fi |
5254 |
|
|
5255 |
dnl |
dnl |
5256 |
dnl Run a perl script to quickly create the makefiles. |
dnl Run a perl script to quickly create the makefiles. |
5257 |
dnl If it succeeds, it outputs a shell command to set CONFIG_FILES |
dnl If it succeeds, it outputs a shell command to set CONFIG_FILES |