1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
This commit is contained in:
Laurent MONIN 2006-01-11 14:10:51 +01:00 committed by Laurent MONIN
parent 5805586f0f
commit 76751d1935
5 changed files with 32 additions and 32 deletions

View File

@ -140,7 +140,7 @@ CONFIG_SCRIPTING_PERL = @CONFIG_SCRIPTING_PERL@
CONFIG_POD2HTML = @CONFIG_POD2HTML@ CONFIG_POD2HTML = @CONFIG_POD2HTML@
CONFIG_PYTHON = @CONFIG_PYTHON@ CONFIG_PYTHON = @CONFIG_PYTHON@
CONFIG_RISCOS = @CONFIG_RISCOS@ CONFIG_RISCOS = @CONFIG_RISCOS@
CONFIG_RUBY = @CONFIG_RUBY@ CONFIG_SCRIPTING_RUBY = @CONFIG_SCRIPTING_RUBY@
CONFIG_SCANNER = @CONFIG_SCANNER@ CONFIG_SCANNER = @CONFIG_SCANNER@
CONFIG_SCRIPTING = @CONFIG_SCRIPTING@ CONFIG_SCRIPTING = @CONFIG_SCRIPTING@
CONFIG_SEE = @CONFIG_SEE@ CONFIG_SEE = @CONFIG_SEE@

View File

@ -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 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]) AC_MSG_CHECKING([for Ruby])
CONFIG_RUBY_WITHVAL="no" CONFIG_SCRIPTING_RUBY_WITHVAL="no"
CONFIG_RUBY="no" CONFIG_SCRIPTING_RUBY="no"
EL_SAVE_FLAGS EL_SAVE_FLAGS
AC_ARG_WITH(ruby, AC_ARG_WITH(ruby,
[ --with-ruby enable Ruby support], [ --with-ruby enable Ruby support],
[CONFIG_RUBY_WITHVAL="$withval"]) [CONFIG_SCRIPTING_RUBY_WITHVAL="$withval"])
if test "$CONFIG_RUBY_WITHVAL" != no; then if test "$CONFIG_SCRIPTING_RUBY_WITHVAL" != no; then
CONFIG_RUBY="yes" CONFIG_SCRIPTING_RUBY="yes"
fi fi
AC_MSG_RESULT($CONFIG_RUBY) AC_MSG_RESULT($CONFIG_SCRIPTING_RUBY)
if test "$CONFIG_RUBY" = "yes"; then if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then
if test -d "$CONFIG_RUBY_WITHVAL"; then if test -d "$CONFIG_SCRIPTING_RUBY_WITHVAL"; then
RUBY_PATH="$CONFIG_RUBY_WITHVAL:$PATH" RUBY_PATH="$CONFIG_SCRIPTING_RUBY_WITHVAL:$PATH"
else else
RUBY_PATH="$PATH" RUBY_PATH="$PATH"
fi fi
AC_PATH_PROG(CONFIG_RUBY, ruby, no, $RUBY_PATH) AC_PATH_PROG(CONFIG_SCRIPTING_RUBY, ruby, no, $RUBY_PATH)
if test "$CONFIG_RUBY" != "no"; then if test "$CONFIG_SCRIPTING_RUBY" != "no"; then
AC_MSG_CHECKING(Ruby version) 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 if $CONFIG_SCRIPTING_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}"'` ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'`
AC_MSG_RESULT($ruby_version) AC_MSG_RESULT($ruby_version)
AC_MSG_CHECKING(for Ruby header files) 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 if test "X$rubyhdrdir" != "X"; then
AC_MSG_RESULT($rubyhdrdir) AC_MSG_RESULT($rubyhdrdir)
RUBY_CFLAGS="-I$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 if test "X$rubylibs" != "X"; then
RUBY_LIBS="$rubylibs" RUBY_LIBS="$rubylibs"
fi 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 if test -f "$rubyhdrdir/$librubyarg"; then
librubyarg="$rubyhdrdir/$librubyarg" librubyarg="$rubyhdrdir/$librubyarg"
else 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 if test -f "$rubylibdir/$librubyarg"; then
librubyarg="$rubylibdir/$librubyarg" librubyarg="$rubylibdir/$librubyarg"
elif test "$librubyarg" = "libruby.a"; then elif test "$librubyarg" = "libruby.a"; then
dnl required on Mac OS 10.3 where libruby.a doesn't exist dnl required on Mac OS 10.3 where libruby.a doesn't exist
librubyarg="-lruby" librubyarg="-lruby"
else 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
fi fi
@ -69,7 +69,7 @@ if test "$CONFIG_RUBY" = "yes"; then
RUBY_LIBS="$librubyarg $RUBY_LIBS" RUBY_LIBS="$librubyarg $RUBY_LIBS"
fi 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 if test "X$rubyldflags" != "X"; then
LDFLAGS="$rubyldflags $LDFLAGS" LDFLAGS="$rubyldflags $LDFLAGS"
fi fi
@ -80,7 +80,7 @@ if test "$CONFIG_RUBY" = "yes"; then
AC_TRY_LINK([#include <ruby.h>], AC_TRY_LINK([#include <ruby.h>],
[ruby_init();], [ruby_init();],
CONFIG_RUBY=yes, CONFIG_RUBY=no) CONFIG_SCRIPTING_RUBY=yes, CONFIG_SCRIPTING_RUBY=no)
else else
AC_MSG_RESULT([Ruby header files not found]) AC_MSG_RESULT([Ruby header files not found])
fi fi
@ -90,14 +90,14 @@ if test "$CONFIG_RUBY" = "yes"; then
fi fi
fi fi
if test "$CONFIG_RUBY" != "yes"; then if test "$CONFIG_SCRIPTING_RUBY" != "yes"; then
if test -n "$CONFIG_RUBY_WITHVAL" && if test -n "$CONFIG_SCRIPTING_RUBY_WITHVAL" &&
test "$CONFIG_RUBY_WITHVAL" != no; then test "$CONFIG_SCRIPTING_RUBY_WITHVAL" != no; then
AC_MSG_ERROR([Ruby not found]) AC_MSG_ERROR([Ruby not found])
fi fi
EL_RESTORE_FLAGS EL_RESTORE_FLAGS
else else
EL_CONFIG(CONFIG_RUBY, [Ruby]) EL_CONFIG(CONFIG_SCRIPTING_RUBY, [Ruby])
CFLAGS="$CFLAGS_X" CFLAGS="$CFLAGS_X"
AC_SUBST(RUBY_CFLAGS) AC_SUBST(RUBY_CFLAGS)

