mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
Tidy up of configure script.
Original commit message from CVS: Tidy up of configure script. Make libghttp detection work at all. Make library configuration specifiable on configure commandline. Make detection of atomic resource stuff cope with 2.0 linux kernels. Fix typo (HAVE_ATOMIC_T for HAVE_ATOMIC_H). Remove generated ltmain.sh file from mp3decode.
This commit is contained in:
parent
2ced491ef1
commit
dc38347cee
8 changed files with 197 additions and 54 deletions
|
@ -3,7 +3,6 @@
|
|||
#undef PLUGINS_USE_SRCDIR
|
||||
|
||||
#undef HAVE_LIBGHTTP
|
||||
#undef HAVE_LIBXML
|
||||
#undef HAVE_LIBMMX
|
||||
#undef HAVE_XAUDIO
|
||||
#undef HAVE_CSSAUTH
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#undef PLUGINS_USE_SRCDIR
|
||||
|
||||
#undef HAVE_LIBGHTTP
|
||||
#undef HAVE_LIBXML
|
||||
#undef HAVE_LIBMMX
|
||||
#undef HAVE_XAUDIO
|
||||
#undef HAVE_CSSAUTH
|
||||
|
@ -20,9 +19,6 @@
|
|||
|
||||
#undef DEBUG_ENABLED
|
||||
|
||||
/* Define if you have the <asm/atomic.h> header file. */
|
||||
#undef HAVE_ASM_ATOMIC_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
|
214
configure.in
214
configure.in
|
@ -13,6 +13,9 @@ STREAMER_REVISION=0
|
|||
STREAMER_AGE=0
|
||||
|
||||
AM_INIT_AUTOMAKE(gstreamer, $STREAMER_VERSION)
|
||||
dnl Add parameters for aclocal
|
||||
dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
AC_SUBST(STREAMER_MAJOR_VERSION)
|
||||
AC_SUBST(STREAMER_MINOR_VERSION)
|
||||
|
@ -35,73 +38,83 @@ AM_DISABLE_STATIC
|
|||
AC_LIBTOOL_DLOPEN
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AM_PATH_GLIB(1.2.0,
|
||||
[LIBS="$LIBS $GLIB_LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS"],
|
||||
dnl ##############################
|
||||
dnl # Do automated configuration #
|
||||
dnl ##############################
|
||||
|
||||
dnl Check for essential libraries first:
|
||||
dnl ====================================
|
||||
|
||||
dnl Check for glib
|
||||
AM_PATH_GLIB(1.2.0,,
|
||||
AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
|
||||
glib gmodule gthread)
|
||||
AM_PATH_GTK(1.2.0)
|
||||
dnl Put the glib flags into $LIBS and $CFLAGS since we always use them
|
||||
LIBS="$LIBS $GLIB_LIBS"
|
||||
CFLAGS="$FLAGS $GLIB_CFLAGS"
|
||||
|
||||
dnl Check for libghttp
|
||||
AC_CHECK_LIB(ghttp,ghttp_request_new,
|
||||
[LIBS="$LIBS -lghttp" HAVE_LIBGHTTP="yes"],
|
||||
AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc),
|
||||
$LIBS)
|
||||
AC_DEFINE(HAVE_LIBGHTTP)
|
||||
AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$HAVE_LIBGHTTP" = "xyes")
|
||||
|
||||
|
||||
AC_CHECK_HEADERS(asm/atomic.h, AC_DEFINE(HAVE_ATOMIC_H))
|
||||
|
||||
|
||||
AC_PATH_PROG(XML_CONFIG,xml-config,no)
|
||||
if test x$XML_CONFIG = xno;then
|
||||
dnl Check for libxml
|
||||
AC_PATH_PROG(XML_CONFIG, xml-config, no)
|
||||
if test x$XML_CONFIG = xno; then
|
||||
AC_MSG_ERROR(Couldn't find xml-config)
|
||||
fi
|
||||
XML_LIBS=`xml-config --libs`
|
||||
XML_CFLAGS=`xml-config --cflags`
|
||||
AC_SUBST(XML_LIBS)
|
||||
AC_SUBST(XML_CFLAGS)
|
||||
AC_DEFINE(HAVE_LIBXML)
|
||||
AM_CONDITIONAL(HAVE_LIBXML, test "x$HAVE_LIBXML" = "xyes")
|
||||
|
||||
|
||||
AC_CHECK_HEADER(mmx.h,[
|
||||
AC_DEFINE(HAVE_LIBMMX)
|
||||
HAVE_LIBMMX="yes", []
|
||||
dnl Next, check for the optional libraries:
|
||||
dnl =======================================
|
||||
|
||||
dnl Check for gtk
|
||||
AM_PATH_GTK(1.2.0)
|
||||
|
||||
dnl Check for libghttp
|
||||
AC_CHECK_LIB(ghttp, ghttp_request_new,
|
||||
[GHTTP_LIBS="-lghttp"
|
||||
HAVE_LIBGHTTP=yes
|
||||
],
|
||||
[AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
|
||||
GHTTP_LIBS=
|
||||
HAVE_LIBGHTTP=no
|
||||
],
|
||||
$LIBS)
|
||||
AC_SUBST(GHTTP_LIBS)
|
||||
|
||||
dnl Check for atomic.h
|
||||
dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
|
||||
dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
|
||||
AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
|
||||
AC_EGREP_HEADER(atomic_set, asm/atomic.h,,
|
||||
[
|
||||
if test x$HAVE_ATOMIC_H = xyes; then
|
||||
AC_MSG_WARN("Atomic reference counting is out of date: doing without.")
|
||||
fi
|
||||
HAVE_ATOMIC_H=no
|
||||
])
|
||||
AM_CONDITIONAL(HAVE_LIBMMX, test "x$HAVE_LIBMMX" = "xyes")
|
||||
|
||||
dnl Check for libmmx
|
||||
AC_CHECK_HEADER(mmx.h, HAVE_LIBMMX="yes", HAVE_LIBMMX="no")
|
||||
|
||||
dnl Check for xaudio
|
||||
AC_CHECK_HEADER(xaudio/decoder.h,[
|
||||
AC_DEFINE(HAVE_XAUDIO)
|
||||
HAVE_XAUDIO="yes", []
|
||||
])
|
||||
AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes")
|
||||
|
||||
dnl Set location of plugin directory
|
||||
PLUGINS_DIR=${prefix}/lib/gst
|
||||
AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
|
||||
AC_SUBST(PLUGINS_DIR)
|
||||
|
||||
dnl Set location of uninstalled plugin directory
|
||||
PLUGINS_SRCDIR=`pwd`/$srcdir
|
||||
AC_DEFINE_UNQUOTED(PLUGINS_SRCDIR,"$PLUGINS_SRCDIR")
|
||||
AC_SUBST(PLUGINS_SRCDIR)
|
||||
|
||||
AC_ARG_ENABLE(plugin-srcdir,
|
||||
[ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
|
||||
[AC_DEFINE(PLUGINS_USE_SRCDIR)])
|
||||
|
||||
AC_DEFINE(PLUGINS_USE_SRCDIR)
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug spews lots of useless info at runtime],
|
||||
[AC_DEFINE(DEBUG_ENABLED)])
|
||||
|
||||
AC_ARG_ENABLE(profiling,
|
||||
[ --enable-profiling adds -pg to compiler commandline, for profiling],
|
||||
[CFLAGS="$CFLAGS -pg"])
|
||||
|
||||
AC_MSG_CHECKING(DVD CSS code)
|
||||
|
||||
dnl check if css.c exists (FIXME)
|
||||
AC_MSG_CHECKING(DVD CSS code)
|
||||
if test -f plugins/dvdsrc/css.c
|
||||
then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@ -110,20 +123,135 @@ else
|
|||
AC_MSG_RESULT(no)
|
||||
HAVE_CSSAUTH="no"
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes")
|
||||
|
||||
dnl check for gtkdoc
|
||||
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
|
||||
|
||||
|
||||
dnl ######################################################################
|
||||
dnl # Check command line parameters, and set shell variables accordingly #
|
||||
dnl ######################################################################
|
||||
|
||||
AC_ARG_ENABLE(libghttp,
|
||||
[ --enable-libghttp use the ghttp library, if available],
|
||||
[case "${enableval}" in
|
||||
yes) USE_LIBGHTTP=$HAVE_LIBGHTTP ;;
|
||||
no) USE_LIBGHTTP=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-libghttp) ;;
|
||||
esac],
|
||||
[USE_LIBGHTTP=$HAVE_LIBGHTTP]) dnl Default value
|
||||
|
||||
AC_ARG_ENABLE(libmmx,
|
||||
[ --enable-libmmx use libmmx, if available],
|
||||
[case "${enableval}" in
|
||||
yes) USE_LIBMMX=$HAVE_LIBMMX ;;
|
||||
no) USE_LIBMMX=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
|
||||
esac],
|
||||
[USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
|
||||
|
||||
AC_ARG_ENABLE(atomic,
|
||||
[ --enable-atomic use atomic reference counting header],
|
||||
[case "${enableval}" in
|
||||
yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
|
||||
noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
|
||||
no) USE_ATOMIC_H=no;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
|
||||
esac],
|
||||
[USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
|
||||
|
||||
AC_ARG_ENABLE(plugin-srcdir,
|
||||
[ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
|
||||
[case "${enableval}" in
|
||||
yes) plugins_use_srcdir=yes ;;
|
||||
no) plugins_use_srcdir=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;;
|
||||
esac],
|
||||
[plugins_use_srcdir=yes]) dnl Default value
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug spews lots of useless info at runtime],
|
||||
[case "${enableval}" in
|
||||
yes) use_debug=yes ;;
|
||||
no) use_debug=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||
esac],
|
||||
[use_debug=no]) dnl Default value
|
||||
|
||||
AC_ARG_ENABLE(profiling,
|
||||
[ --enable-profiling adds -pg to compiler commandline, for profiling],
|
||||
[case "${enableval}" in
|
||||
yes) use_profiling=yes ;;
|
||||
no) use_profiling=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
|
||||
esac],
|
||||
[use_profiling=no]) dnl Default value
|
||||
|
||||
|
||||
dnl ################################################
|
||||
dnl # Set defines according to variables set above #
|
||||
dnl ################################################
|
||||
|
||||
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
|
||||
if test "x$USE_LIBGHTTP" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBGHTTP)
|
||||
fi
|
||||
|
||||
if test "x$USE_LIBMMX" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBMMX)
|
||||
fi
|
||||
|
||||
if test "x$USE_ATOMIC_H" = xyes; then
|
||||
AC_DEFINE(HAVE_ATOMIC_H)
|
||||
fi
|
||||
|
||||
if test "x$PLUGINS_USE_SRCDIR" = xyes; then
|
||||
AC_DEFINE(PLUGINS_USE_SRCDIR)
|
||||
fi
|
||||
|
||||
if test "x$USE_DEBUG" = xyes; then
|
||||
AC_DEFINE(DEBUG_ENABLED)
|
||||
fi
|
||||
|
||||
if test "x$USE_PROFILING" = xyes; then
|
||||
CFLAGS="$CFLAGS -pg"
|
||||
fi
|
||||
|
||||
|
||||
dnl #############################
|
||||
dnl # Set automake conditionals #
|
||||
dnl #############################
|
||||
|
||||
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
|
||||
AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
|
||||
|
||||
|
||||
dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS
|
||||
dnl need it, either.
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
|
||||
AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
|
||||
|
||||
dnl #############################
|
||||
dnl # Configure the subpackages #
|
||||
dnl #############################
|
||||
|
||||
AC_CONFIG_SUBDIRS(gist)
|
||||
AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
|
||||
|
||||
|
||||
dnl #########################
|
||||
dnl # Make the output files #
|
||||
dnl #########################
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
gst/Makefile
|
||||
gst/types/Makefile
|
||||
|
|
|
@ -2,6 +2,12 @@ filterdir = $(libdir)/gst
|
|||
|
||||
filter_LTLIBRARIES = libgstelements.la
|
||||
|
||||
if HAVE_LIBGHTTP
|
||||
GSTHTTPSRC=gsthttpsrc.c
|
||||
else
|
||||
GSTHTTPSRC=
|
||||
endif
|
||||
|
||||
libgstelements_la_DEPENDENCIES = ../libgst.la
|
||||
libgstelements_la_SOURCES = \
|
||||
gstelements.c \
|
||||
|
@ -11,7 +17,7 @@ libgstelements_la_SOURCES = \
|
|||
gstdisksrc.c \
|
||||
gstasyncdisksrc.c \
|
||||
gstfdsrc.c \
|
||||
gsthttpsrc.c \
|
||||
$(GSTHTTPSRC) \
|
||||
gstaudiosink.c \
|
||||
gstaudiosrc.c \
|
||||
gstfdsink.c \
|
||||
|
@ -32,5 +38,5 @@ noinst_HEADERS = \
|
|||
gstqueue.h \
|
||||
gstsinesrc.h
|
||||
|
||||
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS)
|
||||
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS)
|
||||
libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
#include <gstfakesrc.h>
|
||||
#include <gstfdsink.h>
|
||||
#include <gstfdsrc.h>
|
||||
#if HAVE_LIBGHTTP
|
||||
#include <gsthttpsrc.h>
|
||||
#endif /* HAVE_LIBGHTTP */
|
||||
#include <gstqueue.h>
|
||||
#include <gstsinesrc.h>
|
||||
|
||||
|
@ -50,7 +52,9 @@ struct _elements_entry _elements[] = {
|
|||
{ "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details },
|
||||
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details },
|
||||
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details },
|
||||
#if HAVE_LIBGHTTP
|
||||
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details },
|
||||
#endif /* HAVE_LIBGHTTP */
|
||||
{ "queue", gst_queue_get_type, &gst_queue_details },
|
||||
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details },
|
||||
{ NULL, 0 },
|
||||
|
|
|
@ -188,7 +188,7 @@ void gst_object_unref (GstObject *object) {
|
|||
/* if we ended up with the refcount at zero */
|
||||
if (reftest) {
|
||||
/* get the count to 1 for gtk_object_destroy() */
|
||||
#ifdef HAVE_ATOMIC_T
|
||||
#ifdef HAVE_ATOMIC_H
|
||||
atomic_set(&(object->refcount),1);
|
||||
#else
|
||||
object->refcount = 1;
|
||||
|
@ -196,7 +196,7 @@ void gst_object_unref (GstObject *object) {
|
|||
/* destroy it */
|
||||
gtk_object_destroy(GTK_OBJECT(object));
|
||||
/* drop the refcount back to zero */
|
||||
#ifdef HAVE_ATOMIC_T
|
||||
#ifdef HAVE_ATOMIC_H
|
||||
atomic_set(&(object->refcount),0);
|
||||
#else
|
||||
object->refcount = 0;
|
||||
|
|
|
@ -2,6 +2,12 @@ filterdir = $(libdir)/gst
|
|||
|
||||
filter_LTLIBRARIES = libgstelements.la
|
||||
|
||||
if HAVE_LIBGHTTP
|
||||
GSTHTTPSRC=gsthttpsrc.c
|
||||
else
|
||||
GSTHTTPSRC=
|
||||
endif
|
||||
|
||||
libgstelements_la_DEPENDENCIES = ../libgst.la
|
||||
libgstelements_la_SOURCES = \
|
||||
gstelements.c \
|
||||
|
@ -11,7 +17,7 @@ libgstelements_la_SOURCES = \
|
|||
gstdisksrc.c \
|
||||
gstasyncdisksrc.c \
|
||||
gstfdsrc.c \
|
||||
gsthttpsrc.c \
|
||||
$(GSTHTTPSRC) \
|
||||
gstaudiosink.c \
|
||||
gstaudiosrc.c \
|
||||
gstfdsink.c \
|
||||
|
@ -32,5 +38,5 @@ noinst_HEADERS = \
|
|||
gstqueue.h \
|
||||
gstsinesrc.h
|
||||
|
||||
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS)
|
||||
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS)
|
||||
libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
#include <gstfakesrc.h>
|
||||
#include <gstfdsink.h>
|
||||
#include <gstfdsrc.h>
|
||||
#if HAVE_LIBGHTTP
|
||||
#include <gsthttpsrc.h>
|
||||
#endif /* HAVE_LIBGHTTP */
|
||||
#include <gstqueue.h>
|
||||
#include <gstsinesrc.h>
|
||||
|
||||
|
@ -50,7 +52,9 @@ struct _elements_entry _elements[] = {
|
|||
{ "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details },
|
||||
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details },
|
||||
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details },
|
||||
#if HAVE_LIBGHTTP
|
||||
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details },
|
||||
#endif /* HAVE_LIBGHTTP */
|
||||
{ "queue", gst_queue_get_type, &gst_queue_details },
|
||||
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details },
|
||||
{ NULL, 0 },
|
||||
|
|
Loading…
Reference in a new issue