From: Tobias Brunner Date: Thu, 8 Nov 2012 18:23:05 +0000 (+0100) Subject: Use proper Ruby library depending on the available version X-Git-Tag: 5.0.2dr4~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=afabe7b0eff9c73957d28a5d4cd96f869a5821ef;p=thirdparty%2Fstrongswan.git Use proper Ruby library depending on the available version --- diff --git a/configure.in b/configure.in index c00a478b75..2516ea9946 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/dumm/Makefile.am b/src/dumm/Makefile.am index 8b8cebcd88..3e4625ec8e 100644 --- a/src/dumm/Makefile.am +++ b/src/dumm/Makefile.am @@ -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}