diff --git a/configure.ac b/configure.ac
index e5892c4c3e650d72bee126ee5a9c1faa1e40625d..31c83bca371a824eb56ccd02e1b73ccefd9b1eff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,13 @@ case "$host_os" in
     SHLIBLINK='$(CC) $(LDFLAGS) -shared -Wl,--out-implib=$(SHLIBFILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
     SHLIBLIBS='-Wl,--no-whole-archive $(LIBS)'
     ;;
+  darwin*)
+    SHLIBFORLINK=libnettle.dylib
+    SHLIBSONAME='$(SHLIBFORLINK).$(SHLIBMAJOR)'
+    SHLIBFILE='$(SHLIBSONAME).$(SHLIBMINOR)'
+    SHLIBLINK='$(CC) -dynamiclib $(LDFLAGS)'
+    # SHLIBLIBS=' -lgmp'
+    ;;
   *)
     SHLIBFORLINK=libnettle.so
     SHLIBSONAME='$(SHLIBFORLINK).$(SHLIBMAJOR)'