cleanup xine/gstreamer support so users can control their options
authorvapier <vapier>
Sun, 2 Oct 2005 19:44:17 +0000 (19:44 +0000)
committervapier <vapier@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 2 Oct 2005 19:44:17 +0000 (19:44 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/emotion@17118 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.in

index 5941ea0..dc96a60 100644 (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"]
-)
-
-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")
+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"])
+
+       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
 
-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)"
+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=
+
+       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"
+       GSTPLUG_MSG="yes"
 fi
 
-AC_SUBST(GST_CFLAGS)
-AC_SUBST(GST_LIBS)
-
-if test "${HAVE_XINE}" = "no" && test "${HAVE_GSTREAMER}" = "no" ; then
+if test "$HAVE_XINE$HAVE_GSTREAMER" = "nono" ; then
    AC_MSG_ERROR([Xine or Gstreamer must be installed to build emotion])
 fi