From xemacs-m  Sun Jul 13 06:43:56 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id GAA12923
	for <xemacs-beta@xemacs.org>; Sun, 13 Jul 1997 06:43:55 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id FAA08778; Sun, 13 Jul 1997 05:10:57 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id EAA11113; Sun, 13 Jul 1997 04:43:25 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id EAA26135; Sun, 13 Jul 1997 04:43:25 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id EAA02550; Sun, 13 Jul 1997 04:43:21 -0700
Date: Sun, 13 Jul 1997 04:43:21 -0700
Message-Id: <199707131143.EAA02550@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Adrian Aichner <aichner@ecf.teradyne.com>
Cc: xemacs-beta@xemacs.org
Subject: How to determine build-dir within running XEmacs?
In-Reply-To: <rxszprrme68.fsf@ecf.teradyne.com>
References: <rxszprrme68.fsf@ecf.teradyne.com>
X-Mailer: VM 6.32 under 20.3 "Sofia" XEmacs  Lucid (beta9)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "AA" == Adrian Aichner <aichner@ecf.teradyne.com> writes:

AA> Hello All!

AA> With the `xemacs-build-report' module I'm working on, I face the
AA> following problem:

AA> The user may have built XEmacs outside the srcdir using the --srcdir
AA> option to configure.

AA> How can I access the value of the building location, where
AA> `Installation' and make-output files the user may create are located,
AA> from within XEmacs?

configure should (will?) be enhanced so that all the AC_SUBST's and
AC_DEFINE's are captured in a config.el file which gets put.....uhmmm,
not into the normal lisp hierarchy, but into exec-directory (where
else?).  Then elisp code that wanted access to this information could
just do:

(let ((load-path (list exec-directory)))
  (require 'config))

config.el could look like this:

(defvar config-hashtable (make-hashtable 100))
(puthash 'srcdir "/xemacs-23.94-b122" config-hashtable)
(puthash 'HAVE_TERMIOS t)
...

Oops... Didn't I say I wasn't going to do any more configure
enhancements for a while?

Martin

