aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autogen/config.in3
-rwxr-xr-xautogen/configure23
2 files changed, 18 insertions, 8 deletions
diff --git a/autogen/config.in b/autogen/config.in
index 8e18d1c9206..bd10c9f4076 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -731,6 +731,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
731/* Define to 1 if you have the `posix_memalign' function. */ 731/* Define to 1 if you have the `posix_memalign' function. */
732#undef HAVE_POSIX_MEMALIGN 732#undef HAVE_POSIX_MEMALIGN
733 733
734/* Define to 1 if you have the `posix_openpt' function. */
735#undef HAVE_POSIX_OPENPT
736
734/* Define if you have the /proc filesystem. */ 737/* Define if you have the /proc filesystem. */
735#undef HAVE_PROCFS 738#undef HAVE_PROCFS
736 739
diff --git a/autogen/configure b/autogen/configure
index bfe15b6fb2a..961d1acbd38 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -13258,12 +13258,14 @@ done
13258 13258
13259 13259
13260# PTY-related GNU extensions. 13260# PTY-related GNU extensions.
13261for ac_func in getpt 13261for ac_func in getpt posix_openpt
13262do : 13262do :
13263 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" 13263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13264if test "x$ac_cv_func_getpt" = x""yes; then : 13264ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13265eval as_val=\$$as_ac_var
13266 if test "x$as_val" = x""yes; then :
13265 cat >>confdefs.h <<_ACEOF 13267 cat >>confdefs.h <<_ACEOF
13266#define HAVE_GETPT 1 13268#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13267_ACEOF 13269_ACEOF
13268 13270
13269fi 13271fi
@@ -14883,7 +14885,7 @@ case $opsys in
14883 14885
14884 ;; 14886 ;;
14885 14887
14886 darwin ) 14888 darwin )
14887 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h 14889 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
14888 14890
14889 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h 14891 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
@@ -14896,12 +14898,12 @@ case $opsys in
14896 14898
14897 ;; 14899 ;;
14898 14900
14899 gnu | freebsd | netbsd | openbsd ) 14901 gnu | openbsd )
14900 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h 14902 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
14901 14903
14902 ;; 14904 ;;
14903 14905
14904 gnu-linux | gnu-kfreebsd ) 14906 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
14905 if test "x$ac_cv_func_grantpt" = xyes; then 14907 if test "x$ac_cv_func_grantpt" = xyes; then
14906 14908
14907$as_echo "#define UNIX98_PTYS 1" >>confdefs.h 14909$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
@@ -14910,7 +14912,12 @@ $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
14910 14912
14911 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); }" >>confdefs.h 14913 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); }" >>confdefs.h
14912 14914
14913 if test "x$ac_cv_func_getpt" = xyes; then 14915 if test "x$ac_cv_func_posix_openpt" = xyes; then
14916 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
14917
14918 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
14919
14920 elif test "x$ac_cv_func_getpt" = xyes; then
14914 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h 14921 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
14915 14922
14916 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h 14923 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h