Makefile.PL:ExtUtils::PkgConfig, ExtUtils::Depends
[www-quvi.git] / swigity.sh
bloba3e42263e1e295c1984ec14e8decb51421f922ee
1 #!/bin/sh
3 swigity_flag=off
4 build_flag=off
5 clean_flag=off
7 while [ $# -gt 0 ]
8 do
9 case "$1" in
10 -s) swigity_flag=on;;
11 -b) build_flag=on;;
12 -c) clean_flag=on;;
13 esac
14 shift
15 done
17 swigity()
19 swig -c++ -const -outdir lib/WWW -perl5 \
20 -I/usr/include $quvi_CFLAGS Quvi.i
21 exit $?
24 build_so()
26 quvi_CFLAGS=`pkg-config --cflags libquvi`
27 quvi_LDFLAGS=`pkg-config --libs libquvi`
29 perl_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
30 perl_LDFLAGS=`perl -MExtUtils::Embed -e ldopts`
32 g++ -g Quvi_wrap.cxx \
33 -I . \
34 Options.cxx \
35 Link.cxx \
36 Video.cxx \
37 Query.cxx \
38 -fpic -shared -o Quvi.so \
39 $quvi_CFLAGS $quvi_LDFLAGS \
40 $perl_CFLAGS $perl_LDFLAGS
42 exit $?
45 clean()
47 rm Quvi.so
48 exit $?
51 if [ x"$swigity_flag" = "xon" ]; then
52 swigity
55 if [ x"$build_flag" = "xon" ]; then
56 build_so
59 if [ x"$clean_flag" = "xon" ]; then
60 clean
63 echo "
64 usage: $0 [-s | -b | -c]
66 -s .. run swig against Quvi.i
67 -b .. build, compile a shared library from swig wrapper code
68 -c .. cleanup, remove the shared library created with -b
70 Most users will want to use the Makefile.PL instead.
71 This script was written to aid the development work."
72 exit 0