changeset 25460:627d6bde9b8d

solve installation info initialization problem differently Back out changesets 893344cee100 and 69fc8935020b. * defaults.h, defaults.cc: Instead of storing installation info like include_dir, data_dir, info_dir, etc., in file-scope static variables or a class object owned by the interpreter, store the initialized values as constants inside the functions that return them. This way they are initialized on demand and we don't have to worry about initialization order of static data. It's OK for these to be static because even though they may require some computation to intialize (looking at environment variables or substituting the value of OCTAVE_HOME), they are constants for any given installation of Octave and will be the same for any instantiation of the interpreter. Only include defaults.h in files that actually need it.
author John W. Eaton <jwe@octave.org>
date Tue, 12 Jun 2018 13:03:04 -0400
parents a92ecef81da0
children 6011085a9d7c
files libgui/src/documentation.cc libgui/src/main-window.cc libgui/src/resource-manager.cc libinterp/corefcn/default-defs.in.h libinterp/corefcn/defaults.cc libinterp/corefcn/defaults.h libinterp/corefcn/environment.cc libinterp/corefcn/environment.h libinterp/corefcn/ft-text-renderer.cc libinterp/corefcn/help.cc libinterp/corefcn/help.h libinterp/corefcn/installation-data.cc libinterp/corefcn/installation-data.h libinterp/corefcn/interpreter-private.cc libinterp/corefcn/interpreter-private.h libinterp/corefcn/interpreter.cc libinterp/corefcn/interpreter.h libinterp/corefcn/load-path.cc libinterp/corefcn/load-path.h libinterp/corefcn/ls-mat5.cc libinterp/corefcn/module.mk libinterp/corefcn/pager.cc libinterp/corefcn/toplev.cc libinterp/octave-value/ov-dld-fcn.cc libinterp/octave-value/ov-fcn-handle.cc libinterp/octave-value/ov-java.cc libinterp/octave-value/ov-mex-fcn.cc libinterp/octave-value/ov-usr-fcn.cc
diffstat 28 files changed, 718 insertions(+), 1209 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/documentation.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libgui/src/documentation.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -24,8 +24,8 @@
 #  include "config.h"
 #endif
 
+#include "defaults.h"
 #include "file-ops.h"
-#include "installation-data.h"
 #include "oct-env.h"
 
 #include <QApplication>
@@ -46,7 +46,6 @@
 #include <QVBoxLayout>
 
 #include "documentation.h"
-#include "interpreter-private.h"
 #include "resource-manager.h"
 #include "shortcut-manager.h"
 
@@ -63,15 +62,9 @@
     // Get original collection
     QString collection = getenv ("OCTAVE_QTHELP_COLLECTION");
     if (collection.isEmpty ())
-      {
-        // Hmm.
-        installation_data& inst_data
-          = __get_installation_data__ ("documentation::documentation");
-
-        collection = QString::fromStdString (inst_data.oct_doc_dir ()
-                                             + sys::file_ops::dir_sep_str ()
-                                             + "octave_interpreter.qhc");
-      }
+      collection = QString::fromStdString (config::oct_doc_dir ()
+                                           + sys::file_ops::dir_sep_str ()
+                                           + "octave_interpreter.qhc");
 
     // Setup the help engine with the original collection, use a writable copy
     // of the original collection and load the help data
--- a/libgui/src/main-window.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libgui/src/main-window.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -61,10 +61,10 @@
 #include "url-transfer.h"
 
 #include "builtin-defun-decls.h"
+#include "defaults.h"
 #if defined (HAVE_QT_GRAPHICS)
 #  include "__init_qt__.h"
 #endif
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "oct-map.h"
@@ -461,10 +461,7 @@
   {
     if (! m_release_notes_window)
       {
-        installation_data& inst_data
-          = __get_installation_data__ ("main_window::display_release_notes");
-
-        std::string news_file = inst_data.oct_etc_dir () + "/NEWS";
+        std::string news_file = config::oct_etc_dir () + "/NEWS";
 
         QString news;
 
--- a/libgui/src/resource-manager.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libgui/src/resource-manager.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -41,8 +41,7 @@
 #include "help.h"
 #include "oct-env.h"
 
-#include "installation-data.h"
-#include "interpreter-private.h"
+#include "defaults.h"
 
 #include "QTerminal.h"
 #include "workspace-model.h"
@@ -59,15 +58,9 @@
     std::string dsf = sys::env::getenv ("OCTAVE_DEFAULT_QT_SETTINGS");
 
     if (dsf.empty ())
-      {
-        // Hmm.
-        installation_data& inst_data
-          = __get_installation_data__ ("default_qt_settings_file");
-
-        dsf = (inst_data.oct_etc_dir ()
-               + sys::file_ops::dir_sep_str ()
-               + "default-qt-settings");
-      }
+      dsf = (config::oct_etc_dir ()
+             + sys::file_ops::dir_sep_str ()
+             + "default-qt-settings");
 
     return QString::fromStdString (dsf);
   }
@@ -103,15 +96,7 @@
     // get environment variable for the locale dir (e.g. from run-octave)
     std::string dldir = sys::env::getenv ("OCTAVE_LOCALE_DIR");
     if (dldir.empty ())
-      {
-        // Hmm.
-        installation_data& inst_data
-          = __get_installation_data__ ("resource_manager::get_gui_translation_dir");
-
-        // env-var empty, load the default location
-        dldir = inst_data.oct_locale_dir ();
-      }
-
+      dldir = config::oct_locale_dir (); // env-var empty, load the default location
     return QString::fromStdString (dldir);
   }
 
--- a/libinterp/corefcn/default-defs.in.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/default-defs.in.h	Tue Jun 12 13:03:04 2018 -0400
@@ -21,8 +21,8 @@
 
 */
 
-// These are used by functions declared in installation-data.h and
-// defined in installation-data.cc
+// These are used by functions declared in defaults.h and defined in
+// defaults.cc.
 
 #if ! defined (OCTAVE_RELEASE)
 #  define OCTAVE_RELEASE %OCTAVE_RELEASE%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libinterp/corefcn/defaults.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -0,0 +1,506 @@
