lavc/qsvenc: ICQ/VCM/QVBR are not avilable on Linux
[libav.git] / avbuild / pkgconfig_generate.sh
CommitLineData
92db5083
DB
1#!/bin/sh
2
3. avbuild/config.sh
4
5if test "$shared" = "yes"; then
6 shared=true
7else
8 shared=false
9fi
10
11shortname=$1
12name=lib${shortname}
13comment=$2
14libs=$(eval echo \$extralibs_${shortname})
8a34f365
DB
15deps=$(eval echo \$${shortname}_deps)
16
17for dep in $deps; do
18 depname=lib${dep}
19 . ${depname}/${depname}.version
20 depversion=$(eval echo \$${depname}_VERSION)
21 requires="$requires ${depname} >= ${depversion}, "
22done
23
92db5083
DB
24requires=${requires%, }
25
26version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2)
27
28cat <<EOF > $name/$name.pc
29prefix=$prefix
30exec_prefix=\${prefix}
31libdir=$libdir
32includedir=$incdir
33
34Name: $name
35Description: $comment
36Version: $version
37Requires: $($shared || echo $requires)
38Requires.private: $($shared && echo $requires)
39Conflicts:
40Libs: -L\${libdir} -l${shortname} $($shared || echo $libs)
41Libs.private: $($shared && echo $libs)
42Cflags: -I\${includedir}
43EOF
44
45cat <<EOF > $name/$name-uninstalled.pc
46prefix=
47exec_prefix=
48libdir=\${pcfiledir}
49includedir=${source_path}
50
51Name: $name
52Description: $comment
53Version: $version
54Requires: $requires
55Conflicts:
56Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
57Cflags: -I\${includedir}
58EOF