Added stream output. (common work with titer).
[vlc.git] / vlc-config.in
1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
6
7 usage()
8 {
9         cat <<EOF
10 Usage: vlc-config [OPTIONS] [LIBRARIES]
11 Options:
12         [--prefix[=DIR]]
13         [--exec-prefix[=DIR]]
14         [--version]
15         [--libs]
16         [--cflags]
17 Libraries:
18         vlc
19         plugin
20 EOF
21         exit $1
22 }
23
24 if test $# -eq 0; then
25         usage 1 1>&2
26 fi
27
28 lib_vlc=yes
29
30 while test $# -gt 0; do
31   case "$1" in
32   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
33   *) optarg= ;;
34   esac
35
36   case $1 in
37     --prefix=*)
38       prefix=$optarg
39       if test $exec_prefix_set = no ; then
40         exec_prefix=$optarg
41       fi
42       ;;
43     --prefix)
44       echo_prefix=yes
45       ;;
46     --exec-prefix=*)
47       exec_prefix=$optarg
48       exec_prefix_set=yes
49       ;;
50     --exec-prefix)
51       echo_exec_prefix=yes
52       ;;
53     --version)
54       echo @VERSION@
55       exit 0
56       ;;
57     --cflags)
58       if test "@includedir@" != /usr/include ; then
59         includes="-I@includedir@"
60       fi
61       echo_cflags=yes
62       ;;
63     --libs)
64       echo_libs=yes
65       ;;
66     *)
67       usage 1 1>&2
68       ;;
69   esac
70   shift
71 done
72
73 if test "$echo_prefix" = "yes"; then
74         echo $prefix
75 fi
76 if test "$echo_exec_prefix" = "yes"; then
77         echo $exec_prefix
78 fi
79 if test "$echo_cflags" = "yes"; then
80         echo -I@INCLUDE@ $includes
81 fi
82 if test "$echo_libs" = "yes"; then
83         echo "-L@libdir@ -lvlc @LDFLAGS_libvlc@"
84 fi