aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <Marc-Antoine@Perennou.com> 2015-01-18 11:29:56 +0100
committerAvatar Marc-Antoine Perennou <Marc-Antoine@Perennou.com> 2015-01-19 20:32:39 +0100
commit115421932dfba71cc27c9ab02289aeeb31695f96 (patch)
tree2e5e5da61ebddb9c7196390117b37741326c3e67
parent988709223b5544a4e2c60380c75199431dcd4c1d (diff)
downloadpaludis-115421932dfba71cc27c9ab02289aeeb31695f96.tar.gz
paludis-115421932dfba71cc27c9ab02289aeeb31695f96.tar.xz
ruby: always use pkg-config
Change-Id: I505d2936573494dadeec81fd090cf72613b664a1 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r--configure.ac56
1 files changed, 4 insertions, 52 deletions
diff --git a/configure.ac b/configure.ac
index d656f27..0bf3bdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -717,59 +717,13 @@ AC_ARG_ENABLE([ruby],
AC_MSG_RESULT($enable_ruby)
if test "x$enable_ruby" = "xyes" ; then
- PKG_CHECK_MODULES(RUBY, [ruby-1.9], [
- RUBY=`pkg-config --variable=ruby ruby-1.9`
+ PKG_CHECK_MODULES(RUBY, [ruby-2.2], [
+ RUBY=`pkg-config --variable=ruby ruby-2.2`
+ RUBY_SITEARCHDIR=`pkg-config --variable=sitearchdir ruby-2.2`
], [
- AC_CHECK_PROGS(RUBY, ruby, )
- if test "x$RUBY" = "x" ; then
- AC_MSG_ERROR([Ruby is required for --enable-ruby])
- fi
-
- AC_MSG_CHECKING([for Ruby archdir])
- RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"archdir"@:>@'`
- if test "x$RUBY_ARCHDIR" = "x" ; then
- AC_MSG_ERROR([Could not find Ruby archdir])
- fi
- AC_MSG_RESULT([$RUBY_ARCHDIR])
-
- AC_MSG_CHECKING([for Ruby soname])
- RUBY_SONAME=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"RUBY_SO_NAME"@:>@'`
- if test "x$RUBY_SONAME" = "x" ; then
- AC_MSG_ERROR([Could not find Ruby soname])
- fi
- AC_MSG_RESULT([$RUBY_SONAME])
-
- 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_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])
-
- RUBY_CFLAGS="-I${RUBY_HDRDIR} -I${RUBY_HDRARCHDIR}"
- RUBY_LIBS="-l${RUBY_SONAME}"
+ AC_MSG_ERROR([Ruby is required for --enable-ruby])
])
- AC_MSG_CHECKING([for Ruby sitearchdir])
- RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"sitearchdir"@:>@'`
- if test "x$RUBY_SITEARCHDIR" = "x" ; then
- AC_MSG_ERROR([Could not find Ruby sitearchdir])
- fi
- AC_MSG_RESULT([$RUBY_SITEARCHDIR])
-
AC_ARG_WITH([ruby-install-dir],
AS_HELP_STRING([--with-ruby-install-dir=dir], [Specify Ruby installation dir]),
RUBY_INSTALL_DIR=`eval echo $withval`,
@@ -781,8 +735,6 @@ if test "x$enable_ruby" = "xyes" ; then
AC_MSG_RESULT([$RUBY_INSTALL_DIR])
AC_SUBST([RUBY])
- AC_SUBST([RUBY_CFLAGS])
- AC_SUBST([RUBY_LIBS])
AC_SUBST([RUBY_INSTALL_DIR])
fi
AM_CONDITIONAL([ENABLE_RUBY], test "x$enable_ruby" = "xyes")