Constness changes
[melted] / mlt-config-template
1 export package=framework
2 export field=0
3
4 while [ "$1" != "" ]
5 do
6         case $1 in
7                 --help )                field=0 ;;
8                 --version )             field=-1 ;;
9                 --prefix )              field=-2 ;;
10                 --prefix=* )    prefix="${i#--prefix=}" ;;
11                 --cflags )              field=2 ;;
12                 --libs )                field=3 ;;
13                 --list )                field=1; package="" ;;
14                 * )                             package=$1 ;;
15         esac
16         shift
17 done
18
19 if [ "$field" = "0" ]
20 then    echo "Usage: mlt-config [ --version ] | [ --prefix=dir ] [ [ package ] [ --cflags ] [ --libs ] ]"
21 elif [ "$field" = "-1" ]
22 then    echo $version
23 elif [ "$field" = "-2" ]
24 then    config=`which mlt-config`
25                 dir=`dirname $config`
26                 dir=`dirname $dir`
27                 echo $dir
28 elif [ -f "$prefix/share/mlt/packages.dat" ]
29 then grep "^$package" $prefix/share/mlt/packages.dat | cut -f $field
30 else echo mlt-config cannot find package $package.
31 fi
32 echo >&2 "mlt-config is deprecated. Please use pkg-config instead."