# HG changeset patch # User rosfran # Date 1176907660 -3600 # Node ID 1b897f699097eb297928ea2847ac8e9fdcc92e42 # Parent bfe33d404df5ae4e9a1f16718d9424e44108998d [svn r569] Beautify the test scripts, fixed some missing references to the gthread module. diff -r bfe33d404df5 -r 1b897f699097 gmyth/configure.ac --- a/gmyth/configure.ac Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/configure.ac Wed Apr 18 15:47:40 2007 +0100 @@ -126,6 +126,18 @@ AC_SUBST(GOBJECT_CFLAGS) AC_SUBST(GOBJECT_LIBS) +# Check for GThread +PKG_CHECK_MODULES(GTHREAD, gthread-2.0, HAVE_GTHREAD=yes,HAVE_GTHREAD=no) + +# Give error and exit if we don't have glib +if test "x$HAVE_GTHREAD" = "xno"; then + AC_MSG_ERROR(you need gthread+-2.0 installed) +fi + +# make GTHREAD_CFLAGS and GTHREAD_LIBS available +AC_SUBST(GTHREAD_CFLAGS) +AC_SUBST(GTHREAD_LIBS) + # Check for libxml-2.0 PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no) diff -r bfe33d404df5 -r 1b897f699097 gmyth/gmyth.pc.in --- a/gmyth/gmyth.pc.in Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/gmyth.pc.in Wed Apr 18 15:47:40 2007 +0100 @@ -6,7 +6,7 @@ Name: gmyth Description: Myth TV library based upon GLib/GObject paradigm Version: @VERSION@ -Requires: gobject-2.0 glib-2.0 libcurl +Requires: gobject-2.0 glib-2.0 gthread-2.0 libcurl Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth -lcurl Cflags: -I${includedir}/gmyth diff -r bfe33d404df5 -r 1b897f699097 gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/src/gmyth_livetv.c Wed Apr 18 15:47:40 2007 +0100 @@ -530,7 +530,7 @@ /* Get program info from database using chanid and starttime */ livetv->proginfo = gmyth_tvchain_get_program_at (livetv->tvchain, tvchain_curr_index++ ); if ( livetv->proginfo == NULL ) { - gmyth_debug ("[%s] LiveTV not successfully started.\n", __FUNCTION__ ); + gmyth_debug ("LiveTV not successfully started.\n"); res = FALSE; goto error; } else { @@ -548,7 +548,7 @@ { res = FALSE; gmyth_debug( "LiveTV MONITOR handler error on setup!" ); - goto error; + goto error; } livetv->setup_done = TRUE; @@ -705,7 +705,7 @@ return res; error: - gmyth_debug( "[%s] ERROR running LiveTV setup.\n", __FUNCTION__ ); + gmyth_debug( "ERROR running LiveTV setup.\n" ); res = FALSE; @@ -847,4 +847,3 @@ // TODO } - diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/Makefile.am --- a/gmyth/tests/Makefile.am Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/Makefile.am Wed Apr 18 15:47:40 2007 +0100 @@ -1,5 +1,9 @@ + LDADD = \ - $(top_srcdir)/src/.libs/libgmyth.la @GLIB_LIBS@ + $(top_srcdir)/src/.libs/libgmyth.la + +LDFLAGS = \ + @GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@ INCLUDES = \ -I$(top_srcdir) \ @@ -30,7 +34,7 @@ gmyth_test_vlc \ gmyth_test_http -#TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) +#TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) @GLIB_LIBS@ @GOBJECT_LIBS@ @LIBCURL_LIBS@ test_SOURCES = \ main.c diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/gmyth_test_connection.c --- a/gmyth/tests/gmyth_test_connection.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/gmyth_test_connection.c Wed Apr 18 15:47:40 2007 +0100 @@ -60,7 +60,7 @@ GMythBackendInfo *backend_info; g_type_init (); - //g_thread_init (NULL); + g_thread_init (NULL); backend_info = gmyth_backend_info_new_with_uri (argv[1]); diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/gmyth_test_epg.c --- a/gmyth/tests/gmyth_test_epg.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/gmyth_test_epg.c Wed Apr 18 15:47:40 2007 +0100 @@ -48,7 +48,7 @@ GMythBackendInfo *backend_info; g_type_init (); - //g_thread_init (NULL); + g_thread_init (NULL); backend_info = gmyth_backend_info_new_with_uri (argv[1]); diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/gmyth_test_http.c --- a/gmyth/tests/gmyth_test_http.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/gmyth_test_http.c Wed Apr 18 15:47:40 2007 +0100 @@ -7,7 +7,7 @@ { GMythBackendInfo *backend_info; g_type_init(); - //g_thread_init(NULL); + g_thread_init(NULL); backend_info = gmyth_backend_info_new (); diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/gmyth_test_recorder.c --- a/gmyth/tests/gmyth_test_recorder.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/gmyth_test_recorder.c Wed Apr 18 15:47:40 2007 +0100 @@ -106,7 +106,7 @@ GMythBackendInfo *backend_info; g_type_init (); - //g_thread_init (NULL); + g_thread_init (NULL); backend_info = gmyth_backend_info_new_with_uri (argv[1]); diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/gmyth_test_vlc.c --- a/gmyth/tests/gmyth_test_vlc.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/gmyth_test_vlc.c Wed Apr 18 15:47:40 2007 +0100 @@ -7,7 +7,7 @@ { GMythBackendInfo *backend_info; g_type_init(); - //g_thread_init(NULL); + g_thread_init(NULL); backend_info = gmyth_backend_info_new (); diff -r bfe33d404df5 -r 1b897f699097 gmyth/tests/main.c --- a/gmyth/tests/main.c Tue Apr 17 21:48:00 2007 +0100 +++ b/gmyth/tests/main.c Wed Apr 18 15:47:40 2007 +0100 @@ -10,7 +10,7 @@ gboolean res; GMythBackendInfo *backend_info; g_type_init (); - // g_thread_init (NULL); + g_thread_init (NULL); backend_info = gmyth_backend_info_new (); gmyth_uri = gmyth_uri_new_with_value (uri);