Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

installmesa 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/sh
  2. #
  3. # Simple shell script for installing Mesa's header and library files.
  4. # If the copy commands below don't work on a particular system (i.e. the
  5. # -f or -d flags), we may need to branch on `uname` to do the right thing.
  6. #
  7. TOP=.
  8. INCLUDE_DIR="/usr/local/include"
  9. LIB_DIR="/usr/local/lib"
  10. if [ "x$#" = "x0" ] ; then
  11. echo
  12. echo "***** Mesa installation - You may need root privileges to do this *****"
  13. echo
  14. echo "Default directory for header files is:" ${INCLUDE_DIR}
  15. echo "Enter new directory or press <Enter> to accept this default."
  16. read INPUT
  17. if [ "x${INPUT}" != "x" ] ; then
  18. INCLUDE_DIR=${INPUT}
  19. fi
  20. echo
  21. echo "Default directory for library files is:" ${LIB_DIR}
  22. echo "Enter new directory or press <Enter> to accept this default."
  23. read INPUT
  24. if [ "x${INPUT}" != "x" ] ; then
  25. LIB_DIR=${INPUT}
  26. fi
  27. echo
  28. echo "About to install Mesa header files (GL/*.h) in: " ${INCLUDE_DIR}/GL
  29. echo "and Mesa library files (libGL.*, etc) in: " ${LIB_DIR}
  30. echo "Press <Enter> to continue, or <ctrl>-C to abort."
  31. read INPUT
  32. else
  33. INCLUDE_DIR=$1/include
  34. LIB_DIR=$1/lib
  35. fi
  36. # flags:
  37. # -f = force
  38. # -d = preserve symlinks (does not work on BSD)
  39. if [ `uname` = "FreeBSD" ] ; then
  40. CP_FLAGS="-f"
  41. elif [ `uname` = "Darwin" ] ; then
  42. CP_FLAGS="-f"
  43. elif [ `uname` = "AIX" ] ; then
  44. CP_FLAGS="-fh"
  45. else
  46. CP_FLAGS="-fd"
  47. fi
  48. set -v
  49. mkdir -p ${INCLUDE_DIR}
  50. mkdir -p ${INCLUDE_DIR}/GL
  51. # NOT YET: mkdir -p ${INCLUDE_DIR}/GLES
  52. mkdir -p ${LIB_DIR}
  53. cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
  54. cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
  55. # NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
  56. cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}
  57. echo "Done."