+/*
+
+Copyright (C) 1996-2018 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Octave is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<https://www.gnu.org/licenses/>.
+
+*/
+
+#if defined (HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
+#include <cstdlib>
+
+#include <algorithm>
+#include <string>
+
+#include "dir-ops.h"
+#include "file-ops.h"
+#include "oct-env.h"
+
+#include "defaults.h"
+#include "defun.h"
+#include "error.h"
+#include "file-ops.h"
+#include "ovl.h"
+#include "ov.h"
+#include "variables.h"
+#include "version.h"
+
+#include "default-defs.h"
+
+namespace octave
+{
+  namespace config
+  {
+    // Variables that name directories or files are substituted into source
+    // files with "${prefix}/" stripped from the beginning of the string.
+
+    // All configure variables of this form should be specified as absolute
+    // directory names.  The only ones that should not be absolute here are
+    // ones that have had "${prefix}/" or "${exec_prefix} stripped.
+
+    static std::string
+    prepend_home_dir (const std::string& hd, const std::string& s)
+    {
+      std::string retval = s;
+
+      char dir_sep_char = sys::file_ops::dir_sep_char ();
+
+      if (! sys::env::absolute_pathname (retval))
+        retval = hd + dir_sep_char + s;
+
+      if (dir_sep_char != '/')
+        std::replace (retval.begin (), retval.end (), '/', dir_sep_char);
+
+      return retval;
+    }
+
+    static std::string get_octave_home (void)
+    {
+      std::string op = OCTAVE_PREFIX;
+
+      std::string oh = sys::env::getenv ("OCTAVE_HOME");
+
+      // If OCTAVE_HOME is set in the enviornment, use that.  Otherwise,
+      // default to ${prefix} from configure.
+
+      return oh.empty () ? op : oh;
+    }
+
+    static std::string get_octave_exec_home (void)
+    {
+      std::string op = OCTAVE_PREFIX;
+      std::string oep = OCTAVE_EXEC_PREFIX;
+
+      std::string oh = sys::env::getenv ("OCTAVE_HOME");
+      std::string oeh = sys::env::getenv ("OCTAVE_EXEC_HOME");
+
+      // If OCTAVE_EXEC_HOME is set in the environment, use that.
+      // Otherwise, if ${prefix} and ${exec_prefix} from configure are set
+      // to the same value, use OCTAVE_HOME from the environment if it is set.
+      // Othewise, default to ${exec_prefix} from configure.
+
+      if (! oeh.empty ())
+        return oeh;
+
+      if (op == oep && ! oh.empty ())
+        return oh;
+
+      return oep;
+    }
+
+    static std::string get_local_site_defaults_file (void)
+    {
+      std::string lsf = sys::env::getenv ("OCTAVE_SITE_INITFILE");
+
+      return lsf.empty () ? local_startupfile_dir () + "/octaverc" : lsf;
+    }
+
+    static std::string get_site_defaults_file (void)
+    {
+      std::string sf = sys::env::getenv ("OCTAVE_VERSION_INITFILE");
+
+      return sf.empty () ? startupfile_dir () + "/octaverc" : sf;
+    }
+
+    std::string prepend_octave_home (const std::string& s)
+    {
+      return prepend_home_dir (octave_home (), s);
+    }
+
+    std::string prepend_octave_exec_home (const std::string& s)
+    {
+      return prepend_home_dir (octave_exec_home (), s);
+    }
+
+    std::string canonical_host_type (void)
+    {
+      static const std::string s_canonical_host_type
+        = OCTAVE_CANONICAL_HOST_TYPE;
+
+      return s_canonical_host_type;
+    }
+
+    std::string release (void)
+    {
+      static const std::string s_octave_release = OCTAVE_RELEASE;
+
+      return s_octave_release;
+    }
+
+    std::string default_pager (void)
+    {
+      static const std::string s_default_pager = OCTAVE_DEFAULT_PAGER;
+
+      return s_default_pager;
+    }
+
+    std::string octave_home (void)
+    {
+      static const std::string s_octave_home = get_octave_home ();
+
+      return s_octave_home;
+    }
+
+    std::string octave_exec_home (void)
+    {
+      static const std::string s_octave_exec_home = get_octave_exec_home ();
+
+      return s_octave_exec_home;
+    }
+
+    std::string bin_dir (void)
+    {
+      static const std::string s_bin_dir
+        = prepend_octave_exec_home (OCTAVE_BINDIR);
+
+      return s_bin_dir;
+    }
+
+    std::string data_dir (void)
+    {
+      static const std::string s_data_dir
+        = prepend_octave_home (OCTAVE_DATADIR);
+
+      return s_data_dir;
+    }
+
+    std::string dataroot_dir (void)
+    {
+      static const std::string s_dataroot_dir
+        = prepend_octave_home (OCTAVE_DATAROOTDIR);
+
+      return s_dataroot_dir;
+    }
+
+    std::string include_dir (void)
+    {
+      static const std::string s_include_dir
+        = prepend_octave_home (OCTAVE_INCLUDEDIR);
+
+      return s_include_dir;
+    }
+
+    std::string lib_dir (void)
+    {
+      static const std::string s_lib_dir
+        = prepend_octave_exec_home (OCTAVE_LIBDIR);
+
+      return s_lib_dir;
+    }
+
+    std::string libexec_dir (void)
+    {
+      static const std::string s_libexec_dir
+        = prepend_octave_exec_home (OCTAVE_LIBEXECDIR);
+
+      return s_libexec_dir;
+    }
+
+    std::string arch_lib_dir (void)
+    {
+      static const std::string s_arch_lib_dir
+        = prepend_octave_exec_home (OCTAVE_ARCHLIBDIR);
+
+      return s_arch_lib_dir;
+    }
+
+    std::string info_dir (void)
+    {
+      static const std::string s_info_dir
+        = prepend_octave_exec_home (OCTAVE_INFODIR);
+
+      return s_info_dir;
+    }
+
+    std::string local_ver_arch_lib_dir (void)
+    {
+      static const std::string s_local_ver_arch_lib_dir
+        = prepend_octave_exec_home (OCTAVE_LOCALVERARCHLIBDIR);
+
+      return s_local_ver_arch_lib_dir;
+    }
+
+    std::string local_api_arch_lib_dir (void)
+    {
+      static const std::string s_local_api_arch_lib_dir
+        = prepend_octave_exec_home (OCTAVE_LOCALAPIARCHLIBDIR);
+
+      return s_local_api_arch_lib_dir;
+    }
+
+    std::string local_arch_lib_dir (void)
+    {
+      static const std::string s_local_arch_lib_dir
+        = prepend_octave_exec_home (OCTAVE_LOCALARCHLIBDIR);
+
+      return s_local_arch_lib_dir;
+    }
+
+    std::string local_ver_oct_file_dir (void)
+    {
+      static const std::string s_local_ver_oct_file_dir
+        = prepend_octave_exec_home (OCTAVE_LOCALVEROCTFILEDIR);
+
+      return s_local_ver_oct_file_dir;
+    }
+
+    std::string local_api_oct_file_dir (void)
+    {
+      static const std::string s_local_api_oct_file_dir
+        = prepend_octave_exec_home (OCTAVE_LOCALAPIOCTFILEDIR);
+
+      return s_local_api_oct_file_dir;
+    }
+
+    std::string local_oct_file_dir (void)
+    {
+      static const std::string s_local_oct_file_dir
+        = prepend_octave_exec_home (OCTAVE_LOCALOCTFILEDIR);
+
+      return s_local_oct_file_dir;
+    }
+
+    std::string oct_file_dir (void)
+    {
+      static const std::string s_oct_file_dir
+        = prepend_octave_exec_home (OCTAVE_OCTFILEDIR);
+
+      return s_oct_file_dir;
+    }
+
+    std::string local_ver_fcn_file_dir (void)
+    {
+      static const std::string s_local_ver_fcn_file_dir
+        = prepend_octave_home (OCTAVE_LOCALVERFCNFILEDIR);
+
+      return s_local_ver_fcn_file_dir;
+    }
+
+    std::string local_api_fcn_file_dir (void)
+    {
+      static const std::string s_local_api_fcn_file_dir
+        = prepend_octave_home (OCTAVE_LOCALAPIFCNFILEDIR);
+
+      return s_local_api_fcn_file_dir;
+    }
+
+    std::string local_fcn_file_dir (void)
+    {
+      static const std::string s_local_fcn_file_dir
+        = prepend_octave_home (OCTAVE_LOCALFCNFILEDIR);
+
+      return s_local_fcn_file_dir;
+    }
+
+    std::string fcn_file_dir (void)
+    {
+      static const std::string s_fcn_file_dir
+        = prepend_octave_home (OCTAVE_FCNFILEDIR);
+
+      return s_fcn_file_dir;
+    }
+
+    std::string oct_data_dir (void)
+    {
+      static const std::string s_oct_data_dir
+        = prepend_octave_home (OCTAVE_OCTDATADIR);
+
+      return s_oct_data_dir;
+    }
+
+    std::string oct_doc_dir (void)
+    {
+      static const std::string s_oct_doc_dir
+        = prepend_octave_home (OCTAVE_OCTDOCDIR);
+
+      return s_oct_doc_dir;
+    }
+
+    std::string oct_etc_dir (void)
+    {
+      static const std::string s_oct_etc_dir
+        = prepend_octave_home (OCTAVE_OCTETCDIR);
+
+      return s_oct_etc_dir;
+    }
+
+    std::string oct_fonts_dir (void)
+    {
+      static const std::string s_oct_fonts_dir
+        = prepend_octave_home (OCTAVE_OCTFONTSDIR);
+
+      return s_oct_fonts_dir;
+    }
+
+    std::string oct_include_dir (void)
+    {
+      static const std::string s_oct_include_dir
+        = prepend_octave_home (OCTAVE_OCTINCLUDEDIR);
+
+      return s_oct_include_dir;
+    }
+
+    std::string oct_lib_dir (void)
+    {
+      static const std::string s_oct_lib_dir
+        = prepend_octave_exec_home (OCTAVE_OCTLIBDIR);
+
+      return s_oct_lib_dir;
+    }
+
+    std::string oct_locale_dir (void)
+    {
+      static const std::string s_oct_locale_dir
+        = prepend_octave_home (OCTAVE_OCTLOCALEDIR);
+
+      return s_oct_locale_dir;
+    }
+
+    std::string oct_tests_dir (void)
+    {
+      static const std::string s_oct_tests_dir
+        = prepend_octave_home (OCTAVE_OCTTESTSDIR);
+
+      return s_oct_tests_dir;
+    }
+
+    std::string man_dir (void)
+    {
+      static const std::string s_man_dir
+        = prepend_octave_home (OCTAVE_MANDIR);
+
+      return s_man_dir;
+    }
+
+    std::string man1_dir (void)
+    {
+      static const std::string s_man1_dir
+        = prepend_octave_home (OCTAVE_MAN1DIR);
+
+      return s_man1_dir;
+    }
+
+    std::string man1_ext (void)
+    {
+      static const std::string s_man1_ext = OCTAVE_MAN1EXT;
+
+      return s_man1_ext;
+    }
+
+    std::string image_dir (void)
+    {
+      static const std::string s_image_dir
+        = prepend_octave_home (OCTAVE_IMAGEDIR);
+
+      return s_image_dir;
+    }
+
+    std::string local_startupfile_dir (void)
+    {
+      static const std::string s_local_startupfile_dir
+        = prepend_octave_home (OCTAVE_LOCALSTARTUPFILEDIR);
+
+      return s_local_startupfile_dir;
+    }
+
+    std::string startupfile_dir (void)
+    {
+      static const std::string s_startupfile_dir
+        = prepend_octave_home (OCTAVE_STARTUPFILEDIR);
+
+      return s_startupfile_dir;
+    }
+
+    std::string local_site_defaults_file (void)
+    {
+      static const std::string s_local_site_defaults_file
+        = get_local_site_defaults_file ();
+
+      return s_local_site_defaults_file;
+    }
+
+    std::string site_defaults_file (void)
+    {
+      static const std::string s_site_defaults_file
+        = get_site_defaults_file ();
+
+      return s_site_defaults_file;
+    }
+  }
+}
+
+
+DEFUN (OCTAVE_HOME, args, ,
+       doc: /* -*- texinfo -*-
+@deftypefn {} {} OCTAVE_HOME ()
+Return the name of the top-level Octave installation directory.
+OCTAVE_HOME corresponds to the configuration variable @var{prefix}.
+@seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_EXEC_HOME}
+@end deftypefn */)
+{
+  if (args.length () != 0)
+    print_usage ();
+
+  return ovl (octave::config::octave_home ());
+}
+
+/*
+%!assert (ischar (OCTAVE_HOME ()))
+%!error OCTAVE_HOME (1)
+*/
+
+DEFUN (OCTAVE_EXEC_HOME, args, ,
+       doc: /* -*- texinfo -*-
+@deftypefn {} {} OCTAVE_HOME ()
+Return the name of the top-level Octave installation directory for
+architecture-dependent files.  If not specified separately, the value
+is the same as OCTAVE_HOME@.  OCTAVE_EXEC_HOME corresponds to the
+configuration variable @var{exec_prefix}.
+@seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_HOME}
+@end deftypefn */)
+{
+  if (args.length () != 0)
+    print_usage ();
+
+  return ovl (octave::config::octave_exec_home ());
+}
+
+/*
+%!assert (ischar (OCTAVE_EXEC_HOME ()))
+%!error OCTAVE_EXEC_HOME (1)
+*/
+
+DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, ,
+        doc: /* -*- texinfo -*-
+@deftypefn {} {} OCTAVE_VERSION ()
+Return the version number of Octave as a string.
+@seealso{ver, version}
+@end deftypefn */)
+{
+  if (args.length () != 0)
+    print_usage ();
+
+  return ovl (OCTAVE_VERSION);
+}
+
+/*
+%!assert (ischar (OCTAVE_VERSION ()))
+%!error OCTAVE_VERSION (1)
+*/
--- a/libinterp/corefcn/defaults.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/defaults.h	Tue Jun 12 13:03:04 2018 -0400
@@ -27,393 +27,77 @@
 
 #include <string>
 
