summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-30 19:51:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-30 19:51:50 (GMT)
commitb453f0babbea799268127d671157120f3f643d37 (patch)
treed0637c1a1d897d0bff6eca2d5d131578fc28cbbe /configure.in
parent8688f014e9add48096c7e19672ec2205e64fead2 (diff)
downloadcpython-b453f0babbea799268127d671157120f3f643d37.zip
cpython-b453f0babbea799268127d671157120f3f643d37.tar.gz
cpython-b453f0babbea799268127d671157120f3f643d37.tar.bz2
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 6b9d00c..8e9eeb8 100644
--- a/configure.in
+++ b/configure.in
@@ -2656,8 +2656,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[])
@@ -2666,13 +2666,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[])
@@ -2681,10 +2687,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