diff --git a/Makefile b/Makefile
index 6e30c47..b64337a 100644
--- a/Makefile
+++ b/Makefile
@@ -169,7 +169,7 @@ $(OTR_PI): %.so: $(_SRCDIR_)%.c
 
 $(SKYPE_PI): $(_SRCDIR_)protocols/skype/skype.c
 	@echo '*' Building plugin skype
-	@$(CC) $(CFLAGS) -fPIC -shared $< -o $@
+	@$(CC) $(CFLAGS) $(SKYPEFLAGS) $< -o $@
 
 $(objects): %.o: $(_SRCDIR_)%.c
 	@echo '*' Compiling $<
diff --git a/configure b/configure
index 8e70070..0aaebd0 100755
--- a/configure
+++ b/configure
@@ -547,6 +547,11 @@ elif [ "$otr" = "plugin" ]; then
 fi
 
 if [ "$skype" = "1" -o "$skype" = "plugin" ]; then
+	if [ "$arch" = "Darwin" ]; then
+		echo "SKYPEFLAGS=-dynamiclib -undefined dynamic_lookup" >> Makefile.settings
+	else
+		echo "SKYPEFLAGS=-fPIC -shared" >> Makefile.settings
+	fi
 	echo 'SKYPE_PI=skype.so' >> Makefile.settings
 	protocols_mods="$protocol_mods skype(plugin)"
 fi
