1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

configure options --with-xulrunner_includes= and --with-xulrunner_libs=

The first option specifies the directory of xulrunner includes, eg.
--with-xulrunner_includes=/usr/include/xulrunner
The second: compiler options to find library, eg.
--with-xulrunner_libs="-Wl,-R/usr/lib/xulrunner -L/usr/lib/xulrunner -lmozjs"
This commit is contained in:
Witold Filipczyk 2010-07-21 21:08:00 +02:00 committed by Witold Filipczyk
parent 331a4dc62b
commit 4ec7aeafe0
2 changed files with 34 additions and 12 deletions

1
NEWS
View File

@ -70,6 +70,7 @@ Miscellaneous:
which one can search through the cache items' data rather than their which one can search through the cache items' data rather than their
metadata. metadata.
* link against lua51 not lua50 * link against lua51 not lua50
* configure options to link against libmozjs of xulrunner
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
The following changes should be removed from NEWS before ELinks 0.13.0 The following changes should be removed from NEWS before ELinks 0.13.0

View File

@ -622,8 +622,18 @@ fi
# Check for SpiderMonkey, optional even if installed. # Check for SpiderMonkey, optional even if installed.
# =================================================================== # ===================================================================
xulrunner_includes=
xulrunner_libs=
AC_ARG_WITH(xulrunner_includes, [ --with-xulrunner_includes=DIR
When set, the libmozjs of xulrunner is used instead of "standalone" SpiderMonkey],
[xulrunner_includes="$withval"])
AC_ARG_WITH(xulrunner_libs, [ --with-xulrunner_libs=OPTIONS
Linker options for xulrunner,
eg. --with-xulrunner_libs="-Wl,-R/usr/lib/xulrunner -L/usr/lib/xulrunner -lmozjs"],
[xulrunner_libs="$withval"])
AC_ARG_WITH(spidermonkey, [ --without-spidermonkey disable SpiderMonkey Mozilla JavaScript engine support], AC_ARG_WITH(spidermonkey, [ --without-spidermonkey disable SpiderMonkey Mozilla JavaScript engine support],
[if test "$withval" = no; then disable_spidermonkey=yes; fi]) [if test "$withval" = no; then disable_spidermonkey=yes; fi])
AC_MSG_CHECKING([for SpiderMonkey (1.5 RC3a or later)]) AC_MSG_CHECKING([for SpiderMonkey (1.5 RC3a or later)])
EL_SAVE_FLAGS EL_SAVE_FLAGS
@ -633,6 +643,16 @@ if test -z "$disable_spidermonkey"; then
if test ! -d "$withval"; then if test ! -d "$withval"; then
withval=""; withval="";
fi fi
if test ! -z "$xulrunner_includes"; then
SPIDERMONKEY_LIBS="$xulrunner_libs"
SPIDERMONKEY_CFLAGS="-I$xulrunner_includes"
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define XP_UNIX
#include <jsapi.h>]], [[JS_GetReservedSlot(NULL, NULL, 0, NULL)]])],[cf_result=yes],[cf_result=no])
else
for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do
for spidermonkeyinclude in "/include" "/include/js" "/include/smjs" "/include/mozjs"; do for spidermonkeyinclude in "/include" "/include/js" "/include/smjs" "/include/mozjs"; do
for spidermonkeylib in js smjs mozjs; do for spidermonkeylib in js smjs mozjs; do
@ -651,6 +671,7 @@ if test -z "$disable_spidermonkey"; then
done done
done done
fi fi
fi
AC_MSG_RESULT($cf_result) AC_MSG_RESULT($cf_result)
CONFIG_SPIDERMONKEY="$cf_result" CONFIG_SPIDERMONKEY="$cf_result"