-## $Id: Makefile.am,v 1.9 2000-10-02 12:31:43 adam Exp $
+## $Id: Makefile.am,v 1.10 2000-10-11 10:40:56 adam Exp $
AUTOMAKE_OPTIONS = foreign
SUBDIRS = @SUBDIRS_VAR@
+aclocaldir=$(datadir)/aclocal
+
+aclocal_DATA = yaz.m4
+
SPEC_FILE=$(PACKAGE).spec
-EXTRA_DIST=$(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt
+EXTRA_DIST=$(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt \
+ yaz-config.in yaz.m4
dist-hook:
cd doc; make
SUBDIRS = @SUBDIRS_VAR@
+aclocaldir = $(datadir)/aclocal
+
+aclocal_DATA = yaz.m4
+
SPEC_FILE = $(PACKAGE).spec
-EXTRA_DIST = $(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt
+EXTRA_DIST = $(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt yaz-config.in yaz.m4
+
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = yaz-config
+DATA = $(aclocal_DATA)
+
DIST_COMMON = README Makefile.am Makefile.in TODO aclocal.m4 \
config.guess config.sub configure configure.in install-sh ltconfig \
ltmain.sh missing mkinstalldirs yaz-config.in
yaz-config: $(top_builddir)/config.status yaz-config.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+install-aclocalDATA: $(aclocal_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(aclocaldir)
+ @list='$(aclocal_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(aclocaldir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(aclocaldir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(aclocaldir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(aclocaldir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-aclocalDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(aclocal_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(aclocaldir)/$$p; \
+ done
+
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
+@SET_MAKE@
+
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
done; \
- rev="$$rev ."; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
install-exec-am:
install-exec: install-exec-recursive
-install-data-am:
+install-data-am: install-aclocalDATA
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
-uninstall-am:
+uninstall-am: uninstall-aclocalDATA
uninstall: uninstall-recursive
-all-am: Makefile
+all-am: Makefile $(DATA)
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(aclocaldir)
mostlyclean-generic:
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
+.PHONY: uninstall-aclocalDATA install-aclocalDATA install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
YAZ_SRC_ROOT=`pwd`
SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest"
+if test -f lib/yaz-config.in; then
+ rm lib/yaz-config.in
+fi
+sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config.in >lib/yaz-config.in
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
ztest/Makefile
doc/Makefile
yaz-config
-lib/yaz-config" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+lib/yaz-config
+" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
ztest/Makefile
doc/Makefile
yaz-config
-lib/yaz-config"}
+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 yaz-config
+chmod +x yaz-config lib/yaz-config
exit 0
EOF
chmod +x $CONFIG_STATUS
dnl YAZ Toolkit, Index Data 1994-2000
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.36 2000-10-03 13:26:24 adam Exp $
+dnl $Id: configure.in,v 1.37 2000-10-11 10:40:56 adam Exp $
AC_INIT(include/yaz/yaz-version.h)
AM_INIT_AUTOMAKE(yaz, 1.7)
dnl
dnl
SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest"
AC_SUBST(SUBDIRS_VAR)
+if test -f lib/yaz-config.in; then
+ rm lib/yaz-config.in
+fi
+sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config.in >lib/yaz-config.in
dnl
dnl ------ Makefiles
dnl
ztest/Makefile
doc/Makefile
yaz-config
-lib/yaz-config],[chmod +x lib/yaz-config yaz-config])
+lib/yaz-config
+],[chmod +x yaz-config lib/yaz-config])
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
+@SET_MAKE@
+
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
done; \
- rev="$$rev ."; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
-## $Id: Makefile.am,v 1.6 2000-06-19 09:49:35 adam Exp $
+## $Id: Makefile.am,v 1.7 2000-10-11 10:40:56 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
LDFLAGS=-version-info 0:0:0
+bin_SCRIPTS = yaz-config
+
libyaz_la_LIBADD=../odr/libodr.la ../$(ASNMODULE)/libasn.la \
../comstack/libcomstack.la ../server/libserver.la \
../zutil/libzutil.la ../util/libutil.la ../ccl/libccl.la \
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
LDFLAGS = -version-info 0:0:0
+bin_SCRIPTS = yaz-config
+
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)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+++ /dev/null
-#!/bin/sh
-# $Id: yaz-config.in,v 1.6 2000-10-02 12:31:43 adam Exp $
-yazprefix=@prefix@
-yaz_echo_cflags=no
-yaz_echo_libs=no
-yaz_echo_help=no
-yaz_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
-# yaz_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)
- yaz_echo_cflags=yes
- ;;
- --libs)
- yaz_echo_libs=yes
- ;;
- --tabs)
- yaz_echo_tabs=yes
- ;;
- -*)
- yaz_echo_help=yes
- ;;
- esac
- shift
-done
-
-YAZTAB=$yazprefix/share/yaz/tab
-YAZBIN=$yazprefix/bin
-
-if test "$yazprefix" = "/usr"; then
- YAZLIB="-lyaz $yazlibs"
-else
- YAZLIB="-L$yazprefix/lib -lyaz $yazlibs"
-fi
-if test "$yazprefix" = "/usr"; then
- YAZINC=
-else
- YAZINC=-I$yazprefix/include
-fi
-
-if test "$yaz_echo_help" = "yes"; then
- usage 1 1>&2
-fi
-if test "$yaz_echo_cflags" = "yes"; then
- echo $YAZINC
-fi
-if test "$yaz_echo_libs" = "yes"; then
- echo $YAZLIB
-fi
-if test "$yaz_echo_tabs" = "yes"; then
- echo $YAZTAB
-fi
#!/bin/sh
-# yaz-config for source tree
+# $Id: yaz-config.in,v 1.2 2000-10-11 10:40:56 adam Exp $
+yazprefix=@prefix@
+yaz_echo_cflags=no
+yaz_echo_libs=no
+yaz_echo_help=no
+yaz_echo_tabs=no
+yaz_echo_source=yes
+yaz_echo_lalibs=no
+yaz_src_root=@YAZ_SRC_ROOT@
+
+yazlibs="@LIBS@"
YAZVERSION=@VERSION@
-YAZBIN="@YAZ_SRC_ROOT@/bin"
-YAZTAB="@YAZ_SRC_ROOT@/tab"
-YAZLIB="-L@YAZ_SRC_ROOT@/lib/.libs -lyaz"
-YAZINC="-I@YAZ_SRC_ROOT@/include"
+
+usage()
+{
+ cat <<EOF
+Usage: yaz-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--lalibs]
+ [--cflags]
+ [--tabs]
+EOF
+ exit $1
+}
+
+#if test $# -eq 0; then
+# yaz_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)
+ yaz_echo_cflags=yes
+ ;;
+ --libs)
+ yaz_echo_libs=yes
+ ;;
+ --tabs)
+ yaz_echo_tabs=yes
+ ;;
+ --source)
+ yaz_echo_source=yes
+ ;;
+ --lalibs)
+ yaz_echo_lalibs=yes
+ ;;
+ -*)
+ yaz_echo_help=yes
+ ;;
+ esac
+ shift
+done
+
+if test "$yaz_echo_source" = "yes"; then
+ YAZTAB=${yaz_src_root}/tab
+ YAZBIN=${yaz_src_root}/bin
+ YAZLIB="-L${yaz_src_root}/lib/.libs -lyaz $yazlibs"
+ YAZLALIB="${yaz_src_root}/lib/libyaz.la $yazlibs"
+ YAZINC="-I${yaz_src_root}/include"
+else
+ YAZTAB=$yazprefix/share/yaz/tab
+ YAZBIN=$yazprefix/bin
+
+ if test "$yazprefix" = "/usr"; then
+ YAZLIB="-lyaz $yazlibs"
+ else
+ YAZLIB="-L$yazprefix/lib -lyaz $yazlibs"
+ fi
+ YAZLALIB=$YAZLIB
+ if test "$yazprefix" = "/usr"; then
+ YAZINC=
+ else
+ YAZINC=-I$yazprefix/include
+ fi
+fi
+
+if test "$yaz_echo_help" = "yes"; then
+ usage 1 1>&2
+fi
+if test "$yaz_echo_cflags" = "yes"; then
+ echo $YAZINC
+fi
+if test "$yaz_echo_libs" = "yes"; then
+ echo $YAZLIB
+fi
+if test "$yaz_echo_tabs" = "yes"; then
+ echo $YAZTAB
+fi
+if test "$yaz_echo_lalibs" = "yes"; then
+ echo $YAZLALIB
+fi
--- /dev/null
+## $Id: yaz.m4,v 1.1 2000-10-11 10:40:56 adam Exp $
+##
+# Use this m4 funciton for autoconf if you use YAZ in your own
+# configure script.
+# YAZ_INIT
+
+AC_DEFUN([YAZ_INIT],
+[
+ AC_SUBST(YAZLIB)
+ AC_SUBST(YAZLALIB)
+ AC_SUBST(YAZINC)
+ AC_SUBST(YAZVERSION)
+ yazconfig=NONE
+ yazpath=NONE
+ AC_ARG_WITH(yazconfig, [ --with-yazconfig=DIR yaz-config in DIR (example /home/yaz-1.7)], [yazpath=$withval])
+ if test "x$yazpath" != "xNONE"; then
+ yazconfig=$yazpath/yaz-config
+ else
+ for i in ../yaz* ../yaz; do
+ if test -d $i; then
+ if test -r $i/yaz-config; then
+ yazconfig=$i/yaz-config
+ fi
+ fi
+ done
+ if test "x$yazconfig" = "xNONE"; then
+ AC_PATH_PROG(yazconfig, yaz-config, NONE)
+ fi
+ fi
+ AC_MSG_CHECKING(for YAZ)
+ if $yazconfig --version >/dev/null 2>&1; then
+ YAZLIB=`$yazconfig --libs`
+ # if this is empty, it's a simple version YAZ 1.6 script
+ # so we have to source it instead...
+ if test "X$YAZLIB" = "X"; then
+ . $yazconfig
+ else
+ YAZLALIB=`$yazconfig --lalibs`
+ YAZINC=`$yazconfig --cflags`
+ YAZVERSION=`$yazconfig --version`
+ fi
+ AC_MSG_RESULT($yazconfig)
+ else
+ AC_MSG_RESULT(Not found)
+ YAZVERSION=NONE
+ fi
+])
+
/usr/lib/libyaz.so.0.0.0
/usr/include/yaz
/usr/share/yaz/doc
+/usr/share/aclocal/yaz.m4