libgoatvr

diff configure @ 1:d861e4d6850f

added unix makefile and configure script
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 29 Aug 2014 05:09:45 +0300
parents
children 6896f9cf9621
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/configure	Fri Aug 29 05:09:45 2014 +0300
     1.3 @@ -0,0 +1,83 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +prefix=/usr/local
     1.7 +opt=false
     1.8 +dbg=true
     1.9 +use_libovr=true
    1.10 +use_openhmd=false	# not done
    1.11 +
    1.12 +while [ $# != 0 ]; do
    1.13 +	case $1 in
    1.14 +	--prefix=*)
    1.15 +		value=`echo $arg | sed 's/--prefix=//'`
    1.16 +		prefix=${value:-$prefix}
    1.17 +		;;
    1.18 +
    1.19 +	--enable-libovr)
    1.20 +		use_libovr=true
    1.21 +		;;
    1.22 +	--disable-libovr)
    1.23 +		use_libovr=false
    1.24 +		;;
    1.25 +
    1.26 +	--enable-openhmd)
    1.27 +		use_openhmd=true
    1.28 +		;;
    1.29 +	--disable-openhmd)
    1.30 +		use_openhmd=false
    1.31 +		;;
    1.32 +
    1.33 +	--enable-opt)
    1.34 +		opt=true
    1.35 +		;;
    1.36 +	--disable-opt)
    1.37 +		opt=false
    1.38 +		;;
    1.39 +	--enable-debug)
    1.40 +		dbg=true
    1.41 +		;;
    1.42 +	--disable-debug)
    1.43 +		dbg=false
    1.44 +		;;
    1.45 +
    1.46 +	--help)
    1.47 +		echo 'options:'
    1.48 +		echo '--prefix=<path>: installation path (default: /usr/local)'
    1.49 +		echo '--enable-libovr: enable the Oculus SDK VR module (default)'
    1.50 +		echo '--disable-libovr: disable the Oculus SDK VR module'
    1.51 +		echo '--enable-openhmd: enable the OpenHMD VR module (default)'
    1.52 +		echo '--disable-openhmd: disable the OpenHMD VR module'
    1.53 +		echo '--enable-opt: enable optimizations'
    1.54 +		echo '--disable-opt: disable optimizations'
    1.55 +		echo '--enable-debug: enable debugging symbols (default)'
    1.56 +		echo '--disable-debug: disable debugging symbols'
    1.57 +		exit 0
    1.58 +		;;
    1.59 +	esac
    1.60 +	shift
    1.61 +done
    1.62 +
    1.63 +echo 'Configuring libgoatvr...'
    1.64 +echo "  install prefix: $prefix"
    1.65 +echo '  optimizations: ' `$opt && echo yes || echo no`
    1.66 +echo '  debug symbols: ' `$opt && echo yes || echo no`
    1.67 +echo '  use Oculus SDK (LibOVR): ' `$use_libovr && echo yes || echo no`
    1.68 +echo '  use OpenHMD: ' `$use_openhmd && echo yes || echo no`
    1.69 +
    1.70 +echo '# generated makefile, do not edit' >Makefile
    1.71 +echo "PREFIX = $prefix" >>Makefile
    1.72 +if $opt; then
    1.73 +	echo 'opt = -O3' >>Makefile
    1.74 +fi
    1.75 +if $dbg; then
    1.76 +	echo 'dbg = -g' >>Makefile
    1.77 +fi
    1.78 +if $use_libovr; then
    1.79 +	echo 'use_libovr = 1' >>Makefile
    1.80 +fi
    1.81 +if $use_openhmd; then
    1.82 +	echo 'use_openhmd = 1' >>Makefile
    1.83 +fi
    1.84 +echo '# ----------------' >>Makefile
    1.85 +
    1.86 +cat Makefile.in >>Makefile