X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fxsltd%2Fconfigure.in;h=2a8fcd0f3ed4af168a44bf591265a4354123ce7c;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=b3462712ea4f6d76bd1c089908cc7b8d641bfb80;hpb=7795f00bdb9888a6e958e7794e67d6535e37fed9;p=helm.git diff --git a/helm/xsltd/configure.in b/helm/xsltd/configure.in index b3462712e..2a8fcd0f3 100644 --- a/helm/xsltd/configure.in +++ b/helm/xsltd/configure.in @@ -3,9 +3,19 @@ AC_INIT(xaland.class) PACKAGE=helm_xsltd MAJOR_VERSION=0 MINOR_VERSION=0 -MICRO_VERSION=1 +MICRO_VERSION=2 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION +DEFAULT_HELM_LIB_DIR=/usr/local/lib/helm +DEFAULT_HELM_STYLE_DIR=/usr/local/share/helm/style + +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 @@ -20,26 +30,60 @@ fi 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) +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 -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) +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 -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) +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) fi AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(BIN_DIR) AC_SUBST(HELM_LIB_DIR) -AC_SUBST(HELM_STYLES_DIR) +AC_SUBST(HELM_STYLE_DIR) AC_OUTPUT([ Makefile