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 <morten@bogeskov.dk>
+
Shared library support for UNIX using GNU libtool.
* Modified backend interface. Request/Response struct's replaced by
-## $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
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
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
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 <<EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"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"}
+CONFIG_FILES=\${CONFIG_FILES-"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"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
EOF
cat >> $CONFIG_STATUS <<\EOF
-
+chmod +x lib/yaz-config
exit 0
EOF
chmod +x $CONFIG_STATUS
-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
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])
-## $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
../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
-
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
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)
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)
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:
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:
--- /dev/null
+#!/bin/sh
+
+yazprefix=@prefix@
+echo_cflags=no
+echo_libs=no
+echo_help=no
+echo_tabs=no
+
+yazlibs=@LIBS@
+YAZVERSION=@VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: yaz-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+ [--tabs]
+EOF
+ exit $1
+}
+
+#if test $# -eq 0; then
+# echo_help=yes
+#fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ yazprefix=$optarg
+ ;;
+ --prefix)
+ echo $yazprefix
+ exit 0
+ ;;
+ --version)
+ echo $YAZVERSION
+ exit 0
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ --tabs)
+ echo_tabs=yes
+ ;;
+ *)
+ echo_help=yes
+ ;;
+ esac
+ shift
+done
+
+YAZTAB=$yazprefix/share/yaz/tab
+YAZBIN=$yazprefix/bin
+
+if test "$yazprefix" = "/usr"; then
+ YAZLIB="-L$yazprefix/lib $YAZLIB"
+else
+ YAZLIB="-lyaz $yazlibs"
+fi
+if test "$yazprefix" = "/usr"; then
+ YAZINC=
+else
+ YAZINC=-I$yazprefix/include
+fi
+
+if test "$echo_help" = "yes"; then
+ usage 1 1>&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
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