libprelude/master: Fix Ruby include path detection on certain systems

[email protected] Mon, 11 Jan 2010 12:23:46 +0100 (CET)
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
commit 041082281eb7a17e2d2c319b02ef1154595b7e8c
Author: Yoann Vandoorselaere <[email protected]>
Date:   Tue Dec 1 14:22:34 2009 +0100

    Fix Ruby include path detection on certain systems
    
    Thanks to Dominik Elsbroek <[email protected]> for reporting
    the issue, as well as the proper fix. Close #366.


========================================

 m4/am_path_ruby.m4 |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

========================================

diff --git a/m4/am_path_ruby.m4 b/m4/am_path_ruby.m4
index ddb96ea..10ca996 100644
--- a/m4/am_path_ruby.m4
+++ b/m4/am_path_ruby.m4
@@ -1,7 +1,7 @@
 # AM_PATH_RUBY([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # ---------------------------------------------------------------------------
 # Adds support for distributing Ruby modules and packages.  To
-# install modules, copy them to $(rubydir), using the ruby_RUBY 
+# install modules, copy them to $(rubydir), using the ruby_RUBY
 # automake variable.  To install a package with the same name as the
 # automake package, install to $(pkgrubydir), or use the
 # pkgruby_RUBY automake variable.
@@ -83,13 +83,13 @@ AC_DEFUN([AM_PATH_RUBY],
 
 
   dnl Set up 4 directories:
-  dnl rubydir -- where to install ruby scripts.  
+  dnl rubydir -- where to install ruby scripts.
   AC_CACHE_CHECK([for $am_display_RUBY script directory],
     [am_cv_ruby_rubydir],
     [am_cv_ruby_rubydir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(Config::CONFIG[['prefix']])); \\$prefix = Config::CONFIG[['prefix']].sub(drive, ''); \\$archdir = Config::CONFIG[['archdir']].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$archdir;"`])
   AC_SUBST([rubydir], [$am_cv_ruby_rubydir])
 
-  dnl pkgrubydir -- $PACKAGE directory under rubydir.  
+  dnl pkgrubydir -- $PACKAGE directory under rubydir.
   AC_SUBST([pkgrubydir], [\${rubydir}/$PACKAGE])
 
   dnl rbexecdir -- directory for installing ruby extension modules
@@ -99,7 +99,8 @@ AC_DEFUN([AM_PATH_RUBY],
     [am_cv_ruby_rbexecdir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(Config::CONFIG[['prefix']])); \\$prefix = Config::CONFIG[['prefix']].sub(drive, ''); \\$sitearchdir = Config::CONFIG[['sitearchdir']].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$sitearchdir;" 2>/dev/null || echo "${RUBY_EXEC_PREFIX}/local/lib/site_ruby/${RUBY_VERSION}/${RUBY_PLATFORM}"`])
   AC_SUBST([rbexecdir], [$am_cv_ruby_rbexecdir])
 
-  RUBY_INCLUDES=`$RUBY -r rbconfig -e 'print " -I" + Config::CONFIG[["archdir"]]'`
+  RUBY_INCLUDES=`$RUBY -r rbconfig -e 'if Config::CONFIG[["archdir"]] then print " -I" + Config::CONFIG[["archdir"]] end
+                                       if Config::CONFIG[["rubyhdrdir"]] then print " -I" + Config::CONFIG[["rubyhdrdir"]] end'`
   AC_SUBST([RUBY_INCLUDES])
 
   dnl pkgrbexecdir -- $(rbexecdir)/$(PACKAGE)
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog