1#!/bin/sh 2 3prefix=@prefix@ 4exec_prefix=@exec_prefix@ 5exec_prefix_set=no 6includedir=@includedir@ 7libdir=@libdir@ 8 9# if this script is in the same directory as libvncserver-config.in, assume not installed 10if [ -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" 15fi 16 17usage="\ 18Usage: @PACKAGE@-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--link] [--libs] [--cflags]" 19 20if test $# -eq 0; then 21 echo "${usage}" 1>&2 22 exit 1 23fi 24 25while test $# -gt 0; do 26 case "$1" in 27 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 28 *) optarg= ;; 29 esac 30 31 case $1 in 32 --prefix=*) 33 prefix=$optarg 34 if test $exec_prefix_set = no ; then 35 exec_prefix=$optarg 36 fi 37 ;; 38 --prefix) 39 echo $prefix 40 ;; 41 --exec-prefix=*) 42 exec_prefix=$optarg 43 exec_prefix_set=yes 44 ;; 45 --exec-prefix) 46 echo $exec_prefix 47 ;; 48 --version) 49 echo @VERSION@ 50 ;; 51 --cflags) 52 if [ "$includedir" != /usr/include ]; then 53 includes=-I"$includedir" 54 fi 55 echo "$includes" 56 ;; 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" 64 fi 65 done 66 echo "$libs" -lvncserver -lvncclient @LIBS@ @WSOCKLIB@ 67 ;; 68 --link) 69 echo @CC@ 70 ;; 71 *) 72 echo "${usage}" 1>&2 73 exit 1 74 ;; 75 esac 76 shift 77done 78 79