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@"
25 Usage: yaz-config [OPTIONS] [LIBRARIES]
39 while test $# -gt 0; do
41 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 if test "$ICU_CPPFLAGS"; then
92 if test "$lib_server" = "yes"; then
93 lyaz="-lyaz_server $lyaz"
96 if test "$lib_icu" = "yes"; then
97 lyaz="-lyaz_icu $lyaz"
100 YAZINC="@YAZ_CONFIG_CFLAGS@"
102 if test "$yaz_echo_source" = "yes"; then
103 YAZBIN=${yaz_build_root}/bin
105 if test "$lib_static" = "yes"; then
106 YAZLIB="${yaz_build_root}/src/.libs/libyaz.a"
107 if test "$lib_server" = "yes"; then
108 YAZLIB="${yaz_build_root}/src/.libs/libyaz_server.a $YAZLIB"
111 YAZLIB="-L${yaz_build_root}/src/.libs $lyaz"
113 YAZLIB="$YAZLIB ${SSL_LIBS} $LIBS"
115 YAZLALIB="${yaz_build_root}/src/libyaz.la"
116 if test "$lib_server" = "yes"; then
117 YAZLALIB="${yaz_build_root}/src/libyaz_server.la $YAZLALIB"
119 if test "$lib_icu" = "yes"; then
120 YAZLALIB="${yaz_build_root}/src/libyaz_icu.la $YAZLALIB"
122 YAZLALIB="$YAZLALIB $LIBS"
124 YAZINC="-I${yaz_src_root}/include $YAZINC"
125 YAZCOMP=${yaz_src_root}/util/yaz-asncomp
127 YAZBIN=${yazprefix}/bin
128 YAZCOMP=${yazprefix}/bin/yaz-asncomp
130 if test "$yazprefix" != "/usr"; then
131 YAZLIB="-L$yazprefix/lib"
133 YAZLIB="$YAZLIB $lyaz $LIBS"
135 if test "$yazprefix" != "/usr"; then
136 YAZINC="-I$yazprefix/include $YAZINC"
140 if test "$lib_thread" = "yes"; then
141 YAZINC="$PTHREAD_CFLAGS $YAZINC"
142 YAZLIB="$YAZLIB $PTHREAD_LIBS"
143 YAZLALIB="$YAZLALIB $PTHREAD_LIBS"
146 if test "$lib_icu" = "yes"; then
147 YAZINC="$YAZINC $ICU_CPPFLAGS"
148 YAZLIB="$YAZLIB $ICU_LIBS"
149 YAZLALIB="$YAZLALIB $ICU_LIBS"
152 if test "$yaz_echo_help" = "yes"; then
155 if test "$yaz_echo_cflags" = "yes"; then
158 if test "$yaz_echo_libs" = "yes"; then
161 if test "$yaz_echo_lalibs" = "yes"; then
164 if test "$yaz_echo_comp" = "yes"; then