[svn r244] Fixes some problems with the UPnP library dependencies. trunk
authorrosfran
Fri Jan 05 15:06:09 2007 +0000 (2007-01-05)
branchtrunk
changeset 243beb4c07dfb65
parent 242 9612496070ae
child 244 c88244670b08
[svn r244] Fixes some problems with the UPnP library dependencies.
gmyth/configure.ac
gmyth/gmyth.pc.in
gmyth/src/Makefile.am
gmyth/src/gmyth_backendinfo.c
gmyth/src/gmyth_upnp.c
gmyth/src/gmyth_upnp.h
     1.1 --- a/gmyth/configure.ac	Thu Jan 04 21:16:44 2007 +0000
     1.2 +++ b/gmyth/configure.ac	Fri Jan 05 15:06:09 2007 +0000
     1.3 @@ -225,6 +225,8 @@
     1.4  AC_SUBST(MYSQL_CFLAGS)
     1.5  AC_SUBST(MYSQL_LIBS)
     1.6  
     1.7 +
     1.8 +AC_MSG_NOTICE([Checking for the UPnP CyberLink for C library...])
     1.9  dnl ========== Check for Cyberlink UPnP Libraries
    1.10  AC_ARG_ENABLE(upnp,
    1.11  	[AC_HELP_STRING([--disable-upnp], [disable building UPnP related stuff])],
    1.12 @@ -232,7 +234,7 @@
    1.13  	enable_upnp=yes)
    1.14  
    1.15  if test "x$enable_upnp" = "xyes" ; then
    1.16 -	PKG_CHECK_MODULES(CYBERLINK_UPNP,
    1.17 +	PKG_CHECK_MODULES(CYBERLINK,
    1.18  	  clinkc,
    1.19  	  HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no)
    1.20  fi
     2.1 --- a/gmyth/gmyth.pc.in	Thu Jan 04 21:16:44 2007 +0000
     2.2 +++ b/gmyth/gmyth.pc.in	Fri Jan 05 15:06:09 2007 +0000
     2.3 @@ -8,5 +8,5 @@
     2.4  Version: @VERSION@
     2.5  Requires: gobject-2.0 glib-2.0
     2.6  
     2.7 -Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth
     2.8 -Cflags: @MYSQL_CFLAGS@ -I${includedir}/gmyth
     2.9 +Libs: @MYSQL_LIBS@ @CYBERLINK_LIBS@ -L${libdir} -lgmyth
    2.10 +Cflags: @MYSQL_CFLAGS@ @CYBERLINK_CFLAGS@ -I${includedir}/gmyth
     3.1 --- a/gmyth/src/Makefile.am	Thu Jan 04 21:16:44 2007 +0000
     3.2 +++ b/gmyth/src/Makefile.am	Fri Jan 05 15:06:09 2007 +0000
     3.3 @@ -52,6 +52,11 @@
     3.4  	$(GSTPLUGINSBASE_CFLAGS)	\
     3.5  	$(MYSQL_CFLAGS)
     3.6  
     3.7 +if WITH_UPNP
     3.8 +libgmyth_la_CFLAGS += 			\
     3.9 +	$(CYBERLINK_CFLAGS)
    3.10 +endif
    3.11 +
    3.12  libgmyth_la_LDFLAGS = 			\
    3.13  	-export-dynamic 			\
    3.14  	$(MYSQL_LIBS) 				\
    3.15 @@ -59,6 +64,13 @@
    3.16  	$(GSTBASE_LIBS)				\
    3.17  	$(GSTPLUGINS_LIBS)
    3.18  
    3.19 +if WITH_UPNP
    3.20 +libgmyth_la_LDFLAGS += 			\
    3.21 +	$(CYBERLINK_LIBS)
    3.22 +libgmyth_la_LIBS = 			\
    3.23 +	$(CYBERLINK_LIBS)
    3.24 +endif
    3.25 +
    3.26  libgmyth_includedir = 			\
    3.27  	$(pkgincludedir)
    3.28  
     4.1 --- a/gmyth/src/gmyth_backendinfo.c	Thu Jan 04 21:16:44 2007 +0000
     4.2 +++ b/gmyth/src/gmyth_backendinfo.c	Fri Jan 05 15:06:09 2007 +0000
     4.3 @@ -154,7 +154,7 @@
     4.4      { 
     4.5      #ifdef WITH_UPNP
     4.6  	    GMythUPnP *gmyth_upnp = gmyth_upnp_new( backend_info );
     4.7 -	    backend_info = gmyth_upnp_get_backend_info( gmyth_upnp );
     4.8 +	    /* backend_info = gmyth_upnp_get_backend_info( gmyth_upnp ); */
     4.9  	    backend_info->hostname = g_strdup ( gmyth_upnp_get_host( gmyth_upnp ) );
    4.10  	    g_object_unref( gmyth_upnp );
    4.11      #else
     5.1 --- a/gmyth/src/gmyth_upnp.c	Thu Jan 04 21:16:44 2007 +0000
     5.2 +++ b/gmyth/src/gmyth_upnp.c	Fri Jan 05 15:06:09 2007 +0000
     5.3 @@ -27,6 +27,10 @@
     5.4   *   
     5.5   */
     5.6  
     5.7 +#ifdef HAVE_CONFIG_H
     5.8 +#include "config.h"
     5.9 +#endif
    5.10 +
    5.11  #include "gmyth_upnp.h"
    5.12  
    5.13  #include <arpa/inet.h>
    5.14 @@ -253,7 +257,8 @@
    5.15  		devName = cg_upnp_device_getfriendlyname(childDev);
    5.16  		dev_url = cg_upnp_device_getlocationfromssdppacket( childDev );
    5.17  		gmyth_debug( "Device's friendly name = %s, and  device's URL = %s\n", devName, dev_url );
    5.18 -		if ( upnp_dev_found = ( g_strstr_len( devName, strlen( devName ), mythtvFriendlyName ) != NULL ) ) {
    5.19 +		if ( ( upnp_dev_found = ( g_strstr_len( devName, strlen( devName ), mythtvFriendlyName ) != NULL ) ) == TRUE ) 
    5.20 +		{
    5.21  			*udn = cg_upnp_device_getudn( childDev );
    5.22  			*mythtv_servers_lst = g_list_append( *mythtv_servers_lst, dev_url ); 
    5.23  		}
    5.24 @@ -301,7 +306,7 @@
    5.25  	if ( NULL == gmyth_upnp || gmyth_upnp->port <= 0 ) 
    5.26  	{
    5.27  		gmyth_debug ("[%s] GMythUPnP host field not initialized\n", __FUNCTION__);
    5.28 -		return NULL;
    5.29 +		return 0;
    5.30  	}
    5.31  
    5.32  	return gmyth_upnp->port;
     6.1 --- a/gmyth/src/gmyth_upnp.h	Thu Jan 04 21:16:44 2007 +0000
     6.2 +++ b/gmyth/src/gmyth_upnp.h	Fri Jan 05 15:06:09 2007 +0000
     6.3 @@ -1,14 +1,13 @@
     6.4  /**
     6.5   * GMyth Library
     6.6   *
     6.7 - * @file gmyth/gmyth_uri.h
     6.8 + * @file gmyth/gmyth_upnp.h
     6.9   * 
    6.10 - * @brief <p> GMythURI utils
    6.11 - *  - Extracts and parses a URI char string, in according with the RFC 2396 
    6.12 - *    [http://www.ietf.org/rfc/rfc2396.txt]
    6.13 - * 
    6.14 + * @brief <p> GMythUPnP allows that a MythTV frontend discovers a 
    6.15 + * MythTV backend, using the UPnP architecture.
    6.16 + *
    6.17   * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    6.18 - * @author Rosfran Borges <rosfran.borges@indt.org.br>
    6.19 + * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
    6.20   *
    6.21   *//*
    6.22   * 
    6.23 @@ -25,6 +24,7 @@
    6.24   * You should have received a copy of the GNU Lesser General Public License
    6.25   * along with this program; if not, write to the Free Software
    6.26   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    6.27 + *   
    6.28   */
    6.29  
    6.30  #ifndef _GMYTH_UPNP_H_