From f0ed73efe485ebb580e05b7c10fde904da34e052 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Thu, 21 Dec 2000 14:11:27 +0000 Subject: [PATCH] Using autoconf --- helm/configuration/AUTHORS | 0 helm/configuration/ChangeLog | 0 helm/configuration/Makefile.in | 8 ++++ helm/configuration/NEWS | 0 helm/configuration/README | 0 helm/configuration/configure.in | 21 ++++++++++ helm/configuration/etc/configuration.dtd | 34 ++++++++++++++++ helm/configuration/etc/configuration.xml | 22 ++++++++++ helm/configuration/etc/helm-dictionary.xml | 4 ++ .../etc/helm-font-configuration.xml | 35 ++++++++++++++++ .../etc/helm-math-engine-configuration.xml | 37 +++++++++++++++++ helm/configuration/lib/configuration.pl | 40 +++++++++++++++++++ 12 files changed, 201 insertions(+) create mode 100644 helm/configuration/AUTHORS create mode 100644 helm/configuration/ChangeLog create mode 100644 helm/configuration/Makefile.in create mode 100644 helm/configuration/NEWS create mode 100644 helm/configuration/README create mode 100644 helm/configuration/configure.in create mode 100644 helm/configuration/etc/configuration.dtd create mode 100644 helm/configuration/etc/configuration.xml create mode 100644 helm/configuration/etc/helm-dictionary.xml create mode 100644 helm/configuration/etc/helm-font-configuration.xml create mode 100644 helm/configuration/etc/helm-math-engine-configuration.xml create mode 100644 helm/configuration/lib/configuration.pl diff --git a/helm/configuration/AUTHORS b/helm/configuration/AUTHORS new file mode 100644 index 000000000..e69de29bb diff --git a/helm/configuration/ChangeLog b/helm/configuration/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/helm/configuration/Makefile.in b/helm/configuration/Makefile.in new file mode 100644 index 000000000..597add54b --- /dev/null +++ b/helm/configuration/Makefile.in @@ -0,0 +1,8 @@ +HELM_LIB_DIR=@HELM_LIB_DIR@ +HELM_ETC_DIR=@HELM_ETC_DIR@ + +install: + cp lib/configuration.pl $(HELM_LIB_DIR) + cp etc/* $(HELM_ETC_DIR) + +.PHONY: install diff --git a/helm/configuration/NEWS b/helm/configuration/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/helm/configuration/README b/helm/configuration/README new file mode 100644 index 000000000..e69de29bb diff --git a/helm/configuration/configure.in b/helm/configuration/configure.in new file mode 100644 index 000000000..9a4d94cfd --- /dev/null +++ b/helm/configuration/configure.in @@ -0,0 +1,21 @@ +AC_INIT(etc/configuration.xml) + +if test "x$prefix" != xNONE; then + RESOLVED_PREFIX=$prefix +else + RESOLVED_PREFIX=$ac_default_prefix +fi + +if test "x$exec_prefix" != xNONE; then + RESOLVED_EXEC_PREFIX=$exec_prefix +else + RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX +fi + +HELM_LIB_DIR=$RESOLVED_EXEC_PREFIX/lib/helm +HELM_ETC_DIR=$RESOLVED_PREFIX/etc/helm + +AC_SUBST(HELM_LIB_DIR) +AC_SUBST(HELM_ETC_DIR) + +AC_OUTPUT([Makefile]) diff --git a/helm/configuration/etc/configuration.dtd b/helm/configuration/etc/configuration.dtd new file mode 100644 index 000000000..2a2428d1d --- /dev/null +++ b/helm/configuration/etc/configuration.dtd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/helm/configuration/etc/configuration.xml b/helm/configuration/etc/configuration.xml new file mode 100644 index 000000000..29672d5e1 --- /dev/null +++ b/helm/configuration/etc/configuration.xml @@ -0,0 +1,22 @@ + + + + + /home/pauillac/coq3/sacerdot/HELM/V6.2/examples + + /home/pauillac/coq3/sacerdot/HELM/dtd + /home/pauillac/coq3/sacerdot/HELM/V6.2/servers.txt + /home/pauillac/coq3/sacerdot/HELM/V6.2/urls_of_uris + + index.txt + /tmp + + /home/lpadovan/helm/PARSER/examples + http://localhost/really_very_local/helm/header/getheader.xml + http://localhost/really_very_local/helm/style/ + http://localhost/cgi-bin/helm/webeq.pl + http://localhost/cgi-bin/helm/webeqp.pl + http://localhost/cgi-bin/helm/use_webeqp.pl + ?baseurl=&stylesheet1=rootcontent.xsl&stylesheet2=content_to_html.xsl&xmluri= + http://localhost:8081/get?uri= + diff --git a/helm/configuration/etc/helm-dictionary.xml b/helm/configuration/etc/helm-dictionary.xml new file mode 100644 index 000000000..a81bb886b --- /dev/null +++ b/helm/configuration/etc/helm-dictionary.xml @@ -0,0 +1,4 @@ + + + + diff --git a/helm/configuration/etc/helm-font-configuration.xml b/helm/configuration/etc/helm-font-configuration.xml new file mode 100644 index 000000000..19da22c6b --- /dev/null +++ b/helm/configuration/etc/helm-font-configuration.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + diff --git a/helm/configuration/etc/helm-math-engine-configuration.xml b/helm/configuration/etc/helm-math-engine-configuration.xml new file mode 100644 index 000000000..560bd3be3 --- /dev/null +++ b/helm/configuration/etc/helm-math-engine-configuration.xml @@ -0,0 +1,37 @@ + + + + + + /projects/helm/V7/phd/local/etc/helm/helm-dictionary.xml + /projects/helm/local/share/gtkmathview/dictionary.xml + /projects/helm/V7/phd/local/etc/helm/helm-font-configuration.xml + /projects/helm/local/share/gtkmathview/font-configuration.xml + /projects/helm/local/share/gtkmathview/t1.config + + + + + diff --git a/helm/configuration/lib/configuration.pl b/helm/configuration/lib/configuration.pl new file mode 100644 index 000000000..e88d8fbe7 --- /dev/null +++ b/helm/configuration/lib/configuration.pl @@ -0,0 +1,40 @@ +use XML::Parser; + +use Env; +my $HELM_CONFIGURATION_PREFIX = $ENV{"HELM_CONFIGURATION_PREFIX"}; +# this should be the only fixed constant +if (defined ($HELM_CONFIGURATION_PREFIX) { + $configuration_file = + $HELM_CONFIGURATION_PREFIX."/etc/helm/configuration.xml"; +} + +$parser = new XML::Parser(Handlers => {Start => \&handle_start, + End => \&handle_end, + Char => \&handle_char}); + + +$parser->parsefile($configuration_file, ErrorContext => 3); + + +sub handle_start +{ + if ($_[1] eq "value-of") { + $$varname .= ${$_[3]}; + } elsif ($_[1] ne "configuration") { + $varname = $_[1]; + } +} + +sub handle_end +{ + if ($_[1] ne "value-of" && $_[1] ne "configuration") { + # Next line for debugging only: + # print "OK: #$_[1]# := #$$varname#\n"; + $varname = undef; + } +} + +sub handle_char +{ + $$varname .= $_[1]; +} -- 2.39.2