1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

link to glib with xmms

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@502 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-01-12 03:14:39 +00:00
parent 3b330910de
commit c1e9ff4fb4
2 changed files with 9 additions and 6 deletions

View File

@ -102,8 +102,9 @@ case x$want_xmms in
[want_xmms=no])])
if test x$want_xmms = xyes; then
CFLAGS="$CFLAGS $XMMS_CFLAGS"
### do not link to glib 1.2 ###
### LIBS="$LIBS $XMMS_LIBS"
### if we link to glib 1.2, that means 2.0 wasn't found ###
### if we link to glib 2.0, that's ok, we will load libglib-1.2.so.0 dynamically ###
LIBS="$LIBS $XMMS_LIBS"
AC_DEFINE(XMMS, 1, [Define for XMMS Ver. 1 support])
fi
fi
@ -113,8 +114,9 @@ case x$want_xmms in
## its ok to favor the glib 2.0 headers over 1.2 for our purposes ##
PKG_CHECK_MODULES([XMMS], [glib-2.0], [], [PKG_CHECK_MODULES([XMMS], [glib-1.2])])
CFLAGS="$CFLAGS $XMMS_CFLAGS"
### do not link to glib 1.2 ###
### LIBS="$LIBS $XMMS_LIBS" ###
### if we link to glib 1.2, that means 2.0 wasn't found ###
### if we link to glib 2.0, that's ok, we will load libglib-1.2.so.0 dynamically ###
LIBS="$LIBS $XMMS_LIBS"
AC_CHECK_HEADERS([dlfcn.h], [],
[AC_MSG_ERROR(["dlfcn.h not found: dynamic library loading not supported"])])
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"],

View File

@ -210,8 +210,9 @@ void *xmms_thread_func_dynamic(void *pvoid)
glib_v1_2_handle=NULL;
g_free_v1_2=NULL;
/* If g_char *'s are coming from libglib-1.2.so, we need to free them with the g_free()
* function from that library. This macro selects the g_free() from the correct lib. */
/* Conky likely be linked to libglib-2.0.so and not libglib-1.2.so.0. If conky is receiving
* gchar * data from xmms, these strings need to be freed using g_free() from libglib-1.2.so.0.
* This macro selects the g_free() from the correct library. */
#define G_FREE(mem) (info.xmms.current_project==PROJECT_XMMS ? (*g_free_v1_2)(mem) : g_free(mem))
switch(info.xmms.current_project) {