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