Skip to content

Commit

Permalink
Bug 1294803 - Move BUILD_CTYPES to Python configure. r=glandium
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 3TlgdpNDLZW
  • Loading branch information
chmanchester committed Aug 22, 2016
1 parent ec4a1d7 commit 470a2af
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 29 deletions.
1 change: 0 additions & 1 deletion build/moz.configure/old.configure
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def old_configure_options(*options):
'--enable-cookies',
'--enable-cpp-rtti',
'--enable-crashreporter',
'--enable-ctypes',
'--enable-dbus',
'--enable-debug-js-modules',
'--enable-directshow',
Expand Down
13 changes: 2 additions & 11 deletions js/src/old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2102,22 +2102,13 @@ dnl =
dnl ========================================================
MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla))

dnl ========================================================
dnl = Build jsctypes if it's enabled
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(ctypes,
[ --enable-ctypes Enable js-ctypes (default=no)],
BUILD_CTYPES=1,
BUILD_CTYPES= )
JS_HAS_CTYPES=$BUILD_CTYPES
AC_SUBST(JS_HAS_CTYPES)
AC_SUBST(BUILD_CTYPES)
if test "$JS_HAS_CTYPES"; then
dnl JS_HAS_CTYPES is defined by Python configure. This check remains
dnl as long as determining $AS remains in old-configure.
dnl Error out if we're on MSVC and MASM is unavailable.
if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then
AC_MSG_ERROR([\"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes.])
fi
AC_DEFINE(JS_HAS_CTYPES)
fi

dnl ========================================================
Expand Down
24 changes: 24 additions & 0 deletions moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,30 @@ include_when('build/moz.configure/headers.configure',
include_when('build/moz.configure/warnings.configure',
when='--enable-compile-environment')


@depends(building_js, '--help')
def ctypes_default(building_js, _):
return not building_js

js_option('--enable-ctypes', help='Enable js-ctypes',
default=ctypes_default)

build_ctypes = depends_if('--enable-ctypes')(lambda _: True)

set_config('BUILD_CTYPES', build_ctypes)
set_define('BUILD_CTYPES', build_ctypes)
add_old_configure_assignment('BUILD_CTYPES', build_ctypes)

@depends(build_ctypes, building_js)
def js_has_ctypes(ctypes, js):
if ctypes and js:
return True

set_config('JS_HAS_CTYPES', js_has_ctypes)
set_define('JS_HAS_CTYPES', js_has_ctypes)
add_old_configure_assignment('JS_HAS_CTYPES', js_has_ctypes)


@dependable
@imports(_from='mozbuild.backend', _import='backends')
def build_backends_choices():
Expand Down
17 changes: 0 additions & 17 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,6 @@ MOZ_XUL=1
MOZ_ZIPWRITER=1
MOZ_NO_SMART_CARDS=
NECKO_COOKIES=1
BUILD_CTYPES=1
MOZ_USE_NATIVE_POPUP_WINDOWS=
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
MOZ_INSTALL_TRACKING=
Expand Down Expand Up @@ -5550,18 +5549,6 @@ if test "$ENABLE_MARIONETTE"; then
AC_DEFINE(ENABLE_MARIONETTE)
fi

dnl
dnl Build jsctypes on the platforms we can, unless it's explicitly disabled.
dnl
MOZ_ARG_DISABLE_BOOL(ctypes,
[ --disable-ctypes Disable js-ctypes],
BUILD_CTYPES=,
BUILD_CTYPES=1)
AC_SUBST(BUILD_CTYPES)
if test "$BUILD_CTYPES"; then
AC_DEFINE(BUILD_CTYPES)
fi

dnl ========================================================
if test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
Expand Down Expand Up @@ -6238,10 +6225,6 @@ if test "$_INTL_API" = no; then
ac_configure_args="$ac_configure_args --without-intl-api"
fi

if test "$BUILD_CTYPES"; then
# Build js-ctypes on the platforms we can.
ac_configure_args="$ac_configure_args --enable-ctypes"
fi
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
Expand Down

0 comments on commit 470a2af

Please sign in to comment.