View File

@ -849,18 +849,18 @@ dnl ===================================================================
dnl Check for Ruby, optional even if installed. dnl Check for Ruby, optional even if installed.
dnl =================================================================== dnl ===================================================================
EL_CONFIG_RUBY EL_CONFIG_SCRIPTING_RUBY
dnl =================================================================== dnl ===================================================================
dnl Setup global scripting dnl Setup global scripting
dnl =================================================================== 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_GUILE)
AC_SUBST(CONFIG_SCRIPTING_LUA) AC_SUBST(CONFIG_SCRIPTING_LUA)
AC_SUBST(CONFIG_SCRIPTING_PERL) AC_SUBST(CONFIG_SCRIPTING_PERL)
AC_SUBST(CONFIG_PYTHON) AC_SUBST(CONFIG_PYTHON)
AC_SUBST(CONFIG_RUBY) AC_SUBST(CONFIG_SCRIPTING_RUBY)
AC_SUBST(CONFIG_SM_SCRIPTING) AC_SUBST(CONFIG_SM_SCRIPTING)
AC_SUBST(CONFIG_SCRIPTING) AC_SUBST(CONFIG_SCRIPTING)

View File

@ -5,7 +5,7 @@ SUBDIRS-$(CONFIG_SCRIPTING_GUILE) += guile
SUBDIRS-$(CONFIG_SCRIPTING_LUA) += lua SUBDIRS-$(CONFIG_SCRIPTING_LUA) += lua
SUBDIRS-$(CONFIG_SCRIPTING_PERL) += perl SUBDIRS-$(CONFIG_SCRIPTING_PERL) += perl
SUBDIRS-$(CONFIG_PYTHON) += python SUBDIRS-$(CONFIG_PYTHON) += python
SUBDIRS-$(CONFIG_RUBY) += ruby SUBDIRS-$(CONFIG_SCRIPTING_RUBY) += ruby
SUBDIRS-$(CONFIG_SM_SCRIPTING) += smjs SUBDIRS-$(CONFIG_SM_SCRIPTING) += smjs
OBJS = scripting.o OBJS = scripting.o

View File

@ -26,7 +26,7 @@
/* Error reporting. */ /* 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 void
report_scripting_error(struct module *module, struct session *ses, report_scripting_error(struct module *module, struct session *ses,
unsigned char *msg) unsigned char *msg)
@ -74,7 +74,7 @@ static struct module *scripting_modules[] = {
#ifdef CONFIG_PYTHON #ifdef CONFIG_PYTHON
&python_scripting_module, &python_scripting_module,
#endif #endif
#ifdef CONFIG_RUBY #ifdef CONFIG_SCRIPTING_RUBY
&ruby_scripting_module, &ruby_scripting_module,
#endif #endif
#ifdef CONFIG_SM_SCRIPTING #ifdef CONFIG_SM_SCRIPTING