File: mlt-config-template

package info (click to toggle)
mlt 6.16.0-3
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 10,884 kB
  • sloc: ansic: 68,662; cpp: 32,876; makefile: 1,678; sh: 1,596; asm: 311; python: 205; ruby: 191; perl: 34; java: 30; cs: 20; php: 18; tcl: 15
file content (32 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export package=framework
export field=0

while [ "$1" != "" ]
do
	case $1 in
		--help )		field=0 ;;
		--version )		field=-1 ;;
		--prefix )		field=-2 ;;
		--prefix=* )	prefix="${i#--prefix=}" ;;
		--cflags )		field=2 ;;
		--libs )		field=3 ;;
		--list )		field=1; package="" ;;
		* )				package=$1 ;;
	esac
	shift
done

if [ "$field" = "0" ]
then	echo "Usage: mlt-config [ --version ] | [ --prefix=dir ] [ [ package ] [ --cflags ] [ --libs ] ]"
elif [ "$field" = "-1" ]
then	echo $version
elif [ "$field" = "-2" ]
then	config=`which mlt-config`
		dir=`dirname $config`
		dir=`dirname $dir`
		echo $dir
elif [ -f "$prefix/share/mlt/packages.dat" ]
then grep "^$package" $prefix/share/mlt/packages.dat | cut -f $field
else echo mlt-config cannot find package $package.
fi
echo >&2 "mlt-config is deprecated. Please use pkg-config instead."