diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-17 11:16:15 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-17 11:16:15 +0000 |
commit | d098c927151f7217703c89aeabf0e1ae50e7ee10 (patch) | |
tree | e8210b2ed59d3e35c5fcea6af3035d5c7f9bbeb5 /configure | |
parent | 9f852fcd187ee8275c424c9bfec9f012fcb4a0d6 (diff) | |
download | mpv-d098c927151f7217703c89aeabf0e1ae50e7ee10.tar.bz2 mpv-d098c927151f7217703c89aeabf0e1ae50e7ee10.tar.xz |
Modify X11 headers check so as not to add /usr/include, the default system
include path, to our custom include path or duplicate entries in it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23804 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -3748,24 +3748,28 @@ fi echocheck "X11 headers presence" - for I in `echo $_inc_extra | sed s/-I//g` /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/include /usr/openwin/include ; do + _x11_headers="no" + _res_comment="check if the dev(el) packages are installed" + for I in `echo $_inc_extra | sed s/-I//g` /usr/include ; do if test -f "$I/X11/Xlib.h" ; then - _inc_x11="-I$I" + _x11_headers="yes" + _res_comment="" + break + fi + done + for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/openwin/include ; do + if test -f "$I/X11/Xlib.h" ; then + _inc_extra="$_inc_extra -I$I" _x11_headers="yes" _res_comment="using $I" break fi done - if test -z "$_inc_x11" ; then - _x11=no - _x11_headers="no" - _res_comment="check if the dev(el) packages are installed" - fi echores "$_x11_headers" echocheck "X11" -if test "$_x11" != no ; then +if test "$_x11" = auto && test "$_x11_headers" = yes ; then cat > $TMPC <<EOF #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -3778,13 +3782,11 @@ EOF else _ld_tmp="$I -lXext -lX11 $_ld_pthread" fi - cc_check $_inc_x11 $_ld_tmp && _libs_mplayer="$_libs_mplayer $_ld_tmp" \ + cc_check $_ld_tmp && _libs_mplayer="$_libs_mplayer $_ld_tmp" \ && _x11=yes && break done fi if test "$_x11" = yes ; then - #FIXME: This is ugly as it can duplicate a -I parameter.. - _inc_extra="$_inc_extra $_inc_x11" _def_x11='#define HAVE_X11 1' _vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c" _vomodules="x11 xover $_vomodules" |