--- a/Makefile.am
+++ b/Makefile.am
@@ -113,9 +113,11 @@
     libupnpp/upnpputils.hxx \
     libupnpp/workqueue.h
 
+if LINUX
 # Curiously, -no-undefined seems to do nothing?? -Wl,-zdefs works though.
 # automake 1.14.1
 libupnpp_la_LDFLAGS = -Wl,-zdefs -no-undefined -version-info $(VERSION_INFO)
+endif
 
 libupnpp_la_LIBADD = $(LIBUPNPP_LIBS)