You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mltpp/configure

52 lines
1.3 KiB

#!/bin/sh
path=`which mlt-config 2>/dev/null`
[ $? != 0 ] && echo "MLT not installed - aborting" && exit 1
# Determine default prefix
prefix=`mlt-config --prefix`
[ "$prefix" = "" ] && echo "Can't locate MLT's prefix - please reconfigure MLT." && exit 1
# Default the libdir
libdir=""
# Allow override from command line
for i in "$@"
do
case $i in
--prefix=* ) prefix="${i#--prefix=}" ;;
--libdir=* ) libdir="${i#--libdir=}" ;;
esac
done
# Determine the libdir if it's not specified in the args
[ "$libdir" = "" ] && libdir=$prefix/lib
# Sanity check
[ ! -d "$prefix" ] && echo "Invalid prefix $prefix - aborting" && exit 1
echo "version=`mlt-config --version`" > config.mak
echo "prefix=$prefix" >> config.mak
echo "libdir=$libdir" >> config.mak
targetos=$(uname -s)
echo "targetos=$targetos" >> config.mak
case $targetos in
Darwin)
echo LIBSUF=.dylib
echo "CXXFLAGS+=-D__DARWIN__ -Wall -fPIC `mlt-config --cflags`"
echo "LIBFLAGS=-dynamiclib -single_module"
echo "LDFLAGS+=`mlt-config --libs` `mlt-config miracle --libs` `mlt-config valerie --libs`"
;;
Linux)
echo LIBSUF=.so
echo "CXXFLAGS+=-pthread -Wall -fPIC `mlt-config --cflags`"
echo "LIBFLAGS=-shared"
echo "LDFLAGS+=`mlt-config --libs` `mlt-config miracle --libs`"
;;
esac >> config.mak
echo "MLT++ configured - will be installed in $prefix."