I'd like to make a request for an additional feature in the G4 environment. Although the G4 GNUmakefile architecture ($G4INSTALL/config/architecture.gmk and binmake.gmk) are fairly robust, there are times when it's conventient to compile, link, or execute programs outside the toolkit's architecture. It would be convenient to have a command that would return the text of the compiler flags and/or linker flags appropriate for a G4 compilation. An example of this would be the "cernlib" command, which returns the linker options for a supplied set of libraries. For example, here's the result of a sample command on my system: # cernlib mathlib packlib kernlib /usr/local/cern/2001/lib/libmathlib.a \ /usr/local/cern/2001/lib/libpacklib.a \ /usr/local/cern/2001/lib/libkernlib.a \ -lnsl -lcrypt -ldl An even better example is the root-config command in the ROOT distribution, which has different options for compiling or for linking: # root-config --cflags -D_REENTRANT -I/usr/local/root-03.01.06/include # root-config --libs -L/usr/local/root-03.01.06/lib \ -lCore -lCint -lHist -lGraf -lGraf3d -lGpad \ -lTree -lRint -lPostscript -lMatrix -lPhysics \ -lm -ldl -lpthread -rdynamic A "G4config" command might return the appropriate installation-dependent options. The results would depend on, e.g., whether the system was installed with shared libraries, or built with a particular visualization option (since we at Nevis use different options than those at CERN). Such a command does not appear to be difficult to write. If you don't have the resources to spare right now, I offer to create it myself for your review.
Hi Gabriele, this is for you I guess. In general - Shall we try to apply something like scram for configuration management? It would resolve these kinds of issues much more deeply than a script. Many greetings, Hans-Peter.
I think this can be provided through a simple extension to the "Configure" script. To be investigated.
Serguei, can you please have a look at this one ? As I said, it may be solved by simply extending "Configure" script to report about an existing installation.
Currently it's done through "Configure" script with options: -ldlibs : retrieve the list of libraries to link -ldflags : retrieve the list of directories where libraries are placed -cxxflags : retrieve the list of cxxflags -cppflags : retrieve the list of cppflags -incflags : retrieve the list of incflags