-#include "installation-data.h"
+#include "pathsearch.h"
 
 namespace octave
 {
   namespace config
   {
-#if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::prepend_octave_home' instead")
-    inline std::string prepend_octave_home (const std::string& s)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("prepend_octave_home");
-
-      return inst_data.prepend_home (s);
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::prepend_octave_exec_home' instead")
-    inline std::string prepend_octave_exec_home (const std::string& s)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("prepend_octave_exec_home");
-
-      return inst_data.prepend_exec_home (s);
-    }
+    extern OCTINTERP_API std::string
+    prepend_octave_home (const std::string& s);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::canonical_host_type' instead")
-    inline std::string canonical_host_type (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("canonical_host_type");
-
-      return inst_data.canonical_host_type ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::release' instead")
-    inline std::string release (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("release");
-
-      return inst_data.release ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::default_pager' instead")
-    inline std::string default_pager (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("default_pager");
+    extern OCTINTERP_API std::string
+    prepend_octave_exec_home (const std::string& s);
 
-      return inst_data.default_pager ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::octave_home' instead")
-    inline std::string octave_home (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("octave_home");
-
-      return inst_data.home ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::octave_exec_home' instead")
-    inline std::string octave_exec_home (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("octave_exec_home");
-
-      return inst_data.exec_home ();
-    }
+    // These could be defined as pure constants, but we'll use
+    // functions to be consistent with the values that require
+    // initialization.
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::bin_dir' instead")
-    inline std::string bin_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("bin_dir");
-
-      return inst_data.bin_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::data_dir' instead")
-    inline std::string data_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("data_dir");
-
-      return inst_data.data_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::dataroot_dir' instead")
-    inline std::string dataroot_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("dataroot_dir");
-
-      return inst_data.dataroot_dir ();
-    }
+    extern OCTINTERP_API std::string canonical_host_type (void);
+    extern OCTINTERP_API std::string release (void);
+    extern OCTINTERP_API std::string default_pager (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::include_dir' instead")
-    inline std::string include_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("include_dir");
-
-      return inst_data.include_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::lib_dir' instead")
-    inline std::string lib_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("lib_dir");
-
-      return inst_data.lib_dir ();
-    }
+    // These require initialization, so can't be defined as pure
+    // constants.  We use functions to access these values so that
+    // they can't be modified by users.
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::libexec_dir' instead")
-    inline std::string libexec_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("libexec_dir");
-
-      return inst_data.libexec_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_ver_arch_lib_dir' instead")
-    inline std::string arch_lib_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("arch_lib_dir");
-
-      return inst_data.arch_lib_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_api_arch_lib_dir' instead")
-    inline std::string info_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("info_dir");
-
-      return inst_data.info_dir ();
-    }
+    extern OCTINTERP_API std::string octave_home (void);
+    extern OCTINTERP_API std::string octave_exec_home (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_arch_lib_dir' instead")
-    inline std::string local_ver_arch_lib_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_ver_arch_lib_dir");
-
-      return inst_data.local_ver_arch_lib_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::arch_lib_dir' instead")
-    inline std::string local_api_arch_lib_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_api_arch_lib_dir");
-
-      return inst_data.local_api_arch_lib_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_ver_oct_file_dir' instead")
-    inline std::string local_arch_lib_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_arch_lib_dir");
-
-      return inst_data.local_arch_lib_dir ();
-    }
+    extern OCTINTERP_API std::string bin_dir (void);
+    extern OCTINTERP_API std::string data_dir (void);
+    extern OCTINTERP_API std::string dataroot_dir (void);
+    extern OCTINTERP_API std::string include_dir (void);
+    extern OCTINTERP_API std::string lib_dir (void);
+    extern OCTINTERP_API std::string libexec_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_api_oct_file_dir' instead")
-    inline std::string local_ver_oct_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_ver_oct_file_dir");
-
-      return inst_data.local_ver_oct_file_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_oct_file_dir' instead")
-    inline std::string local_api_oct_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_api_oct_file_dir");
-
-      return inst_data.local_api_oct_file_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_file_dir' instead")
-    inline std::string local_oct_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_oct_file_dir");
-
-      return inst_data.local_oct_file_dir ();
-    }
+    extern OCTINTERP_API std::string local_ver_arch_lib_dir (void);
+    extern OCTINTERP_API std::string local_api_arch_lib_dir (void);
+    extern OCTINTERP_API std::string local_arch_lib_dir (void);
+    extern OCTINTERP_API std::string arch_lib_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_ver_fcn_file_dir' instead")
-    inline std::string oct_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_file_dir");
-
-      return inst_data.oct_file_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_api_fcn_file_dir' instead")
-    inline std::string local_ver_fcn_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_ver_fcn_file_dir");
-
-      return inst_data.local_ver_fcn_file_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_fcn_file_dir' instead")
-    inline std::string local_api_fcn_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_api_fcn_file_dir");
-
-      return inst_data.local_api_fcn_file_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::fcn_file_dir' instead")
-    inline std::string local_fcn_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_fcn_file_dir");
-
-      return inst_data.local_fcn_file_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_data_dir' instead")
-    inline std::string fcn_file_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("fcn_file_dir");
-
-      return inst_data.fcn_file_dir ();
-    }
+    extern OCTINTERP_API std::string local_ver_oct_file_dir (void);
+    extern OCTINTERP_API std::string local_api_oct_file_dir (void);
+    extern OCTINTERP_API std::string local_oct_file_dir (void);
+    extern OCTINTERP_API std::string oct_file_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_doc_dir' instead")
-    inline std::string oct_data_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_data_dir");
-
-      return inst_data.oct_data_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_etc_dir' instead")
-    inline std::string oct_doc_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_doc_dir");
-
-      return inst_data.oct_doc_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_fonts_dir' instead")
-    inline std::string oct_etc_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_etc_dir");
-
-      return inst_data.oct_etc_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_include_dir' instead")
-    inline std::string oct_fonts_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_fonts_dir");
-
-      return inst_data.oct_fonts_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_lib_dir' instead")
-    inline std::string oct_include_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_include_dir");
-
-      return inst_data.oct_include_dir ();
-    }
+    extern OCTINTERP_API std::string local_ver_fcn_file_dir (void);
+    extern OCTINTERP_API std::string local_api_fcn_file_dir (void);
+    extern OCTINTERP_API std::string local_fcn_file_dir (void);
+    extern OCTINTERP_API std::string fcn_file_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_locale_dir' instead")
-    inline std::string oct_lib_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_lib_dir");
-
-      return inst_data.oct_lib_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::oct_tests_dir' instead")
-    inline std::string oct_locale_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_locale_dir");
-
-      return inst_data.oct_locale_dir ();
-    }
+    extern OCTINTERP_API std::string oct_data_dir (void);
+    extern OCTINTERP_API std::string oct_doc_dir (void);
+    extern OCTINTERP_API std::string oct_etc_dir (void);
+    extern OCTINTERP_API std::string oct_fonts_dir (void);
+    extern OCTINTERP_API std::string oct_include_dir (void);
+    extern OCTINTERP_API std::string oct_lib_dir (void);
+    extern OCTINTERP_API std::string oct_locale_dir (void);
+    extern OCTINTERP_API std::string oct_tests_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::info_dir' instead")
-    inline std::string oct_tests_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("oct_tests_dir");
-
-      return inst_data.oct_tests_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::man_dir' instead")
-    inline std::string man_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("man_dir");
-
-      return inst_data.man_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::man1_dir' instead")
-    inline std::string man1_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("man1_dir");
-
-      return inst_data.man1_dir ();
-    }
+    extern OCTINTERP_API std::string info_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::man1_ext' instead")
-    inline std::string man1_ext (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("man1_ext");
-
-      return inst_data.man1_ext ();
-    }
+    extern OCTINTERP_API std::string man_dir (void);
+    extern OCTINTERP_API std::string man1_dir (void);
+    extern OCTINTERP_API std::string man1_ext (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::image_dir' instead")
-    inline std::string image_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("image_dir");
-
-      return inst_data.image_dir ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_startupfile_dir' instead")
-    inline std::string local_startupfile_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_startupfile_dir");
-
-      return inst_data.local_startupfile_dir ();
-    }
+    extern OCTINTERP_API std::string image_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::startupfile_dir' instead")
-    inline std::string startupfile_dir (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("startupfile_dir");
-
-      return inst_data.startupfile_dir ();
-    }
+    extern OCTINTERP_API std::string local_startupfile_dir (void);
+    extern OCTINTERP_API std::string startupfile_dir (void);
 
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::local_site_defaults_file' instead")
-    inline std::string local_site_defaults_file (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("local_site_defaults_file");
-
-      return inst_data.local_site_defaults_file ();
-    }
-
-    OCTAVE_DEPRECATED (5, "use 'octave::installation_data::site_defaults_file' instead")
-    inline std::string site_defaults_file (void)
-    {
-      installation_data& inst_data
-        = __get_installation_data__ ("site_defaults_file");
-
-      return inst_data.site_defaults_file ();
-    }
-
-#endif
+    extern OCTINTERP_API std::string local_site_defaults_file (void);
+    extern OCTINTERP_API std::string site_defaults_file (void);
   }
 }
 
--- a/libinterp/corefcn/environment.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/environment.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -32,9 +32,9 @@
 #include "pathsearch.h"
 #include "str-vec.h"
 
+#include "defaults.h"
 #include "defun.h"
 #include "environment.h"
-#include "installation-data.h"
 #include "interpreter.h"
 #include "variables.h"
 
@@ -113,30 +113,25 @@
     return retval;
   }
 
-  std::string environment::init_exec_path (interpreter& interp)
+  std::string environment::init_exec_path (void)
   {
     std::string exec_path = sys::env::getenv ("OCTAVE_EXEC_PATH");
 
     std::string path_sep = directory_path::path_sep_str ();
 
     if (exec_path.empty ())
-      {
-        installation_data& inst_data = interp.get_installation_data ();
-
-        exec_path = (inst_data.local_ver_arch_lib_dir () + path_sep
-                     + inst_data.local_api_arch_lib_dir () + path_sep
-                     + inst_data.local_arch_lib_dir () + path_sep
-                     + inst_data.arch_lib_dir () + path_sep
-                     + inst_data.bin_dir ());
-
-      }
+      exec_path = (config::local_ver_arch_lib_dir () + path_sep
+                   + config::local_api_arch_lib_dir () + path_sep
+                   + config::local_arch_lib_dir () + path_sep
+                   + config::arch_lib_dir () + path_sep
+                   + config::bin_dir ());
 
     append_to_shell_path (exec_path);
 
     return exec_path;
   }
 
