-HELM_DICTIONARY_PATH=/projects/helm/V7/phd/local/etc/helm/helm-dictionary.xml
-GTKMATHVIEW_DICTIONARY_PATH=/projects/helm/local/share/gtkmathview/dictionary.xml
-HELM_FONT_CONFIGURATION_PATH=/projects/helm/V7/phd/local/etc/helm/helm-font-configuration.xml
-GTKMATHVIEW_FONT_CONFIGURATION_PATH=/projects/helm/local/share/gtkmathview/font-configuration.xml
-HELM_T1_CONFIG_FILE=/projects/helm/local/share/gtkmathview/t1.config
+HELM_SHARE_DIR=$RESOLVED_PREFIX/share/helm
+
+dnl Checking for the variable directory
+if test $USE_DEFAULTS != yes; then
+ echo
+ echo "Now you have to choose a suitable directory for variable files."
+ echo "Normally, this directory would be something like /var/local/helm, you"
+ echo "have to be sure that the directory (and the subdirectories in it)"
+ echo "is world-writable."
+ echo
+ echo -n "[[$DEFAULT_HELM_VAR_DIR]] ? "
+ read HELM_VAR_DIR
+ echo
+ if test x$HELM_VAR_DIR = x; then
+ HELM_VAR_DIR="/var/local/helm"
+ fi
+else
+ HELM_VAR_DIR=$DEFAULT_HELM_VAR_DIR
+fi
+
+AC_MSG_CHECKING(for HELM variable dir)
+AC_MSG_RESULT($HELM_VAR_DIR)
+
+dnl Checking for the /tmp directory
+DEFAULTS=$USE_DEFAULTS
+if test $DEFAULTS = auto; then
+ if test -d $DEFAULT_HELM_TMP_DIR ; then
+ HELM_TMP_DIR=$DEFAULT_HELM_TMP_DIR
+ else
+ DEFAULTS=no
+ fi
+fi
+
+if test $DEFAULTS = no; then
+ echo
+ echo "Please, tell me the name of a directory which can be used to store"
+ echo "temporary files (normally it is something like /tmp)"
+ echo
+ echo -n "[[$DEFAULT_HELM_TMP_DIR]]"
+ read HELM_TMP_DIR
+ echo
+ if test x$HELM_TMP_DIR = x; then
+ HELM_TMP_DIR=$DEFAULT_HELM_TMP_DIR
+ fi
+else
+ HELM_TMP_DIR=$DEFAULT_HELM_TMP_DIR
+fi
+
+AC_MSG_CHECKING(for $HELM_TMP_DIR)
+if test ! -d $HELM_TMP_DIR; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please check your installation)
+fi
+AC_MSG_RESULT(ok)
+
+dnl Checks for GtkMathView
+AC_CHECK_PROG(HAVE_GTKMATHVIEW_CONFIG, gtkmathview-config, yes, no)
+if test $HAVE_GTKMATHVIEW_CONFIG = no; then
+ AC_MSG_ERROR(Could not find gtkmathview-config)
+fi
+GTKMATHVIEW_PREFIX=`gtkmathview-config --prefix`