2 # This file is part of the YAZ toolkit.
3 # Copyright (C) 1995-2008 Index Data
12 yaz_src_root=@YAZ_SRC_ROOT@
13 yaz_build_root=@YAZ_BUILD_ROOT@
14 PTHREAD_LIBS="@PTHREAD_LIBS@"
15 PTHREAD_CFLAGS="@PTHREAD_CFLAGS@"
17 ICU_CPPFLAGS="@ICU_CPPFLAGS@"
21 VERSION_SHA1=@VERSION_SHA1@
26 Usage: yaz-config [OPTIONS] [LIBRARIES]
41 while test $# -gt 0; do
43 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
56 echo "$YAZVERSION $VERSION_SHA1"
79 if test "$ICU_CPPFLAGS"; then
98 if test "$lib_server" = "yes"; then
99 lyaz="-lyaz_server $lyaz"
102 if test "$lib_icu" = "yes"; then
103 lyaz="-lyaz_icu $lyaz"
106 YAZINC="@YAZ_CONFIG_CFLAGS@"
108 if test "$yaz_echo_source" = "yes"; then
109 YAZBIN=${yaz_build_root}/bin
111 if test "$lib_static" = "yes"; then
112 YAZLIB="${yaz_build_root}/src/.libs/libyaz.a"
113 if test "$lib_server" = "yes"; then
114 YAZLIB="${yaz_build_root}/src/.libs/libyaz_server.a $YAZLIB"
116 if test "$lib_icu" = "yes"; then
117 YAZLIB="${yaz_build_root}/src/.libs/libyaz_icu.a $YAZLIB"
120 YAZLIB="-L${yaz_build_root}/src/.libs $lyaz"
122 YAZLIB="$YAZLIB ${SSL_LIBS} $LIBS"
124 YAZLALIB="${yaz_build_root}/src/libyaz.la"
125 if test "$lib_server" = "yes"; then
126 YAZLALIB="${yaz_build_root}/src/libyaz_server.la $YAZLALIB"
128 if test "$lib_icu" = "yes"; then
129 YAZLALIB="${yaz_build_root}/src/libyaz_icu.la $YAZLALIB"
131 YAZLALIB="$YAZLALIB $LIBS"
133 YAZINC="-I${yaz_src_root}/include $YAZINC"
134 YAZCOMP=${yaz_src_root}/util/yaz-asncomp
136 YAZBIN=${yazprefix}/bin
137 YAZCOMP=${yazprefix}/bin/yaz-asncomp
139 if test "$yazprefix" != "/usr"; then
140 YAZLIB="-L$yazprefix/lib"
142 YAZLIB="$YAZLIB $lyaz ${SSL_LIBS} $LIBS"
144 if test "$yazprefix" != "/usr"; then
145 YAZINC="-I$yazprefix/include $YAZINC"
149 if test "$lib_thread" = "yes"; then
150 YAZINC="$PTHREAD_CFLAGS $YAZINC"
151 YAZLIB="$YAZLIB $PTHREAD_LIBS"
152 YAZLALIB="$YAZLALIB $PTHREAD_LIBS"
155 if test "$lib_icu" = "yes"; then
156 YAZINC="$YAZINC $ICU_CPPFLAGS"
157 YAZLIB="$YAZLIB $ICU_LIBS"
158 YAZLALIB="$YAZLALIB $ICU_LIBS"
161 if test "$yaz_echo_help" = "yes"; then
164 if test "$yaz_echo_cflags" = "yes"; then
167 if test "$yaz_echo_libs" = "yes"; then
170 if test "$yaz_echo_lalibs" = "yes"; then
173 if test "$yaz_echo_comp" = "yes"; then