-  std::string environment::init_image_path (interpreter& interp)
+  std::string environment::init_image_path (void)
   {
     std::string image_path = ".";
 
@@ -147,9 +142,7 @@
     if (! env_path.empty ())
       image_path += path_sep + env_path;
 
-    installation_data& inst_data = interp.get_installation_data ();
-
-    std::string gen_path = genpath (inst_data.image_dir (), "");
+    std::string gen_path = genpath (config::image_dir (), "");
 
     if (! gen_path.empty ())
       image_path += path_sep + gen_path;
--- a/libinterp/corefcn/environment.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/environment.h	Tue Jun 12 13:03:04 2018 -0400
@@ -32,16 +32,14 @@
 
 namespace octave
 {
-  class interpreter;
-
   class environment
   {
   public:
 
-    environment (interpreter& interp)
+    environment (void)
       : m_editor (init_editor ()),
-        m_exec_path (init_exec_path (interp)),
-        m_image_path (init_image_path (interp))
+        m_exec_path (init_exec_path ()),
+        m_image_path (init_image_path ())
     { }
 
     octave_value editor (const octave_value_list& args, int nargout);
@@ -78,9 +76,9 @@
 
     static std::string init_editor (void);
 
-    static std::string init_exec_path (interpreter& interp);
+    static std::string init_exec_path (void);
 
-    static std::string init_image_path (interpreter& interp);
+    static std::string init_image_path (void);
 
     std::string set (std::string& var, const std::string& new_val)
     {
--- a/libinterp/corefcn/ft-text-renderer.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/ft-text-renderer.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -54,10 +54,9 @@
 #include "singleton-cleanup.h"
 #include "unistr-wrappers.h"
 
+#include "defaults.h"
 #include "error.h"
 #include "file-ops.h"
-#include "installation-data.h"
-#include "interpreter-private.h"
 #include "oct-env.h"
 #include "pr-output.h"
 #include "text-renderer.h"
@@ -214,15 +213,10 @@
           fonts_dir = sys::env::getenv ("OCTAVE_FONTS_DIR");
 
           if (fonts_dir.empty ())
-            {
 #if defined (SYSTEM_FREEFONT_DIR)
-              fonts_dir = SYSTEM_FREEFONT_DIR;
+            fonts_dir = SYSTEM_FREEFONT_DIR;
 #else
-              installation_data& inst_data
-                = __get_installation_data__ ("do_get_font");
-
-              fonts_dir = inst_data.oct_fonts_dir ();
-            }
+            fonts_dir = config::oct_fonts_dir ();
 #endif
         }
 
--- a/libinterp/corefcn/help.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/help.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -44,13 +44,13 @@
 #include "Cell.h"
 #include "builtin-defun-decls.h"
 #include "call-stack.h"
+#include "defaults.h"
 #include "defun.h"
 #include "dirfns.h"
 #include "error.h"
 #include "errwarn.h"
 #include "help.h"
 #include "input.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "load-path.h"
@@ -427,36 +427,30 @@
       }
   }
 
-  std::string help_system::init_built_in_docstrings_file (interpreter& interp)
+  std::string help_system::init_built_in_docstrings_file (void)
   {
-    installation_data& inst_data = interp.get_installation_data ();
-
     std::string df = sys::env::getenv ("OCTAVE_BUILT_IN_DOCSTRINGS_FILE");
 
     std::string dir_sep = sys::file_ops::dir_sep_str ();
 
     if (df.empty ())
-      df = inst_data.oct_etc_dir () + dir_sep + "built-in-docstrings";
+      df = config::oct_etc_dir () + dir_sep + "built-in-docstrings";
 
     return df;
   }
 
-  std::string help_system::init_doc_cache_file (interpreter& interp)
+  std::string help_system::init_doc_cache_file (void)
   {
-    installation_data& inst_data = interp.get_installation_data ();
-
-    std::string def_file = inst_data.prepend_home (OCTAVE_DOC_CACHE_FILE);
+    std::string def_file = config::prepend_octave_home (OCTAVE_DOC_CACHE_FILE);
 
     std::string env_file = sys::env::getenv ("OCTAVE_DOC_CACHE_FILE");
 
     return (env_file.empty () ? def_file : env_file);
   }
 
-  std::string help_system::init_info_file (interpreter& interp)
+  std::string help_system::init_info_file (void)
   {
-    installation_data& inst_data = interp.get_installation_data ();
-
-    std::string std_info_file = inst_data.prepend_home (OCTAVE_INFOFILE);
+    std::string std_info_file = config::prepend_octave_home (OCTAVE_INFOFILE);
 
     std::string oct_info_file = sys::env::getenv ("OCTAVE_INFO_FILE");
 
@@ -473,12 +467,10 @@
     return info_prog;
   }
 
-  std::string help_system::init_texi_macros_file (interpreter& interp)
+  std::string help_system::init_texi_macros_file (void)
   {
-    installation_data& inst_data = interp.get_installation_data ();
-
     std::string def_file
-      = inst_data.prepend_home (OCTAVE_TEXI_MACROS_FILE);
+      = config::prepend_octave_home (OCTAVE_TEXI_MACROS_FILE);
 
     std::string env_file = sys::env::getenv ("OCTAVE_TEXI_MACROS_FILE");
 
--- a/libinterp/corefcn/help.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/help.h	Tue Jun 12 13:03:04 2018 -0400
@@ -43,13 +43,13 @@
 
     help_system (interpreter& interp)
       : m_interpreter (interp),
-        m_built_in_docstrings_file (init_built_in_docstrings_file (interp)),
-        m_doc_cache_file (init_doc_cache_file (interp)),
-        m_info_file (init_info_file (interp)),
+        m_built_in_docstrings_file (init_built_in_docstrings_file ()),
+        m_doc_cache_file (init_doc_cache_file ()),
+        m_info_file (init_info_file ()),
         m_info_program (init_info_program ()),
         m_makeinfo_program ("makeinfo"),
         m_suppress_verbose_help_message (false),
-        m_texi_macros_file (init_texi_macros_file (interp))
+        m_texi_macros_file (init_texi_macros_file ())
     { }
 
     octave_value
@@ -166,15 +166,15 @@
     // (--texi-macros-file)
     std::string m_texi_macros_file;
 
-    static std::string init_built_in_docstrings_file (interpreter& interp);
+    static std::string init_built_in_docstrings_file (void);
 
-    static std::string init_doc_cache_file (interpreter& interp);
+    static std::string init_doc_cache_file (void);
 
-    static std::string init_info_file (interpreter& interp);
+    static std::string init_info_file (void);
 
     static std::string init_info_program (void);
 
-    static std::string init_texi_macros_file (interpreter& interp);
+    static std::string init_texi_macros_file (void);
 
     template <typename T>
     T set (T& var, const T& new_val)
--- a/libinterp/corefcn/installation-data.cc	Tue Jun 12 10:31:13 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,251 +0,0 @@
-/*
-
-Copyright (C) 1996-2018 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Octave is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<https://www.gnu.org/licenses/>.
-
-*/
-
-#if defined (HAVE_CONFIG_H)
-#  include "config.h"
-#endif
-
-#include <algorithm>
-#include <string>
-
-#include "dir-ops.h"
-#include "file-ops.h"
-#include "oct-env.h"
-
-#include "defun.h"
-#include "installation-data.h"
-#include "interpreter-private.h"
-#include "interpreter.h"
-#include "ovl.h"
-#include "ov.h"
-#include "variables.h"
-#include "version.h"
-
-#include "default-defs.h"
-
-// Variables that name directories or files are substituted into source
-// files with "${prefix}/" stripped from the beginning of the string.
-
-// All configure variables of this form should be specified as absolute
-// directory names.  The only ones that should not be absolute here are
-// ones that have had "${prefix}/" or "${exec_prefix} stripped.
-
-namespace octave
-{
-  static std::string
-  prepend_dir (const std::string& dir, const std::string& s)
-  {
-    std::string retval = s;
-
-    char dir_sep_char = octave::sys::file_ops::dir_sep_char ();
-
-    if (! octave::sys::env::absolute_pathname (retval))
-      retval = dir + dir_sep_char + s;
-
-    if (dir_sep_char != '/')
-      std::replace (retval.begin (), retval.end (), '/', dir_sep_char);
-
-    return retval;
-  }
-
-  installation_data::installation_data (void)
-  {
-    m_canonical_host_type = OCTAVE_CANONICAL_HOST_TYPE;
-    m_release = OCTAVE_RELEASE;
-    m_default_pager = OCTAVE_DEFAULT_PAGER;
-
-    // OCTAVE_HOME must be set before other variables that depend on it.
-
-    set_home ();
-
-    m_bin_dir = prepend_exec_home (OCTAVE_BINDIR);
-    m_data_dir = prepend_home (OCTAVE_DATADIR);
-    m_dataroot_dir = prepend_home (OCTAVE_DATAROOTDIR);
-    m_include_dir = prepend_home (OCTAVE_INCLUDEDIR);
-    m_lib_dir = prepend_exec_home (OCTAVE_LIBDIR);
-    m_libexec_dir = prepend_exec_home (OCTAVE_LIBEXECDIR);
-
-    m_local_ver_arch_lib_dir
-      = prepend_exec_home (OCTAVE_LOCALVERARCHLIBDIR);
-    m_local_api_arch_lib_dir
-      = prepend_exec_home (OCTAVE_LOCALAPIARCHLIBDIR);
-    m_local_arch_lib_dir = prepend_exec_home (OCTAVE_LOCALARCHLIBDIR);
-    m_arch_lib_dir = prepend_exec_home (OCTAVE_ARCHLIBDIR);
-
-    m_local_ver_oct_file_dir
-      = prepend_exec_home (OCTAVE_LOCALVEROCTFILEDIR);
-    m_local_api_oct_file_dir
-      = prepend_exec_home (OCTAVE_LOCALAPIOCTFILEDIR);
-    m_local_oct_file_dir = prepend_exec_home (OCTAVE_LOCALOCTFILEDIR);
-    m_oct_file_dir = prepend_exec_home (OCTAVE_OCTFILEDIR);
-
-    m_local_ver_fcn_file_dir = prepend_home (OCTAVE_LOCALVERFCNFILEDIR);
-    m_local_api_fcn_file_dir = prepend_home (OCTAVE_LOCALAPIFCNFILEDIR);
-    m_local_fcn_file_dir = prepend_home (OCTAVE_LOCALFCNFILEDIR);
-    m_fcn_file_dir = prepend_home (OCTAVE_FCNFILEDIR);
-
-    m_oct_data_dir = prepend_home (OCTAVE_OCTDATADIR);
-    m_oct_doc_dir = prepend_home (OCTAVE_OCTDOCDIR);
-    m_oct_etc_dir = prepend_home (OCTAVE_OCTETCDIR);
-    m_oct_fonts_dir = prepend_home (OCTAVE_OCTFONTSDIR);
-    m_oct_include_dir = prepend_home (OCTAVE_OCTINCLUDEDIR);
-    m_oct_lib_dir = prepend_exec_home (OCTAVE_OCTLIBDIR);
-    m_oct_locale_dir = prepend_home (OCTAVE_OCTLOCALEDIR);
-    m_oct_tests_dir = prepend_home (OCTAVE_OCTTESTSDIR);
-
-    m_info_dir = prepend_home (OCTAVE_INFODIR);
-
-    m_man_dir = prepend_home (OCTAVE_MANDIR);
-    m_man1_dir = prepend_home (OCTAVE_MAN1DIR);
-    m_man1_ext = OCTAVE_MAN1EXT;
-
-    m_image_dir = prepend_home (OCTAVE_IMAGEDIR);
-
-    m_local_startupfile_dir = prepend_home (OCTAVE_LOCALSTARTUPFILEDIR);
-    m_startupfile_dir = prepend_home (OCTAVE_STARTUPFILEDIR);
-
-    set_local_site_defaults_file ();
-
-    set_site_defaults_file ();
-  }
-
-  std::string installation_data::prepend_home (const std::string& s) const
-  {
-    return prepend_dir (m_home, s);
-  }
-
-  std::string installation_data::prepend_exec_home (const std::string& s) const
-  {
-    return prepend_dir (m_exec_home, s);
-  }
-
-  void installation_data::set_home (void)
-  {
-    std::string op = OCTAVE_PREFIX;
-    std::string oep = OCTAVE_EXEC_PREFIX;
-
-    std::string oh = sys::env::getenv ("OCTAVE_HOME");
-    std::string oeh = sys::env::getenv ("OCTAVE_EXEC_HOME");
-
-    // If OCTAVE_HOME is set in the enviornment, use that.  Otherwise,
-    // default to ${prefix} from configure.
-
-    m_home = (oh.empty () ? op : oh);
-
-    // If OCTAVE_EXEC_HOME is set in the environment, use that.
-    // Otherwise, if ${prefix} and ${exec_prefix} from configure are set
-    // to the same value, use OCTAVE_HOME from the environment if it is set.
-    // Othewise, default to ${exec_prefix} from configure.
-
-    if (! oeh.empty ())
-      m_exec_home = oeh;
-    else
-      {
-        if (op == oep && ! oh.empty ())
-          m_exec_home = oh;
-        else
-          m_exec_home = oep;
-      }
-  }
-
-  void installation_data::set_local_site_defaults_file (void)
-  {
-    std::string lsf = sys::env::getenv ("OCTAVE_SITE_INITFILE");
-
-    if (lsf.empty ())
-      m_local_site_defaults_file = m_local_startupfile_dir + "/octaverc";
-    else
-      m_local_site_defaults_file = lsf;
-  }
-
-  void installation_data::set_site_defaults_file (void)
-  {
-    std::string sf = sys::env::getenv ("OCTAVE_VERSION_INITFILE");
-
-    if (sf.empty ())
-      m_site_defaults_file = m_startupfile_dir + "/octaverc";
-    else
-      m_site_defaults_file = sf;
-  }
-}
-
-DEFMETHOD (OCTAVE_HOME, interp, args, ,
-           doc: /* -*- texinfo -*-
-@deftypefn {} {} OCTAVE_HOME ()
-Return the name of the top-level Octave installation directory.
-OCTAVE_HOME corresponds to the configuration variable @var{prefix}.
-@seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_EXEC_HOME}
-@end deftypefn */)
-{
-  if (args.length () != 0)
-    print_usage ();
-
-  octave::installation_data& inst_data = interp.get_installation_data ();
-
-  return ovl (inst_data.home ());
-}
-
-/*
-%!assert (ischar (OCTAVE_HOME ()))
-%!error OCTAVE_HOME (1)
-*/
-
-DEFMETHOD (OCTAVE_EXEC_HOME, interp, args, ,
-           doc: /* -*- texinfo -*-
-@deftypefn {} {} OCTAVE_HOME ()
-Return the name of the top-level Octave installation directory for
-architecture-dependent files.  If not specified separately, the value
-is the same as OCTAVE_HOME@.  OCTAVE_EXEC_HOME corresponds to the
-configuration variable @var{exec_prefix}.
-@seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_HOME}
-@end deftypefn */)
-{
-  if (args.length () != 0)
-    print_usage ();
-
-  octave::installation_data& inst_data = interp.get_installation_data ();
-
-  return ovl (inst_data.exec_home ());
-}
-
-/*
-%!assert (ischar (OCTAVE_EXEC_HOME ()))
-%!error OCTAVE_EXEC_HOME (1)
-*/
-
-DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, ,
-        doc: /* -*- texinfo -*-
-@deftypefn {} {} OCTAVE_VERSION ()
-Return the version number of Octave as a string.
-@seealso{ver, version}
-@end deftypefn */)
-{
-  if (args.length () != 0)
-    print_usage ();
-
-  return ovl (OCTAVE_VERSION);
-}
-
-/*
-%!assert (ischar (OCTAVE_VERSION ()))
-%!error OCTAVE_VERSION (1)
-*/
--- a/libinterp/corefcn/installation-data.h	Tue Jun 12 10:31:13 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,311 +0,0 @@
-/*
-
-Copyright (C) 1993-2018 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Octave is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<https://www.gnu.org/licenses/>.
-
-*/
-
-#if ! defined (octave_installation_data_h)
-#define octave_installation_data_h 1
-
-#include "octave-config.h"
-
-#include <string>
-
-namespace octave
-{
-  class
-  installation_data
-  {
-  public:
-
-    installation_data (void);
-
-    installation_data (const installation_data&) = delete;
-
-    installation_data& operator = (const installation_data&) = delete;
-
-    ~installation_data (void) = default;
-
-    std::string canonical_host_type (void) const
-    {
-      return m_canonical_host_type;
-    }
-
-    std::string release (void) const
-    {
-      return m_release;
-    }
-
-    std::string default_pager (void) const
-    {
-      return m_default_pager;
-    }
-
-    std::string home (void) const
-    {
-      return m_home;
-    }
-
-    std::string exec_home (void) const
-    {
-      return m_exec_home;
-    }
-
-    std::string bin_dir (void) const
-    {
-      return m_bin_dir;
-    }
-
-    std::string data_dir (void) const
-    {
-      return m_data_dir;
-    }
-
-    std::string dataroot_dir (void) const
-    {
-      return m_dataroot_dir;
-    }
-
-    std::string include_dir (void) const
-    {
-      return m_include_dir;
-    }
-
-    std::string lib_dir (void) const
-    {
-      return m_lib_dir;
-    }
-
-    std::string libexec_dir (void) const
-    {
-      return m_libexec_dir;
-    }
-
-    std::string local_ver_arch_lib_dir (void) const
-    {
-      return m_local_ver_arch_lib_dir;
-    }
-
-    std::string local_api_arch_lib_dir (void) const
-    {
-      return m_local_api_arch_lib_dir;
-    }
-
-    std::string local_arch_lib_dir (void) const
-    {
-      return m_local_arch_lib_dir;
-    }
-
-    std::string arch_lib_dir (void) const
-    {
-      return m_arch_lib_dir;
-    }
-
-    std::string local_ver_oct_file_dir (void) const
-    {
-      return m_local_ver_oct_file_dir;
-    }
-
-    std::string local_api_oct_file_dir (void) const
-    {
-      return m_local_api_oct_file_dir;
-    }
-
-    std::string local_oct_file_dir (void) const
-    {
-      return m_local_oct_file_dir;
-    }
-
-    std::string oct_file_dir (void) const
-    {
-      return m_oct_file_dir;
-    }
-
-    std::string local_ver_fcn_file_dir (void) const
-    {
-      return m_local_ver_fcn_file_dir;
-    }
-
-    std::string local_api_fcn_file_dir (void) const
-    {
-      return m_local_api_fcn_file_dir;
-    }
-
-    std::string local_fcn_file_dir (void) const
-    {
-      return m_local_fcn_file_dir;
-    }
-
-    std::string fcn_file_dir (void) const
-    {
-      return m_fcn_file_dir;
-    }
-
-    std::string oct_data_dir (void) const
-    {
-      return m_oct_data_dir;
-    }
-
-    std::string oct_doc_dir (void) const
-    {
-      return m_oct_doc_dir;
-    }
-
-    std::string oct_etc_dir (void) const
-    {
-      return m_oct_etc_dir;
-    }
-
-    std::string oct_fonts_dir (void) const
-    {
-      return m_oct_fonts_dir;
-    }
-
-    std::string oct_include_dir (void) const
-    {
-      return m_oct_include_dir;
-    }
-
-    std::string oct_lib_dir (void) const
-    {
-      return m_oct_lib_dir;
-    }
-
-    std::string oct_locale_dir (void) const
-    {
-      return m_oct_locale_dir;
-    }
-
-    std::string oct_tests_dir (void) const
-    {
-      return m_oct_tests_dir;
-    }
-
-    std::string info_dir (void) const
-    {
-      return m_info_dir;
-    }
-
-    std::string man_dir (void) const
-    {
-      return m_man_dir;
-    }
-
-    std::string man1_dir (void) const
-    {
-      return m_man1_dir;
-    }
-
-    std::string man1_ext (void) const
-    {
-      return m_man1_ext;
-    }
-
-    std::string image_dir (void) const
-    {
-      return m_image_dir;
-    }
-
-    std::string local_startupfile_dir (void) const
-    {
-      return m_local_startupfile_dir;
-    }
-
-    std::string startupfile_dir (void) const
-    {
-      return m_startupfile_dir;
-    }
-
-    std::string local_site_defaults_file (void) const
-    {
-      return m_local_site_defaults_file;
-    }
-
-    std::string site_defaults_file (void) const
-    {
-      return m_site_defaults_file;
-    }
-
-    std::string prepend_home (const std::string& s) const;
-
-    std::string prepend_exec_home (const std::string& s) const;
-
-  private:
-
-    void set_home (void);
-
-    void set_local_site_defaults_file (void);
-
-    void set_site_defaults_file (void);
-
-    std::string m_canonical_host_type;
-    std::string m_release;
-    std::string m_default_pager;
-
-    std::string m_home;
-    std::string m_exec_home;
-
-    std::string m_bin_dir;
-    std::string m_data_dir;
-    std::string m_dataroot_dir;
-    std::string m_include_dir;
-    std::string m_lib_dir;
-    std::string m_libexec_dir;
-
-    std::string m_local_ver_arch_lib_dir;
-    std::string m_local_api_arch_lib_dir;
-    std::string m_local_arch_lib_dir;
-    std::string m_arch_lib_dir;
-
-    std::string m_local_ver_oct_file_dir;
-    std::string m_local_api_oct_file_dir;
-    std::string m_local_oct_file_dir;
-    std::string m_oct_file_dir;
-
-    std::string m_local_ver_fcn_file_dir;
-    std::string m_local_api_fcn_file_dir;
-    std::string m_local_fcn_file_dir;
-    std::string m_fcn_file_dir;
-
-    std::string m_oct_data_dir;
-    std::string m_oct_doc_dir;
-    std::string m_oct_etc_dir;
-    std::string m_oct_fonts_dir;
-    std::string m_oct_include_dir;
-    std::string m_oct_lib_dir;
-    std::string m_oct_locale_dir;
-    std::string m_oct_tests_dir;
-
-    std::string m_info_dir;
-
-    std::string m_man_dir;
-    std::string m_man1_dir;
-    std::string m_man1_ext;
-
-    std::string m_image_dir;
-
-    std::string m_local_startupfile_dir;
-    std::string m_startupfile_dir;
-
-    std::string m_local_site_defaults_file;
-    std::string m_site_defaults_file;
-  };
-}
-
-#endif
--- a/libinterp/corefcn/interpreter-private.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/interpreter-private.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -55,13 +55,6 @@
     return *interp;
   }
 
