[farsight2/master] Make libnice non-optional

Olivier Crête olivier.crete at collabora.co.uk
Thu Apr 2 16:10:11 PDT 2009


---
 README                   |    3 +--
 configure.ac             |   34 ++++++----------------------------
 docs/plugins/Makefile.am |   13 ++-----------
 tests/check/Makefile.am  |    8 +-------
 4 files changed, 10 insertions(+), 48 deletions(-)

diff --git a/README b/README
index 19a2cc2..d7b1de6 100644
--- a/README
+++ b/README
@@ -19,12 +19,11 @@ Build time:
  - gst-plugins-base 0.10.22
  - glib 2.16
  - Python 2.4
+ - libnice 0.0.3
 
 For UPnP support:
  - GUPnP-IGD
 
-For the ICE transmitter:
- - libnice 0.0.3
 
 Run time for the RTP plugin:
  All of the build time requirements (except gtk-doc) plus
diff --git a/configure.ac b/configure.ac
index c1d5f65..84a93fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,34 +154,12 @@ AC_ARG_WITH(transmitter-plugins,
     [FS2_TRANSMITTER_PLUGINS_SELECTED=$FS2_TRANSMITTER_PLUGINS_ALL])
 
 
-dnl check for libnice
-if echo $FS2_TRANSMITTER_PLUGINS_SELECTED | grep -qi nice; then
-
-  NICE_REQUIRED=0.0.3
-
-  PKG_CHECK_MODULES(NICE, \
-       nice >= $NICE_REQUIRED,
-       HAVE_NICE=yes,
-       HAVE_NICE=no)
-
-  if test "x$HAVE_NICE" = "xno"; then
-    if test "x$TRANSMITTERS_DEFAULT" = "xyes"; then
-      FS2_TRANSMITTER_PLUGINS_SELECTED="${FS2_TRANSMITTER_PLUGINS_SELECTED/nice/}"
-      AC_MSG_WARN([Will not build libnice transmitter because libnice is not available])
-    else
-      AC_MSG_ERROR([Can not build requested libnice transmitter because libnice is not installed])
-    fi
-  else
-    USE_NICE=yes
-  fi
-
-  AC_SUBST(NICE_CFLAGS)
-  AC_SUBST(NICE_LIBS)
-else
-  AC_MSG_NOTICE(nice transmitter disabled by user request)
-fi
+NICE_REQUIRED=0.0.3
 
-AM_CONDITIONAL(USE_NICE, test "x$USE_NICE" == "xyes")
+PKG_CHECK_MODULES(NICE, \
+       nice >= $NICE_REQUIRED,, AC_MSG_ERROR([Need libnice >= $NICE_REQUIRED]))
+AC_SUBST(NICE_CFLAGS)
+AC_SUBST(NICE_LIBS)
 
 AC_SUBST(FS2_TRANSMITTER_PLUGINS_SELECTED)
 
diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am
index 32ba366..fe41c02 100644
--- a/docs/plugins/Makefile.am
+++ b/docs/plugins/Makefile.am
@@ -57,14 +57,11 @@ CFILE_GLOB=$(DOC_SOURCE_DIR)/gst/*/*.c $(DOC_SOURCE_DIR)/transmitters/*/*.c
 SCANOBJ_DEPS = \
 	$(top_builddir)/transmitters/multicast/libmulticast-transmitter.la \
 	$(top_builddir)/transmitters/rawudp/librawudp-transmitter.la \
+	$(top_builddir)/transmitters/nice/libnice-transmitter.la \
 	$(top_builddir)/gst/fsrtpconference/libfsrtpconference_doc.la \
 	$(top_builddir)/gst/funnel/libfsfunnel.la \
 	$(top_builddir)/gst/videoanyrate/libfsvideoanyrate.la 
 
-if USE_NICE
-SCANOBJ_DEPS += $(top_builddir)/transmitters/nice/libnice-transmitter.la
-endif
-
 # Header files to ignore when scanning.
 IGNORE_HFILES = 
 IGNORE_CFILES = 
@@ -87,16 +84,10 @@ EXTRA_HFILES = \
 	$(top_srcdir)/transmitters/rawudp/fs-rawudp-transmitter.h \
 	$(top_srcdir)/transmitters/rawudp/fs-rawudp-stream-transmitter.h \
 	$(top_srcdir)/transmitters/multicast/fs-multicast-transmitter.h \
-	$(top_srcdir)/transmitters/multicast/fs-multicast-stream-transmitter.h
-
-if USE_NICE
-EXTRA_HFILES += \
+	$(top_srcdir)/transmitters/multicast/fs-multicast-stream-transmitter.h \
 	$(top_srcdir)/transmitters/nice/fs-nice-transmitter.h \
 	$(top_srcdir)/transmitters/nice/fs-nice-stream-transmitter.h
 
-endif
-
-
 # Images to copy into HTML directory.
 HTML_IMAGES =
 
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 05c219d..918f55c 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -36,12 +36,6 @@ EXTRA_DIST = \
 	upnp/WANIPConnection.xml \
 	base/test1.conf
 
-if USE_NICE
-NICE_TRANSMITTER = transmitter/nice
-else
-NICE_TRANSMITTER = 
-endif
-
 #######
 # From here.. Its a list of our tests and their sub stuff
 #
@@ -50,7 +44,7 @@ check_PROGRAMS = \
 	base/fstransmitter \
 	transmitter/rawudp \
 	transmitter/multicast \
-	$(NICE_TRANSMITTER) \
+	transmitter/nice \
 	rtp/codecs \
 	rtp/sendcodecs \
 	rtp/conference \
-- 
1.5.6.5




More information about the farsight-commits mailing list