Add ZOOM_query_ccl2rpn() and two new error-codes that it generates:
[yaz-moved-to-github.git] / yaz-config.in
1 #!/bin/sh
2 # $Id: yaz-config.in,v 1.24 2006-06-13 15:36:09 adam Exp $
3 yazprefix=@prefix@
4 yaz_echo_cflags=no
5 yaz_echo_libs=no
6 yaz_echo_help=no
7 yaz_echo_source=yes
8 yaz_echo_lalibs=no
9 yaz_echo_comp=no
10 yaz_src_root=@YAZ_SRC_ROOT@
11 yaz_build_root=@YAZ_BUILD_ROOT@
12
13 yazextralibs="@LIBS@"
14 YAZVERSION=@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         [--comp]
27 Libraries:
28         threads
29 EOF
30         exit $1
31 }
32
33 while test $# -gt 0; do
34     case "$1" in
35         -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
36         *) optarg= ;;
37     esac
38     
39     case $1 in
40         --prefix=*)
41             yazprefix=$optarg
42             ;;
43         --prefix)
44             echo $yazprefix
45             exit 0
46             ;;
47         --version)
48             echo $YAZVERSION
49             exit 0
50             ;;
51         --cflags)
52             yaz_echo_cflags=yes
53             ;;
54         --libs)
55             yaz_echo_libs=yes
56             ;;
57         --lalibs)
58             yaz_echo_lalibs=yes
59             ;;
60         --comp)
61             yaz_echo_comp=yes
62             ;;
63         threads)
64             lib_thread=yes
65             ;;
66         malloc)
67             lib_malloc=yes
68             ;;
69         -*)
70             yaz_echo_help=yes
71             ;;
72     esac
73     shift
74 done
75
76 lyaz="-lyaz"
77
78 if test "$yaz_echo_source" = "yes"; then
79     YAZBIN=${yaz_build_root}/bin
80     YAZLIB="-L${yaz_build_root}/src/.libs $lyaz $yazextralibs"
81     YAZLALIB="${yaz_build_root}/src/libyaz.la $yazextralibs"
82     YAZINC="-I${yaz_src_root}/include"
83     YAZCOMP=${yaz_src_root}/util/yaz-asncomp
84 else
85     YAZBIN=${yazprefix}/bin
86     YAZCOMP=${yazprefix}/bin/yaz-asncomp
87
88     if test "$yazprefix" = "/usr"; then
89         YAZLIB="$lyaz $yazextralibs"
90     else
91         YAZLIB="-L$yazprefix/lib $lyaz $yazextralibs"
92     fi
93     YAZLALIB=$YAZLIB
94     if test "$yazprefix" = "/usr"; then
95         YAZINC=
96     else
97         YAZINC=-I$yazprefix/include
98     fi
99 fi
100
101 YAZINC="$YAZINC @YAZ_CONF_CFLAGS@"
102
103 if test "$lib_thread" = "yes"; then
104     YAZINC="$YAZINC @THREAD_CFLAGS@"
105 fi
106
107 if test "$yaz_echo_help" = "yes"; then
108     usage 1 1>&2
109 fi
110 if test "$yaz_echo_cflags" = "yes"; then
111     echo $YAZINC
112 fi
113 if test "$yaz_echo_libs" = "yes"; then
114     echo $YAZLIB
115 fi
116 if test "$yaz_echo_lalibs" = "yes"; then
117     echo $YAZLALIB
118 fi
119 if test "$yaz_echo_comp" = "yes"; then
120     echo $YAZCOMP
121 fi
122 # Local Variables:
123 # mode:shell-script
124 # sh-indentation: 2
125 # sh-basic-offset: 4
126 # End: