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 --datadir=directory - data directory (default: $prefix/share)
20 --mandir=directory - man documentation directory (default: $prefix/share/man)
21 --enable-gpl - Enable GPL components
22 --disable-debug - Compile without debug support (default: on)
23 --disable-mmx - Compile without MMX support (default: on)
24 --disable-sse - Compile without SSE support (default: on)
25 --arch='arch' - Compile for a specific architecture (default: none)
26 --cpu='cpu' - Compile for a specific CPU (default: none)
28 Module disable options:
32 for i in src/modules/*
34 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]`
36 awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
39 echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
46 echo "version=$version"
47 echo "soversion=$soversion"
50 echo "bindir=$prefix/bin"
51 echo "datadir=$datadir"
53 echo "targetos=$targetos"
55 [ "$mmx" = "true" ] &&
56 echo "MMX_FLAGS=-DUSE_MMX"
58 [ "$sse" = "true" ] &&
59 echo "SSE_FLAGS=-DUSE_SSE"
61 [ "$debug" = "true" ] &&
64 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
66 [ "$arch" != "" ] && echo "TARGETARCH=-march=$arch"
67 [ "$cpu" != "" ] && echo "TARGETCPU=-mcpu=$cpu"
68 echo "OPTIMISATIONS=-O2 -pipe -fomit-frame-pointer"
70 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(SSE_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
74 sysctl -a hw | grep "x86_64: 1" > /dev/null && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
75 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
76 echo "SHFLAGS=-dynamiclib"
77 echo "LDFLAGS+=`sdl-config --libs`"
80 [ "$(uname -m)" = "x86_64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
81 echo "OPTIMISATIONS+=-ffast-math"
82 echo "CFLAGS+=-pthread"
83 echo "SHFLAGS=-shared"
85 echo "RDYNAMIC=-rdynamic"
86 echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
89 [ "$(uname -m)" = "x86_64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
90 echo "OPTIMISATIONS+=-ffast-math"
91 echo "CFLAGS+=-pthread"
92 echo "SHFLAGS=-shared"
93 echo "RDYNAMIC=-rdynamic"
94 echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
102 echo "#!/bin/sh" > mlt-config
104 echo export version=$version
105 echo export prefix=$prefix
106 echo export libdir=$libdir
107 echo export bindir=$prefix/bin
110 cat < mlt-config-template >> mlt-config
112 echo -n > packages.dat
117 echo prefix="$prefix" > mlt-framework.pc
119 echo exec_prefix=$prefix
121 echo includedir=$prefix/include
122 echo datadir=$datadir
124 echo version=$version
125 echo cflags=`grep ^framework packages.dat | cut -f 2`
126 echo libs=`grep ^framework packages.dat | cut -f 3`
127 ) >> mlt-framework.pc
128 cat mlt-framework.pc.in >>mlt-framework.pc
130 echo prefix="$prefix" > mlt++.pc
132 echo exec_prefix=$prefix
134 echo includedir=$prefix/include
135 echo datadir=$datadir
137 echo version=$version
138 echo cflags=`grep ^mlt++ packages.dat | cut -f 2`
139 echo libs=`grep ^mlt++ packages.dat | cut -f 3`
141 cat mlt++.pc.in >>mlt++.pc
147 # Define build directory for scripts called
148 export build_dir=`dirname $0`
149 export prefix=/usr/local
164 # Chose appropriate suffix for libraries
178 # Iterate through arguments
183 --prefix=* ) prefix="${i#--prefix=}" ;;
184 --libdir=* ) libdir="${i#--libdir=}" ;;
185 --datadir=* ) datadir="${i#--datadir=}" ;;
186 --mandir=* ) mandir="${i#--mandir=}" ;;
187 --disable-debug ) debug=false ;;
188 --disable-mmx ) mmx=false; sse=false ;;
189 --disable-sse ) sse=false ;;
190 --enable-gpl ) gpl=true ;;
191 --arch=* ) arch="${i#--arch=}" ;;
192 --cpu=* ) cpu="${i#--cpu=}" ;;
196 # Determine the libdir if it's not specified in the args
197 [ "$libdir" = "" ] && libdir=$prefix/lib
198 [ "$datadir" = "" ] && datadir=$prefix/share
199 [ "$mandir" = "" ] && mandir=$prefix/share/man
201 # Double check MMX (Darwin, Linux and FreeBSD supported, may end up disabling MMX on other platforms incorrectly)
202 if [ "$mmx" = "true" ]
206 sysctl -a hw | grep "mmx: 1" > /dev/null || mmx=false
209 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
212 [ "$(make -V MACHINE_CPU:Mmmx)" ] || mmx=false
215 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
220 # Double check SSE (Darwin, Linux and FreeBSD supported, may end up disabling SSE on other platforms incorrectly)
221 if [ "$sse" = "true" ]
225 sysctl -a hw | grep "sse: 1" > /dev/null || sse=false
228 grep sse /proc/cpuinfo > /dev/null 2>&1 || sse=false
231 [ "$(make -V MACHINE_CPU:Msse)" ] || sse=false
234 grep sse /proc/cpuinfo > /dev/null 2>&1 || sse=false
239 # Show help if requested
244 # Log the configuration history
246 echo "$0 $@" >> config.log
251 # Iterate through each of the components
252 for i in framework modules melt mlt++ swig
254 if [ -x src/$i/configure ]
256 [ $help = 0 ] && echo "Configuring `basename $i`:"
260 [ $? != 0 ] && exit 1
265 # Build the pkg-config files
270 ( [ "$gpl" = "false" ] &&
271 echo "GPL Components are disabled" ||
272 echo "GPL License Used" )