Look for the directory where libruby.so lives.
authorTilman Sauerbeck <tilman@code-monkey.de>
Mon, 16 Aug 2004 18:12:23 +0000 (18:12 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Mon, 16 Aug 2004 18:12:23 +0000 (18:12 +0000)
m4/ac_ruby_ext.m4
src/Makefile.am

index 17f6259..90a3383 100644 (file)
@@ -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)
 ])
index 141484a..a0d6a19 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile.am 47 2004-07-26 13:24:50Z tilman $
+## $Id: Makefile.am 74 2004-08-16 18:12:23Z tilman $
 
 AM_CFLAGS = $(EVAS_CFLAGS) $(EDJE_CFLAGS)
 INCLUDES = -I$(RUBYDIR) -I$(RUBYSITEDIR)
@@ -10,5 +10,5 @@ edje_la_SOURCES = rb_edje_main.c rb_edje_main.h \
                   rb_edje.c rb_edje.h \
                   rb_part.c rb_part.h
 
-edje_la_LIBADD = -lruby $(EVAS_LIBS) $(EDJE_LIBS)
+edje_la_LIBADD = -L$(RUBYLIBDIR) -lruby $(EVAS_LIBS) $(EDJE_LIBS)
 edje_la_LDFLAGS = -module -avoid-version