mirror of https://github.com/odrling/Aegisub
Switch Ruby support check to use AC_CACHE_CHECK.
Originally committed to SVN as r2134.
This commit is contained in:
parent
faff96d0f6
commit
f7288d0e95
26
configure.in
26
configure.in
|
@ -592,7 +592,6 @@ if test -z "$perl_disabled"; then
|
||||||
# AC_DEFINE(WITH_PERLCONSOLE, 1, [Enable PERL Console support (for debugging purposes)])
|
# AC_DEFINE(WITH_PERLCONSOLE, 1, [Enable PERL Console support (for debugging purposes)])
|
||||||
|
|
||||||
if test "$PERL_BIN" != "no"; then
|
if test "$PERL_BIN" != "no"; then
|
||||||
|
|
||||||
AC_CACHE_CHECK(
|
AC_CACHE_CHECK(
|
||||||
[checking for perl version >= 5.004], [with_perl],
|
[checking for perl version >= 5.004], [with_perl],
|
||||||
[if $PERL_BIN -e 'require 5.004'; then with_perl="yes"; else with_perl="no"; fi])
|
[if $PERL_BIN -e 'require 5.004'; then with_perl="yes"; else with_perl="no"; fi])
|
||||||
|
@ -649,14 +648,14 @@ if test -z "$ruby_disabled"; then
|
||||||
RUBY_BIN="$WITH_RUBY_BIN"
|
RUBY_BIN="$WITH_RUBY_BIN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$RUBY_BIN" != "no"; then
|
|
||||||
AC_MSG_CHECKING([checking for ruby version >= 1.8])
|
|
||||||
if $RUBY_BIN -r rbconfig -e 'if Config::CONFIG@<:@"ruby_version"@:>@.to_f >= 1.8 then exit(0) else exit(1) end' ; then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
with_ruby=yes
|
|
||||||
with_automation="yes"
|
|
||||||
AC_DEFINE(WITH_RUBY, 1, [Enable RUBY Automation.])
|
|
||||||
|
|
||||||
|
if test "$RUBY_BIN" != "no"; then
|
||||||
|
AC_CACHE_CHECK(
|
||||||
|
[checking for ruby version >= 1.8], [with_ruby],
|
||||||
|
[if $RUBY_BIN -r rbconfig -e 'if Config::CONFIG@<:@"ruby_version"@:>@.to_f >= 1.8 then exit(0) else exit(1) end'; then
|
||||||
|
with_ruby="yes"; else with_ruby="no"; fi])
|
||||||
|
|
||||||
|
if test "$with_ruby" = "yes"; then
|
||||||
AC_MSG_CHECKING([checking $RUBY_BIN -r rbconfig archdir, cflags])
|
AC_MSG_CHECKING([checking $RUBY_BIN -r rbconfig archdir, cflags])
|
||||||
RUBY_CFLAGS=`$RUBY_BIN -r rbconfig -e "printf(\"-I%s %s\", Config::CONFIG@<:@'archdir'@:>@, Config::CONFIG@<:@'CFLAGS'@:>@)"`
|
RUBY_CFLAGS=`$RUBY_BIN -r rbconfig -e "printf(\"-I%s %s\", Config::CONFIG@<:@'archdir'@:>@, Config::CONFIG@<:@'CFLAGS'@:>@)"`
|
||||||
AC_MSG_RESULT([$RUBY_CFLAGS])
|
AC_MSG_RESULT([$RUBY_CFLAGS])
|
||||||
|
@ -664,12 +663,13 @@ if test -z "$ruby_disabled"; then
|
||||||
AC_MSG_CHECKING([checking $RUBY_BIN rbconfig libs])
|
AC_MSG_CHECKING([checking $RUBY_BIN rbconfig libs])
|
||||||
RUBY_LDFLAGS=`$RUBY_BIN -r rbconfig -e "print Config::CONFIG@<:@'LIBRUBYARG'@:>@"`
|
RUBY_LDFLAGS=`$RUBY_BIN -r rbconfig -e "print Config::CONFIG@<:@'LIBRUBYARG'@:>@"`
|
||||||
AC_MSG_RESULT([$RUBY_LDFLAGS])
|
AC_MSG_RESULT([$RUBY_LDFLAGS])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
if test "$with_ruby" = "yes"; then
|
||||||
AC_MSG_RESULT([yes])
|
with_automation="yes"
|
||||||
with_ruby=no
|
AC_DEFINE(WITH_RUBY, 1, [Enable RUBY Automation.])
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(RUBY_CFLAGS)
|
AC_SUBST(RUBY_CFLAGS)
|
||||||
|
|
Loading…
Reference in New Issue