git-merge-changelog: Simplify installation instructions.
[gnulib.git] / m4 / posix_openpt.m4
blob2173a720d44efe543384d53e387314c7175dbc64
1 # posix_openpt.m4
2 # serial 4
3 dnl Copyright (C) 2011-2024 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.
8 AC_DEFUN([gl_FUNC_POSIX_OPENPT],
10   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
12   dnl Persuade Solaris <stdlib.h> to declare posix_openpt().
13   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
15   gl_CHECK_FUNCS_ANDROID([posix_openpt], [[#include <stdlib.h>]])
16   if test $ac_cv_func_posix_openpt != yes; then
17     dnl The system does not have posix_openpt.
18     HAVE_POSIX_OPENPT=0
19     case "$gl_cv_onwards_func_posix_openpt" in
20       future*) REPLACE_POSIX_OPENPT=1 ;;
21     esac
22   fi