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 --disable-debug - Compile without debug support (default: on)
17 --disable-mmx - Compile without MMX support (default: on)
18 --cpu='cpu' - Compile for a specific CPU/architectre (default: none)
20 Module disables options:
24 for i in src/modules/*
26 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]`
28 awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
31 echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
38 echo "version=$version"
40 echo "bindir=$prefix/bin"
41 echo "targetos=$targetos"
43 [ "$mmx" = "true" ] &&
44 echo "MMX_FLAGS=-DUSE_MMX"
46 [ "$debug" = "true" ] &&
49 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
52 echo "TARGETARCH=-march=$cpu" &&
53 echo "TARGETCPU=-mcpu=$cpu"
55 echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer"
56 echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"
60 echo "CFLAGS+=-D__DARWIN__"
61 echo "SHFLAGS=-dynamiclib"
64 echo "CFLAGS+=-pthread"
65 echo "SHFLAGS=-shared"
67 echo "RDYNAMIC=-rdynamic"
75 echo "#!/bin/sh" > mlt-config
77 echo export version=$version
78 echo export prefix=$prefix
79 echo export bindir=$prefix/bin
82 cat < mlt-config-template >> mlt-config
84 echo -n > packages.dat
87 function build_pkgconfig
89 for i in framework valerie miracle
91 echo "prefix=$prefix" >mlt-$i.pc
92 echo "exec_prefix=$prefix" >>mlt-$i.pc
93 echo "libdir=$prefix/lib" >>mlt-$i.pc
94 echo "includedir=$prefix/include" >>mlt-$i.pc
95 echo "version=$version" >>mlt-$i.pc
96 echo "cflags=`grep ^$i packages.dat | cut -f 2`" >>mlt-$i.pc
97 echo "libs=`grep ^$i packages.dat | cut -f 3`" >>mlt-$i.pc
98 cat mlt-$i.pc.in >>mlt-$i.pc
105 # Define build directory for scripts called
106 export build_dir=`dirname $0`
107 export prefix=/usr/local
117 # Chose appropriate suffix for libraries
132 # Iterate through arguments
137 --prefix=* ) prefix="${i#--prefix=}" ;;
138 --disable-debug ) debug=false ;;
139 --disable-mmx ) mmx=false ;;
140 --enable-gpl ) gpl=true ;;
141 --cpu=* ) cpu="${i#--cpu=}" ;;
145 # Double check mmx (may end up disabling mmx on non-linux platforms incorrectly)
146 if [ "$mmx" = "true" ]
148 grep mmx /proc/cpuinfo > /dev/null 2>&1 || mmx=false
151 # Show help if requested
152 [ $help = 1 ] && show_help || build_config
154 # Iterate through each of the components
155 for i in framework modules inigo valerie miracle humperdink
157 if [ -x src/$i/configure ]
159 [ $help = 0 ] && echo "Configuring `basename $i`:"
163 [ $? != 0 ] && exit 1
168 # Build the pkg-config files
173 ( [ "$gpl" = "false" ] &&
174 echo "GPL Components are disabled" ||
175 echo "GPL License Used" )