see http://bugs.python.org/issue1006238 this merges in the following

patch to make cross compilation of the chflags check easier:

 http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/files/python-2.6-chflags-cross.patch?rev=1.1
This commit is contained in:
Gregory P. Smith 2009-11-02 01:37:37 +00:00
parent d8b16ab288
commit bb21389202

View file

@ -2657,8 +2657,7 @@ AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE],
# On Tru64, chflags seems to be present, but calling it will
# exit Python
AC_MSG_CHECKING(for chflags)
AC_CACHE_VAL(ac_cv_have_chflags,
AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
AC_TRY_RUN([[
#include <sys/stat.h>
#include <unistd.h>
@ -2670,16 +2669,16 @@ int main(int argc, char*argv[])
}
]], ac_cv_have_chflags=yes,
ac_cv_have_chflags=no,
ac_cv_have_chflags=no)
)
AC_MSG_RESULT($ac_cv_have_chflags)
if test $ac_cv_have_chflags = yes
then
ac_cv_have_chflags=cross)
])
if test "$ac_cv_have_chflags" = cross ; then
AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
fi
if test "$ac_cv_have_chflags" = yes ; then
AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
fi
AC_MSG_CHECKING(for lchflags)
AC_CACHE_VAL(ac_cv_have_lchflags,
AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
AC_TRY_RUN([[
#include <sys/stat.h>
#include <unistd.h>
@ -2691,11 +2690,12 @@ int main(int argc, char*argv[])
}
]], ac_cv_have_lchflags=yes,
ac_cv_have_lchflags=no,
ac_cv_have_lchflags=no)
)
AC_MSG_RESULT($ac_cv_have_lchflags)
if test $ac_cv_have_lchflags = yes
then
ac_cv_have_lchflags=cross)
])
if test "$ac_cv_have_lchflags" = cross ; then
AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
fi
if test "$ac_cv_have_lchflags" = yes ; then
AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
fi