[libvirt] [PATCHv2] maint: Correctly detect wether "gluster" cli tool is accessible

The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible. --- Notes: Version 2: Simplify check. configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e68f5f6..52c50df 100644 --- a/configure.ac +++ b/configure.ac @@ -1939,8 +1939,10 @@ AM_CONDITIONAL([WITH_STORAGE_GLUSTER], [test "$with_storage_gluster" = "yes"]) if test "$with_storage_fs" = "yes" || test "$with_storage_gluster" = "yes"; then AC_PATH_PROG([GLUSTER_CLI], [gluster], [], [$PATH:/sbin:/usr/sbin]) - AC_DEFINE_UNQUOTED([GLUSTER_CLI], ["$GLUSTER_CLI"], - [Location or name of the gluster command line tool]) + if test "x$GLUSTER_CLI" != "x"; then + AC_DEFINE_UNQUOTED([GLUSTER_CLI], ["$GLUSTER_CLI"], + [Location or name of the gluster command line tool]) + fi fi LIBPARTED_CFLAGS= -- 1.9.1

On 04/07/2014 11:40 AM, Peter Krempa wrote:
The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible. ---
Notes: Version 2: Simplify check.
configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
ACK Jan

On 04/07/14 13:14, Ján Tomko wrote:
On 04/07/2014 11:40 AM, Peter Krempa wrote:
The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible. ---
Notes: Version 2: Simplify check.
configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
ACK
Pushed; Thanks. Peter
participants (2)
-
Ján Tomko
-
Peter Krempa