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 NETTLE_LIBS="@NETTLE_LIBS@"
24 MEMCACHED_LIBS="@MEMCACHED_LIBS@"
25 HIREDIS_LIBS="@HIREDIS_LIBS@"
29 VERSION_SHA1=@VERSION_SHA1@
34 Usage: yaz-config [OPTIONS] [LIBRARIES]
45 threads icu server static
50 while test $# -gt 0; do
52 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
65 echo "$VERSION $VERSION_SHA1"
91 if test "$ICU_CPPFLAGS"; then
113 if test "$lib_server" = "yes"; then
114 YAZLIB="-lyaz_server $YAZLIB"
117 if test "$lib_icu" = "yes"; then
118 YAZLIB="-lyaz_icu $YAZLIB"
121 YAZINC="@YAZ_CONFIG_CFLAGS@"
123 if test "$echo_source" = "yes"; then
124 YAZBIN=${build_root}/bin
126 if test "$lib_static" = "yes"; then
127 YAZLIB="${build_root}/src/.libs/libyaz.a"
128 if test "$lib_server" = "yes"; then
129 YAZLIB="${build_root}/src/.libs/libyaz_server.a $YAZLIB"
131 if test "$lib_icu" = "yes"; then
132 YAZLIB="${build_root}/src/.libs/libyaz_icu.a $YAZLIB"
135 YAZLIB="-L${build_root}/src/.libs $YAZLIB"
137 LIBS="${SSL_LIBS} ${GCRYPT_LIBS} ${NETTLE_LIBS} ${MEMCACHED_LIBS} ${HIREDIS_LIBS} $LIBS"
138 YAZLIB="$YAZLIB $LIBS"
140 YAZLALIB="${build_root}/src/libyaz.la"
141 if test "$lib_server" = "yes"; then
142 YAZLALIB="${build_root}/src/libyaz_server.la $YAZLALIB"
144 if test "$lib_icu" = "yes"; then
145 YAZLALIB="${build_root}/src/libyaz_icu.la $YAZLALIB"
147 YAZLALIB="$YAZLALIB $LIBS"
149 YAZBINC="-I${src_root}/include"
150 YAZINC="$YAZBINC $YAZINC"
151 YAZCOMP="${src_root}/util/yaz-asncomp"
153 YAZBIN="${prefix}/bin"
154 YAZCOMP=${prefix}/bin/yaz-asncomp
156 if test "$prefix" != "/usr"; then
157 YAZLIB="-L$libdir $YAZLIB"
159 if test "$lib_ssl" = "yes"; then
160 LIBS="${SSL_LIBS} $LIBS"
162 YAZLIB="$YAZLIB $LIBS"
164 if test "$prefix" != "/usr"; then
165 YAZBINC="-I${includedir}"
166 YAZINC="$YAZBINC $YAZINC"
170 if test "$lib_thread" = "yes"; then
174 if test "$lib_icu" = "yes"; then
175 YAZINC="$YAZINC $ICU_CPPFLAGS"
176 YAZLIB="$YAZLIB $ICU_LIBS"
177 YAZLALIB="$YAZLALIB $ICU_LIBS"
180 if test "$echo_help" = "yes"; then
183 if test "$echo_include" = "yes"; then
186 if test "$echo_cflags" = "yes"; then
189 if test "$echo_libs" = "yes"; then
192 if test "$echo_lalibs" = "yes"; then
195 if test "$echo_comp" = "yes"; then