]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/xsltd/configure.in
improved autoconfiguration and other small fixes, this module is about
[helm.git] / helm / xsltd / configure.in
index 9d1f8bea4922dd229c2f5e23d526df8562c96df9..b3462712ea4f6d76bd1c089908cc7b8d641bfb80 100644 (file)
@@ -1,5 +1,11 @@
 AC_INIT(xaland.class)
 
+PACKAGE=helm_xsltd
+MAJOR_VERSION=0
+MINOR_VERSION=0
+MICRO_VERSION=1
+VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
+
 if test "x$prefix" != xNONE; then
   RESOLVED_PREFIX=$prefix
 else
@@ -12,31 +18,31 @@ else
   RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
 fi
 
-dnl General
-AC_MSG_CHECKING("for the bin dir")
-HELM_BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
-AC_MSG_RESULT($HELM_BIN_DIR)
-
-AC_MSG_CHECKING("for the lib/helm dir")
-HELM_LIB_DIR=$RESOLVED_PREFIX/lib/helm
-AC_MSG_RESULT($HELM_LIB_DIR)
-
-AC_MSG_CHECKING("for the stylesheets\' dir")
-RES=""
-AC_CACHE_VAL(helm_cv_HELM_STYLES_DIR,
-  echo "Where should I find the stylesheets? Note: your answer must be the path of the directory in which the stylesheets in the helm_data package have been installed."
-  read helm_cv_HELM_STYLES_DIR
-  RES="Asked"
-)
-HELM_STYLES_DIR=$helm_cv_HELM_STYLES_DIR
-if test "$RES" != "Asked" ; then
-   HELM_STYLES_DIR=`eval "echo $HELM_STYLES_DIR"`
-   AC_MSG_RESULT($HELM_STYLES_DIR)
+BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
+
+AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
+if test $HAVE_HELM_CONFIG = no; then
+  AC_MSG_ERROR(Could not fing helm-config)
+fi
+
+HELM_LIB_DIR=`helm-config --lib-dir`
+if test ! -d $HELM_LIB_DIR; then
+  AC_MSG_ERROR(Could not find HELM lib directory, please check your installation)
+fi
+
+HELM_STYLES_DIR=`helm-config --style-dir`
+if test ! -d $HELM_STYLES_DIR; then
+  AC_MSG_ERROR(Could not find stylesheet directory, please check your installation)
 fi
-AC_CACHE_SAVE
 
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+AC_SUBST(BIN_DIR)
 AC_SUBST(HELM_LIB_DIR)
-AC_SUBST(HELM_BIN_DIR)
 AC_SUBST(HELM_STYLES_DIR)
 
-AC_OUTPUT([Makefile start-xaland], chmod +x start-xaland)
+AC_OUTPUT([
+  Makefile
+  start-xaland
+  helm_xsltd.spec
+], chmod +x start-xaland)