Remove private extended service URSULA
[yazpp-moved-to-github.git] / yaz++-config.in
1 #!/bin/sh
2 # $Id: yaz++-config.in,v 1.3 2001-03-26 14:43:49 adam Exp $
3 yazppprefix=@prefix@
4 yaz_echo_cflags=no
5 yaz_echo_libs=no
6 yaz_echo_help=no
7 yaz_echo_tabs=no
8 yaz_echo_source=yes
9 yaz_echo_lalibs=no
10 yazpp_src_root=@YAZPP_SRC_ROOT@
11 yazpp_build_root=@YAZPP_BUILD_ROOT@
12
13 yazlibs="@YAZLIB@ @LIBS@"
14 YAZPPVERSION=@VERSION@
15
16 usage()
17 {
18         cat <<EOF
19 Usage: yaz++-config [OPTIONS] [LIBRARIES]
20 Options:
21         [--prefix[=DIR]]
22         [--version]
23         [--libs]
24         [--lalibs]
25         [--cflags]
26 EOF
27         exit $1
28 }
29
30 #if test $# -eq 0; then
31 #       yaz_echo_help=yes
32 #fi
33
34 while test $# -gt 0; do
35   case "$1" in
36   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
37   *) optarg= ;;
38   esac
39
40   case $1 in
41     --prefix=*)
42       yazppprefix=$optarg
43       ;;
44     --prefix)
45       echo $yazppprefix
46       exit 0
47       ;;
48     --version)
49       echo $YAZPPVERSION
50       exit 0
51       ;;
52     --cflags)
53       yaz_echo_cflags=yes
54       ;;
55     --libs)
56       yaz_echo_libs=yes
57       ;;
58     --tabs)
59       yaz_echo_tabs=yes
60       ;;
61     --lalibs)
62       yaz_echo_lalibs=yes
63       ;;
64     -*)
65       yaz_echo_help=yes
66       ;;
67   esac
68   shift
69 done
70
71 if test "$yaz_echo_source" = "yes"; then
72     YAZPPLIB="-L${yazpp_build_root}/src/.libs -lyaz++ $yazlibs"
73     YAZPPLALIB="${yazpp_build_root}/src/libyaz++.la $yazlibs"
74     YAZPPINC="@YAZINC@ -I${yazpp_src_root}/include"
75 else
76
77     if test "$yazppprefix" = "/usr"; then
78         YAZPPLIB="-lyaz++ $yazlibs"
79     else
80         YAZPPLIB="-L${yazppprefix}/lib -lyaz++ $yazlibs"
81     fi
82     YAZPPLALIB=$YAZPPLIB
83     if test "$yazppprefix" = "/usr"; then
84         YAZPPINC=
85     else
86         YAZPPINC="@YAZINC@ -I${yazppprefix}/include"
87     fi
88 fi
89
90 if test "$yaz_echo_help" = "yes"; then
91         usage 1 1>&2
92 fi
93 if test "$yaz_echo_cflags" = "yes"; then
94         echo $YAZPPINC
95 fi
96 if test "$yaz_echo_libs" = "yes"; then
97         echo $YAZPPLIB
98 fi
99 if test "$yaz_echo_lalibs" = "yes"; then
100         echo $YAZPPLALIB
101 fi