summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-17 18:41:15 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-17 18:41:15 +0000
commitc375528575124f64b5515809a8041cd4d05f7f44 (patch)
tree2bb9dc04a077d3dfa68c0c2888987610a9557424 /configure
parent912582e464d4afb5abcffd64a46f05735a66e3f8 (diff)
downloadmpv-c375528575124f64b5515809a8041cd4d05f7f44.tar.bz2
mpv-c375528575124f64b5515809a8041cd4d05f7f44.tar.xz
Support for GTK 2.x.
Patch by Onur Kucuk (onur . delipenguen net). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16247 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure43
1 files changed, 41 insertions, 2 deletions
diff --git a/configure b/configure
index f6459f1548..72aeaf0d5f 100755
--- a/configure
+++ b/configure
@@ -155,7 +155,8 @@ Installation directories:
Optional features:
--disable-mencoder disable mencoder (a/v encoder) compilation [enable]
- --enable-gui enable gmplayer compilation (GTK 1.2 GUI) [disable]
+ --enable-gui enable gmplayer compilation (GTK+ GUI) [disable]
+ --enable-old-gtk force using GTK 1.2 for GUI [disable]
--enable-largefiles enable support for files > 2 GBytes [disable]
--enable-linux-devfs set default devices to devfs ones [disable]
--enable-termcap use termcap database for key codes [autodetect]
@@ -1441,6 +1442,7 @@ _opendivx=no
_lirc=auto
_lircc=auto
_gui=no
+_gtk1=no
_termcap=auto
_termios=auto
_3dfx=no
@@ -1693,6 +1695,7 @@ for ac_option do
--disable-lircc) _lircc=no ;;
--enable-gui) _gui=yes ;;
--disable-gui) _gui=no ;;
+ --enable-old-gtk) _gtk1=yes ;;
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
--enable-termios) _termios=yes ;;
@@ -6629,8 +6632,40 @@ EOF
fi
echores "$_xshape"
+#Check for GTK
+if test "$_gtk1" = no ; then
+ #Check for GTK2 :
+ echocheck "GTK+ version"
+
+ if pkg-config gtk+-2.0 --exists ; then
+ _gtk=`pkg-config gtk+-2.0 --modversion 2>/dev/null`
+ _inc_gtk=`pkg-config gtk+-2.0 --cflags 2>/dev/null`
+ _ld_gtk=`pkg-config gtk+-2.0 --libs 2>/dev/null`
+ echores "$_gtk"
+
+ # Check for GLIB2
+ if pkg-config glib-2.0 --exists ; then
+ echocheck "glib version"
+ _glib=`pkg-config glib-2.0 --modversion 2>/dev/null`
+ _inc_glib=`pkg-config glib-2.0 --cflags 2>/dev/null`
+ _ld_glib=`pkg-config glib-2.0 --libs 2>/dev/null`
+ echores "$_glib"
+
+ _def_gui='#define HAVE_NEW_GUI 1'
+ _def_gtk2_gui='#define HAVE_GTK2_GUI 1'
+ _ld_gui='$(GTKLIB) $(GLIBLIB)'
+ else
+ _gtk1=yes
+ echo "GLIB-2 devel packages were not found, trying GTK 1.2"
+ fi
+ else
+ echo "GTK-2 devel packages were not found, trying GTK 1.2"
+ _gtk1=yes
+ fi
+fi
- # Check for GTK:
+if test "$_gtk1" = yes ; then
+ # Check for old GTK (1.2.x)
echocheck "GTK version"
if test -z "$_gtkconfig" ; then
if ( gtk-config --version ) >/dev/null 2>&1 ; then
@@ -6663,7 +6698,9 @@ EOF
echores "$_glib (using $_glibconfig)"
_def_gui='#define HAVE_NEW_GUI 1'
+ _def_gtk2_gui='#undef HAVE_GTK2_GUI'
_ld_gui='$(GTKLIB) $(GLIBLIB)'
+fi
echo "Creating Gui/config.mak"
cat > Gui/config.mak << EOF
@@ -6678,6 +6715,7 @@ EOF
else
_def_gui='#undef HAVE_NEW_GUI'
+ _def_gtk2_gui='#undef HAVE_GTK2_GUI'
fi
# --------------- GUI specific tests end -------------------
@@ -7440,6 +7478,7 @@ $_def_unrarlib
/* gui support, please do not edit this option */
$_def_gui
+$_def_gtk2_gui
/* Audio output drivers */
$_def_ossaudio