Skip to content

Commit

Permalink
Streamline GUI build.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19057 b3059339-0415-0410-9bf9-f77b7e298cf2
  • Loading branch information
diego committed Jul 13, 2006
1 parent 4e3bf50 commit 7e18214
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Gui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ include ../config.mak

LIBNAME = libgui.a

INCDIR = -I. -I.. -I../loader -I./wm -I./skin $(FREETYPE_INC) $(GTKINC)
INCDIR = -I. -I.. -I../loader -I./wm -I./skin $(FREETYPE_INC) $(GTK_INC)

CFLAGS = $(OPTFLAGS) $(INCDIR) $(DEBUG)
CFLAGS = $(OPTFLAGS) $(INCDIR) -DDEBUG

ifeq ($(TARGET_WIN32),yes)
SRCS = win32/dialogs.c \
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ COMMON_LIBS += $(FREETYPE_LIB)
endif
ifeq ($(GUI),yes)
COMMON_DEPS += Gui/libgui.a
GUI_LIBS = Gui/libgui.a
GUI_LIBS = Gui/libgui.a $(GTK_LIBS)
endif

.SUFFIXES: .cc .c .o
Expand Down Expand Up @@ -377,7 +377,6 @@ LIBS_MPLAYER = libvo/libvo.a \
$(VIDIX_LIBS) \
$(GUI_LIBS) \
$(COMMON_LIBS) \
$(GTK_LIBS) \
$(VO_LIBS) \
$(AO_LIBS) \
$(EXTRA_LIB)\
Expand Down
41 changes: 19 additions & 22 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ Video output:
--enable-vm build with XF86VidMode support for X11 [autodetect]
--enable-xinerama build with Xinerama support for X11 [autodetect]
--enable-x11 build with X11 render support [autodetect]
--enable-xshape build with XShape support [autodetect]
--enable-fbdev build with FBDev render support [autodetect]
--enable-mlib build with mediaLib support (Solaris only) [disable]
--enable-3dfx build with obsolete /dev/3dfx support [disable]
Expand Down Expand Up @@ -1573,6 +1574,7 @@ _libpostproc_so=auto
_libfame=auto
_mencoder=yes
_x11=auto
_xshape=auto
_dga=auto # 1 2 no auto
_xv=auto
_xvmc=no #auto when complete
Expand Down Expand Up @@ -1738,6 +1740,8 @@ for ac_option do
--disable-dynamic-plugins) _dynamic_plugins=no ;;
--enable-x11) _x11=yes ;;
--disable-x11) _x11=no ;;
--enable-xshape) _xshape=yes ;;
--disable-xshape) _xshape=no ;;
--enable-xv) _xv=yes ;;
--disable-xv) _xv=no ;;
--enable-xvmc) _xvmc=yes ;;
Expand Down Expand Up @@ -7008,19 +7012,20 @@ else
fi
echores "$_gethostbyname2"


# --------------- GUI specific tests begin -------------------
echocheck "GUI"
echo "$_gui"
if test "$_gui" = yes ; then

# Required libraries
test "$_png" != yes && die "PNG support required for GUI compilation, please install libpng and libpng-dev packages."
test "$_png" != yes && die "The GUI requires PNG support, please install libpng and libpng-dev packages."
if not win32 ; then
test "$_x11" != yes && die "X11 support required for GUI compilation"
test "$_x11" != yes && die "X11 support required for GUI compilation."

echocheck "XShape extension"
_xshape=no
if test "$_x11" = yes ; then
if test "$_xshape" = auto ; then
_xshape=no
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/Xproto.h>
Expand Down Expand Up @@ -7065,13 +7070,11 @@ if test "$_gtk1" = no ; then
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"
Expand Down Expand Up @@ -7107,32 +7110,30 @@ if test "$_gtk1" = yes ; then
elif ( glib12-config --version ) >/dev/null 2>&1 ; then
_glibconfig="glib12-config"
else
die "The GUI requires GLib devel packages (which were not found)"
die "The GUI requires GLIB devel packages (which were not found)"
fi
fi
_glib=`$_glibconfig --version 2>&1`
_inc_glib=`$_glibconfig --cflags 2>&1`
_ld_glib=`$_glibconfig --libs 2>&1`
echores "$_glib (using $_glibconfig)"

_def_gui='#define HAVE_NEW_GUI 1'
_def_gtk2_gui='#undef HAVE_GTK2_GUI'
_ld_gui='$(GTKLIB) $(GLIBLIB)'
fi

else
else #if not win32
_ld_win32libs="-lcomdlg32 -lcomctl32 -lshell32 -lkernel32 $_ld_win32libs"
_def_gui='#define HAVE_NEW_GUI 1'
_def_gtk2_gui='#undef HAVE_GTK2_GUI'
_ld_gui='$(GTKLIB) $(GLIBLIB)'
fi
fi #if not win32

else
else #if test "$_gui"
_def_gui='#undef HAVE_NEW_GUI'
_def_gtk2_gui='#undef HAVE_GTK2_GUI'
fi
fi #if test "$_gui"
# --------------- GUI specific tests end -------------------


if test "$_charset" = "noconv" ; then
_charset=""
elif test -z "$_charset" ; then
Expand Down Expand Up @@ -7633,15 +7634,11 @@ TARGET_BUILTIN_VECTOR = $_builtin_vector
TARGET_BUILTIN_3DNOW = $_mm3dnow
# --- GUI stuff ---
GTKINC = $_inc_gtk
GTKLIB = $_ld_static $_ld_gtk
GTKLIBS = $_ld_gtk
GLIBLIB = $_ld_static $_ld_glib
GLIBLIBS = $_ld_glib
GLIBINC = $_inc_glib
GTK_LIBS = $_ld_static $_ld_gui
GTK_INC = $_inc_gtk
GTKLIB = $_ld_gtk
GLIBLIB = $_ld_glib
GTK_LIBS = $_ld_static \$(GTKLIB) \$(GLIBLIB)
GUI = $_gui
DEBUG = -DDEBUG
# --- libvo stuff ---
VO_SRCS = $_vosrc
Expand Down

0 comments on commit 7e18214

Please sign in to comment.