mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
This commit is contained in:
parent
5805586f0f
commit
76751d1935
@ -140,7 +140,7 @@ CONFIG_SCRIPTING_PERL = @CONFIG_SCRIPTING_PERL@
|
||||
CONFIG_POD2HTML = @CONFIG_POD2HTML@
|
||||
CONFIG_PYTHON = @CONFIG_PYTHON@
|
||||
CONFIG_RISCOS = @CONFIG_RISCOS@
|
||||
CONFIG_RUBY = @CONFIG_RUBY@
|
||||
CONFIG_SCRIPTING_RUBY = @CONFIG_SCRIPTING_RUBY@
|
||||
CONFIG_SCANNER = @CONFIG_SCANNER@
|
||||
CONFIG_SCRIPTING = @CONFIG_SCRIPTING@
|
||||
CONFIG_SEE = @CONFIG_SEE@
|
||||
|
@ -2,66 +2,66 @@ dnl Thank you very much Vim for this lovely ruby configuration
|
||||
dnl The hitchhiked code is from Vim configure.in version 1.98
|
||||
|
||||
|
||||
AC_DEFUN([EL_CONFIG_RUBY],
|
||||
AC_DEFUN([EL_CONFIG_SCRIPTING_RUBY],
|
||||
[
|
||||
AC_MSG_CHECKING([for Ruby])
|
||||
|
||||
CONFIG_RUBY_WITHVAL="no"
|
||||
CONFIG_RUBY="no"
|
||||
CONFIG_SCRIPTING_RUBY_WITHVAL="no"
|
||||
CONFIG_SCRIPTING_RUBY="no"
|
||||
|
||||
EL_SAVE_FLAGS
|
||||
|
||||
AC_ARG_WITH(ruby,
|
||||
[ --with-ruby enable Ruby support],
|
||||
[CONFIG_RUBY_WITHVAL="$withval"])
|
||||
[CONFIG_SCRIPTING_RUBY_WITHVAL="$withval"])
|
||||
|
||||
if test "$CONFIG_RUBY_WITHVAL" != no; then
|
||||
CONFIG_RUBY="yes"
|
||||
if test "$CONFIG_SCRIPTING_RUBY_WITHVAL" != no; then
|
||||
CONFIG_SCRIPTING_RUBY="yes"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($CONFIG_RUBY)
|
||||
AC_MSG_RESULT($CONFIG_SCRIPTING_RUBY)
|
||||
|
||||
if test "$CONFIG_RUBY" = "yes"; then
|
||||
if test -d "$CONFIG_RUBY_WITHVAL"; then
|
||||
RUBY_PATH="$CONFIG_RUBY_WITHVAL:$PATH"
|
||||
if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then
|
||||
if test -d "$CONFIG_SCRIPTING_RUBY_WITHVAL"; then
|
||||
RUBY_PATH="$CONFIG_SCRIPTING_RUBY_WITHVAL:$PATH"
|
||||
else
|
||||
RUBY_PATH="$PATH"
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(CONFIG_RUBY, ruby, no, $RUBY_PATH)
|
||||
if test "$CONFIG_RUBY" != "no"; then
|
||||
AC_PATH_PROG(CONFIG_SCRIPTING_RUBY, ruby, no, $RUBY_PATH)
|
||||
if test "$CONFIG_SCRIPTING_RUBY" != "no"; then
|
||||
|
||||
AC_MSG_CHECKING(Ruby version)
|
||||
if $CONFIG_RUBY -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
|
||||
ruby_version=`$CONFIG_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'`
|
||||
if $CONFIG_SCRIPTING_RUBY -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
|
||||
ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'`
|
||||
AC_MSG_RESULT($ruby_version)
|
||||
|
||||
AC_MSG_CHECKING(for Ruby header files)
|
||||
rubyhdrdir=`$CONFIG_RUBY -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
|
||||
rubyhdrdir=`$CONFIG_SCRIPTING_RUBY -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
|
||||
|
||||
if test "X$rubyhdrdir" != "X"; then
|
||||
AC_MSG_RESULT($rubyhdrdir)
|
||||
RUBY_CFLAGS="-I$rubyhdrdir"
|
||||
rubylibs=`$CONFIG_RUBY -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
|
||||
rubylibs=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
|
||||
|
||||
if test "X$rubylibs" != "X"; then
|
||||
RUBY_LIBS="$rubylibs"
|
||||
fi
|
||||
|
||||
librubyarg=`$CONFIG_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
|
||||
librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
|
||||
|
||||
if test -f "$rubyhdrdir/$librubyarg"; then
|
||||
librubyarg="$rubyhdrdir/$librubyarg"
|
||||
|
||||
else
|
||||
rubylibdir=`$CONFIG_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
|
||||
rubylibdir=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
|
||||
if test -f "$rubylibdir/$librubyarg"; then
|
||||
librubyarg="$rubylibdir/$librubyarg"
|
||||
elif test "$librubyarg" = "libruby.a"; then
|
||||
dnl required on Mac OS 10.3 where libruby.a doesn't exist
|
||||
librubyarg="-lruby"
|
||||
else
|
||||
librubyarg=`$CONFIG_RUBY -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
|
||||
librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -69,7 +69,7 @@ if test "$CONFIG_RUBY" = "yes"; then
|
||||
RUBY_LIBS="$librubyarg $RUBY_LIBS"
|
||||
fi
|
||||
|
||||
rubyldflags=`$CONFIG_RUBY -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
|
||||
rubyldflags=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
LDFLAGS="$rubyldflags $LDFLAGS"
|
||||
fi
|
||||
@ -80,7 +80,7 @@ if test "$CONFIG_RUBY" = "yes"; then
|
||||
|
||||
AC_TRY_LINK([#include <ruby.h>],
|
||||
[ruby_init();],
|
||||
CONFIG_RUBY=yes, CONFIG_RUBY=no)
|
||||
CONFIG_SCRIPTING_RUBY=yes, CONFIG_SCRIPTING_RUBY=no)
|
||||
else
|
||||
AC_MSG_RESULT([Ruby header files not found])
|
||||
fi
|
||||
@ -90,14 +90,14 @@ if test "$CONFIG_RUBY" = "yes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CONFIG_RUBY" != "yes"; then
|
||||
if test -n "$CONFIG_RUBY_WITHVAL" &&
|
||||
test "$CONFIG_RUBY_WITHVAL" != no; then
|
||||
if test "$CONFIG_SCRIPTING_RUBY" != "yes"; then
|
||||
if test -n "$CONFIG_SCRIPTING_RUBY_WITHVAL" &&
|
||||
test "$CONFIG_SCRIPTING_RUBY_WITHVAL" != no; then
|
||||
AC_MSG_ERROR([Ruby not found])
|
||||
fi
|
||||
EL_RESTORE_FLAGS
|
||||
else
|
||||
EL_CONFIG(CONFIG_RUBY, [Ruby])
|
||||
EL_CONFIG(CONFIG_SCRIPTING_RUBY, [Ruby])
|
||||
|
||||
CFLAGS="$CFLAGS_X"
|
||||
AC_SUBST(RUBY_CFLAGS)
|
||||
|
@ -849,18 +849,18 @@ dnl ===================================================================
|
||||
dnl Check for Ruby, optional even if installed.
|
||||
dnl ===================================================================
|
||||
|
||||
EL_CONFIG_RUBY
|
||||
EL_CONFIG_SCRIPTING_RUBY
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Setup global scripting
|
||||
dnl ===================================================================
|
||||
|
||||
EL_CONFIG_DEPENDS(CONFIG_SCRIPTING, [CONFIG_SCRIPTING_GUILE CONFIG_SCRIPTING_LUA CONFIG_SCRIPTING_PERL CONFIG_PYTHON CONFIG_RUBY CONFIG_SM_SCRIPTING], [Browser scripting])
|
||||
EL_CONFIG_DEPENDS(CONFIG_SCRIPTING, [CONFIG_SCRIPTING_GUILE CONFIG_SCRIPTING_LUA CONFIG_SCRIPTING_PERL CONFIG_PYTHON CONFIG_SCRIPTING_RUBY CONFIG_SM_SCRIPTING], [Browser scripting])
|
||||
AC_SUBST(CONFIG_SCRIPTING_GUILE)
|
||||
AC_SUBST(CONFIG_SCRIPTING_LUA)
|
||||
AC_SUBST(CONFIG_SCRIPTING_PERL)
|
||||
AC_SUBST(CONFIG_PYTHON)
|
||||
AC_SUBST(CONFIG_RUBY)
|
||||
AC_SUBST(CONFIG_SCRIPTING_RUBY)
|
||||
AC_SUBST(CONFIG_SM_SCRIPTING)
|
||||
AC_SUBST(CONFIG_SCRIPTING)
|
||||
|
||||
|
@ -5,7 +5,7 @@ SUBDIRS-$(CONFIG_SCRIPTING_GUILE) += guile
|
||||
SUBDIRS-$(CONFIG_SCRIPTING_LUA) += lua
|
||||
SUBDIRS-$(CONFIG_SCRIPTING_PERL) += perl
|
||||
SUBDIRS-$(CONFIG_PYTHON) += python
|
||||
SUBDIRS-$(CONFIG_RUBY) += ruby
|
||||
SUBDIRS-$(CONFIG_SCRIPTING_RUBY) += ruby
|
||||
SUBDIRS-$(CONFIG_SM_SCRIPTING) += smjs
|
||||
|
||||
OBJS = scripting.o
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
/* Error reporting. */
|
||||
|
||||
#if defined(CONFIG_RUBY) || defined(CONFIG_SEE) || defined(CONFIG_SM_SCRIPTING)
|
||||
#if defined(CONFIG_SCRIPTING_RUBY) || defined(CONFIG_SEE) || defined(CONFIG_SM_SCRIPTING)
|
||||
void
|
||||
report_scripting_error(struct module *module, struct session *ses,
|
||||
unsigned char *msg)
|
||||
@ -74,7 +74,7 @@ static struct module *scripting_modules[] = {
|
||||
#ifdef CONFIG_PYTHON
|
||||
&python_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_RUBY
|
||||
#ifdef CONFIG_SCRIPTING_RUBY
|
||||
&ruby_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_SM_SCRIPTING
|
||||
|
Loading…
Reference in New Issue
Block a user