Ticket #14 (closed defect: fixed)
Need to embed tinyows in the fgs environment
| Reported by: | nsavard | Owned by: | nsavard |
|---|---|---|---|
| Priority: | blocker | Version: | SVN |
| Keywords: | fgs,configure | Cc: | adube@… |
| Triage Stage: | Unreviewed | State of Approval: | Proposed |
| Attached Patches: | Code | Complexity: | Unknown |
| Compatibility: | Unknown | Specification: | Unnecessary |
Description
To be able to build tinyows as a fgs package we need to specify the libxml2 and postgresql location in the fgs built environment. For that configure.in and Makefile.in have to be modified to allow a user to set the path to these headers and library directories.
To specify the path to tinyows configuration and schema files during an fgs installation, we have to modify the following files:
src/ows_define.h.in src/ows/ows.c src/ows/ows_request.c src/ows_api.h
The best approach here is to create two environment variables. TINYOWS_SCHEMA_DIR will be the path to the schema files and TINYOWS_CONFIG_FILE will point out to the XML configuration file. Each constant define in ows_define.h.in for the schema files have been split in two components: the complete path and the end of the path corresponding to the XSD file.
I created two functions named "ows_get_schema_path" and "ows_get_config_path" in ows.c. Each function first checks if the environment variable is set. If this is the case the value of this variable is assigned to the return variable. If the environment variable is not set, the value of the constant, defined in ows_define.h.in, pointing to the full path of the file (config.xml or xxx.xsd) is used.
These functions are called in ows_usage(), main() and ows_request_check().