]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Drop usage of test -e in configure as it is not portable.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Jul 2006 14:11:03 +0000 (14:11 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Jul 2006 14:11:03 +0000 (14:11 +0000)
Fixes #1439538

Misc/NEWS
configure
configure.in

index 87bc4a3e774f571a556b4f5c7e5b07cefdc46408..4fdf27af259405a7e85eb1d04725a02373340b8f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -142,6 +142,8 @@ Tools/Demos
 Build
 -----
 
+- Bug #1439538: Drop usage of test -e in configure as it is not portable.
+
 - Bug #1502728: Correctly link against librt library on HP-UX.
 
 - OpenBSD 3.9 is now supported.
index 701ac82fc65a0d4525075a6d0d55e1dd8c6b80c3..d106c82c596a3fea6c2c28f42db1928244ef03ec 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 46011 .
+# From configure.in Revision: 46609 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for python 2.4.
 #
 
 echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
 echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
-
-if test -e /dev/ptmx
-then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if test "${ac_cv_file__dev_ptmx+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/dev/ptmx"; then
+  ac_cv_file__dev_ptmx=yes
+else
+  ac_cv_file__dev_ptmx=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__dev_ptmx" >&5
+echo "${ECHO_T}$ac_cv_file__dev_ptmx" >&6
+if test $ac_cv_file__dev_ptmx = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DEV_PTMX 1
 _ACEOF
 
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
 fi
 
 echo "$as_me:$LINENO: checking for /dev/ptc" >&5
 echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
-
-if test -e /dev/ptc
-then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if test "${ac_cv_file__dev_ptc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/dev/ptc"; then
+  ac_cv_file__dev_ptc=yes
+else
+  ac_cv_file__dev_ptc=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__dev_ptc" >&5
+echo "${ECHO_T}$ac_cv_file__dev_ptc" >&6
+if test $ac_cv_file__dev_ptc = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DEV_PTC 1
 _ACEOF
 
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
 fi
 
+
 echo "$as_me:$LINENO: checking for socklen_t" >&5
 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
 if test "${ac_cv_type_socklen_t+set}" = set; then
index 4a75be89ad88fb5141ca260f7a10cb1172b0ad42..bf3c4bcebdfaeed1c5e29062cd7c8e73f3b2fa3b 100644 (file)
@@ -3116,27 +3116,8 @@ then
   [Define if WINDOW in curses.h offers a field _flags.])
 fi
 
-AC_MSG_CHECKING(for /dev/ptmx)
-
-if test -e /dev/ptmx
-then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_DEV_PTMX, 1,
-  [Define if we have /dev/ptmx.])
-else
-  AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING(for /dev/ptc)
-
-if test -e /dev/ptc
-then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_DEV_PTC, 1,
-  [Define if we have /dev/ptc.])
-else
-  AC_MSG_RESULT(no)
-fi
+AC_CHECK_FILE(/dev/ptmx, AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if we have /dev/ptmx.]))
+AC_CHECK_FILE(/dev/ptc, AC_DEFINE(HAVE_DEV_PTC, 1, [Define if we have /dev/ptc.]))
 
 AC_CHECK_TYPE(socklen_t,,
   AC_DEFINE(socklen_t,int,