libpsys

annotate configure @ 17:7fbed016e739

fixed the particle system loading
author John Tsiombikas <nuclear@mutantstargoat.com>
date Tue, 11 Sep 2012 03:26:13 +0300
parents 1c8eb90a6989
children
rev   line source
nuclear@0 1 #!/bin/sh
nuclear@0 2
nuclear@0 3 PREFIX=/usr/local
nuclear@0 4 OPT=yes
nuclear@0 5 DBG=yes
nuclear@0 6 VERSION=`head -1 README | sed 's/^.*- //'`
nuclear@0 7
nuclear@0 8 echo "configuring psys $VERSION ..."
nuclear@0 9
nuclear@0 10 check_vmath()
nuclear@0 11 {
nuclear@0 12 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/nekoware/lib/pkgconfig:/usr/freeware/lib/pkgconfig:/opt/lib/pkgconfig
nuclear@0 13 if [ -z "`pkg-config --cflags vmath`" ]; then
nuclear@0 14 echo 'libpsys depends on libvmath. You must install libvmath first.'
nuclear@0 15 exit 1
nuclear@0 16 fi
nuclear@0 17 }
nuclear@0 18
nuclear@0 19 for arg; do
nuclear@0 20 case "$arg" in
nuclear@0 21 --prefix=*)
nuclear@0 22 value=`echo $arg | sed 's/--prefix=//'`
nuclear@0 23 PREFIX=${value:-$PREFIX}
nuclear@0 24 ;;
nuclear@0 25
nuclear@0 26 --enable-opt)
nuclear@0 27 OPT=yes;;
nuclear@0 28 --disable-opt)
nuclear@0 29 OPT=no;;
nuclear@0 30
nuclear@0 31 --enable-debug)
nuclear@0 32 DBG=yes;;
nuclear@0 33 --disable-debug)
nuclear@0 34 DBG=no;;
nuclear@0 35
nuclear@0 36 --help)
nuclear@0 37 echo 'usage: ./configure [options]'
nuclear@0 38 echo 'options:'
nuclear@0 39 echo ' --prefix=<path>: installation path (default: /usr/local)'
nuclear@0 40 echo ' --enable-opt: enable speed optimizations (default)'
nuclear@0 41 echo ' --disable-opt: disable speed optimizations'
nuclear@0 42 echo ' --enable-debug: include debugging symbols (default)'
nuclear@0 43 echo ' --disable-debug: do not include debugging symbols'
nuclear@0 44 echo 'all invalid options are silently ignored'
nuclear@0 45 exit 0
nuclear@0 46 ;;
nuclear@0 47 esac
nuclear@0 48 done
nuclear@0 49
nuclear@0 50 check_vmath
nuclear@0 51
nuclear@0 52 echo "prefix: $PREFIX"
nuclear@0 53 echo "optimize for speed: $OPT"
nuclear@0 54 echo "include debugging symbols: $DBG"
nuclear@0 55
nuclear@0 56 echo 'creating makefile ...'
nuclear@0 57 echo "PREFIX = $PREFIX" >Makefile
nuclear@0 58 if [ "$DBG" = 'yes' ]; then
nuclear@0 59 echo 'dbg = -g' >>Makefile
nuclear@0 60 fi
nuclear@0 61 if [ "$OPT" = 'yes' ]; then
nuclear@0 62 echo 'opt = -O3' >>Makefile
nuclear@0 63 fi
nuclear@0 64 cat Makefile.in >>Makefile
nuclear@0 65
nuclear@0 66 echo 'configuration completed, type make (or gmake) to build.'