-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
+
+if test $USE_DEFAULTS = auto; then
+ AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
+ if test $HAVE_HELM_CONFIG = yes; then
+ HELM_LIB_DIR=`helm-config --lib-dir`
+ HELM_STYLE_DIR=`helm-config --style-dir`
+ else
+ USE_DEFAULTS=no
+ fi
+fi
+
+if test $USE_DEFAULTS = no; then
+ echo
+ echo "\`helm-config' is not installed (or I can't find it in your path)."
+ echo "Please, insert the lib directory for HELM..."
+ echo
+ echo -n "[[$DEFAULT_HELM_LIB_DIR]] ? "
+ read HELM_LIB_DIR
+ if test "x$HELM_LIB_DIR" = "x"; then
+ HELM_LIB_DIR=$DEFAULT_HELM_LIB_DIR
+ fi
+ echo
+ echo "Please, insert the directory where I can find the stylesheets for HELM..."
+ echo
+ echo -n "[[$DEFAULT_HELM_STYLE_DIR]] ? "
+ read HELM_STYLE_DIR
+ if test "x$HELM_STYLE_DIR" = "x"; then
+ HELM_STYLE_DIR=$DEFAULT_HELM_STYLE_DIR
+ fi
+elif test $USE_DEFAULTS = yes; then
+ HELM_LIB_DIR=$DEFAULT_HELM_LIB_DIR
+ HELM_STYLE_DIR=$DEFAULT_HELM_STYLE_DIR
+fi
+
+AC_MSG_CHECKING(for the $HELM_LIB_DIR)
+if test -d $HELM_LIB_DIR; then
+ AC_MSG_RESULT(ok)
+else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please check your installation)
+fi
+
+AC_MSG_CHECKING(for $HELM_STYLE_DIR)
+if test -d $HELM_STYLE_DIR; then
+ AC_MSG_RESULT(ok)
+else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please check your installation)