The environment setup scripts geant4-9.4.0.(c)sh do not set all the required variables for building Geant4 applications. For instance, G4LIB_BUILD_SHARED is not set and this prevents building applications with shared libraries.
Fixed in tag cmake-V09-04-05.