X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhelm_data%2Fconfigure.in;h=635258995358481952c0d9707d40fd736fac92d4;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=34d98becd0d20ec87f8797a834f985302bd91510;hpb=251e34e3e92475a72223f16cc2ce607c9db6a671;p=helm.git diff --git a/helm/helm_data/configure.in b/helm/helm_data/configure.in index 34d98becd..635258995 100644 --- a/helm/helm_data/configure.in +++ b/helm/helm_data/configure.in @@ -3,16 +3,51 @@ AC_INIT(dtd/cic.dtd) PACKAGE=helm_data MAJOR_VERSION=0 MINOR_VERSION=0 -MICRO_VERSION=1 -VERSION=$MAJOR_VERSION.MINOR_VERSION.$MICRO_VERSION +MICRO_VERSION=2 +VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION -AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no) -if test $HAVE_HELM_CONFIG = no; then - AC_MSG_ERROR(Could not find helm-config) +DEFAULT_HELM_DTD_DIR=/usr/local/share/helm/dtd +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 $USE_DEFAULTS = auto; then + AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no) + if test $HAVE_HELM_CONFIG = yes; then + HELM_DTD_DIR=`helm-config --dtd-dir` + HELM_STYLE_DIR=`helm-config --style-dir` + else + USE_DEFAULTS=no + fi fi -HELM_DTD_DIR=`helm-config --dtd-dir` -HELM_STYLE_DIR=`helm-config --style-dir` +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 directory where I can find the DTDs for HELM..." + echo + echo -n "[[$DEFAULT_HELM_DTD_DIR]] ? " + read HELM_DTD_DIR + if test "x$HELM_DTD_DIR" = "x"; then + HELM_DTD_DIR=$DEFAULT_HELM_DTD_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_DTD_DIR=$DEFAULT_HELM_DTD_DIR + HELM_STYLE_DIR=$DEFAULT_HELM_STYLE_DIR +fi AC_SUBST(PACKAGE) AC_SUBST(VERSION)