diff --git a/scripts/install.sh b/scripts/install.sh
index 4d2e0bc091a4b4b3b0849e37c94f74d9c5e1d2e1..5e5ee81b47d641d0e3b6fb1f9b4fdb71107e73ec 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,6 +1,7 @@
 #!/usr/bin/env bash
 
 # Build and install to a local prefix under this repository.
+export OSTYPE
 
 # Flags:
 
@@ -64,10 +65,16 @@ cd native
 make
 cd "${DAEMON}"
 ./autogen.sh
+
+#keep shared Lib on MAC OSX
+if [[ "$OSTYPE" != "darwin"* ]]; then
+    sharedLib="--disable-shared"
+fi
+
 if $global; then
-  ./configure --disable-shared $CONFIGURE_FLAGS
+  ./configure $sharedLib $CONFIGURE_FLAGS
 else
-  ./configure --disable-shared $CONFIGURE_FLAGS --prefix="${INSTALL}/daemon"
+  ./configure $sharedLib $CONFIGURE_FLAGS --prefix="${INSTALL}/daemon"
 fi
 make -j${proc}
 make_install $global