[groonga-commit:1684] ranguba/chupatext [master] Fix for non-gem installation.

null+ranguba at clear-code.com null+ranguba at clear-code.com
Thu Oct 21 01:18:52 EDT 2010


Nobuyoshi Nakada	2010-10-21 05:18:52 +0000 (Thu, 21 Oct 2010)

  New Revision: 2a4673cd6ca18637dea7c7ce18f471c29ca8e21a

  Log:
    Fix for non-gem installation.

  Modified files:
    configure.ac

  Modified: configure.ac (+11 -1)
===================================================================
--- configure.ac    2010-10-21 04:54:38 +0000 (c8f5fce)
+++ configure.ac    2010-10-21 05:18:52 +0000 (dc4ae67)
@@ -168,7 +168,17 @@ if test "$ruby_available" = "yes"; then
   AC_MSG_CHECKING([for Ruby/GLib2 CFLAGS])
   RUBY_GLIB2_CFLAGS=$($RUBY -e '
     ruby_glib2_gem = Gem.cache.find_name("glib2").first
-    exit(false) if ruby_glib2_gem.nil?
+    if ruby_glib2_gem.nil?
+      begin
+        require "glib2"
+        ruby_glib2_path = $".grep(/glib2\.(?!rb\z)\w+\z/).first
+        exit(false) if ruby_glib2_path.nil?
+        print("-I", File.dirname(ruby_glib2_path))
+        exit(true)
+      rescue LoadError
+        exit(false)
+      end
+    end
     ruby_glib2_path = ruby_glib2_gem.full_gem_path
     print("-I", File.join(ruby_glib2_path, "ext", "glib2"))')
   if test $? -ne 0; then



More information about the groonga-commit mailing list