From 3e61994433eac158b5d087f3cedaddaf03b06620 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jun 2006 13:26:13 +0000 Subject: [PATCH] Build shared libraries by default. Installing various man pages and programs with suffix -2.0 (PACKAGE_SUFFIX), to enable multiple versions installed at the same time. --- Makefile.am | 6 +++--- buildconf.sh | 4 ++-- configure.ac | 8 +++----- doc/Makefile.am | 18 +++++++++++++----- include/idzebra/Makefile.am | 6 ++++-- index/Makefile.am | 16 ++++++++++++---- recctrl/Makefile.am | 22 ++++++++++++---------- tab/Makefile.am | 4 ++-- 8 files changed, 51 insertions(+), 33 deletions(-) diff --git a/Makefile.am b/Makefile.am index 86f5066..093ba5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.24 2006-06-07 07:50:58 adam Exp $ +## $Id: Makefile.am,v 1.25 2006-06-28 13:26:13 adam Exp $ AUTOMAKE_OPTIONS=foreign @@ -10,9 +10,9 @@ SUBDIRS=util bfile dfa dict isams isamb isamc rset data1 \ aclocaldir=$(datadir)/aclocal aclocal_DATA = m4/idzebra.m4 -SPEC_FILE=$(PACKAGE).spec +SPEC_FILE=idzebra.spec -EXTRA_DIST= README NEWS $(SPEC_FILE) idzebra.spec.in \ +EXTRA_DIST= README NEWS $(SPEC_FILE) $(SPEC_FILE).in \ idzebra-config.in m4/idzebra.m4 m4/yaz.m4 Doxyfile.in dist-hook: diff --git a/buildconf.sh b/buildconf.sh index ee3d628..95ea222 100755 --- a/buildconf.sh +++ b/buildconf.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: buildconf.sh,v 1.21 2006-06-12 23:44:39 adam Exp $ +# $Id: buildconf.sh,v 1.22 2006-06-28 13:26:13 adam Exp $ if automake --version|head -1 |grep '1\.[4-7]'; then echo "automake 1.4-1.7 is active. You should use automake 1.8 or later" if test -f /etc/debian_version; then @@ -41,7 +41,7 @@ esac if $enable_configure; then if test -n "$sh_flags"; then - CFLAGS="$sh_flags" ./configure $* + CFLAGS="$sh_flags" ./configure --disable-shared $* else ./configure $* fi diff --git a/configure.ac b/configure.ac index 2cbc0ef..45ab75e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,16 +1,15 @@ dnl Zebra, Index Data ApS, 1995-2006 -dnl $Id: configure.ac,v 1.19 2006-06-26 15:11:19 marc Exp $ +dnl $Id: configure.ac,v 1.20 2006-06-28 13:26:13 adam Exp $ dnl AC_PREREQ(2.59) AC_INIT([idzebra],[2.0.0],[adam@indexdata.dk]) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE([1.8]) -ZEBRAPKG_VERSION=2.0 -AC_SUBST(ZEBRAPKG_VERSION) +PACKAGE_SUFFIX="-2.0" +AC_SUBST(PACKAGE_SUFFIX) ZEBRALIBS_VERSION=2:0:0 AC_SUBST(ZEBRALIBS_VERSION) - dnl ------ Substitutions AC_SUBST(TCL_INCLUDE) AC_SUBST(TCL_LIB) @@ -19,7 +18,6 @@ dnl dnl ------ Checking programs AC_PROG_CC AC_PROG_CPP -AM_DISABLE_SHARED AM_PROG_LIBTOOL dnl dnl ------ headers diff --git a/doc/Makefile.am b/doc/Makefile.am index 295e0c1..a81a3ec 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ -## $Id: Makefile.am,v 1.51 2006-06-27 12:07:05 marc Exp $ -docdir=$(datadir)/doc/@PACKAGE@ +## $Id: Makefile.am,v 1.52 2006-06-28 13:26:13 adam Exp $ +docdir=$(datadir)/doc/$(PACKAGE)$(PACKAGE_SUFFIX) SUBDIRS = common @@ -81,7 +81,9 @@ HTMLFILES = \ PNGFILES=zebra.png EPSFILES=zebra.eps -MANFILES=zebraidx.1 zebrasrv.8 idzebra-config.1 +MANFILES=zebraidx$(PACKAGE_SUFFIX).1 \ + zebrasrv$(PACKAGE_SUFFIX).8 \ + idzebra-config.1 REFFILES=zebraidx-man.xml zebrasrv-man.xml idzebra-config-man.xml @@ -92,12 +94,14 @@ EXTRA_DIST = $(XMLFILES) $(REFFILES) \ $(doc_DATA) $(EPSFILES) $(man_MANS) $(REFFILES) \ marc_indexing.xml entities.ent local.ent.in -zebraidx.1: zebraidx-man.xml zebraidx-options.xml zebraidx-commands.xml +zebraidx$(PACKAGE_SUFFIX).1: zebraidx-man.xml zebraidx-options.xml zebraidx-commands.xml $(MAN_COMPILE) $(srcdir)/zebraidx-man.xml + mv zebraidx.1 zebraidx$(PACKAGE_SUFFIX).1 -zebrasrv.8: zebrasrv-man.xml zebrasrv-options.xml \ +zebrasrv$(PACKAGE_SUFFIX).8: zebrasrv-man.xml zebrasrv-options.xml \ zebrasrv-synopsis.xml zebrasrv-virtual.xml $(MAN_COMPILE) $(srcdir)/zebrasrv-man.xml + mv zebrasrv.8 zebrasrv$(PACKAGE_SUFFIX).8 idzebra-config.1: idzebra-config-man.xml $(MAN_COMPILE) $(srcdir)/idzebra-config-man.xml @@ -143,3 +147,7 @@ dist-hook: exit 1; \ fi \ done + +install-data-hook: + cd $(man1dir) && ln -sf zebraidx$(PACKAGE_SUFFIX).1 zebraidx.1 + cd $(man8dir) && ln -sf zebrasrv$(PACKAGE_SUFFIX).8 zebrasrv.8 diff --git a/include/idzebra/Makefile.am b/include/idzebra/Makefile.am index add082c..9fede05 100644 --- a/include/idzebra/Makefile.am +++ b/include/idzebra/Makefile.am @@ -1,6 +1,8 @@ -# $Id: Makefile.am,v 1.9 2006-03-23 09:15:24 adam Exp $ +# $Id: Makefile.am,v 1.10 2006-06-28 13:26:14 adam Exp $ -pkginclude_HEADERS=api.h version.h res.h recctrl.h data1.h recgrs.h \ +zebraincludedir=$(includedir)/$(PACKAGE)$(PACKAGE_SUFFIX)/idzebra + +zebrainclude_HEADERS=api.h version.h res.h recctrl.h data1.h recgrs.h \ zebramap.h bfile.h dict.h isam-codec.h isams.h isamc.h isamb.h util.h \ snippet.h api_swig.h flock.h diff --git a/index/Makefile.am b/index/Makefile.am index 916d4fc..7a0a6d8 100644 --- a/index/Makefile.am +++ b/index/Makefile.am @@ -1,7 +1,7 @@ -## $Id: Makefile.am,v 1.42 2006-06-26 15:11:33 marc Exp $ +## $Id: Makefile.am,v 1.43 2006-06-28 13:26:16 adam Exp $ -noinst_PROGRAMS = apitest kdump +noinst_PROGRAMS = apitest kdump zebrash lib_LTLIBRARIES = libidzebra-api.la @@ -22,7 +22,7 @@ libidzebra_api_la_SOURCES = \ zebraapi.c zinfo.c zinfo.h zserver.h zsets.c zrpn.c -bin_PROGRAMS = zebraidx zebrasrv zebrash +bin_PROGRAMS = zebraidx zebrasrv zebralibs = \ libidzebra-api.la \ @@ -37,7 +37,6 @@ zebralibs = \ ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la - zebraidx_SOURCES = main.c zebrasrv_SOURCES = zserver.c zebrash_SOURCES = zebrash.c @@ -51,3 +50,12 @@ zebrash_LDADD= $(zebralibs) $(YAZLALIB) $(READLINE_LIBS) LDADD = $(zebralibs) $(YAZLALIB) +install-exec-hook: + cd $(bindir) && mv -f zebraidx zebraidx$(PACKAGE_SUFFIX) + cd $(bindir) && ln -sf zebraidx$(PACKAGE_SUFFIX) zebraidx + cd $(bindir) && mv -f zebrasrv zebrasrv$(PACKAGE_SUFFIX) + cd $(bindir) && ln -sf zebrasrv$(PACKAGE_SUFFIX) zebrasrv + +uninstall-hook: + cd $(bindir) && rm -f zebraidx$(PACKAGE_SUFFIX) + cd $(bindir) && rm -f zebrasrv$(PACKAGE_SUFFIX) diff --git a/recctrl/Makefile.am b/recctrl/Makefile.am index 6bc4092..ecff595 100644 --- a/recctrl/Makefile.am +++ b/recctrl/Makefile.am @@ -1,4 +1,6 @@ -## $Id: Makefile.am,v 1.22 2006-06-26 15:11:39 marc Exp $ +## $Id: Makefile.am,v 1.23 2006-06-28 13:26:17 adam Exp $ + +zebralibdir=$(libdir)/$(PACKAGE)$(PACKAGE_SUFFIX) common_libs = libidzebra-recctrl.la \ ../data1/libidzebra-data1.la \ @@ -8,46 +10,46 @@ common_libs = libidzebra-recctrl.la \ # The shared modules mod_grs_regx_la_SOURCES = regxread.c -mod_grs_regx_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +mod_grs_regx_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version mod_grs_regx_la_LADD = $(TCL_LIB) mod_grs_regx_la_LIBADD = $(common_libs) $(mod_grs_regx_la_LADD) mod_grs_xml_la_SOURCES = xmlread.c -mod_grs_xml_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +mod_grs_xml_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version mod_grs_xml_la_LADD = $(EXPAT_LIBS) mod_grs_xml_la_LIBADD = $(common_libs) $(mod_grs_xml_la_LADD) mod_grs_marc_la_SOURCES = marcread.c marcomp.c marcomp.h inline.c inline.h -mod_grs_marc_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +mod_grs_marc_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version mod_grs_marc_la_LADD = mod_grs_marc_la_LIBADD = $(common_libs) $(mod_grs_marc_la_LADD) #mod_grs_csv_la_SOURCES = csvread.c -#mod_grs_csv_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +#mod_grs_csv_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version #mod_grs_csv_la_LADD = #mod_grs_csv_la_LIBADD = $(common_libs) $(mod_grs_csv_la_LADD) #mod_grs_danbib_la_SOURCES = danbibr.c -#mod_grs_danbib_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +#mod_grs_danbib_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version #mod_grs_danbib_la_LADD = #mod_grs_danbib_la_LIBADD = $(common_libs) $(mod_grs_danbib_la_LADD) mod_safari_la_SOURCES = safari.c -mod_safari_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +mod_safari_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version mod_safari_la_LADD = mod_safari_la_LIBADD = $(common_libs) $(mod_safari_la_LADD) mod_alvis_la_SOURCES = alvis.c -mod_alvis_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +mod_alvis_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version mod_alvis_la_LADD = $(XSLT_LIBS) mod_alvis_la_LIBADD = $(common_libs) $(mod_alvis_la_LADD) #mod_xslt_la_SOURCES = xslt.c -#mod_xslt_la_LDFLAGS = -rpath $(pkglibdir) -module -avoid-version +#mod_xslt_la_LDFLAGS = -rpath $(zebralibdir) -module -avoid-version #mod_xslt_la_LADD = $(XSLT_LIBS) #mod_xslt_la_LIBADD = $(common_libs) $(mod_alvis_la_LADD) -pkglib_LTLIBRARIES = $(SHARED_MODULE_LA) +zebralib_LTLIBRARIES = $(SHARED_MODULE_LA) EXTRA_LTLIBRARIES = \ mod-grs-regx.la \ mod-grs-xml.la \ diff --git a/tab/Makefile.am b/tab/Makefile.am index 8170ba0..8e0369c 100644 --- a/tab/Makefile.am +++ b/tab/Makefile.am @@ -1,6 +1,6 @@ -## $Id: Makefile.am,v 1.8 2006-06-26 15:11:42 marc Exp $ +## $Id: Makefile.am,v 1.9 2006-06-28 13:26:18 adam Exp $ -tabdatadir = $(pkgdatadir)/tab +tabdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)/tab tabdata_DATA = bib1.att dan1.att danmarc.abs danmarc.mar \ default.idx explain.abs explain.att explain.tag generic.tag gils.abs \ gils-a.est gils.att gils-b.est gils-f.est gils-g.est gils-summary.map \ -- 1.7.10.4