[Groonga-commit] groonga/groonga [master] Support Ruby detection with relative ruby command path

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 9日 (土) 19:26:45 JST


Kouhei Sutou	2012-06-09 19:26:45 +0900 (Sat, 09 Jun 2012)

  New Revision: b29b43aba8a39e677abe08b9916a81125a123384

  Log:
    Support Ruby detection with relative ruby command path

  Modified files:
    configure.ac

  Modified: configure.ac (+18 -4)
===================================================================
--- configure.ac    2012-06-09 19:17:57 +0900 (2b029d0)
+++ configure.ac    2012-06-09 19:26:45 +0900 (5d48a8b)
@@ -687,10 +687,24 @@ else
       ac_cv_ruby_available="yes"
     fi
   else
-    AC_CHECK_FILE([$RUBY],
-		  [ac_cv_ruby_available="yes"],
-		  [AC_MSG_WARN([$RUBY is not found. Disable HTTP test.])
-		   RUBY="$RUBY-not-found"])
+    ruby_not_found_warning_message="$RUBY is not found. Disable HTTP test."
+    case "$RUBY" in
+    /*)
+      AC_CHECK_FILE([$RUBY],
+                    [ac_cv_ruby_available="yes"],
+                    [AC_MSG_WARN([$ruby_not_found_warning_message])
+                     RUBY="$RUBY-not-found"])
+      ;;
+    *)
+      ruby_not_found="$RUBY-not-found"
+      AC_PATH_PROGS(RUBY, "$RUBY", "$ruby_not_found")
+      if test "$RUBY" = "$ruby_not_found"; then
+        AC_MSG_WARN([$ruby_not_found_warning_message])
+      else
+        ac_cv_ruby_available="yes"
+      fi
+      ;;
+    esac
   fi
 fi
 AC_SUBST(RUBY)




Groonga-commit メーリングリストの案内
Back to archive index