diff options
| author | Georg Brandl <georg@python.org> | 2007-03-31 18:58:21 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2007-03-31 18:58:21 +0000 |
| commit | 48642d4a0a168c8ae0f0e455afc20738cc26cea8 (patch) | |
| tree | d3a448029684114a665ee049bf91a790e435938f /Misc/python-config.in | |
| parent | 65407fb7344d4ecdeecb8733831365c23a713ab6 (diff) | |
| download | cpython-git-48642d4a0a168c8ae0f0e455afc20738cc26cea8.tar.gz | |
Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
(backport from rev. 54634)
Diffstat (limited to 'Misc/python-config.in')
| -rw-r--r-- | Misc/python-config.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Misc/python-config.in b/Misc/python-config.in index e0215a2695..9ac44146d4 100644 --- a/Misc/python-config.in +++ b/Misc/python-config.in @@ -45,7 +45,9 @@ elif opt in ('--includes', '--cflags'): elif opt in ('--libs', '--ldflags'): libs = getvar('LIBS').split() + getvar('SYSLIBS').split() libs.append('-lpython'+pyver) - if opt == '--ldflags': + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) print ' '.join(libs) |
