AC_CHECK_FUNCS([poll])
AC_SUBST(LIBRT)
-PKG_CHECK_MODULES(GLIB, [dnl
- glib-2.0 >= $GLIB_REQ dnl
- gobject-2.0 >= $GLIB_REQ dnl
- gthread-2.0 >= $GLIB_REQ dnl
- gio-2.0 >= $GLIB_REQ dnl
- ])
+# Dependencies
+NICE_PACKAGES_PUBLIC="glib-2.0 >= $GLIB_REQ gio-2.0 >= $GLIB_REQ gobject-2.0 >= $GLIB_REQ"
+NICE_PACKAGES_PRIVATE="gthread-2.0"
+NICE_PACKAGES="$NICE_PACKAGES_PUBLIC $NICE_PACKAGES_PRIVATE"
+AC_SUBST([NICE_PACKAGES_PUBLIC])
+AC_SUBST([NICE_PACKAGES_PRIVATE])
+AC_SUBST([NICE_PACKAGES])
+
+PKG_CHECK_MODULES(GLIB, [$NICE_PACKAGES])
AC_ARG_WITH(gstreamer,
AS_HELP_STRING([--with-gstreamer],[build GStreamer plugin]),
esac],
WANT_GUPNP=test)
+GUPNP_PACKAGES_PUBLIC=""
+GUPNP_PACKAGES_PRIVATE="gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED"
+GUPNP_PACKAGES="$GUPNP_PACKAGES_PUBLIC $GUPNP_PACKAGES_PRIVATE"
+
HAVE_GUPNP=no
if test "x$WANT_GUPNP" != "xno"; then
- PKG_CHECK_MODULES(GUPNP, gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED,
+ PKG_CHECK_MODULES(GUPNP, [$GUPNP_PACKAGES],
[ HAVE_GUPNP=yes ],
[ HAVE_GUPNP=no ])
fi
if test "x$HAVE_GUPNP" = "xyes"; then
AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library])
+else
+ GUPNP_PACKAGES_PUBLIC=""
+ GUPNP_PACKAGES_PRIVATE=""
+ GUPNP_PACKAGES=""
fi
+AC_SUBST([GUPNP_PACKAGES_PUBLIC])
+AC_SUBST([GUPNP_PACKAGES_PRIVATE])
+AC_SUBST([GUPNP_PACKAGES])
+
AC_SUBST(HAVE_GUPNP)
dnl Test coverage
Name: libnice
Description: ICE library
-Requires: glib-2.0 >= 2.10.0
Version: @VERSION@
-Libs: -L${libdir} -lnice @GLIB_LIBS@
-Libs.private: @GUPNP_LIBS@
-Cflags: @GLIB_CFLAGS@ -I${includedir} -I${includedir}/nice
-
+Requires: @NICE_PACKAGES_PUBLIC@ @GUPNP_PACKAGES_PUBLIC@
+Requires.private: @NICE_PACKAGES_PRIVATE@ @GUPNP_PACKAGES_PRIVATE@
+Libs: -L${libdir} -lnice
+Cflags: -I${includedir}/nice