libanim
annotate configure @ 56:73cd80b3db29
added install.bat
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 16 Nov 2013 12:31:03 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 #!/bin/sh |
nuclear@0 | 2 |
nuclear@0 | 3 PREFIX=/usr/local |
nuclear@0 | 4 OPT=yes |
nuclear@0 | 5 DBG=yes |
nuclear@0 | 6 PTHREAD=no |
nuclear@0 | 7 |
nuclear@0 | 8 config_h=src/config.h |
nuclear@0 | 9 |
nuclear@0 | 10 #echo "configuring libanim $VERSION ..." |
nuclear@0 | 11 |
nuclear@0 | 12 for arg; do |
nuclear@0 | 13 case "$arg" in |
nuclear@0 | 14 --prefix=*) |
nuclear@0 | 15 value=`echo $arg | sed 's/--prefix=//'` |
nuclear@0 | 16 PREFIX=${value:-$prefix} |
nuclear@0 | 17 ;; |
nuclear@0 | 18 |
nuclear@0 | 19 --enable-opt) |
nuclear@0 | 20 OPT=yes;; |
nuclear@0 | 21 --disable-opt) |
nuclear@0 | 22 OPT=no;; |
nuclear@0 | 23 |
nuclear@0 | 24 --enable-debug) |
nuclear@0 | 25 DBG=yes;; |
nuclear@0 | 26 --disable-debug) |
nuclear@0 | 27 DBG=no;; |
nuclear@0 | 28 |
nuclear@0 | 29 --thread-safe) |
nuclear@0 | 30 PTHREAD=yes;; |
nuclear@0 | 31 --thread-unsafe) |
nuclear@0 | 32 PTHREAD=no;; |
nuclear@0 | 33 |
nuclear@0 | 34 --help) |
nuclear@0 | 35 echo 'usage: ./configure [options]' |
nuclear@0 | 36 echo 'options:' |
nuclear@0 | 37 echo ' --prefix=<path>: installation path (default: /usr/local)' |
nuclear@0 | 38 echo ' --enable-opt: enable speed optimizations (default)' |
nuclear@0 | 39 echo ' --disable-opt: disable speed optimizations' |
nuclear@0 | 40 echo ' --enable-debug: include debugging symbols (default)' |
nuclear@0 | 41 echo ' --disable-debug: do not include debugging symbols' |
nuclear@0 | 42 echo ' --thread-safe: protect concurrent access to matrix cache' |
nuclear@0 | 43 echo ' --thread-unsafe: assume only single-threaded operation (default)' |
nuclear@0 | 44 echo 'all invalid options are silently ignored' |
nuclear@0 | 45 exit 0 |
nuclear@0 | 46 ;; |
nuclear@0 | 47 esac |
nuclear@0 | 48 done |
nuclear@0 | 49 |
nuclear@0 | 50 echo "prefix: $PREFIX" |
nuclear@0 | 51 echo "optimize for speed: $OPT" |
nuclear@0 | 52 echo "include debugging symbols: $DBG" |
nuclear@0 | 53 |
nuclear@0 | 54 echo 'creating makefile ...' |
nuclear@0 | 55 echo "PREFIX = $PREFIX" >Makefile |
nuclear@0 | 56 if [ "$DBG" = 'yes' ]; then |
nuclear@0 | 57 echo 'dbg = -g' >>Makefile |
nuclear@0 | 58 fi |
nuclear@0 | 59 if [ "$OPT" = 'yes' ]; then |
nuclear@0 | 60 echo 'opt = -O3' >>Makefile |
nuclear@0 | 61 fi |
nuclear@0 | 62 if [ "$PTHREAD" = yes ]; then |
nuclear@0 | 63 echo 'pthr = -lpthread' >>Makefile |
nuclear@0 | 64 fi |
nuclear@0 | 65 |
nuclear@0 | 66 cat Makefile.in >>Makefile |
nuclear@0 | 67 |
nuclear@0 | 68 echo 'creating config.h ...' |
nuclear@0 | 69 echo '#ifndef ANIM_CONFIG_H_' >src/config.h |
nuclear@0 | 70 echo '#define ANIM_CONFIG_H_' >>src/config.h |
nuclear@0 | 71 echo >>src/config.h |
nuclear@0 | 72 if [ "$PTHREAD" = yes ]; then |
nuclear@0 | 73 echo '#define ANIM_THREAD_SAFE' >>src/config.h |
nuclear@0 | 74 else |
nuclear@0 | 75 echo '#undef ANIM_THREAD_SAFE' >>src/config.h |
nuclear@0 | 76 fi |
nuclear@0 | 77 echo >>src/config.h |
nuclear@0 | 78 echo '#endif /* ANIM_CONFIG_H_ */'>>src/config.h |
nuclear@0 | 79 |
nuclear@0 | 80 #echo 'creating pkg-config file ...' |
nuclear@0 | 81 #echo "prefix=$PREFIX" >vmath.pc |
nuclear@0 | 82 #echo "ver=$VERSION" >>vmath.pc |
nuclear@0 | 83 #cat vmath.pc.in >>vmath.pc |
nuclear@0 | 84 |
nuclear@0 | 85 echo 'configuration completed, type make (or gmake) to build.' |