From b3940deda8d874f2c73ed64fadfb1de89b8f2353 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 23 Jun 2021 21:32:15 +0200 Subject: Add env vars to configure cmd. --- configure.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.cc b/configure.cc index c19910e..ab2f837 100644 --- a/configure.cc +++ b/configure.cc @@ -233,24 +233,28 @@ int configure(int argc, char* argv[]) auto cc_env = getenv("CC"); if(cc_env) { + cmd_str = std::string("CC=") + cc_env + " " + cmd_str; cc_prog = cc_env; } auto cxx_env = getenv("CXX"); if(cxx_env) { + cmd_str = std::string("CXX=") + cxx_env + " " + cmd_str; cxx_prog = cxx_env; } auto ar_env = getenv("AR"); if(ar_env) { + cmd_str = std::string("AR=") + ar_env + " " + cmd_str; ar_prog = ar_env; } auto ld_env = getenv("LD"); if(ld_env) { + cmd_str = std::string("LD=") + ld_env + " " + cmd_str; ld_prog = ld_env; } @@ -263,6 +267,7 @@ int configure(int argc, char* argv[]) std::string build_ar = locate(build_arch, ar_prog); std::string build_ld = locate(build_arch, ld_prog); + std::cout << "Writing results to: " << configurationFile.string() << "\n"; { std::ofstream istr(configurationFile); istr << "#include \"libcppbuild.h\"\n\n"; -- cgit v1.2.3