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 --enable-gpl - Enable GPL components
16 --enable-motion-est - Enable motion estimation components
17 --disable-debug - Compile without debug support (default: on)
18 --disable-mmx - Compile without MMX support (default: on)
19 --cpu='cpu' - Compile for a specific CPU/architectre (default: none)
21 Module disables options:
25 for i in src/modules/*
27 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]`
29 awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
32 echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
39 echo "version=$version"
41 echo "bindir=$prefix/bin"
42 echo "targetos=$targetos"
44 [ "$mmx" = "true" ] &&
45 echo "MMX_FLAGS=-DUSE_MMX"
47 [ "$debug" = "true" ] &&
50 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
53 echo "TARGETARCH=-march=$cpu" &&
54 echo "TARGETCPU=-mcpu=$cpu"
56 echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer"
57 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
61 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
62 echo "SHFLAGS=-dynamiclib"
63 echo "LDFLAGS+=`sdl-config --libs`"
66 echo "CFLAGS+=-pthread"
67 echo "SHFLAGS=-shared"
69 echo "RDYNAMIC=-rdynamic"
77 echo "#!/bin/sh" > mlt-config
79 echo export version=$version
80 echo export prefix=$prefix
81 echo export bindir=$prefix/bin
84 cat < mlt-config-template >> mlt-config
86 echo -n > packages.dat
89 function build_pkgconfig
91 for i in framework valerie miracle
93 echo "prefix=$prefix" >mlt-$i.pc
94 echo "exec_prefix=$prefix" >>mlt-$i.pc
95 echo "libdir=$prefix/lib" >>mlt-$i.pc
96 echo "includedir=$prefix/include" >>mlt-$i.pc
97 echo "version=$version" >>mlt-$i.pc
98 echo "cflags=`grep ^$i packages.dat | cut -f 2`" >>mlt-$i.pc
99 echo "libs=`grep ^$i packages.dat | cut -f 3`" >>mlt-$i.pc
100 cat mlt-$i.pc.in >>mlt-$i.pc
107 # Define build directory for scripts called
108 export build_dir=`dirname $0`
109 export prefix=/usr/local
116 export motionest=false
120 # Chose appropriate suffix for libraries
135 # Iterate through arguments
140 --prefix=* ) prefix="${i#--prefix=}" ;;
141 --disable-debug ) debug=false ;;
142 --disable-mmx ) mmx=false ;;
143 --enable-gpl ) gpl=true ;;
144 --enable-motion-est ) motionest=true ;;
145 --cpu=* ) cpu="${i#--cpu=}" ;;
149 # Double check mmx (may end up disabling mmx on non-linux platforms incorrectly)
150 if [ "$mmx" = "true" ]
152 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
155 # Show help if requested
156 [ $help = 1 ] && show_help || build_config
158 # Iterate through each of the components
159 for i in framework modules inigo valerie miracle humperdink
161 if [ -x src/$i/configure ]
163 [ $help = 0 ] && echo "Configuring `basename $i`:"
167 [ $? != 0 ] && exit 1
172 # Build the pkg-config files
177 ( [ "$gpl" = "false" ] &&
178 echo "GPL Components are disabled" ||
179 echo "GPL License Used" )
181 if [ "$motionest" = "true" -a "$gpl" = "false" ]
183 echo "Add the --enable-gpl flag to build the motion estimation components."