aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/Mesa_6.4.2/bin/installmesa
blob: 8d1ee992dc7e34fdd88d9dbd6952e5bb5ea36e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/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"
elif [ `uname` = "Darwin" ] ; 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
cp -f ${TOP}/src/glw/*.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."