aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-04-17 20:25:47 +0200
committerChristian Grothoff <christian@grothoff.org>2024-04-17 20:25:47 +0200
commitd68210a0a0cc069dfa278d044595940a7c9ec17b (patch)
tree56ea948731f29eab07527913f2c165060eaa364f
parent030ee3197daf59a906f4bc6f289a39c16aa189cd (diff)
downloadlibextractor-master.tar.gz
libextractor-master.zip
fix patch for #8620 to keep it building on DebianHEADmaster
-rwxr-xr-xbootstrap2
-rw-r--r--configure.ac11
-rw-r--r--src/plugins/Makefile.am2
-rw-r--r--src/plugins/html_extractor.c7
4 files changed, 18 insertions, 4 deletions
diff --git a/bootstrap b/bootstrap
index 7e15079..0b9420b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -27,7 +27,7 @@ else
27fi 27fi
28 28
29if existence libtool || existence libtoolize || existence glibtoolize || existence slibtool; then 29if existence libtool || existence libtoolize || existence glibtoolize || existence slibtool; then
30 autoreconf -I m4 -i ${1+"$@"} 30 autoreconf -f -I m4 -i ${1+"$@"}
31else 31else
32 echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2; 32 echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
33 exit 1 33 exit 1
diff --git a/configure.ac b/configure.ac
index e89d70c..703c4a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -426,14 +426,20 @@ AC_CHECK_LIB(magic, magic_open,
426 AM_CONDITIONAL(HAVE_MAGIC, false))], 426 AM_CONDITIONAL(HAVE_MAGIC, false))],
427 AM_CONDITIONAL(HAVE_MAGIC, false)) 427 AM_CONDITIONAL(HAVE_MAGIC, false))
428 428
429dnl tidyNodeGetValue was already available in 5.0.0, released in 2015. 429# tidyNodeGetValue was already available in 5.0.0, released in 2015.
430maybe_tidy=1
430PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0], 431PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0],
431 [AC_DEFINE(HAVE_TIDY, 1, [Have tidy]) 432 [AC_DEFINE(HAVE_TIDY, 1, [Have tidy])
432 AM_CONDITIONAL(HAVE_TIDY, true)], 433 AM_CONDITIONAL(HAVE_TIDY, true)],
433 [AM_CONDITIONAL(HAVE_TIDY, false)]) 434 [maybe_tidy=0])
434CFLAGS="$CFLAGS $TIDY_CFLAGS" 435CFLAGS="$CFLAGS $TIDY_CFLAGS"
435LIBS="$LIBS $TIDY_LIBS" 436LIBS="$LIBS $TIDY_LIBS"
436 437
438AC_CHECK_HEADERS([tidy.h],,
439 AC_CHECK_HEADERS([tidy/tidy.h],,[maybe_tidy=0]))
440
441AM_CONDITIONAL(HAVE_TIDY, test "x$maybe_tidy" = "x1")
442
437# should 'make check' run tests? 443# should 'make check' run tests?
438AC_MSG_CHECKING(whether to run tests) 444AC_MSG_CHECKING(whether to run tests)
439AC_ARG_ENABLE([testruns], 445AC_ARG_ENABLE([testruns],
@@ -443,7 +449,6 @@ AC_ARG_ENABLE([testruns],
443AC_MSG_RESULT($enable_test_run) 449AC_MSG_RESULT($enable_test_run)
444AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) 450AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
445 451
446
447AC_HEADER_DIRENT 452AC_HEADER_DIRENT
448AC_HEADER_STDBOOL 453AC_HEADER_STDBOOL
449AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h]) 454AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h])
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 69cb1f7..f32114a 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -363,6 +363,8 @@ test_gstreamer_CFLAGS = \
363 363
364libextractor_html_la_SOURCES = \ 364libextractor_html_la_SOURCES = \
365 html_extractor.c 365 html_extractor.c
366libextractor_html_la_CFLAGS = \
367 $(TIDY_CFLAGS)
366libextractor_html_la_LDFLAGS = \ 368libextractor_html_la_LDFLAGS = \
367 $(PLUGINFLAGS) 369 $(PLUGINFLAGS)
368libextractor_html_la_LIBADD = \ 370libextractor_html_la_LIBADD = \
diff --git a/src/plugins/html_extractor.c b/src/plugins/html_extractor.c
index 88100d3..0a9a89b 100644
--- a/src/plugins/html_extractor.c
+++ b/src/plugins/html_extractor.c
@@ -26,8 +26,15 @@
26#include "platform.h" 26#include "platform.h"
27#include "extractor.h" 27#include "extractor.h"
28#include <magic.h> 28#include <magic.h>
29#if HAVE_TIDY_H
29#include <tidy.h> 30#include <tidy.h>
30#include <tidybuffio.h> 31#include <tidybuffio.h>
32#elif HAVE_TIDY_TIDY_H
33#include <tidy/tidy.h>
34#include <tidy/tidybuffio.h>
35#else
36Broken build, fix tidy detection.
37#endif
31 38
32/** 39/**
33 * Mapping of HTML META names to LE types. 40 * Mapping of HTML META names to LE types.