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 --disable-debug - Compile without debug support (default: on)
21 --disable-mmx - Compile without MMX support (default: on)
22 --disable-sse - Compile without SSE 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 [ "$sse" = "true" ] &&
54 echo "SSE_FLAGS=-DUSE_SSE"
56 [ "$debug" = "true" ] &&
59 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
62 echo "TARGETARCH=-march=$cpu" &&
63 echo "TARGETCPU=-mcpu=$cpu"
64 echo "OPTIMISATIONS=-O3 -pipe -fomit-frame-pointer"
66 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(SSE_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
70 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
71 echo "SHFLAGS=-dynamiclib"
72 echo "LDFLAGS+=`sdl-config --libs`"
75 echo "OPTIMISATIONS+=-ffast-math"
76 echo "CFLAGS+=-pthread"
77 echo "SHFLAGS=-shared"
79 echo "RDYNAMIC=-rdynamic"
82 echo "OPTIMISATIONS+=-ffast-math"
83 echo "CFLAGS+=-pthread"
84 echo "SHFLAGS=-shared"
85 echo "RDYNAMIC=-rdynamic"
93 echo "#!/bin/sh" > mlt-config
95 echo export version=$version
96 echo export prefix=$prefix
97 echo export libdir=$libdir
98 echo export bindir=$prefix/bin
101 cat < mlt-config-template >> mlt-config
103 echo -n > packages.dat
108 for i in framework valerie miracle
110 echo prefix="$prefix" > mlt-$i.pc
112 echo exec_prefix=$prefix
114 echo includedir=$prefix/include
115 echo version=$version
116 echo cflags=`grep ^$i packages.dat | cut -f 2`
117 echo libs=`grep ^$i packages.dat | cut -f 3`
119 cat mlt-$i.pc.in >>mlt-$i.pc
126 # Define build directory for scripts called
127 export build_dir=`dirname $0`
128 export prefix=/usr/local
140 # Chose appropriate suffix for libraries
154 # Iterate through arguments
159 --prefix=* ) prefix="${i#--prefix=}" ;;
160 --libdir=* ) libdir="${i#--libdir=}" ;;
161 --disable-debug ) debug=false ;;
162 --disable-mmx ) mmx=false ;;
163 --disable-sse ) sse=false ;;
164 --enable-gpl ) gpl=true ;;
165 --cpu=* ) cpu="${i#--cpu=}" ;;
169 # Determine the libdir if it's not specified in the args
170 [ "$libdir" = "" ] && libdir=$prefix/lib
172 # Double check mmx (Linux and FreeBSD supported, may end up disabling mmx on other platforms incorrectly)
173 if [ "$mmx" = "true" ]
177 sysctl -a hw | grep mmx: > /dev/null | mmx=false
180 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
183 [ "$(make -V MACHINE_CPU:Mmmx)" ] || mmx=false
186 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
191 # Double check SSE (Linux and FreeBSD supported, may end up disabling SSE on other platforms incorrectly)
192 if [ "$sse" = "true" ]
196 sysctl -a hw | grep sse: > /dev/null | sse=false
199 grep sse /proc/cpuinfo > /dev/null 2>&1 || sse=false
202 [ "$(make -V MACHINE_CPU:Msse)" ] || sse=false
205 grep sse /proc/cpuinfo > /dev/null 2>&1 || sse=false
210 # Show help if requested
215 # Log the configuration history
217 echo "$0 $@" >> config.log
222 # Iterate through each of the components
223 for i in framework modules inigo valerie miracle humperdink
225 if [ -x src/$i/configure ]
227 [ $help = 0 ] && echo "Configuring `basename $i`:"
231 [ $? != 0 ] && exit 1
236 # Build the pkg-config files
241 ( [ "$gpl" = "false" ] &&
242 echo "GPL Components are disabled" ||
243 echo "GPL License Used" )