summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-07 14:52:42 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-07 14:52:42 (GMT)
commita300007c6e047bfdd7ab8f9bef35c0929d7dbbc8 (patch)
treeb82fed94f912ef39470f4a3b1e576d30daf8190b /configure.in
parent19651369e4f195633aa4be97ce8ccdb97289af5f (diff)
downloadcpython-a300007c6e047bfdd7ab8f9bef35c0929d7dbbc8.zip
cpython-a300007c6e047bfdd7ab8f9bef35c0929d7dbbc8.tar.gz
cpython-a300007c6e047bfdd7ab8f9bef35c0929d7dbbc8.tar.bz2
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 a518374..3e82da2 100644
--- a/configure.in
+++ b/configure.in
@@ -2642,13 +2642,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([[