forked from 42Paris/minilibx-linux
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·95 lines (80 loc) · 2.2 KB
/
configure
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh
if [ -n "$1" -a "$1" = "--help" ] ; then
echo "Usage : $0\n Auto-configure and make MinilibX"
exit
fi
conf_inc=NO
for inc in \
/usr/X11/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include \
/usr/include/X11 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include
do
if [ -f "$inc/X11/Xlib.h" -a -f "$inc/X11/extensions/XShm.h" ]; then
conf_inc=$inc
break
fi
done
if [ "$conf_inc" = "NO" ]; then
echo "Can't find a suitable X11 include directory."
exit
else
echo "X11 include dir : $conf_inc"
fi
if [ -z "$HOSTTYPE" ]; then
conf_ht=`uname -s`
else
conf_ht=$HOSTTYPE
fi
if [ -z "$conf_ht" ]; then
conf_docp=""
else
conf_docp="do_cp"
echo "lib_$conf_ht generation"
fi
/bin/echo "INC=$conf_inc" > Makefile.gen
/bin/echo "HT=$conf_ht" >> Makefile.gen
/bin/echo "DOCP=$conf_docp" >> Makefile.gen
cat Makefile.mk | grep -v %%%% >> Makefile.gen
/bin/echo "INC=$conf_inc" > test/Makefile.gen
/bin/echo "HT=$conf_ht" >> test/Makefile.gen
/bin/echo "DOCP=$conf_docp" >> test/Makefile.gen
cat test/Makefile.mk | grep -v %%%% >> test/Makefile.gen
if [ -n "$1" -a "$1" = "clean" ] ; then
echo "Now make it clean."
make -f Makefile.gen clean
(cd test ; make -f Makefile.gen clean)
exit
fi
echo "Now make it."
make -f Makefile.gen all
(cd test ; make -f Makefile.gen all )