From 168515d84240a4fe0d7583f2dcca51d4ea9e3cdc Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 21 Apr 2009 10:55:07 +0100 Subject: [PATCH] Make sure the 'g++ -print-file-name' code does not break if gcc doesn't know anything about the libstdc++.so file. --- wscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index bcbc00864..255804d93 100644 --- a/wscript +++ b/wscript @@ -253,9 +253,10 @@ def configure(conf): env.append_value("LINKFLAGS", "-Wl,--enable-auto-import") cxx, = env['CXX'] p = subprocess.Popen([cxx, '-print-file-name=libstdc++.so'], stdout=subprocess.PIPE) - libstdcxx = p.stdout.read().strip() + libstdcxx_location = os.path.dirname(p.stdout.read().strip()) p.wait() - conf.env.append_value('NS3_MODULE_PATH', os.path.dirname(libstdcxx)) + if libstdcxx_location: + conf.env.append_value('NS3_MODULE_PATH', libstdcxx_location) conf.sub_config('src') conf.sub_config('utils')