[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tools: allow configure time choice of libexec subdirectory.



commit de858271c16851d662b2613699401df6ecec8ef8
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Wed Dec 16 15:06:35 2015 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Jan 5 11:32:21 2016 +0000

    tools: allow configure time choice of libexec subdirectory.
    
    Currently we hardcode various paths such as $libexec/xen/{bin,boot},
    however some downstreams (notably Debian) would like instead to
    install things into $libexec/xen-X.Y/{bin,boot} as part of allowing
    multiple versions of the tools packages to be installed.
    
    Since this currently involves patching configure its a bit fiddly,
    provide a configure option for the leaf dir instead, name it
    --with-libexec-leaf-dir similar to the existing
    --with-sysconfig-leaf-dir.
    
    Rather than have the determination of the full path in both configure
    and config/Paths.mk.in move it into configure only. Also for
    consistency move the other LIBEXEC_* to configure, even though they
    are only substituted into Paths.mk.
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Reviewed-by: Doug Goldstein <cardoe@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Cc: 805508@xxxxxxxxxxxxxxx
    [ ijc -- removed stray ` ]
---
 config/Paths.mk.in |    6 +++---
 configure          |   26 +++++++++++++++++++++++---
 m4/paths.m4        |   24 ++++++++++++++++++------
 tools/configure    |   26 +++++++++++++++++++++++---
 4 files changed, 67 insertions(+), 15 deletions(-)

diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index d36504f..1c7afb4 100644
--- a/config/Paths.mk.in
+++ b/config/Paths.mk.in
@@ -29,10 +29,10 @@ includedir               := @includedir@
 localstatedir            := @localstatedir@
 sysconfdir               := @sysconfdir@
 
-LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)
+LIBEXEC                  := @LIBEXEC@
 LIBEXEC_BIN              := @LIBEXEC_BIN@
-LIBEXEC_LIB              := $(LIBEXEC)/lib
-LIBEXEC_INC              := $(LIBEXEC)/include
+LIBEXEC_LIB              := @LIBEXEC_LIB@
+LIBEXEC_INC              := @LIBEXEC_INC@
 
 SHAREDIR                 := @SHAREDIR@
 MAN1DIR                  := $(mandir)/man1
diff --git a/configure b/configure
index 3c269fa..c200eed 100755
--- a/configure
+++ b/configure
@@ -606,7 +606,10 @@ XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
 XENFIRMWAREDIR
+LIBEXEC_INC
+LIBEXEC_LIB
 LIBEXEC_BIN
+LIBEXEC
 CONFIG_LEAF_DIR
 host_os
 host_vendor
@@ -659,6 +662,7 @@ ac_user_opts='
 enable_option_checking
 with_initddir
 with_sysconfig_leaf_dir
+with_libexec_leaf_dir
 with_xen_dumpdir
 enable_xen
 enable_tools
@@ -1299,6 +1303,8 @@ Optional Packages:
                           options for runlevel scripts and daemons such as
                           xenstored. This should be either "sysconfig" or
                           "default". [sysconfig]
+  --with-libexec-leaf-dir=SUBDIR
+                          Name of subdirectory in libexecdir to use.
   --with-xen-dumpdir=DIR  Path to directory for domU crash dumps.
                           [LOCALSTATEDIR/lib/xen/dump]
 
@@ -1924,6 +1930,15 @@ CONFIG_LEAF_DIR=$config_leaf_dir
 
 
 
+# Check whether --with-libexec-leaf-dir was given.
+if test "${with_libexec_leaf_dir+set}" = set; then :
+  withval=$with_libexec_leaf_dir; libexec_subdir=$withval
+else
+  libexec_subdir=$PACKAGE_TARNAME
+fi
+
+
+
 # Check whether --with-xen-dumpdir was given.
 if test "${with_xen_dumpdir+set}" = set; then :
   withval=$with_xen_dumpdir; xen_dumpdir_path=$withval
@@ -1940,11 +1955,16 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then
          ;;
     esac
 fi
-libexecdir=`eval echo $libexecdir`
-LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin`
+LIBEXEC=`eval echo $libexecdir/$libexec_subdir`
+
+
+LIBEXEC_BIN=${LIBEXEC}/bin
+
+LIBEXEC_LIB=${LIBEXEC}/lib
 
+LIBEXEC_INC=${LIBEXEC}/include
 
-XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot`
+XENFIRMWAREDIR=${LIBEXEC}/boot
 
 
 XEN_RUN_DIR=$localstatedir/run/xen
diff --git a/m4/paths.m4 b/m4/paths.m4
index 63e0f6b..fa902bb 100644
--- a/m4/paths.m4
+++ b/m4/paths.m4
@@ -62,6 +62,14 @@ AC_ARG_WITH([sysconfig-leaf-dir],
 CONFIG_LEAF_DIR=$config_leaf_dir
 AC_SUBST(CONFIG_LEAF_DIR)
 
+dnl autoconf docs suggest to use a "package name" subdir. We make it
+dnl configurable for the benefit of those who want e.g. xen-X.Y instead.
+AC_ARG_WITH([libexec-leaf-dir],
+    AS_HELP_STRING([--with-libexec-leaf-dir=SUBDIR],
+    [Name of subdirectory in libexecdir to use.]),
+    [libexec_subdir=$withval],
+    [libexec_subdir=$PACKAGE_TARNAME])
+
 AC_ARG_WITH([xen-dumpdir],
     AS_HELP_STRING([--with-xen-dumpdir=DIR],
     [Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]),
@@ -77,13 +85,17 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then
     esac
 fi
 dnl expand exec_prefix or it will endup in substituted variables
-libexecdir=`eval echo $libexecdir`
-dnl autoconf doc suggest to use a "package name" subdir
-dnl This variable will be substituted in various .in files
-LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin`
-AC_SUBST(LIBEXEC_BIN)
+LIBEXEC=`eval echo $libexecdir/$libexec_subdir`
+AC_SUBST(LIBEXEC)
 
-XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot`
+dnl These variables will be substituted in various .in files
+LIBEXEC_BIN=${LIBEXEC}/bin
+AC_SUBST(LIBEXEC_BIN)
+LIBEXEC_LIB=${LIBEXEC}/lib
+AC_SUBST(LIBEXEC_LIB)
+LIBEXEC_INC=${LIBEXEC}/include
+AC_SUBST(LIBEXEC_INC)
+XENFIRMWAREDIR=${LIBEXEC}/boot
 AC_SUBST(XENFIRMWAREDIR)
 
 XEN_RUN_DIR=$localstatedir/run/xen
diff --git a/tools/configure b/tools/configure
index 41bed77..cd41b26 100755
--- a/tools/configure
+++ b/tools/configure
@@ -726,7 +726,10 @@ XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
 XENFIRMWAREDIR
+LIBEXEC_INC
+LIBEXEC_LIB
 LIBEXEC_BIN
+LIBEXEC
 CONFIG_LEAF_DIR
 FILE_OFFSET_BITS
 OBJEXT
@@ -789,6 +792,7 @@ enable_option_checking
 enable_largefile
 with_initddir
 with_sysconfig_leaf_dir
+with_libexec_leaf_dir
 with_xen_dumpdir
 enable_rpath
 enable_githttp
@@ -1490,6 +1494,8 @@ Optional Packages:
                           options for runlevel scripts and daemons such as
                           xenstored. This should be either "sysconfig" or
                           "default". [sysconfig]
+  --with-libexec-leaf-dir=SUBDIR
+                          Name of subdirectory in libexecdir to use.
   --with-xen-dumpdir=DIR  Path to directory for domU crash dumps.
                           [LOCALSTATEDIR/lib/xen/dump]
   --with-linux-backend-modules="mod1 mod2"
@@ -3887,6 +3893,15 @@ CONFIG_LEAF_DIR=$config_leaf_dir
 
 
 
+# Check whether --with-libexec-leaf-dir was given.
+if test "${with_libexec_leaf_dir+set}" = set; then :
+  withval=$with_libexec_leaf_dir; libexec_subdir=$withval
+else
+  libexec_subdir=$PACKAGE_TARNAME
+fi
+
+
+
 # Check whether --with-xen-dumpdir was given.
 if test "${with_xen_dumpdir+set}" = set; then :
   withval=$with_xen_dumpdir; xen_dumpdir_path=$withval
@@ -3903,11 +3918,16 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then
          ;;
     esac
 fi
-libexecdir=`eval echo $libexecdir`
-LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin`
+LIBEXEC=`eval echo $libexecdir/$libexec_subdir`
+
+
+LIBEXEC_BIN=${LIBEXEC}/bin
+
+LIBEXEC_LIB=${LIBEXEC}/lib
 
+LIBEXEC_INC=${LIBEXEC}/include
 
-XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot`
+XENFIRMWAREDIR=${LIBEXEC}/boot
 
 
 XEN_RUN_DIR=$localstatedir/run/xen
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.