Make GDK pixbuf optional, by compiling videosink only if it is present.

Original commit message from CVS:
Make GDK pixbuf optional, by compiling videosink only if it is present.
Make documentation generated successfully even if libghttp isn't present
(by skipping the ghttpsrc stuff).
This commit is contained in:
Richard Boulton 2000-05-12 07:15:03 +00:00
parent 8b8574407e
commit 1c6911d307
9 changed files with 111 additions and 85 deletions

View file

@ -2,6 +2,7 @@
#undef PLUGINS_SRCDIR #undef PLUGINS_SRCDIR
#undef PLUGINS_USE_SRCDIR #undef PLUGINS_USE_SRCDIR
#undef HAVE_GDK_PIXBUF
#undef HAVE_LIBGHTTP #undef HAVE_LIBGHTTP
#undef HAVE_LIBMMX #undef HAVE_LIBMMX
#undef HAVE_XAUDIO #undef HAVE_XAUDIO

View file

@ -10,6 +10,7 @@
#undef PLUGINS_SRCDIR #undef PLUGINS_SRCDIR
#undef PLUGINS_USE_SRCDIR #undef PLUGINS_USE_SRCDIR
#undef HAVE_GDK_PIXBUF
#undef HAVE_LIBGHTTP #undef HAVE_LIBGHTTP
#undef HAVE_LIBMMX #undef HAVE_LIBMMX
#undef HAVE_XAUDIO #undef HAVE_XAUDIO

View file

@ -63,34 +63,43 @@ XML_CFLAGS=`xml-config --cflags`
AC_SUBST(XML_LIBS) AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS) AC_SUBST(XML_CFLAGS)
dnl Check for libgdb-pixbuf
AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
if test x$GDK_PIXBUF_CONFIG = xno; then
AC_MSG_ERROR(Couldn't find gdk-pixbuf-config)
fi
GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
AC_SUBST(GDK_PIXBUF_LIBS)
AC_SUBST(GDK_PIXBUF_CFLAGS)
dnl Next, check for the optional libraries: dnl Next, check for the optional libraries:
dnl ======================================= dnl =======================================
dnl Check for libgdk-pixbuf
AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
if test x$GDK_PIXBUF_CONFIG = xno; then
AC_MSG_WARN(Couldn't find gdk-pixbuf-config)
GDK_PIXBUF_LIBS=
GDK_PIXBUF_CFLAGS=
HAVE_GDK_PIXBUF=no
else
GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
HAVE_GDK_PIXBUF=yes
fi
AC_SUBST(GDK_PIXBUF_LIBS)
AC_SUBST(GDK_PIXBUF_CFLAGS)
dnl Check for gtk dnl Check for gtk
AM_PATH_GTK(1.2.0) AM_PATH_GTK(1.2.0)
dnl Check for libghttp dnl Check for libghttp
AC_CHECK_LIB(ghttp, ghttp_request_new, AC_CHECK_LIB(ghttp, ghttp_request_new,
[GHTTP_LIBS="-lghttp" [GHTTP_LIBS="-lghttp"
GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
HAVE_LIBGHTTP=yes HAVE_LIBGHTTP=yes
], ],
[AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc) [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
GHTTP_LIBS= GHTTP_LIBS=
GST_HTTPSRC_GET_TYPE=
HAVE_LIBGHTTP=no HAVE_LIBGHTTP=no
], ],
$LIBS) $LIBS)
AC_SUBST(GHTTP_LIBS) AC_SUBST(GHTTP_LIBS)
AC_SUBST(GST_HTTPSRC_GET_TYPE)
dnl Check for atomic.h dnl Check for atomic.h
dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
@ -172,6 +181,15 @@ dnl ######################################################################
dnl # Check command line parameters, and set shell variables accordingly # dnl # Check command line parameters, and set shell variables accordingly #
dnl ###################################################################### dnl ######################################################################
AC_ARG_ENABLE(gdk-pixbuf,
[ --enable-gdk-pixbuf use gdk pixbuf, if available],
[case "${enableval}" in
yes) USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF ;;
no) USE_GDK_PIXBUF=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-gdk-pixbuf) ;;
esac],
[USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF]) dnl Default value
AC_ARG_ENABLE(libghttp, AC_ARG_ENABLE(libghttp,
[ --enable-libghttp use the ghttp library, if available], [ --enable-libghttp use the ghttp library, if available],
[case "${enableval}" in [case "${enableval}" in
@ -234,6 +252,10 @@ dnl ################################################
dnl These should be "USE_*" instead of "HAVE_*", but some packages expect dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
dnl HAVE_ and it is likely to be easier to stick with the old name dnl HAVE_ and it is likely to be easier to stick with the old name
if test "x$USE_GDK_PIXBUF" = xyes; then
AC_DEFINE(HAVE_GDK_PIXBUF)
fi
if test "x$USE_LIBGHTTP" = xyes; then if test "x$USE_LIBGHTTP" = xyes; then
AC_DEFINE(HAVE_LIBGHTTP) AC_DEFINE(HAVE_LIBGHTTP)
fi fi
@ -265,6 +287,7 @@ dnl #############################
dnl These should be "USE_*" instead of "HAVE_*", but some packages expect dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
dnl HAVE_ and it is likely to be easier to stick with the old name dnl HAVE_ and it is likely to be easier to stick with the old name
AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes")
AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes") AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes") AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes") AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
@ -346,6 +369,7 @@ editor/Makefile
tools/Makefile tools/Makefile
docs/Makefile docs/Makefile
docs/gst/Makefile docs/gst/Makefile
docs/gst/gstreamer.types
stamp.h stamp.h
gstreamer-config gstreamer-config
gstreamer.spec]) gstreamer.spec])

