summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-01-29 22:13:18 +0000
committerjstebbins <[email protected]>2011-01-29 22:13:18 +0000
commitc9c50d62e5ea118f68b9079b514b58bd5016e2c5 (patch)
tree2fab334bf5069cf5f86e44904fda94e375104b92 /gtk
parente9b451617fe690327d361caf7e9d0976fda45910 (diff)
LinGui: refactor --enable-gst option
change to --disable-gst and make it work for both mingw and linux git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3774 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/configure.ac18
-rw-r--r--gtk/module.defs6
-rw-r--r--gtk/src/main.c7
3 files changed, 21 insertions, 10 deletions
diff --git a/gtk/configure.ac b/gtk/configure.ac
index bda4d371f..9f5434751 100644
--- a/gtk/configure.ac
+++ b/gtk/configure.ac
@@ -60,8 +60,8 @@ AC_ARG_ENABLE(dl,
use_libdl=yes, use_libdl=no)
AC_ARG_ENABLE(gst,
- AS_HELP_STRING([--enable-gst], [enable gstreamer on Win32]),
- w32_gst=yes, w32_gst=no)
+ AS_HELP_STRING([--disable-gst], [disable gstreamer (live preview)]),
+ gst_disable=yes, gst_disable=no)
AC_ARG_ENABLE(update-checks,
AS_HELP_STRING([--disable-update-checks], [disable update checks]),
@@ -86,20 +86,24 @@ AM_PROG_LIBTOOL
case $host in
*-*-mingw*)
- if test "x$w32_gst" = "xyes" ; then
- GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0"
- else
+ if test "x$gst_disable" = "xyes" ; then
GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0"
+ else
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0"
fi
mingw_flag=yes
;;
*)
- GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify gudev-1.0"
+ if test "x$gst_disable" = "xyes" ; then
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0 libnotify gudev-1.0"
+ else
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify gudev-1.0"
+ fi
mingw_flag=no
;;
esac
-if test "x$w32_gst" = "xyes" -o "x$mingw_flag" != "xyes" ; then
+if test "x$gst_disable" = "xno" ; then
CXXFLAGS="$CXXFLAGS -D_ENABLE_GST"
CFLAGS="$CFLAGS -D_ENABLE_GST"
fi
diff --git a/gtk/module.defs b/gtk/module.defs
index cc20a18ef..c37af412e 100644
--- a/gtk/module.defs
+++ b/gtk/module.defs
@@ -15,7 +15,7 @@ BUILD.out += $(GTK.out)
###############################################################################
ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
-GTK.CONFIGURE.extra += --host=$(BUILD.spec)
+GTK.CONFIGURE.extra += --host=$(BUILD.spec) --disable-gst
ifeq ($(HAS.dlfcn),1)
GTK.CONFIGURE.extra += --enable-dl
endif
@@ -25,3 +25,7 @@ ifeq (0,$(FEATURE.gtk.update.checks))
GTK.CONFIGURE.extra += --disable-update-checks
endif
+ifeq (0,$(FEATURE.gst))
+ GTK.CONFIGURE.extra += --disable-gst
+endif
+
diff --git a/gtk/src/main.c b/gtk/src/main.c
index de995e959..72617eb2b 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -34,8 +34,11 @@
#include <gtk/gtk.h>
-#if !defined(_WIN32)
+#if defined(_ENABLE_GST)
#include <gst/gst.h>
+#endif
+
+#if !defined(_WIN32)
#include <libnotify/notify.h>
#include <dbus/dbus-glib.h>
#else
@@ -772,7 +775,7 @@ main (int argc, char *argv[])
context = g_option_context_new ("- Rip and encode DVD or MPEG file");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
-#if !defined(_WIN32)
+#if defined(_ENABLE_GST)
g_option_context_add_group (context, gst_init_get_option_group ());
#endif
g_option_context_parse (context, &argc, &argv, &error);