-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfigure
executable file
·60 lines (54 loc) · 1.3 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
#!/bin/sh
prefix=/usr/local
opt=true
dbg=true
use_ft2=true
name=libdrawtext
while [ $# != 0 ]; do
case $1 in
--prefix=*)
prefix=`echo $1 | sed 's/^--prefix=//'`
;;
--enable-opt)
opt=true
;;
--disable-opt)
opt=false
;;
--enable-dbg)
dbg=true
;;
--disable-dbg)
dbg=false
;;
--enable-freetype)
use_ft2=true
name=libdrawtext
;;
--disable-freetype)
use_ft2=false
name=libdrawtext-noft
;;
esac
shift
done
echo "installation prefix: $prefix"
$use_ft2 && echo 'use freetype: yes' || echo 'use freetype: no'
$opt && echo 'optimizations: yes' || echo 'optimizations: no'
$dbg && echo 'debug symbols: yes' || echo 'debug symbols: no'
echo "Configuring ${name}..."
echo "# do not modify this file manually, it's generated by the configure script" >Makefile
echo "PREFIX = $prefix" >>Makefile
$opt && echo '-O3' | xargs echo 'opt =' >>Makefile
$dbg && echo '-g' | xargs echo 'dbg =' >>Makefile
if $use_ft2; then
echo "name = $name" >>Makefile
echo 'ft2_cflags = `pkg-config --cflags freetype2`' >>Makefile
echo 'ft2_libs = `pkg-config --libs freetype2`' >>Makefile
else
echo "name = $name" >>Makefile
echo 'ft2_cflags = -DNO_FREETYPE' >>Makefile
fi
echo '# --- end of generated part, start of Makefile.in ---' >>Makefile
cat Makefile.in >>Makefile
echo 'Done. Run make (or gmake) to compile.'