9 Non-autotool config script for MLT.
13 --help - this information
15 General build options:
17 --prefix=directory - install prefix for path (default: $prefix)
18 --libdir=directory - lib directory (default: $prefix/lib)
19 --enable-gpl - Enable GPL components
20 --enable-motion-est - Enable motion estimation components
21 --disable-debug - Compile without debug support (default: on)
22 --disable-mmx - Compile without MMX support (default: on)
23 --cpu='cpu' - Compile for a specific CPU/architectre (default: none)
25 Module disables options:
29 for i in src/modules/*
31 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]`
33 awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
36 echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
43 echo "version=$version"
44 echo "soversion=$soversion"
47 echo "bindir=$prefix/bin"
48 echo "targetos=$targetos"
50 [ "$mmx" = "true" ] &&
51 echo "MMX_FLAGS=-DUSE_MMX"
53 [ "$debug" = "true" ] &&
56 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
59 echo "TARGETARCH=-march=$cpu" &&
60 echo "TARGETCPU=-mcpu=$cpu"
61 echo "OPTIMISATIONS=-O4 -pipe -fomit-frame-pointer"
63 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
67 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
68 echo "SHFLAGS=-dynamiclib"
69 echo "LDFLAGS+=`sdl-config --libs`"
72 echo "OPTIMISATIONS+=-ffast-math"
73 echo "CFLAGS+=-pthread"
74 echo "SHFLAGS=-shared"
76 echo "RDYNAMIC=-rdynamic"
84 echo "#!/bin/sh" > mlt-config
86 echo export version=$version
87 echo export prefix=$prefix
88 echo export libdir=$libdir
89 echo export bindir=$prefix/bin
92 cat < mlt-config-template >> mlt-config
94 echo -n > packages.dat
99 for i in framework valerie miracle
101 echo prefix="$prefix" > mlt-$i.pc
103 echo exec_prefix=$prefix
105 echo includedir=$prefix/include
106 echo version=$version
107 echo cflags=`grep ^$i packages.dat | cut -f 2`
108 echo libs=`grep ^$i packages.dat | cut -f 3`
110 cat mlt-$i.pc.in >>mlt-$i.pc
117 # Define build directory for scripts called
118 export build_dir=`dirname $0`
119 export prefix=/usr/local
126 export motionest=false
130 # Chose appropriate suffix for libraries
145 # Iterate through arguments
150 --prefix=* ) prefix="${i#--prefix=}" ;;
151 --libdir=* ) libdir="${i#--libdir=}" ;;
152 --disable-debug ) debug=false ;;
153 --disable-mmx ) mmx=false ;;
154 --enable-gpl ) gpl=true ;;
155 --enable-motion-est ) motionest=true ;;
156 --cpu=* ) cpu="${i#--cpu=}" ;;
160 # Determine the libdir if it's not specified in the args
161 [ "$libdir" = "" ] && libdir=$prefix/lib
163 # Double check mmx (may end up disabling mmx on non-linux platforms incorrectly)
164 if [ "$mmx" = "true" ]
166 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
169 # Show help if requested
174 # Log the configuration history
176 echo "$0 $@" >> config.log
181 # Iterate through each of the components
182 for i in framework modules inigo valerie miracle humperdink
184 if [ -x src/$i/configure ]
186 [ $help = 0 ] && echo "Configuring `basename $i`:"
190 [ $? != 0 ] && exit 1
195 # Build the pkg-config files
200 ( [ "$gpl" = "false" ] &&
201 echo "GPL Components are disabled" ||
202 echo "GPL License Used" )
204 if [ "$motionest" = "true" -a "$gpl" = "false" ]
206 echo "Add the --enable-gpl flag to build the motion estimation components."