Make sure the 'g++ -print-file-name' code does not break if gcc doesn't know anything about the libstdc++.so file.

This commit is contained in:
Gustavo J. A. M. Carneiro
2009-04-21 10:55:07 +01:00
parent 7004b72781
commit 168515d842

View File

@@ -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')