aboutsummaryrefslogtreecommitdiff
path: root/src/libdraw/mkwsysrules.sh
blob: f5cf9caa2e9d32c4247444c1adeb9fda9aa8919d (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
#!/bin/sh

[ -f $PLAN9/config ] && . $PLAN9/config

if [ "x$X11" = "x" ]; then 
	if [ -d /usr/X11R6 ]; then
		X11=/usr/X11R6
	elif [ -d /usr/local/X11R6 ]; then
		X11=/usr/local/X11R6
	elif [ -d /usr/X ]; then
		X11=/usr/X
	elif [ -d /usr/openwin ]; then	# for Sun
		X11=/usr/openwin
	else
		X11=noX11dir
	fi
fi

if [ "x$WSYSTYPE" = "x" ]; then
	if [ -d "$X11/include" ]; then
		WSYSTYPE=x11
	else
		WSYSTYPE=nowsys
	fi
fi

echo 'WSYSTYPE='$WSYSTYPE
echo 'X11='$X11

if [ $WSYSTYPE = x11 ]; then
	echo 'CFLAGS=$CFLAGS -I$X11/include'
	echo 'HFILES=$HFILES $XHFILES'
fi