diff --git a/Makefile b/Makefile index 912a7f9..f345271 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,9 @@ endif ifdef STATIC LIBGRAY := $(LIBGRAY:so=a) LIBRARIES := $(LIBRARIES:so=a) +ifndef SEMISTATIC LDFLAGS += -static +endif else LDFLAGS += -Wl,-rpath '$$ORIGIN/../lib/' endif diff --git a/configure b/configure index 05f68d4..e787e6c 100755 --- a/configure +++ b/configure @@ -55,7 +55,10 @@ done printf 'Running on ' case $(uname -s) in Linux*) echo 'Linux' ;; - Darwin*) echo 'Mac' ;; + Darwin*) + echo 'macOS' + # static libc is not available on macOS + printf 'SEMISTATIC=1\n' >> configure.mk ;; CYGWIN*|MSYS*|MINGW*) echo 'Windows' ;; *) echo 'unknown OS' ;; esac