]> granicus.if.org Git - python/commitdiff
see http://bugs.python.org/issue1006238 this merges in the following
authorGregory P. Smith <greg@mad-scientist.com>
Mon, 2 Nov 2009 01:37:37 +0000 (01:37 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Mon, 2 Nov 2009 01:37:37 +0000 (01:37 +0000)
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

configure.in

index fe6ab50cd0321b1bd2f958248b0d43ac31d3d857..58a18d35b3f79ea21945986ff57b11153c552a9c 100644 (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