libdrawtext

view configure @ 100:49feeaf50ae8

merged
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Dec 2015 02:55:35 +0200
parents fe0c54e574ae
children
line source
1 #!/bin/sh
3 prefix=/usr/local
4 opt=false
5 dbg=true
6 use_ft2=true
7 name=libdrawtext
9 while [ $# != 0 ]; do
10 case $1 in
11 --prefix=*)
12 prefix=`echo $1 | sed 's/^--prefix=//'`
13 ;;
14 --enable-opt)
15 opt=true
16 ;;
17 --disable-opt)
18 opt=false
19 ;;
20 --enable-dbg)
21 dbg=true
22 ;;
23 --disable-dbg)
24 dbg=false
25 ;;
26 --enable-freetype)
27 use_ft2=true
28 name=libdrawtext
29 ;;
30 --disable-freetype)
31 use_ft2=false
32 name=libdrawtext-noft
33 ;;
34 esac
35 shift
36 done
38 echo "installation prefix: $prefix"
39 $use_ft2 && echo 'use freetype: yes' || echo 'use freetype: no'
40 $opt && echo 'optimizations: yes' || echo 'optimizations: no'
41 $dbg && echo 'debug symbols: yes' || echo 'debug symbols: no'
43 echo "Configuring ${name}..."
45 echo "# do not modify this file manually, it's generated by the configure script" >Makefile
46 echo "PREFIX = $prefix" >>Makefile
47 $opt && echo '-O3' | xargs echo 'opt =' >>Makefile
48 $dbg && echo '-g' | xargs echo 'dbg =' >>Makefile
49 if $use_ft2; then
50 echo "name = $name" >>Makefile
51 echo 'ft2_cflags = `pkg-config --cflags freetype2`' >>Makefile
52 echo 'ft2_libs = `pkg-config --libs freetype2`' >>Makefile
53 else
54 echo "name = $name" >>Makefile
55 echo 'ft2_cflags = -DNO_FREETYPE' >>Makefile
56 fi
57 echo '# --- end of generated part, start of Makefile.in ---' >>Makefile
58 cat Makefile.in >>Makefile
60 echo 'Done. Run make (or gmake) to compile.'