You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/korundum/rubylib/korundum/configure.in.in

41 lines
1.7 KiB

KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find pkg-config])
])
AC_CHECK_PROG(RUBY, ruby, ruby)
if test -z "$RUBY"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE korundum"
else
AC_MSG_CHECKING(for ruby dirs)
if test -n "$PKGCONFIG"; then
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
else
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null`
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags`
fi
if test -n "$RUBY_VERSION"; then
RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
fi
fi
if test -z "$RUBY_VERSION"; then
RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
fi
AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR, cflags $RUBY_CFLAGS])
AC_SUBST(RUBY_ARCHDIR)
AC_SUBST(RUBY_SITEARCHDIR)
AC_SUBST(RUBY_RUBYLIBDIR)
AC_SUBST(RUBY_SITEDIR)
AC_SUBST(RUBY_CFLAGS)
fi