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__"
62 echo "SHFLAGS=-dynamiclib"
65 echo "CFLAGS+=-pthread"
66 echo "SHFLAGS=-shared"
68 echo "RDYNAMIC=-rdynamic"
76 echo "#!/bin/sh" > mlt-config
78 echo export version=$version
79 echo export prefix=$prefix
80 echo export bindir=$prefix/bin
83 cat < mlt-config-template >> mlt-config
85 echo -n > packages.dat
88 function build_pkgconfig
90 for i in framework valerie miracle
92 echo "prefix=$prefix" >mlt-$i.pc
93 echo "exec_prefix=$prefix" >>mlt-$i.pc
94 echo "libdir=$prefix/lib" >>mlt-$i.pc
95 echo "includedir=$prefix/include" >>mlt-$i.pc
96 echo "version=$version" >>mlt-$i.pc
97 echo "cflags=`grep ^$i packages.dat | cut -f 2`" >>mlt-$i.pc
98 echo "libs=`grep ^$i packages.dat | cut -f 3`" >>mlt-$i.pc
99 cat mlt-$i.pc.in >>mlt-$i.pc
106 # Define build directory for scripts called
107 export build_dir=`dirname $0`
108 export prefix=/usr/local
115 export motionest=false
119 # Chose appropriate suffix for libraries
134 # Iterate through arguments
139 --prefix=* ) prefix="${i#--prefix=}" ;;
140 --disable-debug ) debug=false ;;
141 --disable-mmx ) mmx=false ;;
142 --enable-gpl ) gpl=true ;;
143 --enable-motion-est ) motionest=true ;;
144 --cpu=* ) cpu="${i#--cpu=}" ;;
148 # Double check mmx (may end up disabling mmx on non-linux platforms incorrectly)
149 if [ "$mmx" = "true" ]
151 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
154 # Show help if requested
155 [ $help = 1 ] && show_help || build_config
157 # Iterate through each of the components
158 for i in framework modules inigo valerie miracle humperdink
160 if [ -x src/$i/configure ]
162 [ $help = 0 ] && echo "Configuring `basename $i`:"
166 [ $? != 0 ] && exit 1
171 # Build the pkg-config files
176 ( [ "$gpl" = "false" ] &&
177 echo "GPL Components are disabled" ||
178 echo "GPL License Used" )
180 if [ "$motionest" = "true" -a "$gpl" = "false" ]
182 echo "Add the --enable-gpl flag to build the motion estimation components."