|
Line 0
Link Here
|
|
|
1 |
--- configure.ac.orig Thu Oct 18 21:12:46 2012 +1100 |
| 2 |
+++ configure.ac Thu Oct 18 21:14:28 2012 +1100 |
| 3 |
@@ -75,7 +75,15 @@ |
| 4 |
|
| 5 |
PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \ |
| 6 |
from distutils import sysconfig; \ |
| 7 |
- stdout.write((sysconfig.get_config_var("VERSION")))'` |
| 8 |
+ stdout.write(sysconfig.get_config_var("VERSION"))'` |
| 9 |
+ |
| 10 |
+PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \ |
| 11 |
+ from distutils import sysconfig; \ |
| 12 |
+ stdout.write(sysconfig.get_config_var("LDVERSION") or "")'` |
| 13 |
+ |
| 14 |
+if test x"${PYTHON_LDVERSION}" = x""; then |
| 15 |
+ PYTHON_LDVERSION=${PYTHON_VERSION} |
| 16 |
+fi |
| 17 |
|
| 18 |
CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \ |
| 19 |
from distutils import sysconfig; \ |
| 20 |
@@ -113,12 +121,28 @@ |
| 21 |
from distutils import sysconfig; \ |
| 22 |
stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'` |
| 23 |
|
| 24 |
+if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then |
| 25 |
+ PYTHONCFGDIR="${PYTHONCFGDIR}-${PYTHON_LDVERSION}" |
| 26 |
+fi |
| 27 |
+ |
| 28 |
if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \ |
| 29 |
"${ENABLE_FRAMEWORK}" != "yes"; then |
| 30 |
LDFLAGS1="-L${PYTHONLIBDIR}" |
| 31 |
LDFLAGS2="-L${PYTHONCFGDIR}" |
| 32 |
|
| 33 |
- LDLIBS1="-lpython${PYTHON_VERSION}" |
| 34 |
+ LDLIBS1="-lpython${PYTHON_LDVERSION}" |
| 35 |
+ |
| 36 |
+ # MacOS X seems to be broken and doesn't use ABIFLAGS suffix |
| 37 |
+ # so add a check to try and work out what we need to do. |
| 38 |
+ |
| 39 |
+ if test -f "${PYTHONLIBDIR}/libpython${PYTHON_VERSION}.a"; then |
| 40 |
+ LDLIBS1="-lpython${PYTHON_VERSION}" |
| 41 |
+ fi |
| 42 |
+ |
| 43 |
+ if test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then |
| 44 |
+ LDLIBS1="-lpython${PYTHON_VERSION}" |
| 45 |
+ fi |
| 46 |
+ |
| 47 |
LDLIBS2=`${PYTHON} -c 'from sys import stdout; \ |
| 48 |
from distutils import sysconfig; \ |
| 49 |
stdout.write(sysconfig.get_config_var("LIBS"))'` |
| 50 |
|