From: Adam Dickmeiss Date: Wed, 18 Apr 2007 13:40:19 +0000 (+0000) Subject: Added new option 'static' for yaz-config which makes 'yaz-config --libs' X-Git-Tag: YAZ.3.0.0~38 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=965d5409daba88b43bbffb5bed90b58383c0cc3f;hp=b42021d3f227347b9ec107a28bf52fc7e2578fec Added new option 'static' for yaz-config which makes 'yaz-config --libs' returns static libs rather than shared libs for in-source compilations. This is to make Pazpar2 work for local builds when YAZ is built both statically and with shared objects. We have not seen this problem before because most other applications are built with Libtool. And these that aren't, such as PHP / Perl extensions deal with shared objects fine. --- diff --git a/yaz-config.in b/yaz-config.in index e57da01..a1be133 100644 --- a/yaz-config.in +++ b/yaz-config.in @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: yaz-config.in,v 1.28 2007-04-17 20:26:18 adam Exp $ +# $Id: yaz-config.in,v 1.29 2007-04-18 13:40:19 adam Exp $ yazprefix=@prefix@ yaz_echo_cflags=no yaz_echo_libs=no @@ -69,6 +69,9 @@ while test $# -gt 0; do lib_thread=yes lib_server=yes ;; + static) + lib_static=yes + ;; -*) yaz_echo_help=yes ;; @@ -86,7 +89,14 @@ YAZINC="@YAZ_CONFIG_CFLAGS@" if test "$yaz_echo_source" = "yes"; then YAZBIN=${yaz_build_root}/bin - YAZLIB="-L${yaz_build_root}/src/.libs $lyaz" + if test "$lib_static" = "yes"; then + YAZLIB="${yaz_build_root}/src/.libs/libyaz.a" + if test "$lib_server" = "yes"; then + YAZLIB="${yaz_build_root}/src/.libs/libyaz_server.a $YAZLIB" + fi + else + YAZLIB="-L${yaz_build_root}/src/.libs $lyaz" + fi YAZLIB="$YAZLIB $yazextralibs" YAZLALIB="${yaz_build_root}/src/libyaz.la"