From 70f0ff9bf920e65b47211fd88f409e2b1a2b8e43 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 19 Jun 2000 09:49:35 +0000 Subject: [PATCH] Added options for yaz-config. --- CHANGELOG | 3 ++ Makefile.am | 6 ++-- Makefile.in | 4 ++- configure | 43 ++++++++++++++++++++++++-- configure.in | 26 +++++++++++++--- lib/Makefile.am | 18 ++--------- lib/Makefile.in | 21 ++++--------- lib/yaz-config.in | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++ yaz.spec | 5 ++- 9 files changed, 172 insertions(+), 43 deletions(-) create mode 100755 lib/yaz-config.in diff --git a/CHANGELOG b/CHANGELOG index b61642e..40ae8f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ Possible compatibility problems with earlier versions marked with '*'. +Config file yaz-config now accepts options so that it returns specific +compile settings, etc. Thanks to Morten Bøgeskov + Shared library support for UNIX using GNU libtool. * Modified backend interface. Request/Response struct's replaced by diff --git a/Makefile.am b/Makefile.am index 0b960e6..15c7323 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.7 2000-04-05 07:39:54 adam Exp $ +## $Id: Makefile.am,v 1.8 2000-06-19 09:49:35 adam Exp $ AUTOMAKE_OPTIONS = foreign @@ -11,8 +11,10 @@ SPEC_FILE=$(PACKAGE).spec EXTRA_DIST=$(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt yaz-config: Makefile + @rm -f yaz-config @echo "#!/bin/sh" >yaz-config - @echo "# YAZ settings for developers" >>yaz-config + @echo "# yaz-config for source tree" >>yaz-config + @echo "YAZVERSION=@VERSION@" >>yaz-config @echo "YAZBIN=\"`pwd`/bin\"" >>yaz-config @echo "YAZTAB=\"`pwd`/tab\"" >>yaz-config @echo "YAZLIB=\"-L`pwd`/lib/.libs -lyaz @LIBS@\"" >>yaz-config diff --git a/Makefile.in b/Makefile.in index e698e8c..883a3f4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -344,8 +344,10 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean yaz-config: Makefile + @rm -f yaz-config @echo "#!/bin/sh" >yaz-config - @echo "# YAZ settings for developers" >>yaz-config + @echo "# yaz-config for source tree" >>yaz-config + @echo "YAZVERSION=@VERSION@" >>yaz-config @echo "YAZBIN=\"`pwd`/bin\"" >>yaz-config @echo "YAZTAB=\"`pwd`/tab\"" >>yaz-config @echo "YAZLIB=\"-L`pwd`/lib/.libs -lyaz @LIBS@\"" >>yaz-config diff --git a/configure b/configure index 0b9469b..6f4628e 100755 --- a/configure +++ b/configure @@ -2446,7 +2446,26 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo " +Makefile +util/Makefile +odr/Makefile +z39.50/Makefile +asn/Makefile +ill/Makefile +zutil/Makefile +comstack/Makefile +ccl/Makefile +tab/Makefile +retrieval/Makefile +server/Makefile +include/Makefile +include/yaz/Makefile +lib/Makefile +client/Makefile +ztest/Makefile +doc/Makefile +lib/yaz-config" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2616,7 +2653,7 @@ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - +chmod +x lib/yaz-config exit 0 EOF chmod +x $CONFIG_STATUS diff --git a/configure.in b/configure.in index 5d17926..353b500 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,6 @@ -dnl YAZ Toolkit -dnl (c) Index Data 1994-2000 +dnl YAZ Toolkit, Index Data 1994-2000 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.28 2000-05-18 11:57:04 adam Exp $ +dnl $Id: configure.in,v 1.29 2000-06-19 09:49:35 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 1.7) dnl @@ -118,4 +117,23 @@ AC_SUBST(SUBDIRS_VAR) dnl dnl ------ Makefiles dnl -AC_OUTPUT(Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile) +AC_OUTPUT([ +Makefile +util/Makefile +odr/Makefile +z39.50/Makefile +asn/Makefile +ill/Makefile +zutil/Makefile +comstack/Makefile +ccl/Makefile +tab/Makefile +retrieval/Makefile +server/Makefile +include/Makefile +include/yaz/Makefile +lib/Makefile +client/Makefile +ztest/Makefile +doc/Makefile +lib/yaz-config],[chmod +x lib/yaz-config]) diff --git a/lib/Makefile.am b/lib/Makefile.am index b653261..a2eb3cd 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,9 +1,11 @@ -## $Id: Makefile.am,v 1.5 2000-05-02 19:32:16 adam Exp $ +## $Id: Makefile.am,v 1.6 2000-06-19 09:49:35 adam Exp $ lib_LTLIBRARIES = libyaz.la bin_SCRIPTS = yaz-config +EXTRA_DIST = yaz-config.in + # If the line below is omitted the LINK variable is # not set in Makefile.in and it will NOT work .. EXTRA_libyaz_la_SOURCES=x.c @@ -17,17 +19,3 @@ libyaz_la_LIBADD=../odr/libodr.la ../$(ASNMODULE)/libasn.la \ ../comstack/libcomstack.la ../server/libserver.la \ ../zutil/libzutil.la ../util/libutil.la ../ccl/libccl.la \ ../retrieval/libret.la $(ILLLIB) - -# Public libraries and header files -LIBDIR=$(exec_prefix)/lib -INCDIR=$(prefix)/include - -yaz-config: Makefile - @echo "#!/bin/sh" >yaz-config - @echo "# YAZ settings for developers" >>yaz-config - @echo "YAZBIN='$(bindir)'" >>yaz-config - @echo "YAZTAB='$(pkgdatadir)/tab'" >>yaz-config - @echo "YAZLIB='-L$(libdir) -lyaz $(LIBS)'" >>yaz-config - @echo "YAZINC='-I$(includedir)'" >>yaz-config - chmod +x yaz-config - diff --git a/lib/Makefile.in b/lib/Makefile.in index 521408e..8c85394 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -82,6 +82,8 @@ lib_LTLIBRARIES = libyaz.la bin_SCRIPTS = yaz-config +EXTRA_DIST = yaz-config.in + # If the line below is omitted the LINK variable is # not set in Makefile.in and it will NOT work .. EXTRA_libyaz_la_SOURCES = x.c @@ -93,12 +95,8 @@ LDFLAGS = -version-info 0:0:0 libyaz_la_LIBADD = ../odr/libodr.la ../$(ASNMODULE)/libasn.la ../comstack/libcomstack.la ../server/libserver.la ../zutil/libzutil.la ../util/libutil.la ../ccl/libccl.la ../retrieval/libret.la $(ILLLIB) - -# Public libraries and header files -LIBDIR = $(exec_prefix)/lib -INCDIR = $(prefix)/include mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = yaz-config LTLIBRARIES = $(lib_LTLIBRARIES) @@ -117,7 +115,7 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CF LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = Makefile.am Makefile.in +DIST_COMMON = Makefile.am Makefile.in yaz-config.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -138,6 +136,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +yaz-config: $(top_builddir)/config.status yaz-config.in + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: @@ -378,15 +378,6 @@ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean -yaz-config: Makefile - @echo "#!/bin/sh" >yaz-config - @echo "# YAZ settings for developers" >>yaz-config - @echo "YAZBIN='$(bindir)'" >>yaz-config - @echo "YAZTAB='$(pkgdatadir)/tab'" >>yaz-config - @echo "YAZLIB='-L$(libdir) -lyaz $(LIBS)'" >>yaz-config - @echo "YAZINC='-I$(includedir)'" >>yaz-config - chmod +x yaz-config - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/lib/yaz-config.in b/lib/yaz-config.in new file mode 100755 index 0000000..2713388 --- /dev/null +++ b/lib/yaz-config.in @@ -0,0 +1,89 @@ +#!/bin/sh + +yazprefix=@prefix@ +echo_cflags=no +echo_libs=no +echo_help=no +echo_tabs=no + +yazlibs=@LIBS@ +YAZVERSION=@VERSION@ + +usage() +{ + cat <&2 +fi +if test "$echo_cflags" = "yes"; then + echo $YAZINC +fi +if test "$echo_libs" = "yes"; then + echo $YAZLIB +fi +if test "$echo_tabs" = "yes"; then + echo $YAZTAB +fi diff --git a/yaz.spec b/yaz.spec index 3c882c4..0d8c37a 100644 --- a/yaz.spec +++ b/yaz.spec @@ -11,9 +11,8 @@ URL: http://www.indexdata.dk/yaz/ Summary: Z39.50 Library %description -The YAZ package is a C library for developing client - and -server applications using the ANSI/NISO Z39.50 protocol for Information -Retrieval. +YAZ is a C library for developing client - and server applications +using the ANSI/NISO Z39.50 protocol for Information Retrieval. %prep %setup -- 1.7.10.4