libdrawtext

annotate configure @ 74:838d473cf6cc

- properly supported building of no-freetype version, separately installed as libdrawtext-noft.whatever - saving/loading glyphmaps now work correctly - added nofreetype program in examples, to illustrate how to use libdrawtext-noft with prebuilt glyphmaps (see tools/font2glyphmap)
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 15 Apr 2014 05:10:39 +0300
parents fe0c54e574ae
children
rev   line source
nuclear@0 1 #!/bin/sh
nuclear@0 2
nuclear@0 3 prefix=/usr/local
nuclear@0 4 opt=false
nuclear@0 5 dbg=true
nuclear@0 6 use_ft2=true
nuclear@22 7 name=libdrawtext
nuclear@0 8
nuclear@0 9 while [ $# != 0 ]; do
nuclear@0 10 case $1 in
nuclear@0 11 --prefix=*)
nuclear@0 12 prefix=`echo $1 | sed 's/^--prefix=//'`
nuclear@0 13 ;;
nuclear@0 14 --enable-opt)
nuclear@0 15 opt=true
nuclear@0 16 ;;
nuclear@0 17 --disable-opt)
nuclear@0 18 opt=false
nuclear@0 19 ;;
nuclear@0 20 --enable-dbg)
nuclear@0 21 dbg=true
nuclear@0 22 ;;
nuclear@0 23 --disable-dbg)
nuclear@0 24 dbg=false
nuclear@0 25 ;;
nuclear@0 26 --enable-freetype)
nuclear@0 27 use_ft2=true
nuclear@22 28 name=libdrawtext
nuclear@0 29 ;;
nuclear@0 30 --disable-freetype)
nuclear@0 31 use_ft2=false
nuclear@22 32 name=libdrawtext-noft
nuclear@0 33 ;;
nuclear@0 34 esac
nuclear@3 35 shift
nuclear@0 36 done
nuclear@0 37
nuclear@22 38 echo "installation prefix: $prefix"
nuclear@22 39 $use_ft2 && echo 'use freetype: yes' || echo 'use freetype: no'
nuclear@22 40 $opt && echo 'optimizations: yes' || echo 'optimizations: no'
nuclear@22 41 $dbg && echo 'debug symbols: yes' || echo 'debug symbols: no'
nuclear@22 42
nuclear@22 43 echo "Configuring ${name}..."
nuclear@0 44
nuclear@0 45 echo "# do not modify this file manually, it's generated by the configure script" >Makefile
nuclear@0 46 echo "PREFIX = $prefix" >>Makefile
nuclear@0 47 $opt && echo '-O3' | xargs echo 'opt =' >>Makefile
nuclear@0 48 $dbg && echo '-g' | xargs echo 'dbg =' >>Makefile
nuclear@0 49 if $use_ft2; then
nuclear@22 50 echo "name = $name" >>Makefile
nuclear@0 51 echo 'ft2_cflags = `pkg-config --cflags freetype2`' >>Makefile
nuclear@0 52 echo 'ft2_libs = `pkg-config --libs freetype2`' >>Makefile
nuclear@0 53 else
nuclear@22 54 echo "name = $name" >>Makefile
nuclear@0 55 echo 'ft2_cflags = -DNO_FREETYPE' >>Makefile
nuclear@0 56 fi
nuclear@0 57 echo '# --- end of generated part, start of Makefile.in ---' >>Makefile
nuclear@0 58 cat Makefile.in >>Makefile
nuclear@0 59
nuclear@0 60 echo 'Done. Run make (or gmake) to compile.'