Added checking for all the tools used to make documentation.
[platform/upstream/gstreamer.git] / gstreamer-config.in
1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
6
7 usage="\
8 Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
9
10 if test $# -eq 0; then
11       echo "${usage}" 1>&2
12       exit 1
13 fi
14
15 while test $# -gt 0; do
16   case "$1" in
17   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
18   *) optarg= ;;
19   esac
20
21   case $1 in
22     --prefix=*)
23       prefix=$optarg
24       if `echo $prefix | grep -v -q '^/'` ; then
25         prefix=`pwd`/$prefix
26       fi
27       if test $exec_prefix_set = no ; then
28         exec_prefix=$optarg
29       fi
30       ;;
31     --prefix)
32       echo $prefix
33       ;;
34     --exec-prefix=*)
35       exec_prefix=$optarg
36       exec_prefix_set=yes
37       ;;
38     --exec-prefix)
39       echo $exec_prefix
40       ;;
41     --version)
42       echo @VERSION@
43       ;;
44     --cflags)
45       if test $prefix -ef @builddir@ ; then
46         includes=-I@builddir@ 
47       elif test @includedir@ != /usr/include ; then
48         includes=-I@includedir@ 
49       fi
50       echo $includes `gtk-config --cflags gtk gthread`
51       ;;
52     --libs)
53       if test $prefix -ef @builddir@ ; then
54         echo @builddir@/libgst.la `gtk-config --libs gtk gthread`
55       else
56         libdirs=-L@libdir@
57         echo $libdirs -lgst `gtk-config --libs gtk gthread` 
58       fi
59       ;;
60     *)
61       echo "${usage}" 1>&2
62       exit 1
63       ;;
64   esac
65   shift
66 done
67