summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-07 14:55:24 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-07 14:55:24 (GMT)
commit857298100b9a5fa5bbcafb2ff578418bc6750e58 (patch)
tree395cb55b506ec1953338bcfb9dd394258939ec49 /configure.in
parente80513c207e7f24bfcb5bdd5113c92ef63f0c632 (diff)
downloadcpython-857298100b9a5fa5bbcafb2ff578418bc6750e58.zip
cpython-857298100b9a5fa5bbcafb2ff578418bc6750e58.tar.gz
cpython-857298100b9a5fa5bbcafb2ff578418bc6750e58.tar.bz2
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é. ........
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index cbcbbf0..1d13b18 100644
--- a/configure.in
+++ b/configure.in
@@ -2775,13 +2775,27 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
])
AC_MSG_CHECKING(for flock)
+have_flock=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/file.h>
]], [[void* p = flock]])],
[AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)
+ have_flock=yes
])
+AC_MSG_RESULT($have_flock)
+
+if test "$have_flock" = yes ; then
+ AC_MSG_CHECKING(if flock requires additional libraries.)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/file.h>
+ ]], [[void *p = flock; flock(0, 0)]])],
+ [AC_MSG_RESULT(no)],
+ [AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(bsd,flock, [
+ AC_DEFINE(FLOCK_NEEDS_LIBBSD, 1, Define if flock needs to be linked with bsd library.)
+ ])
+ ])
+fi
AC_MSG_CHECKING(for getpagesize)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[