mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
Bug 56793. Add support for building unix mozilla with a default
MOZILLA_FIVE_HOME. Build changes r=cls. Small XPCOM change sr=scc.
This commit is contained in:
parent
b4afdbb7d0
commit
f155f7f244
@ -1,7 +1,12 @@
|
||||
DIST=@MOZ_NSPRENV_DIST@
|
||||
MOZ_NSPRENV_OVERRIDE_MAKE=@MOZ_NSPRENV_OVERRIDE_MAKE@
|
||||
MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS=@MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS@
|
||||
|
||||
ifdef MOZ_NSPRENV_OVERRIDE_MAKE
|
||||
MAKE=$(MOZ_NSPRENV_OVERRIDE_MAKE)
|
||||
endif
|
||||
|
||||
ifdef MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS
|
||||
DSO_LDOPTS=$(MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS)
|
||||
endif
|
||||
|
||||
|
19
configure.in
19
configure.in
@ -3105,6 +3105,25 @@ MOZ_ARG_ENABLE_BOOL(elf-dynstr-gc,
|
||||
|
||||
AC_SUBST(USE_ELF_DYNSTR_GC)
|
||||
|
||||
dnl ========================================================
|
||||
dnl =
|
||||
dnl = --with-debug-modules=module1,^module2,etc
|
||||
dnl =
|
||||
dnl = Enable/disable debug for specific modules only
|
||||
dnl = module names beginning with ^ will be disabled (this is because you can't
|
||||
dnl = pass args to --without-debug-modules)
|
||||
dnl =
|
||||
dnl ========================================================
|
||||
MOZ_ARG_WITH_STRING(default-mozilla-five-home,
|
||||
[ --with-default-mozilla-five-home Set the default value for MOZILLA_FIVE_HOME],
|
||||
[ val=`echo $withval`
|
||||
DSO_LDOPTS="$DSO_LDOPTS -Wl,-rpath=$val"
|
||||
LIBS="$LIBS -Wl,-rpath=$val"
|
||||
AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val")
|
||||
MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS="-shared -rpath=$val"
|
||||
AC_SUBST(MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS) ] )
|
||||
dnl ========================================================
|
||||
|
||||
dnl ========================================================
|
||||
dnl =
|
||||
dnl = --with-debug-modules=module1,^module2,etc
|
||||
|
@ -196,7 +196,25 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
|
||||
// - if MOZILLA_FIVE_HOME is defined, that is it
|
||||
// - else give the current directory
|
||||
char buf[MAXPATHLEN];
|
||||
|
||||
// The MOZ_DEFAULT_MOZILLA_FIVE_HOME variable can be set at configure time with
|
||||
// a --with-default-mozilla-five-home=foo autoconf flag.
|
||||
//
|
||||
// The idea here is to allow for builds that have a default MOZILLA_FIVE_HOME
|
||||
// regardless of the environment. This makes it easier to write apps that
|
||||
// embed mozilla without having to worry about setting up the environment
|
||||
//
|
||||
// We do this py putenv()ing the default value into the environment. Note that
|
||||
// we only do this if it is not already set.
|
||||
#ifdef MOZ_DEFAULT_MOZILLA_FIVE_HOME
|
||||
if (PR_GetEnv("MOZILLA_FIVE_HOME") == nsnull)
|
||||
{
|
||||
putenv("MOZILLA_FIVE_HOME=" MOZ_DEFAULT_MOZILLA_FIVE_HOME);
|
||||
}
|
||||
#endif
|
||||
|
||||
char *moz5 = PR_GetEnv("MOZILLA_FIVE_HOME");
|
||||
|
||||
if (moz5)
|
||||
{
|
||||
localFile->InitWithPath(moz5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user