Skip to content

Commit

Permalink
tagged spnavcfg 0.1
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.code.sf.net/p/spacenav/code/tags/spnavcfg/spnavcfg-0.1@41 ef983eb1-d774-4af8-acfd-baaf7b16a646
  • Loading branch information
jtsiomb committed Apr 9, 2008
2 parents 2bb52e8 + 5d15ef4 commit 5b1edc7
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/sh

echo 'configuring spnavcfg...'

PREFIX=/usr/local
OPT=yes
DBG=yes
X11=yes

for arg; do
case "$arg" in
--prefix=*)
value=`echo $arg | sed 's/--prefix=//'`
PREFIX=${value:-$prefix}
;;

--enable-opt)
OPT=yes;;
--disable-opt)
OPT=no;;

--enable-debug)
DBG=yes;;
--disable-debug)
DBG=no;;

--help)
echo 'usage: ./configure [options]'
echo 'options:'
echo ' --prefix=<path>: installation path (default: /usr/local)'
echo ' --enable-opt: enable speed optimizations (default)'
echo ' --disable-opt: disable speed optimizations'
echo ' --enable-debug: include debugging symbols (default)'
echo ' --disable-debug: do not include debugging symbols'
echo 'all invalid options are silently ignored'
exit 0
;;
esac
done

echo " prefix: $PREFIX"
echo " optimize for speed: $OPT"
echo " include debugging symbols: $DBG"
echo

# create makefile
echo 'creating makefile ...'
echo "PREFIX = $PREFIX" >Makefile

if [ "$DBG" = 'yes' ]; then
echo 'dbg = -g' >>Makefile
fi

if [ "$OPT" = 'yes' ]; then
echo 'opt = -O3' >>Makefile
fi

cat Makefile.in >>Makefile

echo ''
echo 'Done. You can now type make (or gmake) to compile spnavcfg.'
echo ''

0 comments on commit 5b1edc7

Please sign in to comment.