From 857298100b9a5fa5bbcafb2ff578418bc6750e58 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 7 Sep 2010 14:55:24 +0000 Subject: Merged revisions 84584 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ 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é. ........ --- configure.in | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index cbcbbf019c..1d13b18c17 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 ]], [[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 + ]], [[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([[ -- cgit v1.2.1