diff setup.py @ 64522:c2199175ada8 3.1

Merged revisions 84584 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84584 | antoine.pitrou | 2010-09-07 16:52:42 +0200 (mar., 07 sept. 2010) | 4 lines Issue #4026: Make the fcntl extension build under AIX. Patch by Sébastien Sablé. ........
author Antoine Pitrou <solipsis@pitrou.net>
date Tue, 07 Sep 2010 14:58:50 +0000
parents ad6c8e228712
children 6543fa4b1458
line wrap: on
line diff
--- a/setup.py	Mon Sep 06 22:18:20 2010 +0000
+++ b/setup.py	Tue Sep 07 14:58:50 2010 +0000
@@ -489,7 +489,11 @@
         # supported...)
 
         # fcntl(2) and ioctl(2)
-        exts.append( Extension('fcntl', ['fcntlmodule.c']) )
+        libs = []
+        if (config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)):
+            # May be necessary on AIX for flock function
+            libs = ['bsd']
+        exts.append( Extension('fcntl', ['fcntlmodule.c'], libraries=libs) )
         if platform not in ['mac']:
             # pwd(3)
             exts.append( Extension('pwd', ['pwdmodule.c']) )