]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Use proper Ruby library depending on the available version
authorTobias Brunner <tobias@strongswan.org>
Thu, 8 Nov 2012 18:23:05 +0000 (19:23 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 10 Dec 2012 08:47:46 +0000 (09:47 +0100)
configure.in
src/dumm/Makefile.am

index c00a478b75e4e1918554cf515f8196a68270d3dc..2516ea99467bf50e6336854c60dcc790c3663e93 100644 (file)
@@ -666,6 +666,14 @@ if test x$dumm = xtrue; then
        else
                AC_MSG_ERROR([don't know how to run ruby])
        fi
+       AC_MSG_CHECKING([for libruby])
+       saved_LIBS=$LIBS
+       LIBS=`($RUBY -r rbconfig -e 'print RbConfig::CONFIG[["LIBRUBYARG_SHARED"]] || ""') 2>/dev/null`
+       AC_TRY_LINK_FUNC(ruby_init,
+               [AC_MSG_RESULT([$LIBS]); RUBYLIB=$LIBS],
+               [AC_MSG_ERROR([not found])])
+       AC_SUBST(RUBYLIB)
+       LIBS=$saved_LIBS
 fi
 
 if test x$fast = xtrue; then
index 8b8cebcd88656dcf7b8d0df1b680a28ddbb46611..3e4625ec8ecfdedc16b6efc794fabf6dfc2387a5 100644 (file)
@@ -11,7 +11,7 @@ irdumm_SOURCES = irdumm.c
 
 libdumm_la_LIBADD = -lbridge -lfuse -lutil $(top_builddir)/src/libstrongswan/libstrongswan.la
 dumm_LDADD = libdumm.la ${gtk_LIBS} $(top_builddir)/src/libstrongswan/libstrongswan.la
-irdumm_LDADD = libdumm.la -lruby1.8 $(top_builddir)/src/libstrongswan/libstrongswan.la
+irdumm_LDADD = libdumm.la ${RUBYLIB} $(top_builddir)/src/libstrongswan/libstrongswan.la
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan ${gtk_CFLAGS} \
   ${RUBYINCLUDE}