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 --cpu='cpu' - Compile for a specific CPU/architectre (default: none)
24 Module disables options:
28 for i in src/modules/*
30 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]`
32 awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
35 echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
42 echo "version=$version"
43 echo "soversion=$soversion"
46 echo "bindir=$prefix/bin"
47 echo "targetos=$targetos"
49 [ "$mmx" = "true" ] &&
50 echo "MMX_FLAGS=-DUSE_MMX"
52 [ "$debug" = "true" ] &&
55 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
58 echo "TARGETARCH=-march=$cpu" &&
59 echo "TARGETCPU=-mcpu=$cpu"
60 echo "OPTIMISATIONS=-O3 -pipe -fomit-frame-pointer"
62 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
66 echo "CFLAGS+=-D__DARWIN__ `sdl-config --cflags`"
67 echo "SHFLAGS=-dynamiclib"
68 echo "LDFLAGS+=`sdl-config --libs`"
71 echo "OPTIMISATIONS+=-ffast-math"
72 echo "CFLAGS+=-pthread"
73 echo "SHFLAGS=-shared"
75 echo "RDYNAMIC=-rdynamic"
78 echo "OPTIMISATIONS+=-ffast-math"
79 echo "CFLAGS+=-pthread"
80 echo "SHFLAGS=-shared"
81 echo "RDYNAMIC=-rdynamic"
89 echo "#!/bin/sh" > mlt-config
91 echo export version=$version
92 echo export prefix=$prefix
93 echo export libdir=$libdir
94 echo export bindir=$prefix/bin
97 cat < mlt-config-template >> mlt-config
99 echo -n > packages.dat
104 for i in framework valerie miracle
106 echo prefix="$prefix" > mlt-$i.pc
108 echo exec_prefix=$prefix
110 echo includedir=$prefix/include
111 echo version=$version
112 echo cflags=`grep ^$i packages.dat | cut -f 2`
113 echo libs=`grep ^$i packages.dat | cut -f 3`
115 cat mlt-$i.pc.in >>mlt-$i.pc
122 # Define build directory for scripts called
123 export build_dir=`dirname $0`
124 export prefix=/usr/local
134 # Chose appropriate suffix for libraries
149 # Iterate through arguments
154 --prefix=* ) prefix="${i#--prefix=}" ;;
155 --libdir=* ) libdir="${i#--libdir=}" ;;
156 --disable-debug ) debug=false ;;
157 --disable-mmx ) mmx=false ;;
158 --enable-gpl ) gpl=true ;;
159 --cpu=* ) cpu="${i#--cpu=}" ;;
163 # Determine the libdir if it's not specified in the args
164 [ "$libdir" = "" ] && libdir=$prefix/lib
166 # Double check mmx (Linux and FreeBSD supported, may end up disabling mmx on other platforms incorrectly)
167 if [ "$mmx" = "true" ]
171 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
174 [ "$(make -V MACHINE_CPU:Mmmx)" ] || mmx=false
177 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
182 # Show help if requested
187 # Log the configuration history
189 echo "$0 $@" >> config.log
194 # Iterate through each of the components
195 for i in framework modules inigo valerie miracle humperdink
197 if [ -x src/$i/configure ]
199 [ $help = 0 ] && echo "Configuring `basename $i`:"
203 [ $? != 0 ] && exit 1
208 # Build the pkg-config files
213 ( [ "$gpl" = "false" ] &&
214 echo "GPL Components are disabled" ||
215 echo "GPL License Used" )