-  installation_data& __get_installation_data__ (const std::string& who)
-  {
-    interpreter& interp = __get_interpreter__ (who);
-
-    return interp.get_installation_data ();
-  }
-
   dynamic_loader& __get_dynamic_loader__ (const std::string& who)
   {
     interpreter& interp = __get_interpreter__ (who);
--- a/libinterp/corefcn/interpreter-private.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/interpreter-private.h	Tue Jun 12 13:03:04 2018 -0400
@@ -36,7 +36,6 @@
   class bp_table;
   class call_stack;
   class child_list;
-  class installation_data;
   class dynamic_loader;
   class gtk_manager;
   class help_system;
@@ -49,8 +48,6 @@
 
   extern interpreter& __get_interpreter__ (const std::string& who);
 
-  extern installation_data& __get_installation_data__ (const std::string& who);
-
   extern dynamic_loader& __get_dynamic_loader__ (const std::string& who);
 
   extern help_system& __get_help_system__ (const std::string& who);
--- a/libinterp/corefcn/interpreter.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/interpreter.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -38,8 +38,9 @@
 #include "signal-wrappers.h"
 #include "unistd-wrappers.h"
 
+#include "builtin-defun-decls.h"
+#include "defaults.h"
 #include "Cell.h"
-#include "builtin-defun-decls.h"
 #include "call-stack.h"
 #include "defun.h"
 #include "display.h"
@@ -48,19 +49,18 @@
 #include "graphics.h"
 #include "help.h"
 #include "input.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "load-path.h"
 #include "load-save.h"
+#include "octave-link.h"
+#include "octave.h"
 #include "oct-hist.h"
 #include "oct-map.h"
 #include "oct-mutex.h"
-#include "octave-link.h"
-#include "octave.h"
+#include "ovl.h"
+#include "ov.h"
 #include "ov-classdef.h"
-#include "ov.h"
-#include "ovl.h"
 #include "parse.h"
 #include "pt-eval.h"
 #include "pt-jump.h"
@@ -89,10 +89,6 @@
 Undocumented internal function.
 @end deftypefn */)
 {
-  // FIXME: this seems backwards.  Shouldn't the version info be stored
-  // in the interpreter object and simply returned from this function
-  // instead of being stored in a static here?
-
   static octave_map vinfo;
 
   int nargin = args.length ();
@@ -131,6 +127,19 @@
   return retval;
 }
 
