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