Ticket #9722: get_X11-against-upstream.diff

File get_X11-against-upstream.diff, 2.3 KB (added by leif, 11 years ago)

Just to ease seeing some of the changes I made... (Do not apply, it's in the patch, too.)

  • get_X11

    old new  
    11tdir=$osname-$arch-X11$$
    22mkdir $tdir; cp Imakefile $tdir; cd $tdir
    33if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
     4  echo "Using 'xmkmf' to locate X11 headers and libraries..."
    45  eval `make gp-X11 2> /dev/null | grep -v make`
    56  x11pth="$usrlibdir $libdir";
     7else
     8  echo "'xmkmf' seems not to be available..."
    69fi
    710cd ..; rm -rf $tdir
    811
     12# DEBUG (leif):
     13echo "... (\$Xincroot after xmkmf attempt is \"$Xincroot\".)"
     14echo "... (\$x11pth after xmkmf attempt is \"$x11pth\".)"
     15
    916# Check xmkmf answer
    1017# X11 -- Headers
    1118if test ! -f $Xincroot/X11/Xos.h; then
     
    2835  pth=`echo $x11pth | sed 's,/lib,/include,g'`
    2936  x=`./locate X11/Xos.h '' $pth`
    3037  case $x in
    31    /*) Xincroot=`echo $x | sed 's,/X11/Xos.h,,'`;;
    32    *)  Xincroot=;;
     38   /*) Xincroot=`echo $x | sed 's,/X11/Xos.h,,'`
     39       echo "...Found X11 header files in \"$Xincroot/X11\".";;
     40   *)  Xincroot=""
     41       echo "### Could not find X11 header files."
     42       case $which_graphic_lib in
     43         none)
     44           echo "(This is just informational - no graphics support was requested anyway.)";;
     45       esac
     46       ;;
    3347  esac
     48else
     49  echo "...Found X11 header files in \"$Xincroot/X11\"."
    3450fi
     51
    3552# X11 -- Lib
    3653pth=$x11pth
    3754lib=X11; . ./locatelib
     55# Comment by leif:
     56# The above doesn't find a libX11.so in, e.g., /usr/lib64 (Fedora 13),
     57# so try again if we are on a 64-bit system (added by me):
     58if test -z "$X11" -a "$sizeof_long" -eq 8; then
     59  echo "...libX11.so not yet found, searching 64-bit directories..."
     60  pth=`echo $x11pth | sed 's,/lib,/lib64,g'`
     61  lib=X11; . ./locatelib
     62fi
     63
    3864if test -f $Xincroot/X11/Xos.h -a -n "$X11"; then
    3965  case $which_graphic_lib in
    4066    auto) which_graphic_lib=X11;;
    4167  esac
    4268  echo ..."Found X11 header files in $Xincroot/X11"
     69  echo ..."Found X11 library in $X11"
    4370  test -n "$extralib" && echo ..."Extra Libraries are $extralib"
    4471  X11_LIBS="-L$X11 -lX11 $extralib"
    4572  X11_INC="-I$Xincroot"
    4673else
    47   echo "### X11 not found"
     74  echo "### Not all necessary parts of X11 found"
     75  case $which_graphic_lib in
     76    none)
     77      echo "(This is just informational - no graphics support was requested anyway.)";;
     78  esac
    4879  X11=
    4980fi
     81