diff options
-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 |