[cig-commits] r7309 - cs/autoconf/trunk

leif at geodynamics.org leif at geodynamics.org
Tue Jun 19 18:47:04 PDT 2007


Author: leif
Date: 2007-06-19 18:47:03 -0700 (Tue, 19 Jun 2007)
New Revision: 7309

Modified:
   cs/autoconf/trunk/cit_python.m4
Log:
Added PYTHON_LA_LDFLAGS.  Now that we link Python modules with
"-no-undefined" (in order to tickle libtool into creating DLLs on
Windows), we need to specify the Python library on the module link
line.  But with Apple's Python on Mac OS X, "-lpythonX.X" will not
work; no, sir.  On the Mac, it must be done with "-framework Python".
(If they want to be different, why don't they just pour jell-o down
their pants?)  In order slip this past libtool, it must be given as
"-Wl,-framework,Python", and this is what PYTHON_LA_LDFLAGS contains
on Mac OS X under Apple's framework-ized Python.


Modified: cs/autoconf/trunk/cit_python.m4
===================================================================
--- cs/autoconf/trunk/cit_python.m4	2007-06-20 01:13:56 UTC (rev 7308)
+++ cs/autoconf/trunk/cit_python.m4	2007-06-20 01:47:03 UTC (rev 7309)
@@ -47,6 +47,7 @@
     'LINKFORSHARED',
     'MODLIBS',
     'SYSLIBS',
+    'LA_LDFLAGS',
 )
 if os.name == "nt":
     # We are running under Python for Windows (the real one...
@@ -93,7 +94,9 @@
         # "On Mac OS X frameworks, BLDLIBRARY is blank"
         # See also Issue39.
         framework = "%(PYTHONFRAMEWORKDIR)s/Versions/%(VERSION)s/%(PYTHONFRAMEWORK)s" % vars
-        vars['LINKFORSHARED'] = vars['LINKFORSHARED'].replace(framework, "-framework " + vars.get('PYTHONFRAMEWORK', 'Python'))
+        PYTHONFRAMEWORK = vars.get('PYTHONFRAMEWORK', 'Python'))
+        vars['LINKFORSHARED'] = vars['LINKFORSHARED'].replace(framework, "-framework " + PYTHONFRAMEWORK
+        vars['PYTHON_LA_LDFLAGS'] = "-Wl,-framework,%s" % PYTHONFRAMEWORK
 print 'PYTHON_INCDIR="%s"' % incdir
 for key in keys:
     print 'PYTHON_%s="%s"' % (key, vars.get(key, ''))
@@ -121,6 +124,7 @@
 AC_SUBST([PYTHON_LINKFORSHARED], [$PYTHON_LINKFORSHARED])
 AC_SUBST([PYTHON_MODLIBS], [$PYTHON_MODLIBS])
 AC_SUBST([PYTHON_SYSLIBS], [$PYTHON_SYSLIBS])
+AC_SUBST([PYTHON_LA_LDFLAGS], [$PYTHON_LA_LDFLAGS])
 ])dnl CIT_PYTHON_SYSCONFIG
 
 



More information about the cig-commits mailing list