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 sysctl -a hw | grep "x86_64: 1" > /dev/null && echo "CFLAGS+=-DARCH_X86_64"
71 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
72 echo "SHFLAGS=-dynamiclib"
73 echo "LDFLAGS+=`sdl-config --libs`"
76 echo "OPTIMISATIONS+=-ffast-math"
77 echo "CFLAGS+=-pthread"
78 echo "SHFLAGS=-shared"
80 echo "RDYNAMIC=-rdynamic"
83 echo "OPTIMISATIONS+=-ffast-math"
84 echo "CFLAGS+=-pthread"
85 echo "SHFLAGS=-shared"
86 echo "RDYNAMIC=-rdynamic"
94 echo "#!/bin/sh" > mlt-config
96 echo export version=$version
97 echo export prefix=$prefix
98 echo export libdir=$libdir
99 echo export bindir=$prefix/bin
102 cat < mlt-config-template >> mlt-config
104 echo -n > packages.dat
109 for i in framework valerie miracle
111 echo prefix="$prefix" > mlt-$i.pc
113 echo exec_prefix=$prefix
115 echo includedir=$prefix/include
116 echo version=$version
117 echo cflags=`grep ^$i packages.dat | cut -f 2`
118 echo libs=`grep ^$i packages.dat | cut -f 3`
120 cat mlt-$i.pc.in >>mlt-$i.pc
127 # Define build directory for scripts called
128 export build_dir=`dirname $0`
129 export prefix=/usr/local
141 # Chose appropriate suffix for libraries
155 # Iterate through arguments
160 --prefix=* ) prefix="${i#--prefix=}" ;;
161 --libdir=* ) libdir="${i#--libdir=}" ;;
162 --disable-debug ) debug=false ;;
163 --disable-mmx ) mmx=false ;;
164 --disable-sse ) sse=false ;;
165 --enable-gpl ) gpl=true ;;
166 --cpu=* ) cpu="${i#--cpu=}" ;;
170 # Determine the libdir if it's not specified in the args
171 [ "$libdir" = "" ] && libdir=$prefix/lib
173 # Double check mmx (Linux and FreeBSD supported, may end up disabling mmx on other platforms incorrectly)
174 if [ "$mmx" = "true" ]
178 sysctl -a hw | grep "mmx: 1" > /dev/null || mmx=false
181 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
184 [ "$(make -V MACHINE_CPU:Mmmx)" ] || mmx=false
187 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
192 # Double check SSE (Linux and FreeBSD supported, may end up disabling SSE on other platforms incorrectly)
193 if [ "$sse" = "true" ]
197 sysctl -a hw | grep "sse: 1" > /dev/null || sse=false
200 grep sse /proc/cpuinfo > /dev/null 2>&1 || sse=false
203 [ "$(make -V MACHINE_CPU:Msse)" ] || sse=false
206 grep sse /proc/cpuinfo > /dev/null 2>&1 || sse=false
211 # Show help if requested
216 # Log the configuration history
218 echo "$0 $@" >> config.log
223 # Iterate through each of the components
224 for i in framework modules inigo valerie miracle humperdink
226 if [ -x src/$i/configure ]
228 [ $help = 0 ] && echo "Configuring `basename $i`:"
232 [ $? != 0 ] && exit 1
237 # Build the pkg-config files
242 ( [ "$gpl" = "false" ] &&
243 echo "GPL Components are disabled" ||
244 echo "GPL License Used" )