Bug 601910 - Port hg:ee594fb0fa3e to comm-central (Clean up configure.in a bit); r=Callek

This commit is contained in:
Takanori MATSUURA 2010-10-21 12:14:14 +01:00
Родитель 7f26a49d98
Коммит 2a4f93bb35
1 изменённых файлов: 30 добавлений и 70 удалений

Просмотреть файл

@ -84,7 +84,7 @@ export MOZCONFIG
dnl Check for Perl first -- needed for win32 SDK checks
MOZ_PATH_PROGS(PERL, $PERL perl5 perl)
if test -z "$PERL" || test "$PERL" = ":"; then
if test -z "$PERL" -o "$PERL" = ":"; then
AC_MSG_ERROR([perl not found in \$PATH])
fi
@ -212,10 +212,10 @@ case "$target" in
if test -z "$AS"; then
case "${target_cpu}" in
i*86)
AS=ml
AS=ml;
;;
x86_64)
AS=ml64
AS=ml64;
;;
esac
fi
@ -910,12 +910,12 @@ MOZ_PATH_PROG(DOXYGEN, doxygen, :)
MOZ_PATH_PROG(AUTOCONF, autoconf, :)
MOZ_PATH_PROG(UNZIP, unzip, :)
MOZ_PATH_PROGS(ZIP, zip)
if test -z "$ZIP" || test "$ZIP" = ":"; then
if test -z "$ZIP" -o "$ZIP" = ":"; then
AC_MSG_ERROR([zip not found in \$PATH])
fi
MOZ_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend)
MOZ_PATH_PROG(XARGS, xargs)
if test -z "$XARGS" || test "$XARGS" = ":"; then
if test -z "$XARGS" -o "$XARGS" = ":"; then
AC_MSG_ERROR([xargs not found in \$PATH .])
fi
@ -958,7 +958,7 @@ from building Mozilla. Upgrade to Xcode 2.1 or later.])
changequote(,)
XCODEBUILD_VERSION=`$PBBUILD -version 2>/dev/null | xargs | sed -e 's/.*DevToolsCore-\([0-9]*\).*/\1/'`
changequote([,])
if test -n "$XCODEBUILD_VERSION" && test "$XCODEBUILD_VERSION" -ge 620 ; then
if test -n "$XCODEBUILD_VERSION" -a "$XCODEBUILD_VERSION" -ge 620 ; then
HAS_XCODE_2_1=1;
fi
;;
@ -1941,12 +1941,6 @@ case "$target" in
if test ! "$GNU_CC"; then
DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
fi
# Can't have force w/o an unforce.
# # Hack for FreeBSD 2.2
# if test -z "$MKSHLIB_FORCE_ALL"; then
# MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
# MKSHLIB_UNFORCE_ALL=''
# fi
;;
ia64*-hpux*)
@ -2050,12 +2044,12 @@ ia64*-hpux*)
*-*linux*)
# Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler.
# Similarly for GNU_CXX and INTEL_CXX.
if test "$INTEL_CC" || test "$INTEL_CXX"; then
if test "$INTEL_CC" -o "$INTEL_CXX"; then
# -Os has been broken on Intel's C/C++ compilers for quite a
# while; Intel recommends against using it.
MOZ_OPTIMIZE_FLAGS="-O2"
MOZ_DEBUG_FLAGS="-g"
elif test "$GNU_CC" || test "$GNU_CXX"; then
elif test "$GNU_CC" -o "$GNU_CXX"; then
GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
case $GCC_VERSION in
4.1.*|4.2.*)
@ -2317,7 +2311,7 @@ ia64*-hpux*)
fi
MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd -W`
if test "$?" != "0" || test -z "$MOZ_TOOLS_DIR"; then
if test "$?" != "0" -o -z "$MOZ_TOOLS_DIR"; then
AC_MSG_ERROR([cd \$MOZ_TOOLS failed. MOZ_TOOLS ==? $MOZ_TOOLS])
fi
MOZ_TOOLS_BIN_DIR="$(cd "$MOZ_TOOLS_DIR/bin" && pwd)"
@ -2618,7 +2612,7 @@ alpha*-*-osf*)
_MOZ_EXCEPTIONS_FLAGS_ON='-features=except'
_MOZ_EXCEPTIONS_FLAGS_OFF='-features=no%except'
LDFLAGS="-xildoff $LDFLAGS"
if test -z "$CROSS_COMPILE" && test -f /usr/lib/ld/map.noexstk; then
if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
AC_TRY_LINK([#include <stdio.h>],
@ -2724,7 +2718,7 @@ dnl they can link in the static libs that provide the missing
dnl symbols.
dnl ========================================================
NO_LD_ARCHIVE_FLAGS=
if test -z "$MKSHLIB_FORCE_ALL" || test -z "$MKSHLIB_UNFORCE_ALL"; then
if test -z "$MKSHLIB_FORCE_ALL" -o -z "$MKSHLIB_UNFORCE_ALL"; then
NO_LD_ARCHIVE_FLAGS=1
fi
case "$target" in
@ -3318,7 +3312,7 @@ then
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthread=yes
case "$target_os" in
freebsd*)
@ -3343,7 +3337,7 @@ then
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthreads=yes
CFLAGS="$CFLAGS -pthreads"
CXXFLAGS="$CXXFLAGS -pthreads"
@ -3463,7 +3457,7 @@ AC_CHECK_FUNCS(localtime_r strtok_r)
dnl check for wcrtomb/mbrtowc
dnl =======================================================================
if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
if test -z "$MACOS_DEPLOYMENT_TARGET" -o "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CACHE_CHECK(for wcrtomb,
@ -4206,7 +4200,7 @@ MOZ_ARG_WITH_BOOL(system-libxul,
[ --with-system-libxul Use system installed libxul SDK],
SYSTEM_LIBXUL=1)
if test -n "$SYSTEM_LIBXUL" && test -z "$MOZ_ENABLE_LIBXUL"; then
if test -n "$SYSTEM_LIBXUL" -a -z "$MOZ_ENABLE_LIBXUL"; then
AC_MSG_ERROR([--with-system-libxul needs --with-libxul-sdk])
fi
@ -4297,7 +4291,7 @@ else
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nss$NSS_VERSION\$(DLL_SUFFIX) \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nssutil$NSS_VERSION\$(DLL_SUFFIX)"
if test -z "$GNU_CC" && test "$OS_ARCH" = "WINNT" -o "$OS_ARCH" = "WINCE" -o "$OS_ARCH" = "OS2"; then
if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT" -o "$OS_ARCH" = "WINCE" -o "$OS_ARCH" = "OS2"; then
NSS_LIBS="\
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)crmf.\$(LIB_SUFFIX) \
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)smime$NSS_VERSION.\$(LIB_SUFFIX) \
@ -5050,7 +5044,7 @@ dnl ========================================================
dnl = dbus support
dnl ========================================================
if test "$MOZ_ENABLE_GTK2" || test "$MOZ_ENABLE_QT"
if test "$MOZ_ENABLE_GTK2" -o "$MOZ_ENABLE_QT"
then
MOZ_ENABLE_DBUS=1
@ -5360,7 +5354,7 @@ if test -n "$MOZ_INSTALLER" -a "$OS_ARCH" = "WINNT"; then
REQ_NSIS_MAJOR_VER=2
MIN_NSIS_MINOR_VER=33
MOZ_PATH_PROGS(MAKENSISU, $MAKENSISU makensisu-2.46 makensisu makensis)
if test -z "$MAKENSISU" || test "$MAKENSISU" = ":"; then
if test -z "$MAKENSISU" -o "$MAKENSISU" = ":"; then
AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path. To build without the installer reconfigure using --disable-installer.])
fi
changequote(,)
@ -5371,9 +5365,9 @@ if test -n "$MOZ_INSTALLER" -a "$OS_ARCH" = "WINNT"; then
MAKENSISU_MINOR_VER=`echo $MAKENSISU_VER | $AWK -F\. '{ print $2 }'`
fi
AC_MSG_CHECKING([for Unicode NSIS with major version == $REQ_NSIS_MAJOR_VER and minor version >= $MIN_NSIS_MINOR_VER])
if test "$MAKENSISU_VER" == "" ||
test ! "$MAKENSISU_MAJOR_VER" == "$REQ_NSIS_MAJOR_VER" ||
test ! "$MAKENSISU_MINOR_VER" -ge $MIN_NSIS_MINOR_VER; then
if test "$MAKENSISU_VER" == "" -o \
! "$MAKENSISU_MAJOR_VER" == "$REQ_NSIS_MAJOR_VER" -o \
! "$MAKENSISU_MINOR_VER" -ge $MIN_NSIS_MINOR_VER; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path. To build without the installer reconfigure using --disable-installer.])
fi
@ -5606,28 +5600,8 @@ dnl ========================================================
dnl = Disable building with debug info.
dnl = Debugging is OFF by default
dnl ========================================================
if test -z "$MOZ_DEBUG_FLAGS"
then
case "$target" in
*-irix*)
if test "$GNU_CC"; then
GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'`
case "$GCC_VERSION" in
2.95.*)
MOZ_DEBUG_FLAGS=""
;;
*)
MOZ_DEBUG_FLAGS="-g"
;;
esac
else
MOZ_DEBUG_FLAGS="-g"
fi
;;
*)
MOZ_DEBUG_FLAGS="-g"
;;
esac
if test -z "$MOZ_DEBUG_FLAGS"; then
MOZ_DEBUG_FLAGS="-g"
fi
MOZ_ARG_ENABLE_STRING(debug,
@ -5693,7 +5667,7 @@ MOZ_ARG_ENABLE_STRING(optimize,
--enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]],
[ if test "$enableval" != "no"; then
MOZ_OPTIMIZE=1
if test -n "$enableval" && test "$enableval" != "yes"; then
if test -n "$enableval" -a "$enableval" != "yes"; then
MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'`
MOZ_OPTIMIZE=2
fi
@ -6091,7 +6065,7 @@ AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
dnl ========================================================
dnl = Support for gcc stack unwinding (from gcc 3.3)
dnl ========================================================
if test "$HAVE_GCC3_ABI" && test -z "$SKIP_LIBRARY_CHECKS"; then
if test "$HAVE_GCC3_ABI" -a -z "$SKIP_LIBRARY_CHECKS"; then
AC_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
fi
@ -6204,7 +6178,7 @@ dnl ========================================================
dnl Check for gcc -pipe support
dnl ========================================================
AC_MSG_CHECKING([for gcc -pipe support])
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
if test -n "$GNU_CC" -a -n "$GNU_CXX" -a -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
@ -6223,7 +6197,7 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
[_res_gcc_pipe="no"] )
CFLAGS=$_SAVE_CFLAGS
fi
if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
if test "$_res_as_stdin" = "yes" -a "$_res_gcc_pipe" = "yes"; then
_res="yes";
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
@ -6240,7 +6214,6 @@ dnl ========================================================
dnl Profile guided optimization
dnl ========================================================
dnl Test for profiling options
dnl Under gcc 3.3, use -fprofile-arcs/-fbranch-probabilities
dnl Under gcc 3.4+, use -fprofile-generate/-fprofile-use
dnl Provide a switch to disable PGO even when called via profiledbuild.
@ -6265,19 +6238,6 @@ if test $result = "yes"; then
PROFILE_GEN_LDFLAGS="-fprofile-generate"
PROFILE_USE_CFLAGS="-fprofile-use"
PROFILE_USE_LDFLAGS="-fprofile-use"
else
CFLAGS="$_SAVE_CFLAGS -fprofile-arcs"
AC_MSG_CHECKING([whether C compiler supports -fprofile-arcs])
AC_TRY_COMPILE([], [return 0;],
[ PROFILE_GEN_CFLAGS="-fprofile-arcs"
result="yes" ], result="no")
AC_MSG_RESULT([$result])
if test $result = "yes"; then
PROFILE_USE_CFLAGS="-fbranch-probabilities"
fi
# don't really care, this is an old GCC
PROFILE_GEN_LDFLAGS=
PROFILE_USE_LDFLAGS=
fi
CFLAGS="$_SAVE_CFLAGS"
@ -6596,8 +6556,8 @@ MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla))
dnl Check for GLib.
dnl ========================================================
if test -z "$SKIP_PATH_CHECKS"; then
if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
if test "$MOZ_ENABLE_GTK2" || test "$USE_ELF_DYNSTR_GC" ; then
if test -z "${GLIB_CFLAGS}" -o -z "${GLIB_LIBS}" ; then
if test "$MOZ_ENABLE_GTK2" -o "$USE_ELF_DYNSTR_GC" ; then
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.7 gobject-2.0)
else
AM_PATH_GLIB(${GLIB_VERSION})
@ -6739,7 +6699,7 @@ if test "$MOZ_PLACES"; then
fi
dnl ========================================================
if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"; then
if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi