diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-01-25 22:04:11 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-01-25 22:04:11 +0800 |
commit | 7da97e73384abaf2213b5038e97ae3dbf392e407 (patch) | |
tree | 4bb535e25b82464f9dfcd86811a5bdb27ffdfb06 | |
parent | 2dec73680d1f007235d52abd9e1aa6c89ecf361c (diff) |
Use cURL when not Emscripten
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index b6fee15..43a977c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,13 @@ librtclient_la_SOURCES = \ search.c \ client.c librtclient_la_CPPFLAGS = -I${prefix}/include -librtclient_la_LDFLAGS = -L${prefix}/lib -lcurl +librtclient_la_LDFLAGS = -L${prefix}/lib +if EMSCRIPTEN +librtclient_la_LDFLAGS += -static +else +librtclient_la_CPPFLAGS += $(CURL_CFLAGS) +librtclient_la_LDFLAGS += $(CURL_LIBS) +endif include_HEADERS = rtclient.h pkginclude_HEADERS = \ rtclient/user.h \ diff --git a/configure.ac b/configure.ac index 5dbf567..028b315 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,15 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_TYPE_SIZE_T AC_TYPE_SSIZE_T +AC_CANONICAL_HOST +case $host_os in + *emscripten* ) emscripten=true;; + *) emscripten=false;; +esac +if test "x$emscripten" = "xfalse"; then + PKG_CHECK_MODULES([CURL], [libcurl]) +fi +AM_CONDITIONAL([EMSCRIPTEN], [test x$emscripten = xtrue]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT |