From: Adam Dickmeiss Date: Thu, 5 Apr 2001 13:08:48 +0000 (+0000) Subject: New configure options: --enable-module. X-Git-Tag: YAZ.1.8~96 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=772d9a39dd0e3e139ab975d7d45d1262f5471164 New configure options: --enable-module. --- diff --git a/ccl/Makefile.am b/ccl/Makefile.am index ecd4f6f..af757c7 100644 --- a/ccl/Makefile.am +++ b/ccl/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.6 2001-03-21 15:02:39 adam Exp $ +## $Id: Makefile.am,v 1.7 2001-04-05 13:08:48 adam Exp $ noinst_LTLIBRARIES = libccl.la @@ -6,11 +6,9 @@ noinst_PROGRAMS = cclsh EXTRA_DIST = bib1 -LIBS = $(READLINE_LIBS) - INCLUDES=-I$(top_srcdir)/include libccl_la_SOURCES = cclfind.c ccltoken.c cclerrms.c cclqual.c cclptree.c \ cclqfile.c cclstr.c cclsh_SOURCES=cclsh.c -cclsh_LDADD = libccl.la +cclsh_LDADD = libccl.la $(READLINE_LIBS) diff --git a/client/client.c b/client/client.c index 9a43b95..8aeede6 100644 --- a/client/client.c +++ b/client/client.c @@ -3,7 +3,10 @@ * See the file LICENSE for details. * * $Log: client.c,v $ - * Revision 1.118 2001-03-27 14:48:06 adam + * Revision 1.119 2001-04-05 13:08:48 adam + * New configure options: --enable-module. + * + * Revision 1.118 2001/03/27 14:48:06 adam * Fixed scan for bad CCL. * * Revision 1.117 2001/03/25 21:55:12 adam @@ -401,7 +404,7 @@ #include -#ifdef ASN_COMPILED +#if YAZ_MODULE_ill #include #endif @@ -1314,7 +1317,7 @@ void process_ESResponse(Z_ExtendedServicesResponse *res) } } -#ifdef ASN_COMPILED +#if YAZ_MODULE_ill const char *get_ill_element (void *clientData, const char *element) { @@ -1378,14 +1381,9 @@ static Z_External *create_external_itemRequest() } return r; } -#else -static Z_External *create_external_itemRequest() -{ - return 0; -} #endif -#ifdef ASN_COMPILED +#ifdef YAZ_MODULE_ill static Z_External *create_external_ILL_APDU(int which) { struct ill_get_ctl ctl; @@ -1441,11 +1439,6 @@ static Z_External *create_external_ILL_APDU(int which) } return r; } -#else -static Z_External *create_external_ILLRequest() -{ - return 0; -} #endif @@ -1496,7 +1489,7 @@ static Z_External *create_ItemOrderExternal(const char *type, int itemno) (int *) odr_malloc(out, sizeof(int)); *r->u.itemOrder->u.esRequest->notToKeep->resultSetItem->item = itemno; -#ifdef ASN_COMPILED +#if YAZ_MODULE_ill if (!strcmp (type, "item") || !strcmp(type, "2")) { printf ("using item-request\n"); diff --git a/configure.in b/configure.in index cb53580..84fa72f 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2001 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.42 2001-03-21 12:43:36 adam Exp $ +dnl $Id: configure.in,v 1.43 2001-04-05 13:08:48 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 1.7) dnl @@ -13,23 +13,27 @@ AM_DISABLE_SHARED AM_PROG_LIBTOOL dnl dnl ----- yaz-comp: The Yaz Compiler -AC_SUBST(ASNMODULE) -AC_SUBST(ILLMODULE) -AC_SUBST(ILLLIB) +AC_SUBST(EXTRAMODULE) +AC_SUBST(EXTRALIB) AC_ARG_ENABLE(comp,[ --disable-comp use old encoders, i.e. disable the YAZ ASN.1 Compiler], , enable_comp=yes) if test "$enable_comp" = "yes"; then - ASNMODULE="z39.50" - ILLMODULE="ill" - ILLLIB=../ill/libill.la - ASN_MAKEFILES="z39.50/Makefile ill/Makefile" + EXTRAMODULE="z39.50" HFILE=${srcdir}/include/yaz/z-proto.h else - ILLMODULE="" - ASNMODULE=asn - ILLLIB="" - ASN_MAKEFILES="asn/Makefile" + EXTRAMODULE=asn HFILE=${srcdir}/asn/prt-proto.h fi +AC_ARG_ENABLE(module,[ --enable-module=\"mod ..\" ill],[ + EXTRAMODULE="$EXTRAMODULE $enable_module"]) +EXTRALIB="" +for module in $EXTRAMODULE; do + EXTRALIB="$EXTRALIB ../$module/lib${module}.la" + if test $module = "z39.50"; then + module=z3950 + fi + AC_DEFINE_UNQUOTED(YAZ_MODULE_${module}) +done + AC_MSG_CHECKING(whether proto.h needs to be generated) yaz_include=${srcdir}/include/yaz if test -r ${yaz_include}/proto.h && cmp -s $HFILE ${yaz_include}/proto.h; then @@ -149,7 +153,7 @@ if test -f ${srcdir}/lib/yaz-config.in; then fi sed s%yaz_echo_source=yes%yaz_echo_source=no%g < ${srcdir}/yaz-config.in >${srcdir}/lib/yaz-config.in dnl -SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest" +SUBDIRS_VAR="util odr $EXTRAMODULE zutil comstack ccl tab retrieval server include lib client ztest" AC_SUBST(SUBDIRS_VAR) dnl ------ Makefiles dnl diff --git a/ill/Makefile.am b/ill/Makefile.am index 4629faa..d1d2be8 100644 --- a/ill/Makefile.am +++ b/ill/Makefile.am @@ -1,8 +1,10 @@ -## $Id: Makefile.am,v 1.6 2001-03-21 15:02:39 adam Exp $ +## $Id: Makefile.am,v 1.7 2001-04-05 13:08:48 adam Exp $ INCLUDES=-I$(top_srcdir)/include -EXTRA_DIST=ill9702.asn item-req.asn ill.tcl +tabdatadir=$(pkgdatadir)/ill +tabdata_DATA=ill9702.asn item-req.asn ill.tcl +EXTRA_DIST=$(tabdata_DATA) noinst_LTLIBRARIES=libill.la diff --git a/lib/Makefile.am b/lib/Makefile.am index ff85dc5..8e6c18d 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.9 2000-11-23 10:58:32 adam Exp $ +## $Id: Makefile.am,v 1.10 2001-04-05 13:08:48 adam Exp $ if ISTHR extra=libyazthread.la @@ -27,8 +27,8 @@ INCLUDES =-I$(srcdir)/../include -I$(srcdir)/../server -D_REENTRANT=1 -DHAVE_PT bin_SCRIPTS = yaz-config -libyaz_la_LIBADD=../odr/libodr.la ../$(ASNMODULE)/libasn.la \ +libyaz_la_LIBADD=../odr/libodr.la \ ../comstack/libcomstack.la ../server/libserver.la \ ../zutil/libzutil.la ../util/libutil.la ../ccl/libccl.la \ - ../retrieval/libret.la $(ILLLIB) + ../retrieval/libret.la $(EXTRALIB) diff --git a/yaz-config.in b/yaz-config.in index 99e2ed2..ef737b9 100644 --- a/yaz-config.in +++ b/yaz-config.in @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: yaz-config.in,v 1.6 2001-03-20 15:58:24 adam Exp $ +# $Id: yaz-config.in,v 1.7 2001-04-05 13:08:48 adam Exp $ yazprefix=@prefix@ yaz_echo_cflags=no yaz_echo_libs=no @@ -7,6 +7,7 @@ yaz_echo_help=no yaz_echo_tabs=no yaz_echo_source=yes yaz_echo_lalibs=no +yaz_echo_comp=no yaz_src_root=@YAZ_SRC_ROOT@ yaz_build_root=@YAZ_BUILD_ROOT@ @@ -24,6 +25,7 @@ Options: [--lalibs] [--cflags] [--tabs] + [--comp] Libraries: threads EOF @@ -64,6 +66,9 @@ while test $# -gt 0; do --lalibs) yaz_echo_lalibs=yes ;; + --comp) + yaz_echo_comp=yes + ;; threads) lib_thread=yes ;; @@ -90,9 +95,11 @@ if test "$yaz_echo_source" = "yes"; then YAZLALIB="${yaz_build_root}/lib/libyaz.la $yazextralibs" fi YAZINC="-I${yaz_src_root}/include" + YAZCOMP=${yaz_src_root}/util/yaz-comp else - YAZTAB=$yazprefix/share/yaz/tab - YAZBIN=$yazprefix/bin + YAZTAB=${yazprefix}/share/yaz/tab + YAZBIN=${yazprefix}/bin + YAZCOMP=${yazprefix}/bin/yaz-comp if test "$yazprefix" = "/usr"; then YAZLIB="$lyaz $yazextralibs" @@ -126,3 +133,6 @@ fi if test "$yaz_echo_lalibs" = "yes"; then echo $YAZLALIB fi +if test "$yaz_echo_comp" = "yes"; then + echo $YAZCOMP +fi diff --git a/yaz.spec b/yaz.spec index 33afd51..c93fa1e 100644 --- a/yaz.spec +++ b/yaz.spec @@ -1,6 +1,6 @@ Name: yaz Version: 1.7 -Release: 2 +Release: 3 Copyright: YAZ License Group: Development/Libraries Vendor: Index Data ApS @@ -20,7 +20,7 @@ using the ANSI/NISO Z39.50 protocol for Information Retrieval. %build CFLAGS="$RPM_OPT_FLAGS" \ - ./configure --prefix=/usr --enable-shared --enable-tcpd + ./configure --prefix=/usr --enable-shared --enable-tcpd --enable-module=ill make CFLAGS="$RPM_OPT_FLAGS" %install @@ -45,5 +45,7 @@ cd doc; make prefix=$RPM_BUILD_ROOT/usr install /usr/lib/libyazthread.so.1 /usr/lib/libyazthread.so.1.0.0 /usr/include/yaz +/usr/share/yaz/z39.50 +/usr/share/yaz/ill /usr/share/yaz/doc /usr/share/aclocal/yaz.m4 diff --git a/z39.50/Makefile.am b/z39.50/Makefile.am index 42387df..a68ce22 100644 --- a/z39.50/Makefile.am +++ b/z39.50/Makefile.am @@ -1,16 +1,18 @@ -## $Id: Makefile.am,v 1.5 2001-03-21 15:02:39 adam Exp $ +## $Id: Makefile.am,v 1.6 2001-04-05 13:08:48 adam Exp $ INCLUDES=-I$(top_srcdir)/include -noinst_LTLIBRARIES = libasn.la +noinst_LTLIBRARIES = libz39.50.la -EXTRA_DIST=datetime.asn esupdate.asn univres.asn z3950v3.asn z.tcl esadmin.asn +tabdatadir = $(pkgdatadir)/z39.50 +tabdata_DATA=datetime.asn esupdate.asn univres.asn z3950v3.asn z.tcl esadmin.asn +EXTRA_DIST=$(tabdata_DATA) LIBS = YAZCOMP = $(top_srcdir)/util/yaz-comp -libasn_la_SOURCES = z-accdes1.c z-accform1.c z-acckrb1.c z-core.c \ +libz39_50_la_SOURCES = z-accdes1.c z-accform1.c z-acckrb1.c z-core.c \ z-diag1.c z-espec1.c z-estask.c z-exp.c z-grs.c z-opac.c z-uifr1.c \ z-rrf1.c z-rrf2.c z-sum.c z-sutrs.c \ zes-expi.c zes-exps.c zes-order.c zes-pquery.c zes-psched.c \ diff --git a/ztest/ztest.c b/ztest/ztest.c index e6e724d..50edbc7 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -6,7 +6,10 @@ * Chas Woodfield, Fretwell Downing Datasystems. * * $Log: ztest.c,v $ - * Revision 1.40 2001-03-25 21:55:13 adam + * Revision 1.41 2001-04-05 13:08:48 adam + * New configure options: --enable-module. + * + * Revision 1.40 2001/03/25 21:55:13 adam * Added odr_intdup. Ztest server returns TaskPackage for ItemUpdate. * * Revision 1.39 2001/03/12 14:40:57 adam @@ -142,7 +145,7 @@ #include #include -#ifdef ASN_COMPILED +#if YAZ_MODULE_ill #include #endif @@ -212,7 +215,7 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr) yaz_log(LOG_LOG, "setId: %s", n->resultSetItem->resultSetId); yaz_log(LOG_LOG, "item: %d", *n->resultSetItem->item); } -#ifdef ASN_COMPILED +#if YAZ_MODULE_ill if (n->itemRequest) { Z_External *r = (Z_External*) n->itemRequest;