2 # This file is part of the YAZ toolkit.
3 # Copyright (C) Index Data
4 # See the file LICENSE for details.
7 exec_prefix="@exec_prefix@"
9 includedir="@includedir@"
17 src_root="@abs_top_srcdir@"
18 build_root="@abs_top_builddir@"
20 ICU_CPPFLAGS="@ICU_CPPFLAGS@"
22 MEMCACHED_LIBS="@MEMCACHED_LIBS@"
23 HIREDIS_LIBS="@HIREDIS_LIBS@"
27 VERSION_SHA1=@VERSION_SHA1@
32 Usage: yaz-config [OPTIONS] [LIBRARIES]
43 threads icu server static
48 while test $# -gt 0; do
50 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
63 echo "$VERSION $VERSION_SHA1"
89 if test "$ICU_CPPFLAGS"; then
111 if test "$lib_server" = "yes"; then
112 YAZLIB="-lyaz_server $YAZLIB"
115 if test "$lib_icu" = "yes"; then
116 YAZLIB="-lyaz_icu $YAZLIB"
119 YAZINC="@YAZ_CONFIG_CFLAGS@"
121 if test "$echo_source" = "yes"; then
122 YAZBIN=${build_root}/bin
124 if test "$lib_static" = "yes"; then
125 YAZLIB="${build_root}/src/.libs/libyaz.a"
126 if test "$lib_server" = "yes"; then
127 YAZLIB="${build_root}/src/.libs/libyaz_server.a $YAZLIB"
129 if test "$lib_icu" = "yes"; then
130 YAZLIB="${build_root}/src/.libs/libyaz_icu.a $YAZLIB"
133 YAZLIB="-L${build_root}/src/.libs $YAZLIB"
135 LIBS="${SSL_LIBS} ${MEMCACHED_LIBS} ${HIREDIS_LIBS} $LIBS"
136 YAZLIB="$YAZLIB $LIBS"
138 YAZLALIB="${build_root}/src/libyaz.la"
139 if test "$lib_server" = "yes"; then
140 YAZLALIB="${build_root}/src/libyaz_server.la $YAZLALIB"
142 if test "$lib_icu" = "yes"; then
143 YAZLALIB="${build_root}/src/libyaz_icu.la $YAZLALIB"
145 YAZLALIB="$YAZLALIB $LIBS"
147 YAZBINC="-I${src_root}/include"
148 YAZINC="$YAZBINC $YAZINC"
149 YAZCOMP="${src_root}/util/yaz-asncomp"
151 YAZBIN="${prefix}/bin"
152 YAZCOMP=${prefix}/bin/yaz-asncomp
154 if test "$prefix" != "/usr"; then
155 YAZLIB="-L$libdir $YAZLIB"
157 if test "$lib_ssl" = "yes"; then
158 LIBS="${SSL_LIBS} $LIBS"
160 YAZLIB="$YAZLIB $LIBS"
162 if test "$prefix" != "/usr"; then
163 YAZBINC="-I${includedir}"
164 YAZINC="$YAZBINC $YAZINC"
168 if test "$lib_thread" = "yes"; then
172 if test "$lib_icu" = "yes"; then
173 YAZINC="$YAZINC $ICU_CPPFLAGS"
174 YAZLIB="$YAZLIB $ICU_LIBS"
175 YAZLALIB="$YAZLALIB $ICU_LIBS"
178 if test "$echo_help" = "yes"; then
181 if test "$echo_include" = "yes"; then
184 if test "$echo_cflags" = "yes"; then
187 if test "$echo_libs" = "yes"; then
190 if test "$echo_lalibs" = "yes"; then
193 if test "$echo_comp" = "yes"; then