]> matita.cs.unibo.it Git - helm.git/commitdiff
autoconfiguration improved (?)
authorLuca Padovani <luca.padovani@unito.it>
Wed, 17 Jan 2001 17:53:29 +0000 (17:53 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Wed, 17 Jan 2001 17:53:29 +0000 (17:53 +0000)
helm/configuration/.cvsignore
helm/configuration/Makefile.in
helm/configuration/config.cache.pkg
helm/configuration/configure.in
helm/configuration/etc/configuration.xml.in
helm/configuration/etc/helm-dictionary.xml
helm/configuration/helm_configuration-0.0.1-1.spec [deleted file]
helm/configuration/helm_configuration.spec.in [new file with mode: 0644]

index cbb473e0b43d3c2f2a49d4284096e5f6c6300eb8..1923d231960effee7b2fe131a75a088554916a24 100644 (file)
@@ -1 +1,2 @@
 Makefile configure config.log config.cache config.status
+helm-config
index f973fd729b7f0320c68089e55488c94437f8cd46..8966646f9392ab392bb200a70643682a930c5de4 100644 (file)
@@ -1,26 +1,39 @@
+
+HELM_BIN_DIR=@HELM_BIN_DIR@
 HELM_LIB_DIR=@HELM_LIB_DIR@
 HELM_ETC_DIR=@HELM_ETC_DIR@
+HELM_SHARE_DIR=@HELM_SHARE_DIR@
+HELM_VAR_DIR=@HELM_VAR_DIR@
+HELM_DTD_DIR=@HELM_DTD_DIR@
+HELM_STYLE_DIR=@HELM_STYLE_DIR@
 HELM_LIBRARY_DIR=@HELM_LIBRARY_DIR@
-CONFIGURATION_DTD_DIR=@CONFIGURATION_DTD_DIR@
-CONFIGURATION_HELM_DIR=@CONFIGURATION_HELM_DIR@
+
+all:
 
 install:
+       mkdir -p $(HELM_BIN_DIR)
+       cp helm-config $(HELM_BIN_DIR)
        mkdir -p $(HELM_LIB_DIR)
        mkdir -p $(HELM_ETC_DIR)
-       mkdir -p $(CONFIGURATION_HELM_DIR)
-       chmod 777 $(CONFIGURATION_HELM_DIR)
-       mkdir -p $(CONFIGURATION_DTD_DIR)
+       mkdir -p $(HELM_SHARE_DIR)
+       mkdir -p $(HELM_VAR_DIR)
+       chmod 777 $(HELM_VAR_DIR)
+       mkdir -p $(HELM_LIBRARY_DIR)
+       chmod 777 $(HELM_LIBRARY_DIR)
+       mkdir -p $(HELM_DTD_DIR)
+       mkdir -p $(HELM_STYLE_DIR)
        cp lib/configuration.pl $(HELM_LIB_DIR)
        cp etc/configuration.dtd etc/configuration.xml etc/helm-dictionary.xml \
          etc/helm-font-configuration.xml etc/helm-math-engine-configuration.xml\
          $(HELM_ETC_DIR)
-       cp library/servers.txt library/urls_of_uris.db $(HELM_LIBRARY_DIR)
-       chmod 666 $(HELM_LIBRARY_DIR)/servers.txt \
-         $(HELM_LIBRARY_DIR)/urls_of_uris.db
+       cp library/servers.txt library/urls_of_uris.db $(HELM_VAR_DIR)
+       chmod 666 $(HELM_VAR_DIR)/servers.txt \
+         $(HELM_VAR_DIR)/urls_of_uris.db
 
 distclean:
        rm -f Makefile configure config.log config.cache config.status \
         etc/configuration.xml etc/helm-math-engine-configuration.xml \
-        lib/configuration.pl
+        lib/configuration.pl helm-config helm_configuration.spec
+
+.PHONY: all install distclean
 
-.PHONY: install distclean
index 0900d904bc0801eef9dc36883417477ac1d2ca6b..434e570a2b28d8e18af0cd7f6044e8e014a7a6c0 100644 (file)
@@ -1,4 +1,15 @@
-# This is the config.cache that holds the ``standard'' path for the
-# HELM library. It is supposed to be used when creating packages
-
-helm_cv_HELM_LIBRARY_DIR=${helm_cv_HELM_LIBRARY_DIR='$RESOLVED_PREFIX/var/helm'}
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+helm_cv_HELM_VAR_DIR=${helm_cv_HELM_VAR_DIR='/var/local/helm'}
index 29f38aa9a2f8642f2bbf8272e4e9546d906f6f06..2db664ed0a3556c7d95764dcdff1c8f40e3447e8 100644 (file)
@@ -1,5 +1,12 @@
 AC_INIT(etc/configuration.xml.in)
 
+PACKAGE=helm_configuration
+
+HELM_MAJOR_VERSION=0
+HELM_MINOR_VERSION=0
+HELM_MICRO_VERSION=1
+HELM_VERSION=$HELM_MAJOR_VERSION.$HELM_MINOR_VERSION.$HELM_MICRO_VERSION
+
 if test "x$prefix" != xNONE; then
   RESOLVED_PREFIX=$prefix
 else
@@ -13,134 +20,128 @@ else
 fi
 
 dnl General
-AC_MSG_CHECKING("for the lib/helm dir")
+HELM_BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
 HELM_LIB_DIR=$RESOLVED_EXEC_PREFIX/lib/helm
-AC_MSG_RESULT($HELM_LIB_DIR)
-
-AC_MSG_CHECKING("for the etc/helm dir")
 HELM_ETC_DIR=$RESOLVED_PREFIX/etc/helm
-AC_MSG_RESULT($HELM_ETC_DIR)
-
-AC_MSG_CHECKING("for the lib/helm dir")
 HELM_SHARE_DIR=$RESOLVED_PREFIX/share/helm
-AC_MSG_RESULT($HELM_SHARE_DIR)
 
-dnl Only for GtkMathview XML configuration
-HELM_DICTIONARY_PATH=$HELM_ETC_DIR/helm-dictionary.xml
+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
 
-AC_CHECK_PROG(HAVE_GTKMATHVIEW_CONFIG,gtkmathview-config,yes,no)
-if test $HAVE_GTKMATHVIEW_CONFIG = no ; then
+dnl Checking for the /tmp directory
+if test -d "/tmp" ; then
+   HELM_TMP_DIR=/tmp
+else
+   AC_MSG_WARN(Could not find /tmp. Which directory could I use instead?)
+   read $HELM_TMP_DIR
+fi
+
+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`
 
-AC_MSG_CHECKING("for dictionary.xml")
-AC_CACHE_VAL(helm_cv_GTKMATHVIEW_DICTIONARY_PATH,
-   helm_cv_GTKMATHVIEW_DICTIONARY_PATH=$GTKMATHVIEW_PREFIX/share/gtkmathview/dictionary.xml
-   if test ! -f $helm_cv_GTKMATHVIEW_DICTIONARY_PATH ; then
-      echo ""
-      AC_MSG_WARN(Could not find dictionary.xml. Where is it?)
-      read helm_cv_GTKMATHVIEW_DICTIONARY_PATH
-      RES="Asked"
-   fi
+AC_CACHE_CHECK(
+  for dictionary.xml,
+  helm_cv_GTKMATHVIEW_DICTIONARY_PATH,
+  helm_cv_GTKMATHVIEW_DICTIONARY_PATH=$GTKMATHVIEW_PREFIX/share/gtkmathview/dictionary.xml
+  if test ! -f $helm_cv_GTKMATHVIEW_DICTIONARY_PATH; then
+    read helm_cv_GTKMATHVIEW_DICTIONARY_PATH
+  fi
 )
 GTKMATHVIEW_DICTIONARY_PATH=$helm_cv_GTKMATHVIEW_DICTIONARY_PATH
-if test "$RES" != "Asked" ; then
-   AC_MSG_RESULT($GTKMATHVIEW_DICTIONARY_PATH)
-fi
-AC_CACHE_SAVE
-
-AC_MSG_CHECKING("for font-configuration.xml")
-RES=""
-AC_CACHE_VAL(helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH,
-   helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH=$GTKMATHVIEW_PREFIX/share/gtkmathview/font-configuration.xml
-   if test ! -f $helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH ; then
-      echo ""
-      AC_MSG_WARN(Could not find font-configuration.xml. Where is it?)
-      read helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH
-      RES="Asked"
-   fi
+
+AC_CACHE_CHECK(
+  for font-configuration.xml,
+  helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH,
+  helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH=$GTKMATHVIEW_PREFIX/share/gtkmathview/font-configuration.xml
+  if test ! -f $helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH; then
+    read helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH
+  fi
 )
 GTKMATHVIEW_FONT_CONFIGURATION_PATH=$helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH
-if test "$RES" != "Asked" ; then
-   AC_MSG_RESULT($GTKMATHVIEW_FONT_CONFIGURATION_PATH)
-fi
-AC_CACHE_SAVE
-
-AC_MSG_CHECKING("for t1.config")
-RES=""
-AC_CACHE_VAL(helm_cv_GTKMATHVIEW_T1_CONFIG_FILE,
-   helm_cv_GTKMATHVIEW_T1_CONFIG_FILE=$GTKMATHVIEW_PREFIX/share/gtkmathview/t1.config
-   if test ! -f $helm_cv_GTKMATHVIEW_T1_CONFIG_FILE ; then
-      echo ""
-      AC_MSG_WARN(Could not find t1.config. Where is it?)
-      read helm_cv_GTKMATHVIEW_T1_CONFIG_FILE
-      RES="Asked"
-   fi
+
+AC_CACHE_CHECK(
+  for t1lib configuration file,
+    helm_cv_GTKMATHVIEW_T1_CONFIG_FILE,
+    helm_cv_GTKMATHVIEW_T1_CONFIG_FILE=$GTKMATHVIEW_PREFIX/share/gtkmathview/t1.config
+    if test ! -f $helm_cv_GTKMATHVIEW_T1_CONFIG_FILE; then
+      read GTKMATHVIEW_T1_CONFIG_FILE
+    fi
 )
 GTKMATHVIEW_T1_CONFIG_FILE=$helm_cv_GTKMATHVIEW_T1_CONFIG_FILE
-if test "$RES" != "Asked" ; then
-   AC_MSG_RESULT($GTKMATHVIEW_T1_CONFIG_FILE)
-fi
-AC_CACHE_SAVE
 
+HELM_DICTIONARY_PATH=$HELM_ETC_DIR/helm-dictionary.xml
 HELM_FONT_CONFIGURATION_PATH=$HELM_ETC_DIR/helm-font-configuration.xml
 
 dnl Only for HELM XML configuration
+HELM_LIBRARY_DIR=$HELM_VAR_DIR/library
+HELM_SERVERS_FILE=$HELM_VAR_DIR/servers.txt
+HELM_URIS_DBM=$HELM_VAR_DIR/urls_of_uris
 
-AC_MSG_CHECKING("for the library path")
-RES=""
-AC_CACHE_VAL(helm_cv_HELM_LIBRARY_DIR,
-  echo "Where should I put the downloaded library? Note: the \"library\" subdirectory and all the files and subdirectories recursively in it should be world writeable"
-  read helm_cv_HELM_LIBRARY_DIR
-  RES="Asked"
-)
-HELM_LIBRARY_DIR=$helm_cv_HELM_LIBRARY_DIR
-if test "$RES" != "Asked" ; then
-   HELM_LIBRARY_DIR=`eval "echo $HELM_LIBRARY_DIR"`
-   AC_MSG_RESULT($HELM_LIBRARY_DIR)
-fi
-AC_CACHE_SAVE
-
-
-CONFIGURATION_HELM_DIR=$HELM_LIBRARY_DIR/library
-
-dnl CSC: ERROR: getters should download the DTDs
-CONFIGURATION_DTD_DIR=$HELM_SHARE_DIR/dtd
+dnl CSC: FIXME: getters should download the DTDs
+HELM_DTD_DIR=$HELM_SHARE_DIR/dtd
+HELM_STYLE_DIR=$HELM_SHARE_DIR/style
 
-CONFIGURATION_SERVERS_FILE=$HELM_LIBRARY_DIR/servers.txt
-CONFIGURATION_URIS_DBM=$HELM_LIBRARY_DIR/urls_of_uris
+dnl HELM prefixes
+AC_SUBST(RESOLVED_PREFIX)
+AC_SUBST(RESOLVED_EXEC_PREFIX)
 
-AC_MSG_CHECKING("for the tmp dir")
-RES=""
-if test -d "/tmp" ; then
-   CONFIGURATION_TMPDIR=/tmp
-else
-   AC_MSG_WARN(Could not find /tmp. What directory could I use instead?)
-   read $CONFIGURATION_TMPDIR
-   RES="Asked"
-fi
-if test "$RES" != "Asked" ; then
-   AC_MSG_RESULT($CONFIGURATION_TMPDIR)
-fi
+dnl HELM version
+AC_SUBST(PACKAGE)
+AC_SUBST(HELM_VERSION)
 
+dnl HELM directories
+AC_SUBST(HELM_BIN_DIR)
 AC_SUBST(HELM_LIB_DIR)
 AC_SUBST(HELM_ETC_DIR)
+AC_SUBST(HELM_SHARE_DIR)
+AC_SUBST(HELM_VAR_DIR)
+AC_SUBST(HELM_TMP_DIR)
+
+dnl HELM download directory
 AC_SUBST(HELM_LIBRARY_DIR)
+
+dnl HELM servers
+AC_SUBST(HELM_SERVERS_FILE)
+
+dnl HELM URIS data-base
+AC_SUBST(HELM_URIS_DBM)
+
+dnl HELM DTDs
+AC_SUBST(HELM_DTD_DIR)
+
+dnl HELM stylesheets
+AC_SUBST(HELM_STYLE_DIR)
+
+dnl HELM customized GtkMathView configuration
 AC_SUBST(HELM_DICTIONARY_PATH)
-AC_SUBST(GTKMATHVIEW_DICTIONARY_PATH)
 AC_SUBST(HELM_FONT_CONFIGURATION_PATH)
+AC_SUBST(GTKMATHVIEW_DICTIONARY_PATH)
 AC_SUBST(GTKMATHVIEW_FONT_CONFIGURATION_PATH)
 AC_SUBST(GTKMATHVIEW_T1_CONFIG_FILE)
-AC_SUBST(CONFIGURATION_HELM_DIR)
-AC_SUBST(CONFIGURATION_DTD_DIR)
-AC_SUBST(CONFIGURATION_SERVERS_FILE)
-AC_SUBST(CONFIGURATION_URIS_DBM)
-AC_SUBST(CONFIGURATION_TMPDIR)
 
 AC_OUTPUT(
-[Makefile
- lib/configuration.pl
- etc/helm-math-engine-configuration.xml
- etc/configuration.xml
-])
+[ Makefile
+  helm-config
+  lib/configuration.pl
+  etc/helm-math-engine-configuration.xml
+  etc/configuration.xml
+  helm_configuration.spec
+], chmod +x helm-config)
index 5079df4009a2e02461f816dd9f85c17eeaa85e6e..ad4e62aba036231a30bd57e13265342b44d05e90 100644 (file)
 <!-- http://cs.unibo.it/helm/.                                         -->
 
 <configuration>
- <helm_dir>@CONFIGURATION_HELM_DIR@</helm_dir>
+ <helm_dir>@HELM_VAR_DIR@</helm_dir>
 
- <dtd_dir>@CONFIGURATION_DTD_DIR@</dtd_dir>
- <servers_file>@CONFIGURATION_SERVERS_FILE@</servers_file>
- <uris_dbm>@CONFIGURATION_URIS_DBM@</uris_dbm>
+ <dtd_dir>@HELM_DTD_DIR@</dtd_dir>
+ <servers_file>@HELM_SERVERS_FILE@</servers_file>
+ <uris_dbm>@HELM_URIS_DBM@</uris_dbm>
  <dest><value-of var="helm_dir"/></dest>
  <indexname>index.txt</indexname>
- <tmpdir>@CONFIGURATION_TMPDIR@</tmpdir>
+ <tmpdir>@HELM_TMP_DIR@</tmpdir>
 
  <helm_url_path>/home/lpadovan/helm/PARSER/examples</helm_url_path>
  <getheader_url>http://localhost/really_very_local/helm/header/getheader.xml</getheader_url>
index 05d1fadd05991e863fe47c451bd383b31e15332c..6d1caf72299152c54c3c4928f93f48a4ffb205aa 100644 (file)
@@ -27,4 +27,5 @@
 <dictionary>
  <operator name="&Union;" form="infix" stretchy="false" lspace="mediummathspace" rspace="mediummathspace"/>
  <operator name="&Intersection;" form="infix" stretchy="false" lspace="mediummathspace" rspace="mediummathspace"/>
+ <operator name="lim" form="prefix" movablelimits="false"/>
 </dictionary>
diff --git a/helm/configuration/helm_configuration-0.0.1-1.spec b/helm/configuration/helm_configuration-0.0.1-1.spec
deleted file mode 100644 (file)
index d9ad640..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-Summary: The configuration files shared by all the tools of project HELM
-Name: helm_configuration
-Version: 0.0.1
-Release: 1
-Copyright: GPL
-URL: http://www.cs.unibo.it/helm
-Packager: Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
-Group: Applications/Publishing
-Source: www.cs.unibo.it:/~lpadovan/mml-widget/helm_configuration-0.0.1-1.tar.gz
-%description
-HELM (Hypertextual Electronic Library of Mathematics) is a project aimed
-at the creation of tools for the development and exploitation of a huge
-distributed library of formal mathematical knowledge. This package holds
-the configuration files shared by all this tools.
-For more information see http://www.cs.unibo.it/helm
-
-%prep
-%setup
-
-%build
-cp config.cache.pkg config.cache
-./configure
-
-%install
-make install
-
-%files
-%doc AUTHORS COPYING ChangeLog NEWS README
-
-/usr/local/lib/helm/configuration.pl
-/usr/local/etc/helm/configuration.dtd
-/usr/local/etc/helm/helm-font-configuration.xml
-/usr/local/etc/helm/configuration.xml
-/usr/local/etc/helm/helm-math-engine-configuration.xml
-/usr/local/etc/helm/helm-dictionary.xml
-%attr(666,root,root) /usr/local/var/helm/servers.txt
-%attr(666,root,root) /usr/local/var/helm/urls_of_uris.db
-
-%dir /usr/local/var/helm/library
-%dir /usr/local/share/helm/dtd
diff --git a/helm/configuration/helm_configuration.spec.in b/helm/configuration/helm_configuration.spec.in
new file mode 100644 (file)
index 0000000..6890c69
--- /dev/null
@@ -0,0 +1,42 @@
+Summary: The configuration files shared by all the tools of project HELM
+Name: @PACKAGE@
+Version: @HELM_VERSION@
+Release: 1
+Copyright: GPL
+URL: http://www.cs.unibo.it/helm
+Packager: Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
+Group: Applications/Publishing
+Source: www.cs.unibo.it:/helm/@PACKAGE@-@HELM_VERSION@-1.tar.gz
+%description
+HELM (Hypertextual Electronic Library of Mathematics) is a project aimed
+at the creation of tools for the development and exploitation of a huge
+distributed library of formal mathematical knowledge. This package holds
+the configuration files shared by all this tools.
+For more information see http://www.cs.unibo.it/helm
+
+%prep
+%setup
+
+%build
+cp config.cache.pkg config.cache
+./configure
+
+%install
+make install
+
+%files
+%doc AUTHORS COPYING ChangeLog NEWS README
+
+/usr/local/bin/helm-config
+/usr/local/lib/helm/configuration.pl
+/usr/local/etc/helm/configuration.dtd
+/usr/local/etc/helm/helm-font-configuration.xml
+/usr/local/etc/helm/configuration.xml
+/usr/local/etc/helm/helm-math-engine-configuration.xml
+/usr/local/etc/helm/helm-dictionary.xml
+%attr(666,root,root) /var/local/helm/servers.txt
+%attr(666,root,root) /var/local/helm/urls_of_uris.db
+
+%dir /var/local/helm/library
+%dir /usr/local/share/helm/dtd
+%dir /usr/local/share/helm/style