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

[configure.ac] Compile with libxml++-5.0

Note, disable CSS if do not want segfaults
This commit is contained in:
Witold Filipczyk 2021-07-09 17:52:15 +02:00
parent 7328da1756
commit d4f280d325
4 changed files with 14 additions and 3 deletions

View File

@ -173,6 +173,7 @@ CONFIG_TRUE_COLOR = @CONFIG_TRUE_COLOR@
CONFIG_URI_REWRITE = @CONFIG_URI_REWRITE@
CONFIG_UTF8 = @CONFIG_UTF8@
CONFIG_XBEL_BOOKMARKS = @CONFIG_XBEL_BOOKMARKS@
CONFIG_XML = @CONFIG_XML@
CONFIG_XMLTO = @CONFIG_XMLTO@
CONFIG_GSSAPI = @CONFIG_GSSAPI@
CONFIG_ZSTD = @CONFIG_ZSTD@

View File

@ -643,6 +643,7 @@ AC_ARG_WITH([spidermonkey],
# when we know for sure whether we're going to use SpiderMonkey or not.
# (features.conf is not supposed to define it.)
CONFIG_SPIDERMONKEY=
CONFIG_XML=
EL_SAVE_FLAGS
case "$with_spidermonkey" in
@ -667,9 +668,12 @@ for package in mozjs-52; do
AC_MSG_CHECKING([for SpiderMonkey (mozjs-52) in pkg-config $package])
if $PKG_CONFIG $pkg_config_static --cflags --libs $package > /dev/null 2>&AS_MESSAGE_LOG_FD; then
DB_LOCALSTORAGE_LIBS="$($PKG_CONFIG $pkg_config_static --libs sqlite3)"
SPIDERMONKEY_LIBS="$($PKG_CONFIG $pkg_config_static --libs $package) $DB_LOCALSTORAGE_LIBS"
XMLPLUSPLUS_LIBS="$($PKG_CONFIG $pkg_config_static --libs libxml++-5.0)"
SPIDERMONKEY_LIBS="$($PKG_CONFIG $pkg_config_static --libs $package) $DB_LOCALSTORAGE_LIBS $XMLPLUSPLUS_LIBS"
DB_LOCALSTORAGE_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags sqlite3)"
SPIDERMONKEY_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags $package) $DB_LOCALSTORAGE_CFLAGS"
XMLPLUSPLUS_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags libxml++-5.0)"
SPIDERMONKEY_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags $package) $DB_LOCALSTORAGE_CFLAGS $XMLPLUSPLUS_CFLAGS"
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
@ -697,6 +701,8 @@ done
if test -z "$CONFIG_SPIDERMONKEY"; then
# Didn't find SpiderMonkey anywhere.
CONFIG_SPIDERMONKEY=no
else
CONFIG_XML=yes
fi
EL_RESTORE_FLAGS
@ -739,9 +745,11 @@ fi
if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes ||
test "x$CONFIG_SCRIPTING_SPIDERMONKEY" = xyes; then
LIBS="$LIBS $SPIDERMONKEY_LIBS"
EL_CONFIG(CONFIG_XML, [libxml++5.0])
AC_SUBST(SPIDERMONKEY_LIBS)
AC_SUBST(SPIDERMONKEY_CFLAGS)
AC_SUBST(CONFIG_SPIDERMONKEY)
AC_SUBST(CONFIG_XML)
CFLAGS="$CFLAGS -fpermissive $SPIDERMONKEY_CFLAGS"
fi

View File

@ -3,6 +3,7 @@ include $(top_builddir)/Makefile.config
SUBDIRS-$(CONFIG_CSS) += css
SUBDIRS-$(CONFIG_DOM) += dom
SUBDIRS-$(CONFIG_XML) += xml
SUBDIRS = gemini html plain

View File

@ -26,6 +26,7 @@
#include "document/html/renderer.h"
#include "document/html/tables.h"
#include "document/options.h"
#include "document/xml/tables.h"
#include "document/xml/tags.h"
#include "globhist/globhist.h"
#include "intl/charsets.h"
@ -3767,7 +3768,7 @@ tags_html_table(struct source_renderer *renderer, void *no, unsigned char *attr,
xmlpp::Element *node = no;
if (false && html_context->options->tables
&& html_context->table_level < HTML_MAX_TABLE_LEVEL) {
format_table(attr, html, eof, end, html_context);
tags_format_table(renderer, no);
ln_break(html_context, 2);
return;