- // hard-wire CINTSYSDIR, inherited from configure, if it is not set
- setenv("CINTSYSDIR", CINTSYSDIR.c_str(), 0);
+ // hard-wire CINTSYSDIR, inherited from configure, but only if it has
+ // been set therein (to allow for system-wide installations of cint)
+ // and without overriding it if the user has specified it.
+ if (CINTSYSDIR != "@CINTSYSDIR@")
+ setenv("CINTSYSDIR", CINTSYSDIR.c_str(), 0);