From 87ee715abd58bb5709637c5e16d1f0b87257f2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 24 Sep 2022 21:34:34 +0800 Subject: Make libtidy and the handler optional --- configure.ac | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cc4846b..4d895be 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,27 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC AM_PROG_AR LT_INIT -PKG_CHECK_MODULES([TIDY], [tidy]) +AC_ARG_WITH([tidy], + [AS_HELP_STRING([--with-tidy], + [enable HTML parsing with libtidy])], + [], + [with_tidy=no]) +AS_IF([test "x$with_tidy" != xno], + [PKG_CHECK_MODULES([TIDY], [tidy])]) +AM_CONDITIONAL([TIDY], [test "x$with_tidy" = xyes]) +AC_CANONICAL_HOST +case $host_cpu in + *wasm* ) wasm=true;; + *) wasm=false;; +esac +AM_CONDITIONAL([WASM], [test "x$wasm" = xtrue]) +AS_IF([test "x$wasm" != xtrue], + [PKG_CHECK_MODULES([CURL], [libcurl])]) +case $host in + *arm*apple-darwin1* ) ios=true;; + *) ios=false;; +esac +AM_CONDITIONAL([IOS], [test "x$ios" = xtrue]) AC_CHECK_HEADERS([stddef.h, locale.h]) AC_CHECK_HEADERS([threads.h], [AC_DEFINE([HAVE_THREADS_H])]) @@ -16,17 +36,6 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_TYPE_SIZE_T AC_TYPE_SSIZE_T -AC_CANONICAL_HOST -case $host_cpu in - *wasm* ) wasm=true;; - *) wasm=false;; -esac -AM_CONDITIONAL([WASM], [test x$wasm = xtrue]) -case $host in - *arm*apple-darwin1* ) ios=true;; - *) ios=false;; -esac -AM_CONDITIONAL([IOS], [test x$ios = xtrue]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- cgit v1.2.3