]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/helm_data/configure.in
improved autoconfiguration
[helm.git] / helm / helm_data / configure.in
index e4dcc651d7a06c87c777e2619a1f415ebf756933..34d98becd0d20ec87f8797a834f985302bd91510 100644 (file)
@@ -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])