libgoatvr

annotate configure @ 6:b71314e80654

fixed the null plugin
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 19 Sep 2014 05:30:20 +0300
parents
children 6896f9cf9621
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@1 9 while [ $# != 0 ]; do
nuclear@1 10 case $1 in
nuclear@1 11 --prefix=*)
nuclear@1 12 value=`echo $arg | sed 's/--prefix=//'`
nuclear@1 13 prefix=${value:-$prefix}
nuclear@1 14 ;;
nuclear@1 15
nuclear@1 16 --enable-libovr)
nuclear@1 17 use_libovr=true
nuclear@1 18 ;;
nuclear@1 19 --disable-libovr)
nuclear@1 20 use_libovr=false
nuclear@1 21 ;;
nuclear@1 22
nuclear@1 23 --enable-openhmd)
nuclear@1 24 use_openhmd=true
nuclear@1 25 ;;
nuclear@1 26 --disable-openhmd)
nuclear@1 27 use_openhmd=false
nuclear@1 28 ;;
nuclear@1 29
nuclear@1 30 --enable-opt)
nuclear@1 31 opt=true
nuclear@1 32 ;;
nuclear@1 33 --disable-opt)
nuclear@1 34 opt=false
nuclear@1 35 ;;
nuclear@1 36 --enable-debug)
nuclear@1 37 dbg=true
nuclear@1 38 ;;
nuclear@1 39 --disable-debug)
nuclear@1 40 dbg=false
nuclear@1 41 ;;
nuclear@1 42
nuclear@1 43 --help)
nuclear@1 44 echo 'options:'
nuclear@1 45 echo '--prefix=<path>: installation path (default: /usr/local)'
nuclear@1 46 echo '--enable-libovr: enable the Oculus SDK VR module (default)'
nuclear@1 47 echo '--disable-libovr: disable the Oculus SDK VR module'
nuclear@1 48 echo '--enable-openhmd: enable the OpenHMD VR module (default)'
nuclear@1 49 echo '--disable-openhmd: disable the OpenHMD VR module'
nuclear@1 50 echo '--enable-opt: enable optimizations'
nuclear@1 51 echo '--disable-opt: disable optimizations'
nuclear@1 52 echo '--enable-debug: enable debugging symbols (default)'
nuclear@1 53 echo '--disable-debug: disable debugging symbols'
nuclear@1 54 exit 0
nuclear@1 55 ;;
nuclear@1 56 esac
nuclear@1 57 shift
nuclear@1 58 done
nuclear@1 59
nuclear@1 60 echo 'Configuring libgoatvr...'
nuclear@1 61 echo " install prefix: $prefix"
nuclear@1 62 echo ' optimizations: ' `$opt && echo yes || echo no`
nuclear@1 63 echo ' debug symbols: ' `$opt && echo yes || echo no`
nuclear@1 64 echo ' use Oculus SDK (LibOVR): ' `$use_libovr && echo yes || echo no`
nuclear@1 65 echo ' use OpenHMD: ' `$use_openhmd && echo yes || echo no`
nuclear@1 66
nuclear@1 67 echo '# generated makefile, do not edit' >Makefile
nuclear@1 68 echo "PREFIX = $prefix" >>Makefile
nuclear@1 69 if $opt; then
nuclear@1 70 echo 'opt = -O3' >>Makefile
nuclear@1 71 fi
nuclear@1 72 if $dbg; then
nuclear@1 73 echo 'dbg = -g' >>Makefile
nuclear@1 74 fi
nuclear@1 75 if $use_libovr; then
nuclear@1 76 echo 'use_libovr = 1' >>Makefile
nuclear@1 77 fi
nuclear@1 78 if $use_openhmd; then
nuclear@1 79 echo 'use_openhmd = 1' >>Makefile
nuclear@1 80 fi
nuclear@1 81 echo '# ----------------' >>Makefile
nuclear@1 82
nuclear@1 83 cat Makefile.in >>Makefile