summaryrefslogtreecommitdiffstats
path: root/bin/installmesa
diff options
context:
space:
mode:
authorDavid Nusinow <[email protected]>2005-11-09 02:46:07 +0000
committerDavid Nusinow <[email protected]>2005-11-09 02:46:07 +0000
commitc37d6b4ca8a9a7ac42a2e0082cf1bb0acbbff3cc (patch)
tree85b03b216318e1c3c138fd1f4371df3d3ac2dd35 /bin/installmesa
Commit Mesa 6.4 sources and packaging
Diffstat (limited to 'bin/installmesa')
-rwxr-xr-xbin/installmesa69
1 files changed, 69 insertions, 0 deletions
diff --git a/bin/installmesa b/bin/installmesa
new file mode 100755
index 00000000000..0bfce33c7a5
--- /dev/null
+++ b/bin/installmesa
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+#
+# Simple shell script for installing Mesa's header and library files.
+# If the copy commands below don't work on a particular system (i.e. the
+# -f or -d flags), we may need to branch on `uname` to do the right thing.
+#
+
+
+TOP=.
+
+INCLUDE_DIR="/usr/local/include"
+LIB_DIR="/usr/local/lib"
+
+if [ "x$#" = "x0" ] ; then
+echo
+echo "***** Mesa installation - You may need root privileges to do this *****"
+echo
+echo "Default directory for header files is:" ${INCLUDE_DIR}
+echo "Enter new directory or press <Enter> to accept this default."
+
+read INPUT
+if [ "x${INPUT}" != "x" ] ; then
+ INCLUDE_DIR=${INPUT}
+fi
+
+echo
+echo "Default directory for library files is:" ${LIB_DIR}
+echo "Enter new directory or press <Enter> to accept this default."
+
+read INPUT
+if [ "x${INPUT}" != "x" ] ; then
+ LIB_DIR=${INPUT}
+fi
+
+echo
+echo "About to install Mesa header files (GL/*.h) in: " ${INCLUDE_DIR}/GL
+echo "and Mesa library files (libGL.*, etc) in: " ${LIB_DIR}
+echo "Press <Enter> to continue, or <ctrl>-C to abort."
+
+read INPUT
+
+else
+INCLUDE_DIR=$1/include
+LIB_DIR=$1/lib
+fi
+
+# flags:
+# -f = force
+# -d = preserve symlinks (does not work on BSD)
+
+if [ `uname` = "FreeBSD" ] ; then
+ CP_FLAGS="-f"
+else
+ CP_FLAGS="-fd"
+fi
+
+
+set -v
+
+mkdir ${INCLUDE_DIR}
+mkdir ${INCLUDE_DIR}/GL
+mkdir ${INCLUDE_DIR}/GLES
+mkdir ${LIB_DIR}
+cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
+# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
+cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}
+
+echo "Done."