+static void
+initialize_version_info (void)
+{
+  octave_value_list args;
+
+  args(3) = OCTAVE_RELEASE_DATE;
+  args(2) = octave::config::release ();
+  args(1) = OCTAVE_VERSION;
+  args(0) = "GNU Octave";
+
+  F__version_info__ (args, 0);
+}
+
 OCTAVE_NORETURN static void
 lo_error_handler (const char *fmt, ...)
 {
@@ -316,14 +325,13 @@
 
   interpreter::interpreter (application *app_context)
     : m_app_context (app_context),
-      m_installation_data (),
-      m_environment (*this),
+      m_environment (),
       m_settings (),
       m_help_system (*this),
       m_input_system (*this),
       m_output_system (*this),
       m_dynamic_loader (*this),
-      m_load_path (*this),
+      m_load_path (),
       m_type_info (),
       m_symbol_table (),
       m_evaluator (*this),
@@ -502,18 +510,6 @@
     cleanup ();
   }
 
-  void interpreter::initialize_version_info (void)
-  {
-    octave_value_list args;
-
-    args(3) = OCTAVE_RELEASE_DATE;
-    args(2) = m_installation_data.release ();
-    args(1) = OCTAVE_VERSION;
-    args(0) = "GNU Octave";
-
-    F__version_info__ (args, 0);
-  }
-
   void interpreter::intern_nargin (octave_idx_type nargs)
   {
     // FIXME: should this explicitly be top_scope?
@@ -730,14 +726,13 @@
         // (if it exists), then from the file
         // $(prefix)/share/octave/$(version)/m/octaverc (if it exists).
 
-        int status
-          = safe_source_file (m_installation_data.local_site_defaults_file (),
-                              context, verbose, require_file);
+        int status = safe_source_file (config::local_site_defaults_file (),
+                                       context, verbose, require_file);
 
         if (status)
           exit_status = status;
 
-        status = safe_source_file (m_installation_data.site_defaults_file (),
+        status = safe_source_file (config::site_defaults_file (),
                                    context, verbose, require_file);
 
         if (status)
--- a/libinterp/corefcn/interpreter.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/interpreter.h	Tue Jun 12 13:03:04 2018 -0400
@@ -36,7 +36,6 @@
 #include "gtk-manager.h"
 #include "help.h"
 #include "input.h"
-#include "installation-data.h"
 #include "load-path.h"
 #include "oct-stream.h"
 #include "ov-classdef.h"
@@ -87,8 +86,6 @@
 
     ~interpreter (void);
 
-    void initialize_version_info (void);
-
     void intern_nargin (octave_idx_type nargs);
 
     // If creating an embedded interpreter, you may inhibit reading
@@ -150,11 +147,6 @@
       return m_initialized;
     }
 
-    installation_data& get_installation_data (void)
-    {
-      return  m_installation_data;
-    }
-
     environment& get_environment (void)
     {
       return m_environment;
@@ -270,8 +262,6 @@
 
     application *m_app_context;
 
-    installation_data m_installation_data;
-
     environment m_environment;
 
     settings m_settings;
--- a/libinterp/corefcn/load-path.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/load-path.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -33,9 +33,9 @@
 #include "oct-env.h"
 #include "pathsearch.h"
 
+#include "defaults.h"
 #include "defun.h"
 #include "input.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "load-path.h"
@@ -188,9 +188,9 @@
   std::string load_path::sys_path;
   load_path::abs_dir_cache_type load_path::abs_dir_cache;
 
-  load_path::load_path (interpreter& interp)
-    : m_interpreter (interp), package_map (), top_level_package (),
-      dir_info_list (), init_dirs (), m_command_line_path (),
+  load_path::load_path (void)
+    : package_map (), top_level_package (), dir_info_list (), init_dirs (),
+      m_command_line_path (),
       add_hook ([this] (const std::string& dir) { this->execute_pkg_add (dir); }),
       remove_hook ([this] (const std::string& dir) { this->execute_pkg_del (dir); })
   { }
@@ -202,17 +202,15 @@
 
     if (set_initial_path)
       {
-        installation_data& inst_data = m_interpreter.get_installation_data ();
-
-        maybe_add_path_elts (sys_path, inst_data.local_ver_oct_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.local_api_oct_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.local_oct_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.local_ver_fcn_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.local_api_fcn_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.local_fcn_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.oct_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.fcn_file_dir ());
-        maybe_add_path_elts (sys_path, inst_data.oct_data_dir ());
+        maybe_add_path_elts (sys_path, config::local_ver_oct_file_dir ());
+        maybe_add_path_elts (sys_path, config::local_api_oct_file_dir ());
+        maybe_add_path_elts (sys_path, config::local_oct_file_dir ());
+        maybe_add_path_elts (sys_path, config::local_ver_fcn_file_dir ());
+        maybe_add_path_elts (sys_path, config::local_api_fcn_file_dir ());
+        maybe_add_path_elts (sys_path, config::local_fcn_file_dir ());
+        maybe_add_path_elts (sys_path, config::oct_file_dir ());
+        maybe_add_path_elts (sys_path, config::fcn_file_dir ());
+        maybe_add_path_elts (sys_path, config::oct_data_dir ());
       }
 
     std::string tpath = load_path::m_command_line_path;
--- a/libinterp/corefcn/load-path.h	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/load-path.h	Tue Jun 12 13:03:04 2018 -0400
@@ -39,15 +39,13 @@
 
 namespace octave
 {
-  class interpreter;
-
   class
   OCTINTERP_API
   load_path
   {
   public:
 
-    load_path (interpreter& interp);
+    load_path (void);
 
     typedef void (*hook_fcn_ptr) (const std::string& dir);
 
@@ -509,8 +507,6 @@
     typedef package_map_type::const_iterator const_package_map_iterator;
     typedef package_map_type::iterator package_map_iterator;
 
-    interpreter& m_interpreter;
-
     mutable package_map_type package_map;
 
     mutable package_info top_level_package;
--- a/libinterp/corefcn/ls-mat5.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/ls-mat5.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -52,10 +52,10 @@
 
 #include "Cell.h"
 #include "call-stack.h"
+#include "defaults.h"
 #include "defun.h"
 #include "error.h"
 #include "errwarn.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "load-path.h"
@@ -864,12 +864,9 @@
                 std::string mroot =
                   m0.contents ("matlabroot").string_value ();
 
-                octave::installation_data& inst_data
-                  = octave::__get_installation_data__ ("read_mat5_binary_element");
-
                 if ((fpath.length () >= mroot.length ())
                     && fpath.substr (0, mroot.length ()) == mroot
-                    && inst_data.exec_home () != mroot)
+                    && octave::config::octave_exec_home () != mroot)
                   {
                     // If fpath starts with matlabroot, and matlabroot
                     // doesn't equal __octave_config_info__ ("exec_prefix")
@@ -880,7 +877,7 @@
 
                     // First check if just replacing matlabroot is enough
                     std::string str
-                      = (inst_data.exec_home ()
+                      = (octave::config::octave_exec_home ()
                          + fpath.substr (mroot.length ()));
                     octave::sys::file_stat fs (str);
 
--- a/libinterp/corefcn/module.mk	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/module.mk	Tue Jun 12 13:03:04 2018 -0400
@@ -17,12 +17,13 @@
 DIRSTAMP_FILES += %reldir%/$(octave_dirstamp)
 
 COREFCN_INC = \
+  %reldir%/base-text-renderer.h \
   %reldir%/Cell.h \
-  %reldir%/base-text-renderer.h \
   %reldir%/c-file-ptr-stream.h \
   %reldir%/call-stack.h \
   %reldir%/cdisplay.h \
   %reldir%/data.h \
+  %reldir%/defaults.h \
   %reldir%/defun-dld.h \
   %reldir%/defun-int.h \
   %reldir%/defun.h \
@@ -44,7 +45,6 @@
   %reldir%/help.h \
   %reldir%/hook-fcn.h \
   %reldir%/input.h \
-  %reldir%/installation-data.h \
   %reldir%/interpreter.h \
   %reldir%/load-path.h \
   %reldir%/load-save.h \
@@ -53,8 +53,8 @@
   %reldir%/ls-mat-ascii.h \
   %reldir%/ls-mat4.h \
   %reldir%/ls-mat5.h \
+  %reldir%/ls-oct-text.h \
   %reldir%/ls-oct-binary.h \
-  %reldir%/ls-oct-text.h \
   %reldir%/ls-utils.h \
   %reldir%/mex.h \
   %reldir%/mexproto.h \
@@ -134,6 +134,7 @@
   %reldir%/dassl.cc \
   %reldir%/data.cc \
   %reldir%/debug.cc \
+  %reldir%/defaults.cc \
   %reldir%/defun.cc \
   %reldir%/det.cc \
   %reldir%/dirfns.cc \
@@ -172,7 +173,6 @@
   %reldir%/hex2num.cc \
   %reldir%/hook-fcn.cc \
   %reldir%/input.cc \
-  %reldir%/installation-data.cc \
   %reldir%/inv.cc \
   %reldir%/interpreter-private.cc \
   %reldir%/interpreter.cc \
--- a/libinterp/corefcn/pager.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/pager.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -33,13 +33,13 @@
 #include "oct-env.h"
 #include "oct-syscalls.h"
 
+#include "defaults.h"
 #include "defun.h"
 #include "error.h"
 #include "errwarn.h"
 #include "input.h"
-#include "installation-data.h"
+#include "interpreter.h"
 #include "interpreter-private.h"
-#include "interpreter.h"
 #include "octave.h"
 #include "ovl.h"
 #include "pager.h"
@@ -111,16 +111,12 @@
     return false;
   }
 
-  static std::string default_pager (interpreter& interp)
+  static std::string default_pager (void)
   {
     std::string pager_binary = sys::env::getenv ("PAGER");
 
     if (pager_binary.empty ())
-      {
-        installation_data& inst_data = interp.get_installation_data ();
-
-        pager_binary = inst_data.default_pager ();
-      }
+      pager_binary = config::default_pager ();
 
     return pager_binary;
   }
@@ -269,7 +265,7 @@
   output_system::output_system (interpreter& interp)
     : m_interpreter (interp), m_pager_stream (), m_diary_stream (),
       m_external_pager (nullptr), m_external_diary_file (),
-      m_diary_file_name ("diary"), m_PAGER (default_pager (interp)),
+      m_diary_file_name ("diary"), m_PAGER (default_pager ()),
       m_PAGER_FLAGS (), m_page_output_immediately (false),
       m_page_screen_output (false), m_write_to_diary_file (false),
       m_really_flush_to_pager (false), m_flushing_output_to_pager (false)
--- a/libinterp/corefcn/toplev.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/corefcn/toplev.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -47,19 +47,18 @@
 #include "wait-for-input.h"
 
 #include "build-env.h"
+#include "liboctinterp-build-info.h"
 #include "call-stack.h"
+#include "defaults.h"
 #include "defun.h"
 #include "error.h"
 #include "file-io.h"
 #include "help.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
-#include "interpreter.h"
-#include "liboctinterp-build-info.h"
+#include "octave.h"
 #include "oct-map.h"
-#include "octave.h"
+#include "ovl.h"
 #include "ov.h"
-#include "ovl.h"
 #include "pager.h"
 #include "procstream.h"
 #include "sysdep.h"
@@ -335,8 +334,8 @@
   return octave_value ();
 }
 
-DEFMETHOD (__octave_config_info__, interp, args, ,
-           doc: /* -*- texinfo -*-
+DEFUN (__octave_config_info__, args, ,
+       doc: /* -*- texinfo -*-
 @deftypefn  {} {} __octave_config_info__ ()
 @deftypefnx {} {} __octave_config_info__ (@var{option})
 Return a structure containing configuration and installation information for
@@ -362,10 +361,8 @@
 
   if (! initialized)
     {
-      octave::installation_data& inst_data = interp.get_installation_data ();
-
       std::map<std::string, octave_value> conf_info_map
-        = {{ "DEFAULT_PAGER", inst_data.default_pager () },
+        = {{ "DEFAULT_PAGER", octave::config::default_pager () },
 
 #if defined (OCTAVE_ENABLE_64)
            { "ENABLE_64", true },
@@ -410,46 +407,46 @@
 #endif
 
            { "api_version", OCTAVE_API_VERSION },
-           { "archlibdir", inst_data.arch_lib_dir () },
-           { "bindir", inst_data.bin_dir () },
-           { "canonical_host_type", inst_data.canonical_host_type () },
-           { "datadir", inst_data.data_dir () },
-           { "datarootdir", inst_data.dataroot_dir () },
-           { "fcnfiledir", inst_data.fcn_file_dir () },
+           { "archlibdir", octave::config::arch_lib_dir () },
+           { "bindir", octave::config::bin_dir () },
+           { "canonical_host_type", octave::config::canonical_host_type () },
+           { "datadir", octave::config::data_dir () },
+           { "datarootdir", octave::config::dataroot_dir () },
+           { "fcnfiledir", octave::config::fcn_file_dir () },
            { "fftw_version", octave::fftw_version () },
            { "fftwf_version", octave::fftwf_version () },
-           { "imagedir", inst_data.image_dir () },
-           { "includedir", inst_data.include_dir () },
-           { "infodir", inst_data.info_dir () },
-           { "libdir", inst_data.lib_dir () },
-           { "libexecdir", inst_data.libexec_dir () },
+           { "imagedir", octave::config::image_dir () },
+           { "includedir", octave::config::include_dir () },
+           { "infodir", octave::config::info_dir () },
+           { "libdir", octave::config::lib_dir () },
+           { "libexecdir", octave::config::libexec_dir () },
            // Each library and executable has its own definition of the hg
            // id.  We check for consistency when Octave starts so we just
            // store and report one of them here.
            { "hg_id", liboctinterp_hg_id () },
-           { "localapiarchlibdir", inst_data.local_api_arch_lib_dir () },
-           { "localapifcnfiledir", inst_data.local_api_fcn_file_dir () },
-           { "localapioctfiledir", inst_data.local_api_oct_file_dir () },
-           { "localarchlibdir", inst_data.local_arch_lib_dir () },
-           { "localfcnfiledir", inst_data.local_fcn_file_dir () },
-           { "localoctfiledir", inst_data.local_oct_file_dir () },
-           { "localstartupfiledir", inst_data.local_startupfile_dir () },
-           { "localverarchlibdir", inst_data.local_ver_arch_lib_dir () },
-           { "localverfcnfiledir", inst_data.local_ver_fcn_file_dir () },
-           { "localveroctfiledir", inst_data.local_ver_oct_file_dir () },
-           { "man1dir", inst_data.man1_dir () },
-           { "man1ext", inst_data.man1_ext () },
-           { "mandir", inst_data.man_dir () },
-           { "octdatadir", inst_data.oct_data_dir () },
-           { "octdocdir", inst_data.oct_doc_dir () },
-           { "octetcdir", inst_data.oct_etc_dir () },
-           { "octfiledir", inst_data.oct_file_dir () },
-           { "octfontsdir", inst_data.oct_fonts_dir () },
-           { "octincludedir", inst_data.oct_include_dir () },
-           { "octlibdir", inst_data.oct_lib_dir () },
-           { "octtestsdir", inst_data.oct_tests_dir () },
+           { "localapiarchlibdir", octave::config::local_api_arch_lib_dir () },
+           { "localapifcnfiledir", octave::config::local_api_fcn_file_dir () },
+           { "localapioctfiledir", octave::config::local_api_oct_file_dir () },
+           { "localarchlibdir", octave::config::local_arch_lib_dir () },
+           { "localfcnfiledir", octave::config::local_fcn_file_dir () },
+           { "localoctfiledir", octave::config::local_oct_file_dir () },
+           { "localstartupfiledir", octave::config::local_startupfile_dir () },
+           { "localverarchlibdir", octave::config::local_ver_arch_lib_dir () },
+           { "localverfcnfiledir", octave::config::local_ver_fcn_file_dir () },
+           { "localveroctfiledir", octave::config::local_ver_oct_file_dir () },
+           { "man1dir", octave::config::man1_dir () },
+           { "man1ext", octave::config::man1_ext () },
+           { "mandir", octave::config::man_dir () },
+           { "octdatadir", octave::config::oct_data_dir () },
+           { "octdocdir", octave::config::oct_doc_dir () },
+           { "octetcdir", octave::config::oct_etc_dir () },
+           { "octfiledir", octave::config::oct_file_dir () },
+           { "octfontsdir", octave::config::oct_fonts_dir () },
+           { "octincludedir", octave::config::oct_include_dir () },
+           { "octlibdir", octave::config::oct_lib_dir () },
+           { "octtestsdir", octave::config::oct_tests_dir () },
            { "release_date", OCTAVE_RELEASE_DATE },
-           { "startupfiledir", inst_data.startupfile_dir () },
+           { "startupfiledir", octave::config::startupfile_dir () },
            { "version", OCTAVE_VERSION }};
 
       std::map<std::string, octave_value> build_env_map
--- a/libinterp/octave-value/ov-dld-fcn.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/octave-value/ov-dld-fcn.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -26,13 +26,13 @@
 
 #include "oct-shlib.h"
 
+#include "defaults.h"
 #include "dynamic-ld.h"
 #include "error.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
+#include "ovl.h"
 #include "ov-dld-fcn.h"
 #include "ov.h"
-#include "ovl.h"
 
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_dld_function,
@@ -48,10 +48,7 @@
 
   std::string file_name = fcn_file_name ();
 
-  octave::installation_data& inst_data
-    = octave::__get_installation_data__ ("octave_dld_function::octave_dld_function");
-
-  std::string oct_file_dir = inst_data.oct_file_dir ();
+  std::string oct_file_dir = octave::config::oct_file_dir ();
 
   system_fcn_file
     = (! file_name.empty ()
@@ -67,10 +64,7 @@
 
   std::string file_name = fcn_file_name ();
 
-  octave::installation_data& inst_data
-    = octave::__get_installation_data__ ("octave_dld_function::octave_dld_function");
-
-  std::string oct_file_dir = inst_data.oct_file_dir ();
+  std::string oct_file_dir = octave::config::oct_file_dir ();
 
   system_fcn_file
     = (! file_name.empty ()
--- a/libinterp/octave-value/ov-fcn-handle.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -36,12 +36,12 @@
 #include "oct-locbuf.h"
 
 #include "call-stack.h"
+#include "defaults.h"
 #include "defun.h"
 #include "error.h"
 #include "errwarn.h"
 #include "file-stat.h"
 #include "input.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "load-path.h"
@@ -255,17 +255,14 @@
 octave_fcn_handle::set_fcn (const std::string& octaveroot,
                             const std::string& fpath)
 {
-  octave::installation_data& inst_data
-    = octave::__get_installation_data__ ("octave_fcn_handle::set_fcn");
-
   if (octaveroot.length () != 0
       && fpath.length () >= octaveroot.length ()
       && fpath.substr (0, octaveroot.length ()) == octaveroot
-      && inst_data.exec_home () != octaveroot)
+      && octave::config::octave_exec_home () != octaveroot)
     {
       // First check if just replacing matlabroot is enough
       std::string str
-        = (inst_data.exec_home ()
+        = (octave::config::octave_exec_home ()
            + fpath.substr (octaveroot.length ()));
       octave::sys::file_stat fs (str);
 
@@ -385,10 +382,7 @@
       octave_function *f = function_value ();
       std::string fnm = (f ? f->fcn_file_name () : "");
 
-      octave::installation_data& inst_data
-        = octave::__get_installation_data__ ("octave_fcn_handle::save_ascii");
-
-      os << "# octaveroot: " << inst_data.exec_home () << "\n";
+      os << "# octaveroot: " << octave::config::octave_exec_home () << "\n";
       if (! fnm.empty ())
         os << "# path: " << fnm << "\n";
       os << nm << "\n";
@@ -586,10 +580,7 @@
       octave_function *f = function_value ();
       std::string fnm = (f ? f->fcn_file_name () : "");
 
-      octave::installation_data& inst_data
-        = octave::__get_installation_data__ ("octave_fcn_handle::save_binary");
-
-      nmbuf << nm << "\n" << inst_data.exec_home () << "\n" << fnm;
+      nmbuf << nm << "\n" << octave::config::octave_exec_home () << "\n" << fnm;
 
       std::string buf_str = nmbuf.str ();
       int32_t tmp = buf_str.length ();
@@ -869,10 +860,7 @@
     }
   else
     {
-      octave::installation_data& inst_data
-        = octave::__get_installation_data__ ("octave_fcn_handle::save_binary");
-
-      std::string octaveroot = inst_data.exec_home ();
+      std::string octaveroot = octave::config::octave_exec_home ();
 
       octave_function *f = function_value ();
       std::string fpath = (f ? f->fcn_file_name () : "");
--- a/libinterp/octave-value/ov-java.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/octave-value/ov-java.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -45,14 +45,13 @@
 #include "Cell.h"
 #include "builtin-defun-decls.h"
 #include "cmd-edit.h"
+#include "defaults.h"
 #include "defun.h"
 #include "error.h"
 #include "errwarn.h"
 #include "file-ops.h"
 #include "file-stat.h"
 #include "fpucw-wrappers.h"
-#include "installation-data.h"
-#include "interpreter-private.h"
 #include "load-path.h"
 #include "oct-env.h"
 #include "oct-shlib.h"
@@ -333,13 +332,8 @@
       java_dir = octave::sys::env::getenv ("OCTAVE_JAVA_DIR");
 
       if (java_dir.empty ())
-        {
-          octave::installation_data& inst_data
-            = octave::__get_installation_data__ ("initial_java_dir");
-
-          java_dir = (inst_data.fcn_file_dir ()
-                      + octave::sys::file_ops::dir_sep_str () + "java");
-        }
+        java_dir = (octave::config::fcn_file_dir ()
+                    + octave::sys::file_ops::dir_sep_str () + "java");
     }
 
   return java_dir;
--- a/libinterp/octave-value/ov-mex-fcn.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/octave-value/ov-mex-fcn.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -27,10 +27,10 @@
 #include "oct-shlib.h"
 
 #include "call-stack.h"
+#include "defaults.h"
 #include "dynamic-ld.h"
 #include "error.h"
 #include "errwarn.h"
-#include "installation-data.h"
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "ov-mex-fcn.h"
@@ -53,10 +53,7 @@
 
   std::string file_name = fcn_file_name ();
 
-  octave::installation_data& inst_data
-    = octave::__get_installation_data__ ("octave_mex_function::octave_mex_function");
-
-  std::string oct_file_dir = inst_data.oct_file_dir ();
+  std::string oct_file_dir = octave::config::oct_file_dir ();
   m_is_system_fcn_file
     = (! file_name.empty ()
        && oct_file_dir == file_name.substr (0, oct_file_dir.length ()));
--- a/libinterp/octave-value/ov-usr-fcn.cc	Tue Jun 12 10:31:13 2018 -0700
+++ b/libinterp/octave-value/ov-usr-fcn.cc	Tue Jun 12 13:03:04 2018 -0400
@@ -30,23 +30,18 @@
 #include "file-stat.h"
 #include "str-vec.h"
 
-#include "Cell.h"
 #include "builtin-defun-decls.h"
 #include "call-stack.h"
+#include "defaults.h"
+#include "Cell.h"
 #include "defun.h"
 #include "error.h"
 #include "errwarn.h"
 #include "input.h"
-#include "installation-data.h"
-#include "interpreter-private.h"
-#include "interpreter.h"
-#include "ov-fcn-handle.h"
+#include "ovl.h"
 #include "ov-usr-fcn.h"
 #include "ov.h"
-#include "ovl.h"
 #include "pager.h"
-#include "parse.h"
-#include "profiler.h"
 #include "pt-eval.h"
 #include "pt-jit.h"
 #include "pt-jump.h"
@@ -55,9 +50,14 @@
 #include "pt-stmt.h"
 #include "pt-walk.h"
 #include "symtab.h"
+#include "interpreter-private.h"
+#include "interpreter.h"
 #include "unwind-prot.h"
 #include "utils.h"
+#include "parse.h"
+#include "profiler.h"
 #include "variables.h"
+#include "ov-fcn-handle.h"
 
 // Whether to optimize subsasgn method calls.
 static bool Voptimize_subsasgn_calls = true;
@@ -334,10 +334,7 @@
 
       std::string ff_name = fcn_file_in_path (file_name);
 
-      octave::installation_data& inst_data
-        = octave::__get_installation_data__ ("octave_user_function::mark_as_system_fcn_file");
-
-      std::string fcn_file_dir = inst_data.fcn_file_dir ();
+      std::string fcn_file_dir = octave::config::fcn_file_dir ();
       if (fcn_file_dir == ff_name.substr (0, fcn_file_dir.length ()))
         system_fcn_file = true;
     }