-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)