mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[configure.ac] Added --with-quickjs option
Note, that if you pass both: --with-spidermonkey \ --with-quickjs you'll get compilation error
This commit is contained in:
parent
e7cc68f742
commit
9a3be156a7
@ -157,6 +157,7 @@ CONFIG_OS_UNIX = @CONFIG_OS_UNIX@
|
||||
CONFIG_OS_WIN32 = @CONFIG_OS_WIN32@
|
||||
CONFIG_OWN_LIBC = @CONFIG_OWN_LIBC@
|
||||
CONFIG_POD2HTML = @CONFIG_POD2HTML@
|
||||
CONFIG_QUICKJS = @CONFIG_QUICKJS@
|
||||
CONFIG_SCRIPTING = @CONFIG_SCRIPTING@
|
||||
CONFIG_SCRIPTING_GUILE = @CONFIG_SCRIPTING_GUILE@
|
||||
CONFIG_SCRIPTING_LUA = @CONFIG_SCRIPTING_LUA@
|
||||
|
60
configure.ac
60
configure.ac
@ -630,6 +630,57 @@ if test "$CONFIG_OS_WIN32" = yes; then
|
||||
EL_CONFIG_OS_WIN32
|
||||
fi
|
||||
|
||||
# ===================================================================
|
||||
# Check for QuickJS
|
||||
# ===================================================================
|
||||
|
||||
AC_ARG_WITH([quickjs],
|
||||
[AS_HELP_STRING([--with-quickjs],
|
||||
[enable Quickjs engine])])
|
||||
|
||||
CONFIG_QUICKJS=
|
||||
|
||||
case "$with_quickjs" in
|
||||
"" | no)
|
||||
# The user specified --without-quickjs.
|
||||
AC_MSG_CHECKING([for QuickJS])
|
||||
AC_MSG_RESULT([disabled])
|
||||
CONFIG_QUICKJS="no"
|
||||
;;
|
||||
yes)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$CONFIG_QUICKJS"; then
|
||||
break
|
||||
else
|
||||
AC_MSG_CHECKING([for QuickJS])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <quickjs/quickjs.h>
|
||||
]], [])],
|
||||
[CONFIG_QUICKJS=yes
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([not found])]
|
||||
)
|
||||
|
||||
if test "x$CONFIG_QUICKJS" = xyes; then
|
||||
DB_LOCALSTORAGE_LIBS="$($PKG_CONFIG $pkg_config_static --libs sqlite3)"
|
||||
XMLPLUSPLUS_LIBS="$($PKG_CONFIG $pkg_config_static --libs libxml++-5.0)"
|
||||
DB_LOCALSTORAGE_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags sqlite3)"
|
||||
XMLPLUSPLUS_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags libxml++-5.0)"
|
||||
|
||||
CFLAGS="$CFLAGS $DB_LOCALSTORAGE_CFLAGS $XMLPLUSPLUS_CFLAGS"
|
||||
|
||||
LIBS="$LIBS $DB_LOCALSTORAGE_LIBS $XMLPLUSPLUS_LIBS /usr/lib/quickjs/libquickjs.a"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# ===================================================================
|
||||
# Check for SpiderMonkey, optional even if installed.
|
||||
# ===================================================================
|
||||
@ -712,7 +763,7 @@ else
|
||||
CONFIG_ECMASCRIPT_SMJS=no
|
||||
fi
|
||||
|
||||
EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_ECMASCRIPT_SMJS], [ECMAScript (JavaScript)])
|
||||
EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_ECMASCRIPT_SMJS CONFIG_QUICKJS], [ECMAScript (JavaScript)])
|
||||
AC_SUBST(CONFIG_ECMASCRIPT_SMJS)
|
||||
|
||||
if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes &&
|
||||
@ -752,6 +803,13 @@ if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes ||
|
||||
CFLAGS="$CFLAGS -fpermissive $SPIDERMONKEY_CFLAGS"
|
||||
fi
|
||||
|
||||
if test "x$CONFIG_QUICKJS" = xyes; then
|
||||
EL_CONFIG(CONFIG_XML, [libxml++5.0])
|
||||
EL_CONFIG(CONFIG_QUICKJS, [quickjs])
|
||||
AC_SUBST(CONFIG_QUICKJS)
|
||||
AC_SUBST(CONFIG_XML)
|
||||
CFLAGS="$CFLAGS -fpermissive"
|
||||
fi
|
||||
# ===================================================================
|
||||
# Check for Guile, optional even if installed.
|
||||
# ===================================================================
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
cd "$MESON_SOURCE_ROOT"
|
||||
|
||||
|
@ -4,8 +4,12 @@ INCLUDES += $(SPIDERMONKEY_CFLAGS)
|
||||
|
||||
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
||||
|
||||
SUBDIRS-$(CONFIG_QUICKJS) += quickjs
|
||||
|
||||
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += css2xpath.o ecmascript.o localstorage-db.o spidermonkey.o
|
||||
|
||||
OBJS-$(CONFIG_QUICKJS) += css2xpath.o ecmascript.o localstorage-db.o quickjs.o
|
||||
|
||||
ifeq ($(CONFIG_ECMASCRIPT_SMJS), yes)
|
||||
CONFIG_ANY_SPIDERMONKEY = yes
|
||||
else ifeq ($(CONFIG_SCRIPTING_SPIDERMONKEY), yes)
|
||||
|
8
src/ecmascript/quickjs/Makefile
Normal file
8
src/ecmascript/quickjs/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
top_builddir=../../..
|
||||
include $(top_builddir)/Makefile.config
|
||||
|
||||
OBJS = attr.o attributes.o collection.o console.o document.o element.o form.o \
|
||||
forms.o heartbeat.o history.o implementation.o input.o location.o \
|
||||
localstorage.o navigator.o nodelist.o screen.o unibar.o window.o
|
||||
|
||||
include $(top_srcdir)/Makefile.lib
|
Loading…
Reference in New Issue
Block a user