| 1 |
# posix_openpt.m4 |
| 2 |
# serial 4 |
| 3 |
dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 |
dnl This file is free software; the Free Software Foundation |
| 5 |
dnl gives unlimited permission to copy and/or distribute it, |
| 6 |
dnl with or without modifications, as long as this notice is preserved. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_DEFUN([gl_FUNC_POSIX_OPENPT], |
| 10 |
[ |
| 11 |
AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
| 12 |
|
| 13 |
dnl Persuade Solaris <stdlib.h> to declare posix_openpt(). |
| 14 |
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) |
| 15 |
|
| 16 |
gl_CHECK_FUNCS_ANDROID([posix_openpt], [[#include <stdlib.h>]]) |
| 17 |
if test $ac_cv_func_posix_openpt != yes; then |
| 18 |
dnl The system does not have posix_openpt. |
| 19 |
HAVE_POSIX_OPENPT=0 |
| 20 |
case "$gl_cv_onwards_func_posix_openpt" in |
| 21 |
future*) REPLACE_POSIX_OPENPT=1 ;; |
| 22 |
esac |
| 23 |
fi |
| 24 |
]) |