summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2012-06-30 17:28:16 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2012-06-30 17:28:16 (GMT)
commitb457b9be4deac2460cb8ac741af6a723d6cb4f88 (patch)
tree4355de4795f23a93c495427c0c6dce9ed2c810e7 /configure.ac
parent536f1b909cd6ffd98186c3b604a55c1a42b8f9ce (diff)
downloadcpython-b457b9be4deac2460cb8ac741af6a723d6cb4f88.zip
cpython-b457b9be4deac2460cb8ac741af6a723d6cb4f88.tar.gz
cpython-b457b9be4deac2460cb8ac741af6a723d6cb4f88.tar.bz2
- Issue #3754: Fix /dev/ptmx, /dev/ptc file checks for cross builds,
require values set in CONFIG_SITE.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 21 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 00ed902..c0ed024 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4212,26 +4212,31 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=resizeterm
[AC_MSG_RESULT(no)]
)
-AC_MSG_CHECKING(for /dev/ptmx)
+AC_MSG_NOTICE([checking for device files])
+
+dnl NOTE: Inform user how to proceed with files when cross compiling.
+if test "x$cross_compiling" = xyes; then
+ if test "${ac_cv_file__dev_ptmx+set}" != set; then
+ AC_MSG_CHECKING([for /dev/ptmx])
+ AC_MSG_RESULT([not set])
+ AC_MSG_ERROR([set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling])
+ fi
+ if test "${ac_cv_file__dev_ptc+set}" != set; then
+ AC_MSG_CHECKING([for /dev/ptc])
+ AC_MSG_RESULT([not set])
+ AC_MSG_ERROR([set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling])
+ fi
+fi
-if test -r /dev/ptmx
-then
- AC_MSG_RESULT(yes)
+AC_CHECK_FILE(/dev/ptmx, [], [])
+if test "x$ac_cv_file__dev_ptmx" = xyes; then
AC_DEFINE(HAVE_DEV_PTMX, 1,
- [Define if we have /dev/ptmx.])
-else
- AC_MSG_RESULT(no)
+ [Define to 1 if you have the /dev/ptmx device file.])
fi
-
-AC_MSG_CHECKING(for /dev/ptc)
-
-if test -r /dev/ptc
-then
- AC_MSG_RESULT(yes)
+AC_CHECK_FILE(/dev/ptc, [], [])
+if test "x$ac_cv_file__dev_ptc" = xyes; then
AC_DEFINE(HAVE_DEV_PTC, 1,
- [Define if we have /dev/ptc.])
-else
- AC_MSG_RESULT(no)
+ [Define to 1 if you have the /dev/ptc device file.])
fi
if test "$have_long_long" = yes