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:
ramiro%eazel.com 2000-10-21 08:33:16 +00:00
parent b4afdbb7d0
commit f155f7f244
3 changed files with 42 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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);