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@"
25 VERSION_SHA1=@VERSION_SHA1@
30 Usage: yaz-config [OPTIONS] [LIBRARIES]
41 threads icu server static
46 while test $# -gt 0; do
48 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
61 echo "$VERSION $VERSION_SHA1"
87 if test "$ICU_CPPFLAGS"; then
109 if test "$lib_server" = "yes"; then
110 YAZLIB="-lyaz_server $YAZLIB"
113 if test "$lib_icu" = "yes"; then
114 YAZLIB="-lyaz_icu $YAZLIB"
117 YAZINC="@YAZ_CONFIG_CFLAGS@"
119 if test "$echo_source" = "yes"; then
120 YAZBIN=${build_root}/bin
122 if test "$lib_static" = "yes"; then
123 YAZLIB="${build_root}/src/.libs/libyaz.a"
124 if test "$lib_server" = "yes"; then
125 YAZLIB="${build_root}/src/.libs/libyaz_server.a $YAZLIB"
127 if test "$lib_icu" = "yes"; then
128 YAZLIB="${build_root}/src/.libs/libyaz_icu.a $YAZLIB"
131 YAZLIB="-L${build_root}/src/.libs $YAZLIB"
133 LIBS="${SSL_LIBS} $LIBS"
134 YAZLIB="$YAZLIB $LIBS"
136 YAZLALIB="${build_root}/src/libyaz.la"
137 if test "$lib_server" = "yes"; then
138 YAZLALIB="${build_root}/src/libyaz_server.la $YAZLALIB"
140 if test "$lib_icu" = "yes"; then
141 YAZLALIB="${build_root}/src/libyaz_icu.la $YAZLALIB"
143 YAZLALIB="$YAZLALIB $LIBS"
145 YAZBINC="-I${src_root}/include"
146 YAZINC="$YAZBINC $YAZINC"
147 YAZCOMP=${src_root}/util/yaz-asncomp
150 YAZCOMP=${prefix}/bin/yaz-asncomp
152 if test "$prefix" != "/usr"; then
153 YAZLIB="-L$libdir $YAZLIB"
155 if test "$lib_ssl" = "yes"; then
156 LIBS="${SSL_LIBS} $LIBS"
158 YAZLIB="$YAZLIB $LIBS"
160 if test "$prefix" != "/usr"; then
161 YAZBINC="-I${includedir}"
162 YAZINC="$YAZBINC $YAZINC"
166 if test "$lib_thread" = "yes"; then
170 if test "$lib_icu" = "yes"; then
171 YAZINC="$YAZINC $ICU_CPPFLAGS"
172 YAZLIB="$YAZLIB $ICU_LIBS"
173 YAZLALIB="$YAZLALIB $ICU_LIBS"
176 if test "$echo_help" = "yes"; then
179 if test "$echo_include" = "yes"; then
182 if test "$echo_cflags" = "yes"; then
185 if test "$echo_libs" = "yes"; then
188 if test "$echo_lalibs" = "yes"; then
191 if test "$echo_comp" = "yes"; then