summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/moz.configure/old.configure1
-rw-r--r--js/src/old-configure.in10
-rw-r--r--moz.configure32
-rw-r--r--old-configure.in29
4 files changed, 40 insertions, 32 deletions
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index ffdea81b0..9f29e68c9 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -235,6 +235,7 @@ def old_configure_options(*options):
'--enable-system-pixman',
'--enable-system-sqlite',
'--enable-tasktracer',
+ '--enable-tests',
'--enable-thread-sanitizer',
'--enable-trace-logging',
'--enable-ui-locale',
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
index 7432ab9e2..162a071d7 100644
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1534,6 +1534,14 @@ MOZ_ARG_ENABLE_STRING(ui-locale,
AC_SUBST(MOZ_UI_LOCALE)
dnl ========================================================
+dnl Build the tests?
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(tests,
+[ --enable-tests Build test libraries & programs],
+ ENABLE_TESTS=1,
+ ENABLE_TESTS= )
+
+dnl ========================================================
dnl =
dnl = Module specific options
dnl =
@@ -2091,6 +2099,8 @@ AC_SUBST(MOZ_DEBUG_LDFLAGS)
AC_SUBST(WARNINGS_AS_ERRORS)
AC_SUBST(LIBICONV)
+AC_SUBST(ENABLE_TESTS)
+
AC_SUBST(ENABLE_STRIP)
AC_SUBST(PKG_SKIP_STRIP)
AC_SUBST(INCREMENTAL_LINKER)
diff --git a/moz.configure b/moz.configure
index cecc1335e..64cdc8ac6 100644
--- a/moz.configure
+++ b/moz.configure
@@ -52,38 +52,6 @@ def compile_environment(compile_env):
set_config('COMPILE_ENVIRONMENT', compile_environment)
add_old_configure_assignment('COMPILE_ENVIRONMENT', compile_environment)
-js_option('--disable-tests',
- help='Do not build test libraries & programs')
-
-@depends('--disable-tests')
-def enable_tests(value):
- if value:
- return True
-
-set_config('ENABLE_TESTS', enable_tests)
-set_define('ENABLE_TESTS', enable_tests)
-
-@depends(enable_tests)
-def gtest_has_rtti(value):
- if value:
- return '0'
-
-set_define('GTEST_HAS_RTTI', gtest_has_rtti)
-
-@depends(target, enable_tests)
-def linux_gtest_defines(target, enable_tests):
- if enable_tests and target.os == 'Android':
- return namespace(os_linux_android=True,
- use_own_tr1_tuple=True,
- has_clone='0')
-
-set_define('GTEST_OS_LINUX_ANDROID',
- delayed_getattr(linux_gtest_defines, 'os_linux_android'))
-set_define('GTEST_USE_OWN_TR1_TUPLE',
- delayed_getattr(linux_gtest_defines, 'use_own_tr1_tuple'))
-set_define('GTEST_HAS_CLONE',
- delayed_getattr(linux_gtest_defines, 'has_clone'))
-
js_option('--enable-debug',
nargs='?',
help='Enable building with developer debug info '
diff --git a/old-configure.in b/old-configure.in
index d8a6d01f0..7d336d37f 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2256,6 +2256,7 @@ dnl ========================================================
MOZ_ARG_HEADER(Application)
+ENABLE_TESTS=
ENABLE_SYSTEM_EXTENSION_DIRS=1
MOZ_BRANDING_DIRECTORY=
MOZ_OFFICIAL_BRANDING=
@@ -3794,6 +3795,32 @@ if test -n "$MOZ_UPDATER"; then
fi
dnl ========================================================
+dnl Build the tests?
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(tests,
+[ --enable-tests Build test libraries & programs],
+ ENABLE_TESTS=1,
+ ENABLE_TESTS= )
+
+if test -n "$ENABLE_TESTS"; then
+ GTEST_HAS_RTTI=0
+ AC_DEFINE(ENABLE_TESTS)
+ AC_DEFINE_UNQUOTED(GTEST_HAS_RTTI, 0)
+ AC_SUBST(GTEST_HAS_RTTI)
+ if test -n "$_WIN32_MSVC"; then
+ AC_DEFINE_UNQUOTED(_VARIADIC_MAX, 10)
+ fi
+ if test "${OS_TARGET}" = "Android"; then
+ AC_DEFINE(GTEST_OS_LINUX_ANDROID)
+ AC_DEFINE(GTEST_USE_OWN_TR1_TUPLE)
+ AC_DEFINE_UNQUOTED(GTEST_HAS_CLONE, 0)
+ AC_SUBST(GTEST_OS_LINUX_ANDROID)
+ AC_SUBST(GTEST_USE_OWN_TR1_TUPLE)
+ AC_SUBST(GTEST_HAS_CLONE)
+ fi
+fi
+
+dnl ========================================================
dnl parental controls (for Windows Vista)
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(parental-controls,
@@ -5245,6 +5272,8 @@ AC_SUBST(LIBICONV)
AC_SUBST(MOZ_TOOLKIT_SEARCH)
AC_SUBST(MOZ_FEEDS)
+AC_SUBST(ENABLE_TESTS)
+
AC_SUBST(MOZ_UNIVERSALCHARDET)
AC_SUBST(ACCESSIBILITY)
AC_SUBST(MOZ_SPELLCHECK)