From 028072908e652187656c5e25d2da965487e73c98 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Mon, 16 Aug 2004 18:11:52 +0000 Subject: [PATCH] Look for the directory where libruby.so lives. --- m4/ac_ruby_ext.m4 | 14 ++++++++++++-- src/Makefile.am | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/m4/ac_ruby_ext.m4 b/m4/ac_ruby_ext.m4 index 17f6259..90a3383 100644 --- a/m4/ac_ruby_ext.m4 +++ b/m4/ac_ruby_ext.m4 @@ -13,13 +13,22 @@ AC_DEFUN([AC_RUBY_EXT], [ fi AC_MSG_CHECKING(for Ruby library path) + RUBYLIBDIR=`($rubybin -rmkmf -e 'print Config::CONFIG[["libdir"]]') 2> /dev/null` + if test -d "$RUBYLIBDIR"; then + AC_MSG_RESULT([$RUBYLIBDIR]) + else + AC_MSG_RESULT(not found) + AC_MSG_ERROR(Ruby library path not found) + fi + + AC_MSG_CHECKING(for Ruby extension path) RUBYDIR=`($rubybin -rmkmf -e 'print Config::CONFIG[["archdir"]]') 2> /dev/null` if test -d "$RUBYDIR"; then AC_MSG_RESULT([$RUBYDIR]) else AC_MSG_RESULT(not found) - AC_MSG_ERROR(Ruby library path not found) + AC_MSG_ERROR(Ruby extension path not found) fi AC_MSG_CHECKING(for Ruby site library path) @@ -28,9 +37,10 @@ AC_DEFUN([AC_RUBY_EXT], [ AC_MSG_RESULT([$RUBYSITEDIR]) else AC_MSG_RESULT(not found) - AC_MSG_ERROR(Ruby site library path not found) + AC_MSG_ERROR(Ruby site extension path not found) fi + AC_SUBST(RUBYLIBDIR) AC_SUBST(RUBYDIR) AC_SUBST(RUBYSITEDIR) ]) diff --git a/src/Makefile.am b/src/Makefile.am index 54af43a..57e38e3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am 61 2004-08-12 10:04:07Z tilman $ +## $Id: Makefile.am 73 2004-08-16 18:11:52Z tilman $ AM_CFLAGS = $(EVAS_CFLAGS) INCLUDES = -I$(RUBYDIR) @@ -17,7 +17,7 @@ evas_la_SOURCES = rb_evas_main.c rb_evas_main.h \ rb_text.c rb_text.h \ rb_smart.c rb_smart.h -evas_la_LIBADD = -lruby $(EVAS_LIBS) +evas_la_LIBADD = -L$(RUBYLIBDIR) -lruby $(EVAS_LIBS) evas_la_LDFLAGS = -module -avoid-version pkgincludedir = $(RUBYSITEDIR)/evas -- 2.30.2