shmalloc: Manually decide to use GLib or not in the shmalloc
authorOlivier Crête <olivier.crete@collabora.co.uk>
Fri, 22 Oct 2010 23:12:49 +0000 (01:12 +0200)
committerOlivier Crête <olivier.crete@collabora.co.uk>
Thu, 25 Nov 2010 00:12:10 +0000 (19:12 -0500)
So make it easier for embedders to use it with or without Glib

sys/shm/Makefile.am
sys/shm/shmalloc.h

index fdc034b..bfe7b49 100644 (file)
@@ -5,7 +5,7 @@ include $(top_srcdir)/common/glib-gen.mak
 plugin_LTLIBRARIES = libgstshm.la
 
 libgstshm_la_SOURCES = shmpipe.c shmalloc.c gstshm.c gstshmsrc.c gstshmsink.c
-libgstshm_la_CFLAGS = $(GST_CFLAGS)
+libgstshm_la_CFLAGS = $(GST_CFLAGS) -DSHM_PIPE_USE_GLIB
 libgstshm_la_LIBADD = -lrt
 libgstshm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
 libgstshm_la_LIBTOOLFLAGS = --tag=disable-static
index d5aa581..c3d3365 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __SHMALLOC_H__
 #define __SHMALLOC_H__
 
-#ifdef GST_PACKAGE_NAME
+#ifdef SHM_PIPE_USE_GLIB
 #include <glib.h>
 
 #define spalloc_new(type) g_slice_new (type)