mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
commit
c31450e862
@ -108,6 +108,7 @@ CONFIG_DATA = @CONFIG_DATA@
|
||||
CONFIG_DEBUG = @CONFIG_DEBUG@
|
||||
CONFIG_DOM = @CONFIG_DOM@
|
||||
CONFIG_ECMASCRIPT = @CONFIG_ECMASCRIPT@
|
||||
CONFIG_ECMASCRIPT_SMJS = @CONFIG_ECMASCRIPT_SMJS@
|
||||
CONFIG_EXMODE = @CONFIG_EXMODE@
|
||||
CONFIG_FASTMEM = @CONFIG_FASTMEM@
|
||||
CONFIG_FINGER = @CONFIG_FINGER@
|
||||
@ -116,14 +117,14 @@ CONFIG_FTP = @CONFIG_FTP@
|
||||
CONFIG_GLOBHIST = @CONFIG_GLOBHIST@
|
||||
CONFIG_GNUTLS = @CONFIG_GNUTLS@
|
||||
CONFIG_GOPHER = @CONFIG_GOPHER@
|
||||
CONFIG_GUILE = @CONFIG_GUILE@
|
||||
CONFIG_SCRIPTING_GUILE = @CONFIG_SCRIPTING_GUILE@
|
||||
CONFIG_GZIP = @CONFIG_GZIP@
|
||||
CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@
|
||||
CONFIG_INTERLINK = @CONFIG_INTERLINK@
|
||||
CONFIG_IPV6 = @CONFIG_IPV6@
|
||||
CONFIG_JW = @CONFIG_JW@
|
||||
CONFIG_LEDS = @CONFIG_LEDS@
|
||||
CONFIG_LUA = @CONFIG_LUA@
|
||||
CONFIG_SCRIPTING_LUA = @CONFIG_SCRIPTING_LUA@
|
||||
CONFIG_MAILCAP = @CONFIG_MAILCAP@
|
||||
CONFIG_MARKS = @CONFIG_MARKS@
|
||||
CONFIG_MD5 = @CONFIG_MD5@
|
||||
@ -135,11 +136,11 @@ CONFIG_NO_ROOT_EXEC = @CONFIG_NO_ROOT_EXEC@
|
||||
CONFIG_OPENSSL = @CONFIG_OPENSSL@
|
||||
CONFIG_OS2 = @CONFIG_OS2@
|
||||
CONFIG_OWN_LIBC = @CONFIG_OWN_LIBC@
|
||||
CONFIG_PERL = @CONFIG_PERL@
|
||||
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)
|
||||
|
18
configure.in
18
configure.in
@ -659,7 +659,7 @@ if test "$enable_guile" = "yes"; then
|
||||
GUILE_CFLAGS="`guile-config compile`"
|
||||
LIBS="$GUILE_LIBS $LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $GUILE_CFLAGS"
|
||||
EL_CONFIG(CONFIG_GUILE, [Guile])
|
||||
EL_CONFIG(CONFIG_SCRIPTING_GUILE, [Guile])
|
||||
AC_SUBST(GUILE_CFLAGS)
|
||||
cat <<EOF
|
||||
***********************************************************************
|
||||
@ -720,7 +720,7 @@ fi
|
||||
if test "$cf_result" != "yes"; then
|
||||
EL_RESTORE_FLAGS
|
||||
else
|
||||
EL_CONFIG(CONFIG_PERL, [Perl])
|
||||
EL_CONFIG(CONFIG_SCRIPTING_PERL, [Perl])
|
||||
|
||||
CFLAGS="$CFLAGS_X"
|
||||
AC_SUBST(PERL_LIBS)
|
||||
@ -836,7 +836,7 @@ AC_MSG_RESULT($cf_result)
|
||||
if test "$cf_result" != yes; then
|
||||
EL_RESTORE_FLAGS
|
||||
else
|
||||
EL_CONFIG(CONFIG_LUA, [Lua])
|
||||
EL_CONFIG(CONFIG_SCRIPTING_LUA, [Lua])
|
||||
AC_CHECK_HEADERS(lauxlib.h)
|
||||
|
||||
CFLAGS="$CFLAGS_X"
|
||||
@ -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_GUILE CONFIG_LUA CONFIG_PERL CONFIG_PYTHON CONFIG_RUBY CONFIG_SM_SCRIPTING], [Browser scripting])
|
||||
AC_SUBST(CONFIG_GUILE)
|
||||
AC_SUBST(CONFIG_LUA)
|
||||
AC_SUBST(CONFIG_PERL)
|
||||
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)
|
||||
|
||||
|
@ -4,8 +4,10 @@ INCLUDES += $(SPIDERMONKEY_CFLAGS)
|
||||
|
||||
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
||||
SUBDIRS-$(CONFIG_SEE) += see
|
||||
|
||||
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey.o
|
||||
OBJS-$(CONFIG_SEE) += see.o
|
||||
|
||||
OBJS = ecmascript.o
|
||||
|
||||
include $(top_srcdir)/Makefile.lib
|
||||
|
@ -1,11 +1,11 @@
|
||||
top_builddir=../..
|
||||
include $(top_builddir)/Makefile.config
|
||||
|
||||
SUBDIRS-$(CONFIG_GUILE) += guile
|
||||
SUBDIRS-$(CONFIG_LUA) += lua
|
||||
SUBDIRS-$(CONFIG_PERL) += perl
|
||||
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)
|
||||
@ -62,19 +62,19 @@ report_scripting_error(struct module *module, struct session *ses,
|
||||
|
||||
|
||||
static struct module *scripting_modules[] = {
|
||||
#ifdef CONFIG_LUA
|
||||
#ifdef CONFIG_SCRIPTING_LUA
|
||||
&lua_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_GUILE
|
||||
#ifdef CONFIG_SCRIPTING_GUILE
|
||||
&guile_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_PERL
|
||||
#ifdef CONFIG_SCRIPTING_PERL
|
||||
&perl_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_PYTHON
|
||||
&python_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_RUBY
|
||||
#ifdef CONFIG_SCRIPTING_RUBY
|
||||
&ruby_scripting_module,
|
||||
#endif
|
||||
#ifdef CONFIG_SM_SCRIPTING
|
||||
|
@ -293,7 +293,7 @@ do_action(struct session *ses, enum main_action action_id, int verbose)
|
||||
break;
|
||||
|
||||
case ACT_MAIN_LUA_CONSOLE:
|
||||
#ifdef CONFIG_LUA
|
||||
#ifdef CONFIG_SCRIPTING_LUA
|
||||
trigger_event_name("dialog-lua-console", ses);
|
||||
#endif
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user