Mercurial > mplayer.hg
changeset 37180:8c95bcbe4ddc
Improve detection of GTK+ and GLib versions.
Demand minimum versions required by the GUI
and inform in detail in case the detected versions
are too old.
author | ib |
---|---|
date | Mon, 08 Sep 2014 21:28:12 +0000 |
parents | b02352aadc5d |
children | 04373738d82b |
files | configure |
diffstat | 1 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Mon Sep 08 20:29:06 2014 +0000 +++ b/configure Mon Sep 08 21:28:12 2014 +0000 @@ -7876,24 +7876,38 @@ echocheck "GTK+ version" if $_pkg_config gtk+-2.0 --exists ; then - _gtk=$($_pkg_config gtk+-2.0 --modversion 2>/dev/null) + _gtk=$($_pkg_config "gtk+-2.0 >= 2.4.0" --modversion 2>&1) + if [ $? -eq 0 ]; then extra_cflags="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)" libs_mplayer="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)" echores "$_gtk" + else + res_comment="too old" + echores "$($_pkg_config gtk+-2.0 --modversion 2>/dev/null)" + die "$_gtk" + fi # Check for GLIB2 echocheck "GLib version" if $_pkg_config glib-2.0 --exists ; then - _glib=$($_pkg_config glib-2.0 --modversion 2>/dev/null) + _glib=$($_pkg_config "glib-2.0 >= 2.6.0" --modversion 2>&1) + if [ $? -eq 0 ]; then libs_mplayer="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)" echores "$_glib" + else + res_comment="too old" + echores "$($_pkg_config glib-2.0 --modversion 2>/dev/null)" + die "$_glib" + fi def_gui='#define CONFIG_GUI 1' else - die "GLib 2 devel packages were not found." + echores "no" + die "GLib version 2 devel packages were not found (required for GUI)." fi else - die "GTK+ 2 devel packages were not found." + echores "no" + die "GTK+ version 2 devel packages were not found (required for GUI)." fi else #if ! win32