[Pkg-libvirt-commits] [libguestfs] 29/116: ruby: fix detection of ruby library

Hilko Bengen bengen at moszumanska.debian.org
Wed Nov 26 22:04:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.29.10-1
in repository libguestfs.

commit 3d02e53c48266669675cc237f61ae2c4e1816e66
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Mon Nov 3 16:49:59 2014 +0100

    ruby: fix detection of ruby library
    
    Query RbConfig::CONFIG for "libdir", and use that when trying to link to
    the ruby library.  This fixes the libruby detection when it is installed
    in a non-standard library directory.
---
 configure.ac | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e5fa215..54692d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1255,9 +1255,15 @@ AS_IF([test "x$enable_ruby" != "xno"],[
         libruby="$(cat conftest)"
         rm conftest
         AS_IF([test -n "$libruby"],[
+            ruby_cmd='puts RbConfig::CONFIG@<:@"libdir"@:>@'
+            echo running: $RUBY -rrbconfig -e \'$ruby_cmd\' >&AS_MESSAGE_LOG_FD
+            $RUBY -rrbconfig -e "$ruby_cmd" >conftest 2>&AS_MESSAGE_LOG_FD
+            libruby_libdir="$(cat conftest)"
+            rm conftest
+            test -n "$libruby_libdir" && libruby_libdir="-L$libruby_libdir"
             AC_MSG_RESULT([-l$libruby])
             AC_CHECK_LIB([$libruby],[ruby_init],
-                         [have_libruby=1],[have_libruby=])
+                         [have_libruby=1],[have_libruby=],[$libruby_libdir])
         ],[
             AC_MSG_RESULT([not found])
         ])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list