View file

@ -12,6 +12,8 @@ DOC_SOURCE_DIR=$(top_srcdir)/gst
CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir)
LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la $(top_srcdir)/gst/elements/libgstelements.la LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la $(top_srcdir)/gst/elements/libgstelements.la
EXTRA_DIST=gstreamer.types.in
HTML_DIR=$(datadir)/gstreamer/gst/html HTML_DIR=$(datadir)/gstreamer/gst/html
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
@ -85,7 +87,7 @@ sgml/gstreamer-doc.bottom: $(tmpl_sources)
gstreamer-decl.txt: gstreamer-decl.txt:
$(MAKE) scan $(MAKE) scan
scanobj: scanobj: $(srcdir)/$(DOC_MODULE).types
env CC="$(LIBTOOL) --mode=link $(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ env CC="$(LIBTOOL) --mode=link $(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
gtkdoc-scanobj --module=$(DOC_MODULE) \ gtkdoc-scanobj --module=$(DOC_MODULE) \
--types=$(srcdir)/$(DOC_MODULE).types --types=$(srcdir)/$(DOC_MODULE).types

View file

@ -359,64 +359,6 @@ GstBuffer *buffer
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GstBuffer *buffer,GstMeta *meta GstBuffer *buffer,GstMeta *meta
</FUNCTION> </FUNCTION>
<TYPEDEF>
<NAME>GstClockTime</NAME>
typedef guint64 GstClockTime;
</TYPEDEF>
<TYPEDEF>
<NAME>GstClockTimeDiff</NAME>
typedef gint64 GstClockTimeDiff;
</TYPEDEF>
<MACRO>
<NAME>GST_CLOCK_DIFF</NAME>
#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e))
</MACRO>
<STRUCT>
<NAME>GstClock</NAME>
</STRUCT>
<STRUCT>
<NAME>GstClock</NAME>
struct GstClock {
gchar *name;
GstClockTime start_time;
GstClockTime current_time;
GstClockTimeDiff adjust;
gboolean locking;
GList *sinkobjects;
GMutex *sinkmutex;
GMutex *lock;
};
</STRUCT>
<FUNCTION>
<NAME>gst_clock_new</NAME>
<RETURNS>GstClock *</RETURNS>
gchar *name
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_get_system</NAME>
<RETURNS>GstClock *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_register</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstObject *obj
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_set</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstClockTime time
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_reset</NAME>
<RETURNS>void </RETURNS>
GstClock *clock
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_wait</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstClockTime time, GstObject *obj
</FUNCTION>
<MACRO> <MACRO>
<NAME>GST_TYPE_CONNECTION</NAME> <NAME>GST_TYPE_CONNECTION</NAME>
#define GST_TYPE_CONNECTION \ #define GST_TYPE_CONNECTION \
@ -1825,6 +1767,64 @@ GtkObject *object,guchar *argname
<RETURNS>xmlDocPtr </RETURNS> <RETURNS>xmlDocPtr </RETURNS>
GstElement *element GstElement *element
</FUNCTION> </FUNCTION>
<TYPEDEF>
<NAME>GstClockTime</NAME>
typedef guint64 GstClockTime;
</TYPEDEF>
<TYPEDEF>
<NAME>GstClockTimeDiff</NAME>
typedef gint64 GstClockTimeDiff;
</TYPEDEF>
<MACRO>
<NAME>GST_CLOCK_DIFF</NAME>
#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e))
</MACRO>
<STRUCT>
<NAME>GstClock</NAME>
</STRUCT>
<STRUCT>
<NAME>GstClock</NAME>
struct GstClock {
gchar *name;
GstClockTime start_time;
GstClockTime current_time;
GstClockTimeDiff adjust;
gboolean locking;
GList *sinkobjects;
GMutex *sinkmutex;
GMutex *lock;
};
</STRUCT>
<FUNCTION>
<NAME>gst_clock_new</NAME>
<RETURNS>GstClock *</RETURNS>
gchar *name
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_get_system</NAME>
<RETURNS>GstClock *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_register</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstObject *obj
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_set</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstClockTime time
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_reset</NAME>
<RETURNS>void </RETURNS>
GstClock *clock
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_wait</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstClockTime time, GstObject *obj
</FUNCTION>
<MACRO> <MACRO>
<NAME>GST_TYPE_ASYNCDISKSRC</NAME> <NAME>GST_TYPE_ASYNCDISKSRC</NAME>
#define GST_TYPE_ASYNCDISKSRC \ #define GST_TYPE_ASYNCDISKSRC \

View file

@ -1,7 +1,4 @@
GtkObject GtkObject
GtkWidget
GtkRange
GtkContainer
GstObject GstObject
GstElement GstElement
GstBin GstBin
@ -18,7 +15,6 @@ GtkObject
GstFakeSrc GstFakeSrc
GstDiskSrc GstDiskSrc
GstAsyncDiskSrc GstAsyncDiskSrc
GstHttpSrc
GstFdSrc GstFdSrc
GstAudioSrc GstAudioSrc
GstSineSrc GstSineSrc

View file

@ -17,7 +17,7 @@ gst_fakesink_get_type
gst_disksrc_get_type gst_disksrc_get_type
gst_asyncdisksrc_get_type gst_asyncdisksrc_get_type
gst_httpsrc_get_type @GST_HTTPSRC_GET_TYPE@
gst_fdsrc_get_type gst_fdsrc_get_type
gst_audiosrc_get_type gst_audiosrc_get_type
gst_sinesrc_get_type gst_sinesrc_get_type

View file

@ -14,14 +14,3 @@ Reads data from a URL.
</para> </para>
<!-- ##### ARG GstHttpSrc:location ##### -->
<para>
Specify the location of the file. The location must be a fully qualified URL.
</para>
<!-- ##### ARG GstHttpSrc:bytesperread ##### -->
<para>
Specify how many bytes to read at a time.
</para>

View file

@ -72,6 +72,13 @@
</para> </para>
<!-- ##### ARG GstHttpSrc:bytesperread ##### -->
<para>
Specify how many bytes to read at a time.
</para>
<!-- ##### STRUCT GstBinClass ##### --> <!-- ##### STRUCT GstBinClass ##### -->
<para> <para>
@ -1488,6 +1495,12 @@ GstElement
@klass: @klass:
<!-- ##### ARG GstHttpSrc:location ##### -->
<para>
Specify the location of the file. The location must be a fully qualified URL.
</para>
<!-- ##### MACRO GST_IS_AUDIOSINK ##### --> <!-- ##### MACRO GST_IS_AUDIOSINK ##### -->
<para> <para>