diff options
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rwxr-xr-x | wasm-unknown-emscripten-configure | 4 | ||||
-rwxr-xr-x | wasm32-unknown-emscripten-configure | 4 |
4 files changed, 25 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 1c46e4e..66867b2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,14 @@ libicclient_la_SOURCES = \ member.c \ admin.c \ client.c +libicclient_la_CFLAGS = -I${prefix}/include +libicclient_la_LDFLAGS = $(CURL_LIBS) +if WASM +libicclient_la_LDFLAGS += -static +endif +if IOS +libicclient_la_LDFLAGS += -static +endif pkginclude_HEADERS = \ icclient/product.h \ icclient/catalog.h \ @@ -17,4 +25,3 @@ pkginclude_HEADERS = \ icclient/member.h \ icclient/admin.h \ icclient/client.h -libicclient_la_LDFLAGS = -lcurl diff --git a/configure.ac b/configure.ac index 7317c8c..66826d2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,9 @@ AC_INIT([icclient], [0.0], [pt@darapsa.co.id]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC -AC_CONFIG_FILES([Makefile]) AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([Makefile]) +PKG_CHECK_MODULES([CURL], [libcurl]) AC_CHECK_HEADER_STDBOOL AC_C_INLINE AC_FUNC_MALLOC @@ -11,4 +12,15 @@ AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AM_PROG_AR LT_INIT +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_OUTPUT diff --git a/wasm-unknown-emscripten-configure b/wasm-unknown-emscripten-configure deleted file mode 100755 index f84b40a..0000000 --- a/wasm-unknown-emscripten-configure +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export CPPFLAGS="$CPPFLAGS -DDEBUG" -export CFLAGS="$CFLAGS -g" -emconfigure ./configure --prefix=$EMSDK/upstream/emscripten/system --disable-shared diff --git a/wasm32-unknown-emscripten-configure b/wasm32-unknown-emscripten-configure new file mode 100755 index 0000000..f35091b --- /dev/null +++ b/wasm32-unknown-emscripten-configure @@ -0,0 +1,4 @@ +#!/bin/sh +export CPPFLAGS="$CPPFLAGS -DDEBUG" +export CFLAGS="$CFLAGS -g" +emconfigure ./configure --host=wasm32-unknown-emscripten --prefix=$EMSDK/upstream/emscripten/system |