libgoatvr
view configure @ 26:23a654109494
Merge
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 14 Mar 2015 23:32:22 +0200 |
parents | d861e4d6850f |
children |
line source
1 #!/bin/sh
3 prefix=/usr/local
4 opt=false
5 dbg=true
6 use_libovr=true
7 use_openhmd=false # not done
9 echo "$0 \\" >config.status
10 chmod +x config.status
12 while [ $# != 0 ]; do
13 echo "$1 \\" >>config.status
14 case $1 in
15 --prefix=*)
16 value=`echo $arg | sed 's/--prefix=//'`
17 prefix=${value:-$prefix}
18 ;;
20 --enable-libovr)
21 use_libovr=true
22 ;;
23 --disable-libovr)
24 use_libovr=false
25 ;;
27 --enable-openhmd)
28 use_openhmd=true
29 ;;
30 --disable-openhmd)
31 use_openhmd=false
32 ;;
34 --enable-opt)
35 opt=true
36 ;;
37 --disable-opt)
38 opt=false
39 ;;
40 --enable-debug)
41 dbg=true
42 ;;
43 --disable-debug)
44 dbg=false
45 ;;
47 --help)
48 echo 'options:'
49 echo '--prefix=<path>: installation path (default: /usr/local)'
50 echo '--enable-libovr: enable the Oculus SDK VR module (default)'
51 echo '--disable-libovr: disable the Oculus SDK VR module'
52 echo '--enable-openhmd: enable the OpenHMD VR module (default)'
53 echo '--disable-openhmd: disable the OpenHMD VR module'
54 echo '--enable-opt: enable optimizations'
55 echo '--disable-opt: disable optimizations'
56 echo '--enable-debug: enable debugging symbols (default)'
57 echo '--disable-debug: disable debugging symbols'
58 exit 0
59 ;;
60 esac
61 shift
62 done
64 echo >>config.status
66 echo 'Configuring libgoatvr...'
67 echo " install prefix: $prefix"
68 echo ' optimizations: ' `$opt && echo yes || echo no`
69 echo ' debug symbols: ' `$opt && echo yes || echo no`
70 echo ' use Oculus SDK (LibOVR): ' `$use_libovr && echo yes || echo no`
71 echo ' use OpenHMD: ' `$use_openhmd && echo yes || echo no`
73 echo '# generated makefile, do not edit' >Makefile
74 echo "PREFIX = $prefix" >>Makefile
75 if $opt; then
76 echo 'opt = -O3' >>Makefile
77 fi
78 if $dbg; then
79 echo 'dbg = -g' >>Makefile
80 fi
81 if $use_libovr; then
82 echo 'use_libovr = 1' >>Makefile
83 fi
84 if $use_openhmd; then
85 echo 'use_openhmd = 1' >>Makefile
86 fi
87 echo '# ----------------' >>Makefile
89 cat Makefile.in >>Makefile