Set opcode correctly for binary frames.
[libvncserver.git] / libvncserver-config.in
blobea0bef8d89085b7f546fd5b82a1b680621a05621
1 #!/bin/sh
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
6 includedir=@includedir@
7 libdir=@libdir@
9 # if this script is in the same directory as libvncserver-config.in, assume not installed
10 if [ -f "`dirname "$0"`/libvncserver-config.in" ]; then
11 dir="`dirname "$0"`"
12 prefix="`cd "$dir"; pwd`"
13 includedir="$prefix"
14 libdir="$prefix/libvncserver/.libs $prefix/libvncclient/.libs"
17 usage="\
18 Usage: @PACKAGE@-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--link] [--libs] [--cflags]"
20 if test $# -eq 0; then
21 echo "${usage}" 1>&2
22 exit 1
25 while test $# -gt 0; do
26 case "$1" in
27 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
28 *) optarg= ;;
29 esac
31 case $1 in
32 --prefix=*)
33 prefix=$optarg
34 if test $exec_prefix_set = no ; then
35 exec_prefix=$optarg
38 --prefix)
39 echo $prefix
41 --exec-prefix=*)
42 exec_prefix=$optarg
43 exec_prefix_set=yes
45 --exec-prefix)
46 echo $exec_prefix
48 --version)
49 echo @VERSION@
51 --cflags)
52 if [ "$includedir" != /usr/include ]; then
53 includes=-I"$includedir"
55 echo "$includes"
57 --libs)
58 libs=""
59 for dir in $libdir; do
60 libs="$libs -L$dir"
61 if [ "`uname`" = "SunOS" ]; then
62 # why only Solaris??
63 libs="$libs -R$dir"
65 done
66 echo "$libs" -lvncserver -lvncclient @LIBS@ @WSOCKLIB@
68 --link)
69 echo @CC@
72 echo "${usage}" 1>&2
73 exit 1
75 esac
76 shift
77 done