Ticket #206: x11_check.diff

File x11_check.diff, 1.6 KB (added by reimar, 22 years ago)

Check if found libs compile

  • configure

    RCS file: /cvsroot/mplayer/main/configure,v
    retrieving revision 1.957
    diff -u -r1.957 configure
     
    33813385fi
    33823386
    33833387
    3384 echocheck "X11 libs presence"
     3388echocheck "working X11 libs"
    33853389if test -z "$_ld_x11" ; then
    33863390  for I in /usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib ; do
    33873391    if test -d "$I" && ( test -f "$I/libX11.so" || test -f "$I/libX11.a" || test -f "$I/libX11.dll.a" ) ; then
    … …  
    33903394      else
    33913395        _ld_x11="-L$I"
    33923396      fi
     3397      _ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
     3398      cat > $TMPC <<EOF
     3399#include <X11/Xlib.h>
     3400#include <X11/Xutil.h>
     3401int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
     3402EOF
     3403     if cc_check $_inc_x11 $_ld_x11 ; then
    33933404      echores "yes (using $I)"
    33943405      break;
     3406     else
     3407      _ld_x11=""
     3408     fi
    33953409    fi
    33963410  done
    33973411  if test -z "$_ld_x11" ; then
    … …  
    34003414  fi
    34013415else
    34023416  echores "yes (using $_ld_x11)"
     3417  _ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
    34033418fi
    3404 _ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
    34053419
    34063420
    34073421echocheck "X11"
    3408 if test "$_x11" != no ; then
    3409   cat > $TMPC <<EOF
    3410 #include <X11/Xlib.h>
    3411 #include <X11/Xutil.h>
    3412 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
    3413 EOF
    3414   _x11=no
    3415   cc_check $_inc_x11 $_ld_x11 && _x11=yes
     3422if test "$_x11" = auto ; then
     3423  # X11 lib check will set to no when not working
     3424  _x11=yes
    34163425fi
    34173426if test "$_x11" = yes ; then
    34183427  _def_x11='#define HAVE_X11 1'