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 GCRYPT_LIBS="@GCRYPT_LIBS@"
23 MEMCACHED_LIBS="@MEMCACHED_LIBS@"
24 HIREDIS_LIBS="@HIREDIS_LIBS@"
28 VERSION_SHA1=@VERSION_SHA1@
33 Usage: yaz-config [OPTIONS] [LIBRARIES]
44 threads icu server static
49 while test $# -gt 0; do
51 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
64 echo "$VERSION $VERSION_SHA1"
90 if test "$ICU_CPPFLAGS"; then
112 if test "$lib_server" = "yes"; then
113 YAZLIB="-lyaz_server $YAZLIB"
116 if test "$lib_icu" = "yes"; then
117 YAZLIB="-lyaz_icu $YAZLIB"
120 YAZINC="@YAZ_CONFIG_CFLAGS@"
122 if test "$echo_source" = "yes"; then
123 YAZBIN=${build_root}/bin
125 if test "$lib_static" = "yes"; then
126 YAZLIB="${build_root}/src/.libs/libyaz.a"
127 if test "$lib_server" = "yes"; then
128 YAZLIB="${build_root}/src/.libs/libyaz_server.a $YAZLIB"
130 if test "$lib_icu" = "yes"; then
131 YAZLIB="${build_root}/src/.libs/libyaz_icu.a $YAZLIB"
134 YAZLIB="-L${build_root}/src/.libs $YAZLIB"
136 LIBS="${SSL_LIBS} ${GCRYPT_LIBS} ${MEMCACHED_LIBS} ${HIREDIS_LIBS} $LIBS"
137 YAZLIB="$YAZLIB $LIBS"
139 YAZLALIB="${build_root}/src/libyaz.la"
140 if test "$lib_server" = "yes"; then
141 YAZLALIB="${build_root}/src/libyaz_server.la $YAZLALIB"
143 if test "$lib_icu" = "yes"; then
144 YAZLALIB="${build_root}/src/libyaz_icu.la $YAZLALIB"
146 YAZLALIB="$YAZLALIB $LIBS"
148 YAZBINC="-I${src_root}/include"
149 YAZINC="$YAZBINC $YAZINC"
150 YAZCOMP="${src_root}/util/yaz-asncomp"
152 YAZBIN="${prefix}/bin"
153 YAZCOMP=${prefix}/bin/yaz-asncomp
155 if test "$prefix" != "/usr"; then
156 YAZLIB="-L$libdir $YAZLIB"
158 if test "$lib_ssl" = "yes"; then
159 LIBS="${SSL_LIBS} $LIBS"
161 YAZLIB="$YAZLIB $LIBS"
163 if test "$prefix" != "/usr"; then
164 YAZBINC="-I${includedir}"
165 YAZINC="$YAZBINC $YAZINC"
169 if test "$lib_thread" = "yes"; then
173 if test "$lib_icu" = "yes"; then
174 YAZINC="$YAZINC $ICU_CPPFLAGS"
175 YAZLIB="$YAZLIB $ICU_LIBS"
176 YAZLALIB="$YAZLALIB $ICU_LIBS"
179 if test "$echo_help" = "yes"; then
182 if test "$echo_include" = "yes"; then
185 if test "$echo_cflags" = "yes"; then
188 if test "$echo_libs" = "yes"; then
191 if test "$echo_lalibs" = "yes"; then
194 if test "$echo_comp" = "yes"; then