summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-30 19:51:43 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-30 19:51:43 (GMT)
commit08fd672e67829b3dedf326467d5dbb73e054e8d7 (patch)
treedbf7609ddbe20db93bffe37af60e42c3a22f2110 /configure.in
parentca300b8eb0705f6c18d20aa0c9ff81dd0eed6bdd (diff)
downloadcpython-08fd672e67829b3dedf326467d5dbb73e054e8d7.zip
cpython-08fd672e67829b3dedf326467d5dbb73e054e8d7.tar.gz
cpython-08fd672e67829b3dedf326467d5dbb73e054e8d7.tar.bz2
Merged revisions 77862 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77862 | benjamin.peterson | 2010-01-30 13:36:43 -0600 (Sat, 30 Jan 2010) | 12 lines Merged revisions 76050 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76050 | gregory.p.smith | 2009-11-01 19:37:37 -0600 (Sun, 01 Nov 2009) | 5 lines 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 ........ ................
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in36
1 files changed, 24 insertions, 12 deletions
diff --git a/configure.in b/configure.in
index f5fe923..09fff18 100644
--- a/configure.in
+++ b/configure.in
@@ -2592,8 +2592,8 @@ 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_TRY_RUN([
+AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
+AC_TRY_RUN([[
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char*argv[])
@@ -2602,13 +2602,19 @@ int main(int argc, char*argv[])
return 1;
return 0;
}
-],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
-)
+]], ac_cv_have_chflags=yes,
+ ac_cv_have_chflags=no,
+ 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_TRY_RUN([
+AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
+AC_TRY_RUN([[
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char*argv[])
@@ -2617,10 +2623,16 @@ int main(int argc, char*argv[])
return 1;
return 0;
}
-],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
-)
+]], ac_cv_have_lchflags=yes,
+ ac_cv_have_lchflags=no,
+ 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
dnl Check if system zlib has *Copy() functions
dnl