diff --git a/contrib/src/upnp/rules.mak b/contrib/src/upnp/rules.mak index 87ebd9fe9471bf7c5baf22b65cc8d75d31127259..4bfd039ba78bda93d3b1fcbcb8d958f04e61295b 100644 --- a/contrib/src/upnp/rules.mak +++ b/contrib/src/upnp/rules.mak @@ -20,13 +20,22 @@ endif $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub $(MOVE) +PUPNP_OPTIONS=--disable-largefile --disable-samples --disable-device --disable-webserver --without-documentation +ifdef HAVE_IOS +PUPNP_OPTIONS+= --disable-reuseaddr +else +ifdef HAVE_MACOSX +PUPNP_OPTIONS+= --disable-reuseaddr +endif +endif + .upnp: upnp ifdef HAVE_WIN32 $(RECONF) - cd $< && $(HOSTVARS) CFLAGS="-DUPNP_STATIC_LIB" ./configure --disable-largefile --disable-samples --disable-device --disable-webserver --without-documentation $(HOSTCONF) + cd $< && $(HOSTVARS) CFLAGS="-DUPNP_STATIC_LIB" ./configure $(PUPNP_OPTIONS) $(HOSTCONF) else $(RECONF) - cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DUPNP_STATIC_LIB" ./configure --disable-largefile --disable-samples --disable-device --disable-webserver --without-documentation $(HOSTCONF) + cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DUPNP_STATIC_LIB" ./configure $(PUPNP_OPTIONS) $(HOSTCONF) endif cd $< && $(MAKE) install touch $@