]> git.tdb.fi Git - builder.git/blobdiff - source/builder.cpp
Let PackageManager take care of PKG_CONFIG_PATH
[builder.git] / source / builder.cpp
index 122e1b901e011d6abafd8ea86789b86e66bb628e..ff2f95257b22b98404b2061bb5aab01b7b6aadff 100644 (file)
@@ -1,5 +1,4 @@
 #include <set>
-#include <cstdlib>
 #include <msp/core/getopt.h>
 #include <msp/datafile/parser.h>
 #include <msp/fs/dir.h>
@@ -230,25 +229,6 @@ Builder::~Builder()
 
 int Builder::main()
 {
-       if(prefix.str()!="/usr")
-       {
-               FS::Path pcdir = prefix/"lib"/"pkgconfig";
-               if(const char *pcp = getenv("PKG_CONFIG_PATH"))
-               {
-                       vector<string> path = split(pcp, ':');
-                       bool found = false;
-                       for(vector<string>::const_iterator i=path.begin(); (!found && i!=path.end()); ++i)
-                               found = (*i==pcdir.str());
-                       if(!found)
-                       {
-                               path.push_back(pcdir.str());
-                               setenv("PKG_CONFIG_PATH", join(path.begin(), path.end(), ":").c_str(), true);
-                       }
-               }
-               else
-                       setenv("PKG_CONFIG_PATH", pcdir.str().c_str(), true);
-       }
-
        if(load_build_file(cwd/build_file))
        {
                if(help)