--- python-config.in.ORIG 2013-04-06 03:41:49.000000000 -0400 +++ python-config.in 2013-05-23 14:59:25.000040000 -0400 @@ -45,8 +45,8 @@ print(' '.join(flags)) elif opt in ('--libs', '--ldflags'): - libs = getvar('LIBS').split() + getvar('SYSLIBS').split() - libs.append('-lpython' + pyver + sys.abiflags) + libs ='-lpython' + pyver + sys.abiflags + libs += getvar('LIBS').split() + getvar('SYSLIBS').split() # add the prefix/lib/pythonX.Y/config dir, but only if there is no # shared library in prefix/lib/. if opt == '--ldflags':