[farsight2/master] Separate wanting and having gupnp
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:25:00 PST 2008
---
Makefile.am | 2 +-
configure.ac | 18 +++++++++++++-----
gst-libs/ext/Makefile.am | 2 +-
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4108593..95befb0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,7 +44,7 @@ endif
pcverfiles = farsight2- at GST_MAJORMINOR@.pc
pcinfiles = farsight2.pc.in farsight2-upnp.pc.in
-if WANT_GUPNP
+if HAVE_GUPNP
pcverfiles += farsight2-upnp.pc
endif
diff --git a/configure.ac b/configure.ac
index 7a1a5b7..496fb55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -368,18 +368,26 @@ AM_CONDITIONAL(WANT_PYTHON, test "x$WANT_PYTHON" = "xyes")
AC_ARG_ENABLE([gupnp],
AC_HELP_STRING([--disable-gupnp], [Disable GUPnP support]),
[case "${enableval}" in
- yes) WANT_GUPNP=test ;;
+ yes) WANT_GUPNP=yes ;;
no) WANT_GUPNP=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-gupnp) ;;
esac],
WANT_GUPNP=test)
-if test "x$WANT_GUPNP" = "xtest"; then
+HAVE_GUPNP=no
+if test "x$WANT_GUPNP" != "xno"; then
PKG_CHECK_MODULES(GUPNP, [ gupnp-1.0 ],
- [ WANT_GUPNP=yes ],
- [ WANT_GUPNP=no ])
+ [ HAVE_GUPNP=yes ],
+ [ HAVE_GUPNP=no ])
+fi
+if test "x$WANT_GUPNP" = "xyes" && test "x$HAVE_GUPNP" = "xno"; then
+ AC_ERROR([Requested GUPnP, but it is not available])
+fi
+
+AM_CONDITIONAL(HAVE_GUPNP, test "x$HAVE_GUPNP" = "xyes")
+if test "x$HAVE_GUPNP" = "xyes"; then
+ AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP library])
fi
-AM_CONDITIONAL(WANT_GUPNP, test "x$WANT_GUPNP" = "xyes")
dnl *** output files ***
diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am
index f41c344..76755e2 100644
--- a/gst-libs/ext/Makefile.am
+++ b/gst-libs/ext/Makefile.am
@@ -1,4 +1,4 @@
-if WANT_GUPNP
+if HAVE_GUPNP
SUBDIRS = fsupnp
else
SUBDIRS =
--
1.5.6.5
More information about the farsight-commits
mailing list