+ Whoops - had forgotten these OS/X patches...
[melted] / mlt++ / configure
1 #!/bin/sh
2
3 path=`which mlt-config 2>/dev/null`
4 [ $? != 0 ] && echo "MLT not installed - aborting" && exit 1 
5
6 # Determine default prefix
7 prefix=`mlt-config --prefix`
8 [ "$prefix" = "" ] && echo "Can't locate MLT's prefix - please reconfigure MLT." && exit 1
9
10 # Allow override from command line
11 [ "$1" != "" ] && prefix="${1#--prefix=}"
12
13 # Sanity check
14 [ ! -d "$prefix" ] && echo "Invalid prefix $prefix - aborting" && exit 1
15
16 echo "prefix=$prefix" > config.mak
17
18 targetos=$(uname -s)
19
20 case $targetos in 
21         Darwin)
22                 echo LIBSUF=.dylib
23         echo "CXXFLAGS+=-D__DARWIN__ -Wall -fPIC `mlt-config --cflags`"
24         echo "LDFLAGS=-dynamiclib `mlt-config --libs` `mlt-config miracle --libs` `mlt-config valerie --libs` -single_module"
25                 ;;
26         Linux)
27                 echo LIBSUF=.so
28         echo "CXXFLAGS+=-pthread -Wall -fPIC `mlt-config --cflags`"
29         echo "LDFLAGS=-shared `mlt-config --libs` `mlt-config miracle --libs`"
30                 ;;
31 esac >> config.mak
32
33 echo "MLT++ configured - will be installed in $prefix."
34