cleanup xine/gstreamer support so users can control their options

SVN revision: 17118
This commit is contained in:
Mike Frysinger 2005-10-02 19:44:17 +00:00
parent 2c7b0df81a
commit c1d5c47689
1 changed files with 54 additions and 32 deletions

View File

@ -129,42 +129,64 @@ AC_PATH_GENERIC(embryo, 0.9.1,
[ AC_MSG_ERROR(Embryo isn't installed)]
)
AC_PATH_GENERIC(xine, 1.0.0,
[HAVE_XINE="yes"],
[HAVE_XINE="no"]
)
AC_ARG_ENABLE(xine,
AC_HELP_STRING([--disable-xine],[disable xine support @<:@default=auto@:>@]),
[enable_xine=$enableval],[enable_xine=auto])
HAVE_XINE="no"
if test "$enable_xine" != "no" ; then
AC_PATH_GENERIC(xine, 1.0.0, [HAVE_XINE="yes"])
xine_plugins=`$XINE_CONFIG --plugindir`
AC_SUBST(xine_plugins)
dnl gstreamer
gstreamer_cflags=
gstreamer_libs=
dnl Gstreamer version requirement
GST_REQS=0.8.10
GSTPLUG_REQS=0.8.10
GST_MAJORMINOR=0.8
PKG_CHECK_MODULES(GST, \
gstreamer-$GST_MAJORMINOR >= $GST_REQS,
HAVE_GSTREAMER="yes", HAVE_GSTREAMER="no")
PKG_CHECK_MODULES(GSTPLUG, \
gstreamer-plugins-$GST_MAJORMINOR >= $GSTPLUG_REQS,
HAVE_GSTPLUG="yes", HAVE_GSTPLUG="no")
if test "${HAVE_GSTPLUG}" = "no" ; then
AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to decode properly your video and audio files])
GSTPLUG_MSG="no (you should install gst-plugins and gst-ffmpeg)"
else
GSTPLUG_MSG="yes"
if test "$HAVE_XINE" = "yes" ; then
xine_plugins=`$XINE_CONFIG --plugindir`
AC_SUBST(xine_plugins)
fi
fi
if test "$enable_xine$HAVE_XINE" = "yesno" ; then
AC_MSG_ERROR(xine not found)
fi
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)
AC_ARG_ENABLE(gstreamer,
AC_HELP_STRING([--disable-gstreamer],[disable gstreamer support @<:@default=auto@:>@]),
[enable_gstreamer=$enableval],[enable_gstreamer=auto])
HAVE_GSTREAMER="no"
HAVE_GSTPLUG="no"
if test "$enable_gstreamer" != "no" ; then
gstreamer_cflags=
gstreamer_libs=
if test "${HAVE_XINE}" = "no" && test "${HAVE_GSTREAMER}" = "no" ; then
dnl Gstreamer version requirement
GST_REQS=0.8.10
GSTPLUG_REQS=0.8.10
GST_MAJORMINOR=0.8
PKG_CHECK_MODULES(GST, \
gstreamer-$GST_MAJORMINOR >= $GST_REQS,
HAVE_GSTREAMER="yes", HAVE_GSTREAMER="no")
AC_MSG_RESULT($HAVE_GSTREAMER)
PKG_CHECK_MODULES(GSTPLUG, \
gstreamer-plugins-$GST_MAJORMINOR >= $GSTPLUG_REQS,
HAVE_GSTPLUG="yes", HAVE_GSTPLUG="no")
AC_MSG_RESULT($HAVE_GSTPLUG)
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)
fi
if test "$enable_gstreamer$HAVE_GSTREAMER" = "yesno" ; then
AC_MSG_ERROR(gstreamer not found)
fi
if test "$HAVE_GSTPLUG" = "no" ; then
if test "$HAVE_GSTREAMER" = "no" ; then
GSTPLUG_MSG="no"
else
AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
GSTPLUG_MSG="no (you should install gst-plugins and gst-ffmpeg)"
fi
else
GSTPLUG_MSG="yes"
fi
if test "$HAVE_XINE$HAVE_GSTREAMER" = "nono" ; then
AC_MSG_ERROR([Xine or Gstreamer must be installed to build emotion])
fi