]> git.sesse.net Git - mlt/blobdiff - configure
Version modules and data directories, and melt
[mlt] / configure
index 8ae178f0717c8d92627004441b0918c25bfa3586..e935e19cdb69bff2dabb44593a15074a382858db 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-export version=0.7.9
+export version=0.8.8
 export soversion=5
 
 show_help()
@@ -18,6 +18,8 @@ General build options:
   --libdir=directory      - lib directory (default: $prefix/lib)
   --datadir=directory     - data directory (default: $prefix/share)
   --mandir=directory      - man documentation directory (default: $prefix/share/man)
+  --rename-melt           - Give melt executable a different name.
+  --no-compat-dirs        - Do not create compatibility, unversioned, files and directories
   --enable-gpl            - Enable GPLv2 components
   --enable-gpl3           - Enable GPLv3 components
   --enable-debug          - Compile without optimizations support (default: off)
@@ -55,6 +57,8 @@ build_config()
                echo "bindir=$prefix/bin"
                echo "datadir=$datadir"
                echo "mandir=$mandir"
+               echo "compat_dirs=$compat_dirs"
+               echo "compat_nomelt=$compat_nomelt"
                echo "targetos=$targetos"
 
                [ "$mmx" = "true" ] && 
@@ -111,7 +115,7 @@ build_config()
                NetBSD)
                [ "$optimisations" = "true" ] &&
                        echo "OPTIMISATIONS+=-ffast-math"
-               echo "CFLAGS+=-pthread"
+               echo "CFLAGS+=-fPIC -pthread"
                echo "SHFLAGS=-shared"
                echo "RDYNAMIC=-rdynamic"
                echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
@@ -128,6 +132,9 @@ build_config()
                ;;
                esac
                echo "LIBSUF=$LIBSUF"
+               echo "moduledir=${libdir}/mlt-${soversion}"
+               echo "mltdatadir=${datadir}/mlt-${soversion}"
+               echo "meltname=${meltname}"
        ) > config.mak
 
        echo "#!/bin/sh" > mlt-config
@@ -155,6 +162,9 @@ build_pkgconfig()
                echo version=$version
                echo cflags=`grep ^framework packages.dat | cut -f 2`
                echo libs=`grep ^framework packages.dat | cut -f 3`
+               echo moduledir=${libdir}/mlt-${soversion}
+               echo mltdatadir=${datadir}/mlt-${soversion}
+               echo meltbin=${prefix}/bin/${meltname}
        ) >> mlt-framework.pc
        cat mlt-framework.pc.in >>mlt-framework.pc
 
@@ -194,6 +204,11 @@ export cpu=
 export targetos=$(uname -s)
 export targetarch=
 export amd64=false
+export compat_dirs=true
+export compat_nomelt=false
+
+# Define the compiler used in tests (gcc is not installed everywhere)
+: ${CC:=gcc}
 
 # Iterate through arguments
 for i in "$@"
@@ -204,6 +219,8 @@ do
                --libdir=* )            libdir="${i#--libdir=}" ;;
                --datadir=* )           datadir="${i#--datadir=}" ;;
                --mandir=* )            mandir="${i#--mandir=}" ;;
+               --rename-melt=* )       meltname="${i#--rename-melt=}"; compat_nomelt=true ;;
+               --no-compat-dirs )      compat_dirs=false ;;
                --enable-debug )        optimisations=false ;;
                --disable-debug )       debug=false ;;
                --disable-mmx )         mmx=false; sse=false; sse2=false ;;
@@ -218,6 +235,11 @@ do
        esac
 done
 
+if [ -z "${meltname}" ]
+then
+       meltname=melt${soversion}
+fi
+
 # Chose appropriate suffix for libraries
 case $targetos in
        Darwin)
@@ -250,6 +272,9 @@ export LIBSUF
 [ "$datadir" = "" ] && datadir=$prefix/share
 [ "$mandir" = "" ] && mandir=$prefix/share/man
 
+export moduledir=${libdir}/mlt-${soversion}
+export mltdatadir=${datadir}/mlt-${soversion}
+
 # Double check MMX (Darwin, Linux and FreeBSD supported, may end up disabling MMX on other platforms incorrectly)
 if [ "$mmx" = "true" ]
 then
@@ -327,7 +352,7 @@ do
                [ $help = 0 ] && echo "Configuring `basename $i`:"
                olddir=`pwd`
                cd src/$i
-               ./configure "$@"
+               CC="$CC" ./configure "$@"
                [ $? != 0 ] && exit 1
                cd $olddir
        fi