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"
42 [ "$mmx" = "true" ] &&
43 echo "MMX_FLAGS=-DUSE_MMX"
45 [ "$debug" = "true" ] &&
48 echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
51 echo "TARGETARCH=-march=$cpu" &&
52 echo "TARGETCPU=-mcpu=$cpu"
54 [ "`uname`" = "Linux" ] &&
57 echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer"
58 echo "CFLAGS+=-Wall \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread"
61 echo "#!/bin/sh" > mlt-config
63 echo export version=$version
64 echo export prefix=$prefix
65 echo export bindir=$prefix/bin
68 cat < mlt-config-template >> mlt-config
70 echo -n > packages.dat
73 function build_pkgconfig
75 for i in framework valerie miracle
77 echo "prefix=$prefix" >mlt-$i.pc
78 echo "exec_prefix=$prefix" >>mlt-$i.pc
79 echo "libdir=$prefix/lib" >>mlt-$i.pc
80 echo "includedir=$prefix/include" >>mlt-$i.pc
81 echo "version=$version" >>mlt-$i.pc
82 echo "cflags=`grep ^$i packages.dat | cut -f 2`" >>mlt-$i.pc
83 echo "libs=`grep ^$i packages.dat | cut -f 3`" >>mlt-$i.pc
84 cat mlt-$i.pc.in >>mlt-$i.pc
91 # Define build directory for scripts called
92 export build_dir=`dirname $0`
93 export prefix=/usr/local
101 # Iterate through arguments
106 --prefix=* ) prefix="${i#--prefix=}" ;;
107 --disable-debug ) debug=false ;;
108 --disable-mmx ) mmx=false ;;
109 --enable-gpl ) gpl=true ;;
110 --cpu=* ) cpu="${i#--cpu=}" ;;
114 # Show help if requested
115 [ $help = 1 ] && show_help || build_config
117 # Iterate through each of the components
118 for i in framework modules inigo valerie miracle humperdink
120 if [ -x src/$i/configure ]
122 [ $help = 0 ] && echo "Configuring `basename $i`:"
123 pushd src/$i > /dev/null
125 [ $? != 0 ] && exit 1
130 # Build the pkg-config files
135 ( [ "$gpl" = "false" ] &&
136 echo "GPL Components are disabled" ||
137 echo "GPL License Used" )