diff -r 251c5b4bb05d configure.ac --- a/configure.ac Sat Apr 20 21:28:49 2013 -0700 +++ b/configure.ac Tue Apr 23 01:06:23 2013 +0100 @@ -4311,30 +4311,39 @@ 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 - -AC_CHECK_FILE(/dev/ptmx, [], []) -if test "x$ac_cv_file__dev_ptmx" = xyes; then - AC_DEFINE(HAVE_DEV_PTMX, 1, - [Define to 1 if you have the /dev/ptmx device file.]) -fi -AC_CHECK_FILE(/dev/ptc, [], []) -if test "x$ac_cv_file__dev_ptc" = xyes; then - AC_DEFINE(HAVE_DEV_PTC, 1, - [Define to 1 if you have the /dev/ptc device file.]) -fi +dnl NOTE: User must decide how to proceed with files when cross compiling. +AC_ARG_ENABLE(ptmx, + AS_HELP_STRING([--enable-ptmx],[enable use of /dev/ptmx device file]), +[], +[ + if test "x$cross_compiling" = xyes; then + AC_MSG_CHECKING([for /dev/ptmx]) + AC_MSG_RESULT([not set]) + AC_MSG_ERROR([in cross compiling needs --{enable|disable}-ptmx flag]) + fi + AC_CHECK_FILE(/dev/ptmx, [enable_ptmx=yes], [enable_ptmx=no]) +]) +if test "x$enable_ptmx" = xyes; then + AC_DEFINE(HAVE_DEV_PTMX, 1, + [Define to 1 if you have the /dev/ptmx device file.]) +fi + +AC_ARG_ENABLE(ptc, + AS_HELP_STRING([--enable-ptc],[enable use of /dev/ptc device file]), +[], +[ + if test "x$cross_compiling" = xyes; then + AC_MSG_CHECKING([for /dev/ptc]) + AC_MSG_RESULT([not set]) + AC_MSG_ERROR([in cross compiling needs --{enable|disable}-ptc flag]) + fi + AC_CHECK_FILE(/dev/ptc, [enable_ptc=yes], [enable_ptc=no]) +]) +if test "x$enable_ptc" = xyes; then + AC_DEFINE(HAVE_DEV_PTC, 1, + [Define to 1 if you have the /dev/ptc device file.]) +fi + if test "$have_long_long" = yes then