mirror of https://github.com/python/cpython
Merged revisions 84674 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84674 | antoine.pitrou | 2010-09-10 20:39:00 +0200 (ven., 10 sept. 2010) | 3 lines Followup to #4026: better patch for flock detection. ........
This commit is contained in:
parent
0ea31a9355
commit
5ea2828c66
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Revision: 84367 .
|
# From configure.in Revision: 84586 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.65 for python 3.1.
|
# Generated by GNU Autoconf 2.65 for python 3.1.
|
||||||
#
|
#
|
||||||
|
@ -9408,59 +9408,44 @@ $as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
|
||||||
$as_echo_n "checking for flock... " >&6; }
|
$as_echo_n "checking for flock declaration... " >&6; }
|
||||||
have_flock=no
|
if test "${ac_cv_flock_decl+set}" = set; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
#include "confdefs.h"
|
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
void* p = flock
|
void* p = flock
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
ac_cv_flock_decl=yes
|
||||||
|
else
|
||||||
$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
|
ac_cv_flock_decl=no
|
||||||
|
|
||||||
have_flock=yes
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_flock" >&5
|
|
||||||
$as_echo "$have_flock" >&6; }
|
|
||||||
|
|
||||||
if test "$have_flock" = yes ; then
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if flock requires additional libraries." >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
|
||||||
$as_echo_n "checking if flock requires additional libraries.... " >&6; }
|
$as_echo "$ac_cv_flock_decl" >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
if test "x${ac_cv_flock_decl}" = xyes; then
|
||||||
/* end confdefs.h. */
|
for ac_func in flock
|
||||||
|
do :
|
||||||
#include "confdefs.h"
|
ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
|
||||||
#include <sys/file.h>
|
if test "x$ac_cv_func_flock" = x""yes; then :
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
int
|
#define HAVE_FLOCK 1
|
||||||
main ()
|
|
||||||
{
|
|
||||||
flock(0, 0)
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
else
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
else
|
||||||
$as_echo "yes" >&6; }
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
|
||||||
$as_echo_n "checking for flock in -lbsd... " >&6; }
|
$as_echo_n "checking for flock in -lbsd... " >&6; }
|
||||||
if test "${ac_cv_lib_bsd_flock+set}" = set; then :
|
if test "${ac_cv_lib_bsd_flock+set}" = set; then :
|
||||||
|
@ -9498,6 +9483,7 @@ fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
|
||||||
$as_echo "$ac_cv_lib_bsd_flock" >&6; }
|
$as_echo "$ac_cv_lib_bsd_flock" >&6; }
|
||||||
if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
|
if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
|
||||||
|
$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
|
$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
|
||||||
|
@ -9507,8 +9493,8 @@ fi
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
done
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
|
||||||
|
|
34
configure.in
34
configure.in
|
@ -2641,29 +2641,23 @@ AC_TRY_COMPILE([
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for flock)
|
AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
|
||||||
have_flock=no
|
[AC_COMPILE_IFELSE(
|
||||||
AC_TRY_COMPILE([
|
[AC_LANG_PROGRAM(
|
||||||
#include "confdefs.h"
|
[#include <sys/file.h>],
|
||||||
#include <sys/file.h>
|
[void* p = flock]
|
||||||
], void* p = flock, [
|
)],
|
||||||
AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
|
[ac_cv_flock_decl=yes],
|
||||||
have_flock=yes
|
[ac_cv_flock_decl=no]
|
||||||
|
)
|
||||||
])
|
])
|
||||||
AC_MSG_RESULT($have_flock)
|
if test "x${ac_cv_flock_decl}" = xyes; then
|
||||||
|
AC_CHECK_FUNCS(flock,,
|
||||||
if test "$have_flock" = yes ; then
|
AC_CHECK_LIB(bsd,flock,
|
||||||
AC_MSG_CHECKING(if flock requires additional libraries.)
|
[AC_DEFINE(HAVE_FLOCK)
|
||||||
AC_TRY_LINK([
|
|
||||||
#include "confdefs.h"
|
|
||||||
#include <sys/file.h>
|
|
||||||
], [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.)
|
AC_DEFINE(FLOCK_NEEDS_LIBBSD, 1, Define if flock needs to be linked with bsd library.)
|
||||||
])
|
])
|
||||||
])
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for getpagesize)
|
AC_MSG_CHECKING(for getpagesize)
|
||||||
|
|
Loading…
Reference in New Issue