From 251e34e3e92475a72223f16cc2ce607c9db6a671 Mon Sep 17 00:00:00 2001 From: Luca Padovani Date: Wed, 17 Jan 2001 18:17:10 +0000 Subject: [PATCH] improved autoconfiguration --- helm/helm_data/Makefile.in | 15 ++++--- helm/helm_data/configure.in | 43 ++++++++----------- ...lm_data-0.0.1-1.spec => helm_data.spec.in} | 7 +-- 3 files changed, 32 insertions(+), 33 deletions(-) rename helm/helm_data/{helm_data-0.0.1-1.spec => helm_data.spec.in} (88%) diff --git a/helm/helm_data/Makefile.in b/helm/helm_data/Makefile.in index f969fd7a1..bf5738b22 100644 --- a/helm/helm_data/Makefile.in +++ b/helm/helm_data/Makefile.in @@ -1,12 +1,15 @@ -HELM_DTDS_DIR=@HELM_DTDS_DIR@ -HELM_STYLES_DIR=@HELM_STYLES_DIR@ + +HELM_DTD_DIR=@HELM_DTD_DIR@ +HELM_STYLE_DIR=@HELM_STYLE_DIR@ + +all: install: - mkdir -p $(HELM_STYLES_DIR) - cp dtd/* $(HELM_DTDS_DIR) - cp style/*.xsl $(HELM_STYLES_DIR) + cp dtd/* $(HELM_DTD_DIR) + cp style/*.xsl $(HELM_STYLE_DIR) distclean: rm -f Makefile configure config.log config.cache config.status + rm -rf dtd style -.PHONY: install distclean +.PHONY: all install distclean diff --git a/helm/helm_data/configure.in b/helm/helm_data/configure.in index e4dcc651d..34d98becd 100644 --- a/helm/helm_data/configure.in +++ b/helm/helm_data/configure.in @@ -1,31 +1,26 @@ AC_INIT(dtd/cic.dtd) -if test "x$prefix" != xNONE; then - RESOLVED_PREFIX=$prefix -else - RESOLVED_PREFIX=$ac_default_prefix -fi +PACKAGE=helm_data +MAJOR_VERSION=0 +MINOR_VERSION=0 +MICRO_VERSION=1 +VERSION=$MAJOR_VERSION.MINOR_VERSION.$MICRO_VERSION -dnl General -AC_MSG_CHECKING("for the share/helm/dtd dir") -RES="" -AC_CACHE_VAL(helm_cv_HELM_DTDS_DIR, - echo "Where should I put the DTDs? Note: your answer must be the entry of value dtd_dir in the configuration.xml file of the helm_configuration package that you should have already installed." - read helm_cv_HELM_DTDS_DIR - RES="Asked" -) -HELM_DTDS_DIR=$helm_cv_HELM_DTDS_DIR -if test "$RES" != "Asked" ; then - HELM_DTDS_DIR=`eval "echo $HELM_DTDS_DIR"` - AC_MSG_RESULT($HELM_DTDS_DIR) +AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no) +if test $HAVE_HELM_CONFIG = no; then + AC_MSG_ERROR(Could not find helm-config) fi -AC_CACHE_SAVE -AC_MSG_CHECKING("for the share/helm/style dir") -HELM_STYLES_DIR=$RESOLVED_PREFIX/share/helm/style -AC_MSG_RESULT($HELM_STYLES_DIR) +HELM_DTD_DIR=`helm-config --dtd-dir` +HELM_STYLE_DIR=`helm-config --style-dir` + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) +AC_SUBST(HELM_DTD_DIR) +AC_SUBST(HELM_STYLE_DIR) -AC_SUBST(HELM_DTDS_DIR) -AC_SUBST(HELM_STYLES_DIR) +AC_OUTPUT([ + Makefile + helm_data.spec +]) -AC_OUTPUT([Makefile]) diff --git a/helm/helm_data/helm_data-0.0.1-1.spec b/helm/helm_data/helm_data.spec.in similarity index 88% rename from helm/helm_data/helm_data-0.0.1-1.spec rename to helm/helm_data/helm_data.spec.in index c81b80ba7..fae80359c 100644 --- a/helm/helm_data/helm_data-0.0.1-1.spec +++ b/helm/helm_data/helm_data.spec.in @@ -1,13 +1,13 @@ Summary: The base DTDs and XSLT stylesheets of project HELM -Name: helm_data -Version: 0.0.1 +Name: @PACKAGE@ +Version: @VERSION@ Release: 1 Copyright: GPL URL: http://www.cs.unibo.it/helm Packager: Claudio Sacerdoti Coen Requires: helm_configuration = 0.0.1 Group: Applications/Publishing -Source: www.cs.unibo.it:/~lpadovan/mml-widget/helm_data-0.0.1-1.tar.gz +Source: www.cs.unibo.it:/helm/@PACKAGE@-@VERSION@.tar.gz %description HELM (Hypertextual Electronic Library of Mathematics) is a project aimed at the creation of tools for the development and exploitation of a huge @@ -22,6 +22,7 @@ For more information see http://www.cs.unibo.it/helm %build cp config.cache.pkg config.cache ./configure +make %install make install -- 2.39.2