6 Non-autotool config script for MLT.
10 --help - this information
12 General build options:
14 --prefix=directory - install prefix for path (default: $prefix)
15 --libdir=directory - lib directory (default: $prefix/lib)
16 --enable-gpl - Enable GPL components
17 --enable-motion-est - Enable motion estimation components
18 --disable-debug - Compile without debug support (default: on)
19 --disable-mmx - Compile without MMX support (default: on)
20 --cpu='cpu' - Compile for a specific CPU/architectre (default: none)
22 Module disables options:
26 for i in src/modules/*
28 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]`
30 awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
33 echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
40 echo "version=$version"
43 echo "bindir=$prefix/bin"
44 echo "targetos=$targetos"
46 [ "$mmx" = "true" ] &&
47 echo "MMX_FLAGS=-DUSE_MMX"
49 [ "$debug" = "true" ] &&
52 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
55 echo "TARGETARCH=-march=$cpu" &&
56 echo "TARGETCPU=-mcpu=$cpu"
57 echo "OPTIMISATIONS=-O4 -pipe -fomit-frame-pointer"
59 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
63 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
64 echo "SHFLAGS=-dynamiclib"
65 echo "LDFLAGS+=`sdl-config --libs`"
68 echo "OPTIMISATIONS+=-ffast-math"
69 echo "CFLAGS+=-pthread"
70 echo "SHFLAGS=-shared"
72 echo "RDYNAMIC=-rdynamic"
80 echo "#!/bin/sh" > mlt-config
82 echo export version=$version
83 echo export prefix=$prefix
84 echo export libdir=$libdir
85 echo export bindir=$prefix/bin
88 cat < mlt-config-template >> mlt-config
90 echo -n > packages.dat
95 for i in framework valerie miracle
97 echo "prefix=$prefix" >mlt-$i.pc
98 echo "exec_prefix=$prefix" >>mlt-$i.pc
99 echo "libdir=$libdir" >>mlt-$i.pc
100 echo "includedir=$prefix/include" >>mlt-$i.pc
101 echo "version=$version" >>mlt-$i.pc
102 echo "cflags=`grep ^$i packages.dat | cut -f 2`" >>mlt-$i.pc
103 echo "libs=`grep ^$i packages.dat | cut -f 3`" >>mlt-$i.pc
104 cat mlt-$i.pc.in >>mlt-$i.pc
111 # Define build directory for scripts called
112 export build_dir=`dirname $0`
113 export prefix=/usr/local
121 export motionest=false
125 # Chose appropriate suffix for libraries
140 # Iterate through arguments
145 --prefix=* ) prefix="${i#--prefix=}" ;;
146 --libdir=* ) libdir="${i#--libdir=}" ;;
147 --disable-debug ) debug=false ;;
148 --disable-mmx ) mmx=false ;;
149 --enable-gpl ) gpl=true ;;
150 --enable-motion-est ) motionest=true ;;
151 --cpu=* ) cpu="${i#--cpu=}" ;;
155 # Determine the libdir if it's not specified in the args
156 [ "$libdir" = "" ] && libdir=$prefix/lib
158 # Double check mmx (may end up disabling mmx on non-linux platforms incorrectly)
159 if [ "$mmx" = "true" ]
161 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
164 # Show help if requested
169 # Log the configuration history
171 echo "$0 $@" >> config.log
176 # Iterate through each of the components
177 for i in framework modules inigo valerie miracle humperdink
179 if [ -x src/$i/configure ]
181 [ $help = 0 ] && echo "Configuring `basename $i`:"
185 [ $? != 0 ] && exit 1
190 # Build the pkg-config files
195 ( [ "$gpl" = "false" ] &&
196 echo "GPL Components are disabled" ||
197 echo "GPL License Used" )
199 if [ "$motionest" = "true" -a "$gpl" = "false" ]
201 echo "Add the --enable-gpl flag to build the motion estimation components."