Make --disable-libxul imply --enable-shared-js. (Bug 587375) r=ted a2.0=dbaron

This commit is contained in:
Kyle Huey 2010-08-16 10:04:10 -04:00
parent 7deb0abd61
commit 64da8c83e1

View File

@ -74,19 +74,6 @@ TARGET_OS="${target_os}"
MOZ_DEB_TIMESTAMP=`date +"%a, %d %b %Y %T %z" 2>&1`
AC_SUBST(MOZ_DEB_TIMESTAMP)
MOZ_ARG_ENABLE_BOOL(shared-js,
[ --enable-shared-js
Create a shared JavaScript library.],
ENABLE_SHARED_JS=1,
ENABLE_SHARED_JS=0)
if test "$ENABLE_SHARED_JS" = "1" ; then
JS_SHARED_LIBRARY=1
else
AC_DEFINE(MOZ_STATIC_JS)
fi
AC_SUBST(JS_SHARED_LIBRARY)
dnl ========================================================
dnl =
dnl = Don't change the following two lines. Doing so breaks:
@ -1233,11 +1220,8 @@ MOZ_BZ2_LIBS='$(call EXPAND_LIBNAME_PATH,bz2,$(DEPTH)/modules/libbz2/src)'
MOZ_PNG_CFLAGS=
MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/modules/libimg/png)'
if test -z "$JS_SHARED_LIBRARY" ; then
MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -ljs_static'
else
MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
fi
MOZ_JS_STATIC_LIBS='-L$(LIBXUL_DIST)/bin -ljs_static'
MOZ_JS_SHARED_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core -lmozalloc'
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom -lmozalloc'
@ -2284,11 +2268,8 @@ ia64*-hpux*)
MOZ_DEBUG_FLAGS='-Zi'
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
MOZ_FIX_LINK_PATHS=
if test -z "$JS_SHARED_LIBRARY" ; then
MOZ_JS_LIBS='$(LIBXUL_DIST)/lib/js_static.lib'
else
MOZ_JS_LIBS='$(LIBXUL_DIST)/lib/mozjs.lib'
fi
MOZ_JS_STATIC_LIBS='$(LIBXUL_DIST)/lib/js_static.lib'
MOZ_JS_SHARED_LIBS='$(LIBXUL_DIST)/lib/mozjs.lib'
OBJ_SUFFIX=obj
RANLIB='echo not_ranlib'
STRIP='echo not_strip'
@ -2348,11 +2329,8 @@ ia64*-hpux*)
RCFLAGS='-O coff --use-temp-file'
# mingw doesn't require kernel32, user32, and advapi32 explicitly
LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32"
if test -z "$JS_SHARED_LIBRARY" ; then
MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -ljs_static'
else
MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
fi
MOZ_JS_STATIC_LIBS='-L$(LIBXUL_DIST)/bin -ljs_static'
MOZ_JS_SHARED_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
MOZ_FIX_LINK_PATHS=
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core -lmozalloc'
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom -lmozalloc'
@ -2398,11 +2376,8 @@ ia64*-hpux*)
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
WARNINGS_AS_ERRORS='-WX'
MOZ_OPTIMIZE_FLAGS='-O1'
if test -z "$JS_SHARED_LIBRARY" ; then
MOZ_JS_LIBS='$(LIBXUL_DIST)/lib/js_static.lib'
else
MOZ_JS_LIBS='$(LIBXUL_DIST)/lib/mozjs.lib'
fi
MOZ_JS_STATIC_LIBS='$(LIBXUL_DIST)/lib/js_static.lib'
MOZ_JS_SHARED_LIBS='$(LIBXUL_DIST)/lib/mozjs.lib'
MOZ_FIX_LINK_PATHS=
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
@ -8058,6 +8033,26 @@ MOZ_ARG_ENABLE_BOOL(libxul,
MOZ_ENABLE_LIBXUL=1,
MOZ_ENABLE_LIBXUL=)
MOZ_ARG_ENABLE_BOOL(shared-js,
[ --enable-shared-js
Create a shared JavaScript library.],
ENABLE_SHARED_JS=1,
ENABLE_SHARED_JS=)
if test -z "$MOZ_ENABLE_LIBXUL"; then
dnl --disable-libxul implies shared js
ENABLE_SHARED_JS=1
fi
if test -n "$ENABLE_SHARED_JS"; then
JS_SHARED_LIBRARY=1
MOZ_JS_LIBS=$MOZ_JS_SHARED_LIBS
else
MOZ_JS_LIBS=$MOZ_JS_STATIC_LIBS
AC_DEFINE(MOZ_STATIC_JS)
fi
AC_SUBST(JS_SHARED_LIBRARY)
if test -n "$MOZ_STATIC_BUILD_UNSUPPORTED" -a -n "$BUILD_STATIC_LIBS"; then
AC_MSG_ERROR([--enable-static is not supported for building $MOZ_APP_NAME. You probably want --enable-libxul.])
fi