[Bug: 21.5-b27] startup.el "borks" filepath?

Michael Sperber sperber
Thu Nov 23 12:56:58 EST 2006


"Stephen J. Turnbull" <stephen at xemacs.org> writes:

>  > You're right in that you shouldn't have `configure-lisp-directory' set
>  > to anything.  Do you?  (Robert, do you?)
>
> Yes, I do.  I don't understand why, though; all I do in my experiments
> is set $prefix, and for my in-use XEmacs I don't even to that (see
> below).
>
>  > That would set LISPDIR_USER_DEFINED to something if datadir were out
>  > of whack.  But as it isn't specified explicitly, it shouldn't.  (And
>  > it isn't for me.)
>
> Here's an excerpt from a recent config.h (for the XEmacs I'm typing
> this in, in fact).
>
> ------------------------------------------------------------------------
> /* The configuration options.  This is exported to Lisp. */
> #define EMACS_CONFIG_OPTIONS "'--with-mule' '--with-widgets=athena' '--with-dialogs=athena' '--with-athena=3d' '--with-bignum=gmp' '--with-debug' '--with-error-checking=all' '--with-xft=emacs,tabs,gauges,menubars' '--with-union-type'"
>
> [...]
>
> #define PREFIX_USER_DEFINED 1
> /* #undef EXEC_PREFIX_USER_DEFINED */
> #define MODULEDIR_USER_DEFINED 1
> /* #undef SITEMODULEDIR_USER_DEFINED */
> #define DOCDIR_USER_DEFINED 1
> #define LISPDIR_USER_DEFINED 1
> /* #undef EARLY_PACKAGE_DIRECTORIES_USER_DEFINED */
> /* #undef LATE_PACKAGE_DIRECTORIES_USER_DEFINED */
> /* #undef LAST_PACKAGE_DIRECTORIES_USER_DEFINED */
> /* #undef PACKAGE_PATH_USER_DEFINED */
> /* #undef SITELISPDIR_USER_DEFINED */
> #define ARCHLIBDIR_USER_DEFINED 1
> #define ETCDIR_USER_DEFINED 1
> #define INFODIR_USER_DEFINED 1
> /* #undef INFOPATH_USER_DEFINED */

Ah, I see.  Argl.  Shell quoting strikes again.

> Here's the top of Installation:
>
> ------------------------------------------------------------------------
> uname -a: Linux tleeps19 2.6.18-rc3 #1 SMP Fri Aug 4 14:40:13 JST 2006 x86_64 Dual Core AMD Opteron(tm) Processor 265 AuthenticAMD GNU/Linux
>
> ../configure '--with-mule' '--with-widgets=athena' '--with-dialogs=athena' '--with-athena=3d' '--with-bignum=gmp' '--with-debug' '--with-error-checking=all' '--with-xft=emacs,tabs,gauges,menubars' '--with-union-type'
> ------------------------------------------------------------------------
>
> This makes no sense to me.  I think we probably have a conflict
> between our configure.ac code and something that Autoconf is trying to
> force on us.  Are you using an Autoconf 2.60-generated configure?

Argh, it appears I didn't have the latest version, as xemacs.org was
unreachable for me yesterday.  I see now.

Does the attached patch do anything for you?  It's ugly as hell, but
what's not in this file?

2006-11-23  Mike Sperber  <mike at xemacs.org>

	* configure.ac: Fully expand the various directories before
	comparing them for figuring out which of them are user-defined.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.ac,v
retrieving revision 1.48
diff -u -r1.48 configure.ac
--- configure.ac	16 Nov 2006 11:22:33 -0000	1.48
+++ configure.ac	23 Nov 2006 17:56:03 -0000
@@ -1051,7 +1051,24 @@
 else
   AC_DEFINE(EXEC_PREFIX_USER_DEFINED)
 fi
-if test "x$datadir" != 'x${prefix}/share'
+
+prefix_expanded=$prefix 
+while true; do
+  case "$prefix_expanded" in
+    *\$* ) eval "prefix_expanded=$prefix_expanded" ;;
+    *) break ;;
+  esac
+done
+
+datadir_expanded=$datadir 
+while true; do
+  case "$datadir_expanded" in
+    *\$* ) eval "datadir_expanded=$datadir_expanded" ;;
+    *) break ;;
+  esac
+done
+
+if test "x$datadir_expanded" != "x$prefix_expanded/share"
 then
   AC_DEFINE(INFODIR_USER_DEFINED)
   AC_DEFINE(LISPDIR_USER_DEFINED)
@@ -1062,15 +1079,50 @@
 else
   datadir='${prefix}/lib'
 fi
-if test "x$libdir" != 'x${exec_prefix}/lib'
+
+exec_prefix_expanded=$exec_prefix 
+while true; do
+  case "$exec_prefix_expanded" in
+    *\$* ) eval "exec_prefix_expanded=$exec_prefix_expanded" ;;
+    *) break ;;
+  esac
+done
+
+libdir_expanded=$libdir 
+while true; do
+  case "$libdir_expanded" in
+    *\$* ) eval "libdir_expanded=$libdir_expanded" ;;
+    *) break ;;
+  esac
+done
+
+if test "x$libdir_expanded" != "x$exec_prefix_expanded/lib"
 then
   AC_DEFINE(ARCHLIBDIR_USER_DEFINED)
 fi
-if test "x$mandir" = 'x${prefix}/man'
+
+mandir_expanded=$mandir 
+while true; do
+  case "$mandir_expanded" in
+    *\$* ) eval "mandir_expanded=$mandir_expanded" ;;
+    *) break ;;
+  esac
+done
+
+if test "x$mandir_expanded" = "x$prefix_expanded/man"
 then
   mandir='${prefix}/man/man1'
 fi
-if test "x$infodir" != 'x${prefix}/info'
+
+infodir_expanded=$infodir
+while true; do
+  case "$infodir_expanded" in
+    *\$* ) eval "infodir_expanded=$infodir_expanded" ;;
+    *) break ;;
+  esac
+done
+
+if test "x$infodir_expanded" != 'x${prefix_expanded}/info'
 then
   AC_DEFINE(INFODIR_USER_DEFINED)
 else


More information about the XEmacs-Beta mailing list