From xemacs-m  Tue Aug 19 03:27:39 1997
Received: from inf.enst.fr (wiq9aKAv5TiO4POx9bRZ8bE3U/q87ZBu@inf.enst.fr [137.194.2.81])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id DAA11614;
	Tue, 19 Aug 1997 03:27:38 -0500 (CDT)
Received: from metheny.enst.fr (metheny.enst.fr [137.194.160.27])
          by inf.enst.fr (8.8.4/8.8.4) with ESMTP
	  id KAA17249; Tue, 19 Aug 1997 10:27:38 +0200 (MET DST)
Received: (from verna@localhost)
          by metheny.enst.fr (8.8.4/8.8.4)
	  id KAA28312; Tue, 19 Aug 1997 10:27:34 +0200 (MET DST)
Date: Tue, 19 Aug 1997 10:27:34 +0200 (MET DST)
Message-Id: <199708190827.KAA28312@metheny.enst.fr>
From: Didier Verna <verna@inf.enst.fr>
MIME-Version: 1.0
To: SL Baur <steve@xemacs.org>
Cc: xemacs-beta@xemacs.org
Subject: configure.in patch [Re: GNUS error in 20.3-b18]
In-Reply-To: message <m2n2mfxrhb.fsf@altair.xemacs.org> from SL Baur
References: <199708181811.OAA25640@homer.sccon.com>
	<199708181825.UAA14179@metheny.enst.fr>
	<m2n2mfxrhb.fsf@altair.xemacs.org>
X-Mailer: VM 6.33 under 20.3 "Bratislava" XEmacs  Lucid (beta18)
Reply-To: verna@inf.enst.fr
X-Attribution: Did
X-Url: http://www-inf.enst.fr/~verna/
X-Face: 6o|eiKqaHN.ANh8HXDzntcWUOCg\]RsOd.ctvm~*y}Y^R&*a+Co,\s#=HWsw3x$b_n2kJ#g
 (7u?J^@^xP)f,jUF|0Z'J:|G/bMA5O12*b,7`-Q`=pKsCRIpso07.Y>YB2H{7`?u&yh;C_ZtLHfj<!
 $J=.i&Al'?,ax]MZd4tcm)_wF3$n*:f/lgS.;?Jr3T;Fl^q<qP**'tw
X-Face: |j}\)O|k##MrRz#VK$Jy=0r=3Qc,,a/Tr6*JQbE73dy17]<u3$*$]4O\1|h\|O\EDT9d$n+
 MTB{U&>2YcmW$9Z&H21e}#~#pgc>dn(is5Bv1l!{1re+Q9suKIOUmOqZs2>QMxHlR;;}kaGYA@HR3D
 C6
Content-Type: text/plain; charset=US-ASCII


---- From SL Baur's message of August 18 (Re: GNUS error in 20.3-b18):

> Check the value of package-path.  If the value is something like:
> ("NONE/lib/xemacs/packages" "~/.xemacs")
> then it means I probably screwed up the patch.

	You didn't. However, there 's no more default value for package_path.


> The critical part of configure.in should look like:
> 
> dnl The following gives NONE/lib/xemacs/packages as the first package
> dnl package_path=${prefix}/lib/xemacs/packages:~/.xemacs

	Yup. This is because those lines appear *before* all the options 
processing stuff, so prefix is not set yet.


	So here 's a patch for configure.in that should fix the whole thing.
Here 's what I do:

	- set package_path to NONE at the very beginning.
	- After options processing, (actually where you put the blank-to-colon
	  conversion), check wether package_path is still set to NONE, and if
	  so give it the def val ${prefix}/lib/xemacs/packages:~/.xemacs
        - process the blank-to-colon conversion as before.

	I've also added a line in the help string ;-)


Tue Aug 19 10:24:12 MET DST 1997

--- configure.in.orig	Tue Aug 19 09:29:14 1997
+++ configure.in	Tue Aug 19 10:22:07 1997
@@ -257,6 +257,8 @@
 x_includes=NONE
 x_libraries=NONE
 CDPATH=.; export CDPATH
+dnl this will serve for testing if a default value sould be given
+package_path=NONE
 
 dnl Allow this script to work with zsh, by setting sh emulation options
 if test -n "$ZSH_VERSION"; then
@@ -279,8 +281,6 @@
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
 libdir='${{exec_prefix}}/lib'
-dnl The following gives NONE/lib/xemacs/packages as the first package
-dnl package_path=${prefix}/lib/xemacs/packages:~/.xemacs
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 infodir='${prefix}/info'
@@ -489,6 +489,9 @@
 --mail-locking=TYPE (*)	Specify the locking to be used by movemail to prevent
 			concurrent updates of mail spool files. Valid types
 			are \`lockf', \`flock', and \`file'.
+--package-path=PATH     A list of blank separated directories for finding 
+                        packages to dump with xemacs.
+			Defaults to \`$prefix/lib/xemacs/packages ~/.xemacs'
 
 Internationalization options:
 
@@ -3368,11 +3371,13 @@
 AC_SUBST(dynodump_arch)
 
 
-dnl change blanks to colons in package path, and make available to config.h
-if test -n "$package_path"; then
-  package_path=`echo $package_path | sed 'y/ /:/'`
-  AC_DEFINE_UNQUOTED(PACKAGE_PATH, "$package_path")
+dnl if --package-path wasn't passed to configure, give the default value
+if test "x${package_path}" = "xNONE" ; then
+	package_path="${prefix}/lib/xemacs/packages:~/.xemacs"
 fi
+dnl change blanks to colons in package path, and make available to config.h
+package_path=`echo $package_path | sed 'y/ /:/'`
+AC_DEFINE_UNQUOTED(PACKAGE_PATH, "$package_path")
 
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical")
 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}")

