summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 07:05:32 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 07:05:32 +0800
commitdfc4062d5aa1e4dc7f44fbb1104638ca78fe9e7b (patch)
treed2b0d1992a7976614e180349c530453ccb14d006
parent87ee715abd58bb5709637c5e16d1f0b87257f2af (diff)
Turn Strap parsing into a feature
rather than external libtidy package option, though it does, require libtidy to parse Strap, but libtidy will only be used for parsing Strap, not for anything else, seen from the library user's perspective.
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac14
2 files changed, 8 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index c6ef2d1..d43fd49 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,15 +11,13 @@ if WASM
libinterchange_la_LDFLAGS = -static
else
libinterchange_la_CPPFLAGS += $(CURL_CFLAGS)
-libinterchange_la_LDFLAGS = $(CURL_LIBS)
endif
if IOS
-libinterchange_la_LDFLAGS += -static
+libinterchange_la_LDFLAGS = -static
endif
-if TIDY
+if STRAP
libinterchange_la_SOURCES += handler.c
libinterchange_la_CPPFLAGS += $(TIDY_CFLAGS)
-libinterchange_la_LDFLAGS += $(TIDY_LIBS)
endif
include_HEADERS = icclient.h
pkginclude_HEADERS = \
diff --git a/configure.ac b/configure.ac
index 4d895be..734bb99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,14 +3,12 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AM_PROG_AR
LT_INIT
-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_ARG_ENABLE([strap],
+ [AS_HELP_STRING([--enable-strap],
+ [enable Strap template parsing with libtidy])],
+ [PKG_CHECK_MODULES([TIDY], [tidy])],
+ [enable_strap=no])
+AM_CONDITIONAL([STRAP], [test "x$enable_strap" = xyes])
AC_CANONICAL_HOST
case $host_cpu in
*wasm* ) wasm=true;;