Changeset 20075


Ignore:
Timestamp:
04/12/21 20:34:36 (2 months ago)
Author:
tbretz
Message:
Allow for a fallback solution to look for fact++.rc, which is the syscondir.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Configuration.cc

    r19805 r20075  
    886886//!  - (5)  Read and parse the global configuration file, which is compiled
    887887//!         from the path corresponding to the argument given in the
    888 //!         constructor + "/fact++.rc", unrecognized options are always
     888//!         constructor + "/fact++.rc" (or sysconf-prefix + fact++.rc
     889//!         if not found), unrecognized options are always
    889890//!         allowed. Note that in contradiction to all other options
    890891//!         the options in this file are not checked at all. Hence,
     
    10491050
    10501051    const boost::filesystem::path path(GetName());
    1051     const string globalfile = (path.parent_path()/boost::filesystem::path("fact++.rc")).string();
    1052 
     1052    string globalfile = (path.parent_path()/boost::filesystem::path("fact++.rc")).string();
     1053
     1054#ifdef PACKAGE_INSTALL_SYSCONFDIR
     1055    if (!boost::filesystem::exists(globalfile))
     1056        globalfile = (boost::filesystem::path(PACKAGE_INSTALL_SYSCONFDIR)/boost::filesystem::path("fact++.rc")).string();
     1057#endif
    10531058
    10541059    errno = 0;
Note: See TracChangeset for help on using the changeset viewer.