[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools: don't expand prefix and exec_prefix too early
On Wed, Aug 08, 2012 at 07:26:35AM -0700, Jan Beulich wrote: > A comment in tools/configure says that it is intended for these to be > command line overridable, so they shouldn't get expanded at configure > time. I'm not sure which comment you're referencing, or which command line it's intended that you're able to override prefix/exec_prefix. Could you point it out? What's not working? > The patch is fixing tools/m4/default_lib.m4 as far as I can see myself > doing this, but imo it is flawed altogether and should rather be > removed: > - setting prefix and exec_prefix to default values is being done later > in tools/configure anyway > - setting LIB_PATH based on the (non-)existence of a lib64 directory > underneath ${exec_prefix} is plain wrong (it can obviously exist on a > 32-bit installation) > - I wasn't able to locate any use of LIB_PATH I believe that the LIB_PATH portions can now be removed. I also believe you're right that all of this can be removed. Did you attempt that as well? > (I did see IanC's comment in c/s 25594:ad08cd8e7097 that removing it > supposedly causes other problems, but I don't see how that would > happen). The tail of the thread where IanC had trouble is here: http://lists.xen.org/archives/html/xen-devel/2012-07/msg00268.html If we're going back into this code, I think that adding a lowercase prefix variable and removing default_lib.m4 altogether should resolve remaining problems. But we should probably only do that for 4.2 if something's very broken with what's in the tree now. > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > > --- > This will require tools/configure to be re-generated. This is typically part of the same commit. Matt > --- a/config/Tools.mk.in > +++ b/config/Tools.mk.in > @@ -1,5 +1,6 @@ > # Prefix and install folder > -PREFIX := @prefix@ > +prefix := @prefix@ > +PREFIX := $(prefix) > exec_prefix := @exec_prefix@ > LIBDIR := @libdir@ > > --- a/tools/m4/default_lib.m4 > +++ b/tools/m4/default_lib.m4 > @@ -1,14 +1,19 @@ > AC_DEFUN([AX_DEFAULT_LIB], > -[AS_IF([test "\${exec_prefix}/lib" = "$libdir"], > - [AS_IF([test "$exec_prefix" = "NONE" && test "$prefix" != "NONE"], > - [exec_prefix=$prefix]) > - AS_IF([test "$exec_prefix" = "NONE"], [exec_prefix=$ac_default_prefix]) > - AS_IF([test -d "${exec_prefix}/lib64"], [ > +[AS_IF([test "\${exec_prefix}/lib" = "$libdir"], [ > + AS_IF([test "$prefix" = "NONE"], [prefix=$ac_default_prefix]) > + AS_IF([test "$exec_prefix" = "NONE"], [exec_prefix='${prefix}']) > + AS_IF([eval test -d "${exec_prefix}/lib64"], [ > LIB_PATH="lib64" > ],[ > LIB_PATH="lib" > ]) > ], [ > LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" > + AS_IF([test -z "${libdir##\$\{exec_prefix\}/*}"], [ > + LIB_PATH="${libdir:15}" > + ]) > + AS_IF([test -z "${libdir##\$exec_prefix/*}"], [ > + LIB_PATH="${libdir:13}" > + ]) > ]) > AC_SUBST(LIB_PATH)]) > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |