[Python-checkins] r76050 - python/trunk/configure.in

gregory.p.smith python-checkins at python.org
Mon Nov 2 02:37:38 CET 2009


Author: gregory.p.smith
Date: Mon Nov  2 02:37:37 2009
New Revision: 76050

Log:
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


Modified:
   python/trunk/configure.in

Modified: python/trunk/configure.in
==============================================================================
--- python/trunk/configure.in	(original)
+++ python/trunk/configure.in	Mon Nov  2 02:37:37 2009
@@ -2657,8 +2657,7 @@
 
 # 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 @@
 }
 ]], 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 @@
 }
 ]], 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
 


More information about the Python-checkins mailing list