From 45188c35bebda2cd4f91ffd7c09fdb9cae973dab Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 29 Aug 2004 12:31:32 +0000 Subject: [PATCH] Created idzebra-config that returns compiler flags and libs --- Makefile.am | 4 +- configure.in | 9 +++- idzebra-config.in | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++ util/Makefile.am | 6 ++- 4 files changed, 134 insertions(+), 5 deletions(-) create mode 100755 idzebra-config.in diff --git a/Makefile.am b/Makefile.am index 9cb40d4..27762d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.15 2004-08-06 13:14:46 adam Exp $ +## $Id: Makefile.am,v 1.16 2004-08-29 12:31:32 adam Exp $ AUTOMAKE_OPTIONS=foreign @@ -7,7 +7,7 @@ SUBDIRS=util bfile dfa dict isams isamb isamc rset data1 \ SPEC_FILE=$(PACKAGE).spec -EXTRA_DIST= README NEWS $(SPEC_FILE) idzebra.spec.in +EXTRA_DIST= README NEWS $(SPEC_FILE) idzebra.spec.in idzebra-config.in dist-hook: cp $(srcdir)/LICENSE* $(distdir) diff --git a/configure.in b/configure.in index b43eaba..100c591 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Zebra, Index Data Aps, 1995-2004 -dnl $Id: configure.in,v 1.95 2004-08-25 09:23:35 adam Exp $ +dnl $Id: configure.in,v 1.96 2004-08-29 12:31:32 adam Exp $ dnl AC_INIT(include/idzebra/version.h) AM_INIT_AUTOMAKE(idzebra,1.4.0) @@ -362,6 +362,10 @@ AC_STDC_HEADERS if test "$ac_cv_header_stdc" = "no"; then AC_MSG_WARN(Your system doesn't seem to support ANSI C) fi +AC_SUBST(IDZEBRA_SRC_ROOT) +AC_SUBST(IDZEBRA_BUILD_ROOT) +IDZEBRA_SRC_ROOT=`cd ${srcdir}; pwd` +IDZEBRA_BUILD_ROOT=`pwd` dnl ------ Create Makefiles AC_OUTPUT([ Makefile @@ -393,7 +397,8 @@ AC_OUTPUT([ test/marcxml/Makefile test/charmap/Makefile test/codec/Makefile examples/Makefile examples/gils/Makefile examples/zthes/Makefile idzebra.spec -]) + idzebra-config +],[sed s%idzebra_echo_source=yes%idzebra_echo_source=no%g < idzebra-config > util/idzebra-config && chmod +x idzebra-config util/idzebra-config]) if test -x "$perlbin"; then res=`cd perl ; $perlbin Makefile.PL ; cd .. ;`; fi diff --git a/idzebra-config.in b/idzebra-config.in new file mode 100755 index 0000000..5c91ce6 --- /dev/null +++ b/idzebra-config.in @@ -0,0 +1,120 @@ +#!/bin/sh +# $Id: idzebra-config.in,v 1.1 2004-08-29 12:31:32 adam Exp $ +idzebraprefix=@prefix@ +idzebra_echo_cflags=no +idzebra_echo_libs=no +idzebra_echo_help=no +idzebra_echo_tabs=no +idzebra_echo_source=yes +idzebra_echo_lalibs=no +idzebra_src_root=@IDZEBRA_SRC_ROOT@ +idzebra_build_root=@IDZEBRA_BUILD_ROOT@ + +yazlibs="@YAZLIB@ @LIBS@" +yazlalibs="@YAZLALIB@ @LIBS@" +IDZEBRAVERSION=@VERSION@ + +usage() +{ + cat <&2 +fi +if test "$idzebra_echo_cflags" = "yes"; then + echo $IDZEBRAINC +fi +if test "$idzebra_echo_libs" = "yes"; then + echo $IDZEBRALIB +fi +if test "$idzebra_echo_lalibs" = "yes"; then + echo $IDZEBRALALIB +fi diff --git a/util/Makefile.am b/util/Makefile.am index 12e2f59..e20962a 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,11 +1,15 @@ -## $Id: Makefile.am,v 1.10 2004-08-24 10:37:20 adam Exp $ +## $Id: Makefile.am,v 1.11 2004-08-29 12:31:32 adam Exp $ lib_LTLIBRARIES = libidzebra-util.la noinst_PROGRAMS = passtest +bin_SCRIPTS = idzebra-config + EXTRA_DIST = zebrasrv.rh +DISTCLEANFILES = idzebra-config + AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) -DDEFAULT_PROFILE_PATH=\"$(pkgdatadir)/tab\" LDADD = libidzebra-util.la $(TCL_LIB) $(YAZLALIB) -- 1.7.10.4