[Python-checkins] r77863 - in python/branches/release31-maint: configure configure.in

benjamin.peterson python-checkins at python.org
Sat Jan 30 20:51:43 CET 2010


Author: benjamin.peterson
Date: Sat Jan 30 20:51:43 2010
New Revision: 77863

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


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/configure
   python/branches/release31-maint/configure.in

Modified: python/branches/release31-maint/configure
==============================================================================
--- python/branches/release31-maint/configure	(original)
+++ python/branches/release31-maint/configure	Sat Jan 30 20:51:43 2010
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 76821 .
+# From configure.in Revision: 77197 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 3.1.
 #
@@ -17309,12 +17309,11 @@
 # exit Python
 { echo "$as_me:$LINENO: checking for chflags" >&5
 echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+if test "${ac_cv_have_chflags+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_have_chflags=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17322,7 +17321,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+[
 #include <sys/stat.h>
 #include <unistd.h>
 int main(int argc, char*argv[])
@@ -17331,7 +17330,7 @@
     return 1;
   return 0;
 }
-
+]
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -17353,36 +17352,127 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHFLAGS 1
-_ACEOF
-
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  ac_cv_have_chflags=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
+ac_cv_have_chflags=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
+echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
+if test "$ac_cv_have_chflags" = cross ; then
+  { echo "$as_me:$LINENO: checking for chflags" >&5
+echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
+if test "${ac_cv_func_chflags+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define chflags innocuous_chflags
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char chflags (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef chflags
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char chflags ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_chflags || defined __stub___chflags
+choke me
+#endif
+
+int
+main ()
+{
+return chflags ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_chflags=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_chflags=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
+echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
+if test $ac_cv_func_chflags = yes; then
+  ac_cv_have_chflags="yes"
+else
+  ac_cv_have_chflags="no"
+fi
+
+fi
+if test "$ac_cv_have_chflags" = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHFLAGS 1
+_ACEOF
+
+fi
+
 { echo "$as_me:$LINENO: checking for lchflags" >&5
 echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+if test "${ac_cv_have_lchflags+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_have_lchflags=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17390,7 +17480,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+[
 #include <sys/stat.h>
 #include <unistd.h>
 int main(int argc, char*argv[])
@@ -17399,7 +17489,7 @@
     return 1;
   return 0;
 }
-
+]
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -17421,28 +17511,120 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LCHFLAGS 1
-_ACEOF
-
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  ac_cv_have_lchflags=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
+ac_cv_have_lchflags=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
+echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
+if test "$ac_cv_have_lchflags" = cross ; then
+  { echo "$as_me:$LINENO: checking for lchflags" >&5
+echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
+if test "${ac_cv_func_lchflags+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define lchflags innocuous_lchflags
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char lchflags (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef lchflags
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lchflags ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_lchflags || defined __stub___lchflags
+choke me
+#endif
+
+int
+main ()
+{
+return lchflags ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_lchflags=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_lchflags=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
+echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
+if test $ac_cv_func_lchflags = yes; then
+  ac_cv_have_lchflags="yes"
+else
+  ac_cv_have_lchflags="no"
+fi
+
+fi
+if test "$ac_cv_have_lchflags" = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LCHFLAGS 1
+_ACEOF
+
+fi
+
 case $ac_sys_system/$ac_sys_release in
 Darwin/*)
 	_CUR_CFLAGS="${CFLAGS}"

Modified: python/branches/release31-maint/configure.in
==============================================================================
--- python/branches/release31-maint/configure.in	(original)
+++ python/branches/release31-maint/configure.in	Sat Jan 30 20:51:43 2010
@@ -2592,8 +2592,8 @@
 
 # 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 @@
     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 @@
     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


More information about the Python-checkins mailing list