From 088c64751826270f01d66d5ddca1897fc83d13a9 Mon Sep 17 00:00:00 2001 From: Luca Padovani Date: Mon, 29 Jan 2001 12:28:41 +0000 Subject: [PATCH] some improvements --- helm/configuration/configure.in | 76 ++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/helm/configuration/configure.in b/helm/configuration/configure.in index 925b4da6b..d5de3e656 100644 --- a/helm/configuration/configure.in +++ b/helm/configuration/configure.in @@ -7,6 +7,16 @@ HELM_MINOR_VERSION=0 HELM_MICRO_VERSION=2 HELM_VERSION=$HELM_MAJOR_VERSION.$HELM_MINOR_VERSION.$HELM_MICRO_VERSION +DEFAULT_HELM_VAR_DIR=/var/local/helm +DEFAULT_HELM_TMP_DIR=/tmp + +AC_ARG_ENABLE( + defaults, + [ --enable-defaults[=ARG] if yes then use defaults (don't ask user) [default=auto]], + USE_DEFAULTS=$enableval, + USE_DEFAULTS=auto +) + if test "x$prefix" != xNONE; then RESOLVED_PREFIX=$prefix else @@ -26,29 +36,57 @@ HELM_ETC_DIR=$RESOLVED_PREFIX/etc/helm HELM_SHARE_DIR=$RESOLVED_PREFIX/share/helm dnl Checking for the variable directory -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 "" -AC_CACHE_CHECK( - "for the variable dir [[[/var/local/helm]]]", - helm_cv_HELM_VAR_DIR, - read helm_cv_HELM_VAR_DIR - if test x$helm_cv_HELM_VAR_DIR = x; then - helm_cv_HELM_VAR_DIR="/var/local/helm" - fi -) -HELM_VAR_DIR=$helm_cv_HELM_VAR_DIR +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 -if test -d "/tmp" ; then - HELM_TMP_DIR=/tmp +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 - AC_MSG_WARN(Could not find /tmp. Which directory could I use instead?) - read $HELM_TMP_DIR + 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) -- 2.39.2