| Summary: | Re-running ./Configure does not remember path to XercesC | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Michael Kelsey <kelsey> |
| Component: | config | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED FIXED | ||
| Severity: | trivial | ||
| Priority: | P5 | ||
| Version: | 9.4 | ||
| Hardware: | Apple | ||
| OS: | Mac OS X | ||
|
Description
Michael Kelsey
2011-01-14 00:29:21 CET
I took a closer look at ./Configure, and I think I see the problem. The shell variable which specifies the XercesC location is "g4gdml_xercesc_root" (see env.sh and config.sh), but its value isn't pre-loaded into the variables used internally in the GDML block.
It looks to me as though there should be a "preset" line at the beginning of the GDML block (line 5686 of ./Configure):
with_xercesc_root=$g4gdml_xercesc_root
That would ensure that the "user input" and "search" variables are preloaded with the previously set value, and only if they are empty will the system actually perform the search and prompt.
I've confirmed that this change works as expected for |./Configure -de -build| (the previous value is carried over) and for |./Configure -build| without reading config.sh (the user is prompted as before).
This is now fixed in SVN. I had to use a slightly more involved logic than the suggested patch, which results in the following behaviour: 1) The check for XercesC proceeds as before. The 'standard locations' are common directories in which we might expect to find a XercesC install, specifically: /usr/include /usr/local/include /opt/local/include /sw/include They are 'best guesses' and we can add to them if needed. You can optionally run Configure with ./Configure -build -Dwith_xercesc_root=/where/you/installed/xercesc which with autoenable GDML and use the supplied path to search for Xercesc, falling over to query the user if it fails to find Xercesc in that location. 2) Re-running Configure as ./Configure -build and choosing the default answers will pick up the last remebered value of the Xercesc installation path (it actually also rechecks it). 3) Re-running Configure as ./Configure -build -Dwith_xercesc_root=/some/other/path/to/xercesc and choosing the default answers will in this case *override* the last remembered value for the Xercesc path (and equivalently enable and serach for Xercesc if you previously disabled it). That may all seem rather convoluted, but I think it covers all the cases - at least it gives the originally requested functionality (plus a bit extra ;-)) Ben |