X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=configure;h=a5f03123b9b19127abafe605e53b966375d4dbb1;hb=49df6db34095251b3acf611b5622b2a5da33e7e4;hp=f77470ac6527b7077ae88b9e266d3c6f03c0466c;hpb=380ba25c38651c7bbbe6bbefe5091e3b8fd9b1b4;p=melted diff --git a/configure b/configure index f77470a..a5f0312 100755 --- a/configure +++ b/configure @@ -3,32 +3,68 @@ function show_help { cat << EOF -Funky non-autotool config script for MLT. +Non-autotool config script for MLT. - Options are: +Help options: + + --help - this information + +General build options: + + --prefix=directory - install prefix for path (default: $prefix) + --enable-gpl - Enable GPL components + --disable-debug - Compile without debug support (default: on) + --disable-mmx - Compile without MMX support (default: on) + --cpu='cpu' - Compile for a specific CPU/architectre (default: none) + +Module disables options: - --help - this information - --prefix=directory - install prefix for path (default: $prefix) EOF for i in src/modules/* do - [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo " --disable-`basename $i`" - done + [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo `basename $i` `[ -f $i/gpl ] && echo [GPL]` + done | + awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }' echo + echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated." + echo } function build_config { ( - echo version=$version - echo prefix=$prefix - echo bindir=$prefix/bin + echo "version=$version" + echo "prefix=$prefix" + echo "bindir=$prefix/bin" + + [ "$mmx" = "true" ] && + echo "MMX_FLAGS=-DUSE_MMX" + + [ "$debug" = "true" ] && + echo "DEBUG_FLAGS=-g" + + echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" + + [ "$cpu" != "" ] && + echo "TARGETARCH=-march=$cpu" && + echo "TARGETCPU=-mcpu=$cpu" + + [ "`uname`" = "Linux" ] && + echo "LIBDL=-ldl" + + echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer" + echo "CFLAGS+=-Wall \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread" ) > config.mak echo "#!/bin/sh" > mlt-config - sed 's/^/export /' < config.mak >> mlt-config + ( + echo export version=$version + echo export prefix=$prefix + echo export bindir=$prefix/bin + ) >> mlt-config + cat < mlt-config-template >> mlt-config echo -n > packages.dat @@ -56,14 +92,22 @@ set +x export build_dir=`dirname $0` export prefix=/usr/local export help=0 -export version=0.1.0 +export version=0.1.1 +export debug=true +export mmx=true +export gpl=false +export cpu= # Iterate through arguments -for i in $* +for i in "$@" do case $i in - --help ) help=1 ;; - --prefix=* ) prefix="${i#--prefix=}" ;; + --help ) help=1 ;; + --prefix=* ) prefix="${i#--prefix=}" ;; + --disable-debug ) debug=false ;; + --disable-mmx ) mmx=false ;; + --enable-gpl ) gpl=true ;; + --cpu=* ) cpu="${i#--cpu=}" ;; esac done @@ -75,9 +119,9 @@ for i in framework modules inigo valerie miracle humperdink do if [ -x src/$i/configure ] then - echo "Configuring `basename $i`:" + [ $help = 0 ] && echo "Configuring `basename $i`:" pushd src/$i > /dev/null - ./configure $@ + ./configure "$@" [ $? != 0 ] && exit 1 popd > /dev/null fi @@ -85,3 +129,10 @@ done # Build the pkg-config files build_pkgconfig + +# Report GPL Usage +[ $help != 1 ] && +( [ "$gpl" = "false" ] && +echo "GPL Components are disabled" || +echo "GPL License Used" ) +