aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2009-03-29 08:49:25 +0100
committerAvatar Richard Brown <rbrown@exherbo.org> 2009-03-29 17:02:02 +0100
commit2a768ecc8d271a802d31db7c74d196f2298248b2 (patch)
tree91110932ae916eeed06be03804510a5d921373f3
parent1c19aa0dbf7ac341afe9603b18b89225922e029d (diff)
downloadpaludis-2a768ecc8d271a802d31db7c74d196f2298248b2.tar.gz
paludis-2a768ecc8d271a802d31db7c74d196f2298248b2.tar.xz
ruby-1.9.1 uses different include dirs
-rw-r--r--configure.ac22
-rw-r--r--ruby/Makefile.am8
2 files changed, 26 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 54ad933..78ca74b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1029,6 +1029,28 @@ if test "x$enable_ruby" = "xyes" ; then
AC_MSG_RESULT([$RUBY_INSTALL_DIR])
AC_SUBST([RUBY_INSTALL_DIR])
+ AC_MSG_CHECKING([for Ruby hdrdir])
+ RUBY_HDRDIR=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"rubyhdrdir"@:>@'`
+ if test "x$RUBY_HDRDIR" = "x" ; then
+ AC_MSG_ERROR([Could not find Ruby hdrdir])
+ elif test "x$RUBY_HDRDIR" = "xnil" ; then
+ RUBY_HDRDIR=$RUBY_ARCHDIR
+ fi
+ AC_MSG_RESULT([$RUBY_HDRDIR])
+ AC_SUBST([RUBY_HDRDIR])
+
+ AC_MSG_CHECKING([for Ruby hdrarchdir])
+ if test "x$RUBY_ARCHDIR" = "x$RUBY_HDRDIR"; then
+ RUBY_HDRARCHDIR=$RUBY_ARCHDIR
+ else
+ RUBY_HDRARCHDIR=`$RUBY -r rbconfig -e 'puts File.join(Config::CONFIG@<:@"rubyhdrdir"@:>@, Config::CONFIG@<:@"arch"@:>@'\)`
+ if test "x$RUBY_HDRARCHDIR" = "x" ; then
+ AC_MSG_ERROR([Could not find Ruby hdrarchdir])
+ fi
+ fi
+ AC_MSG_RESULT([$RUBY_HDRARCHDIR])
+ AC_SUBST([RUBY_HDRARCHDIR])
+
fi
AM_CONDITIONAL([ENABLE_RUBY], test "x$enable_ruby" = "xyes")
dnl }}}
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 0b332e0..d500a53 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -129,12 +129,12 @@ if ENABLE_RUBY
lib_LTLIBRARIES = libpaludisruby_@PALUDIS_PC_SLOT@.la
-libpaludisruby_@PALUDIS_PC_SLOT@_la_CXXFLAGS = $(AM_CXXFLAGS) -I. -I@RUBY_SITEARCHDIR@ -I@RUBY_ARCHDIR@
+libpaludisruby_@PALUDIS_PC_SLOT@_la_CXXFLAGS = $(AM_CXXFLAGS) -I. -I@RUBY_HDRDIR@ -I@RUBY_HDRARCHDIR@
libpaludisruby_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
paludis_ruby_so.o : paludis_ruby_so.cc
if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) \
- $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) -I$(RUBY_SITEARCHDIR) -I$(RUBY_ARCHDIR) -c \
+ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) -I$(RUBY_HDRDIR) -I$(RUBY_HDRARCHDIR) -c \
-o $@ $(srcdir)/paludis_ruby_so.cc ; then ln -fs .libs/paludis_ruby_so.o $@ ; else rm -f $@ ; exit 1 ; fi
if ENABLE_QA
@@ -166,7 +166,7 @@ rubylib_DATA = Paludis.so
$(CXX) -fPIC -shared $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) $(PTHREAD_LIBS) \
- -I@RUBY_SITEARCHDIR@ -l@RUBY_SONAME@ \
+ -l@RUBY_SONAME@ \
-o $@ \
.libs/paludis_ruby_so.o \
-L$(top_builddir)/ruby/.libs -lpaludisruby_@PALUDIS_PC_SLOT@
@@ -175,7 +175,7 @@ Paludis.so : libpaludisruby_@PALUDIS_PC_SLOT@.la paludis_ruby_so.o
$(CXX) -fPIC -shared $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) $(PTHREAD_LIBS) \
- -I@RUBY_SITEARCHDIR@ -l@RUBY_SONAME@ \
+ -l@RUBY_SONAME@ \
-o $@ \
.libs/paludis_ruby_so.o \
-L$(top_builddir)/ruby/.libs -lpaludisruby_@PALUDIS_PC_SLOT@