]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add have_pty variable to check if pty is available
authorJordan Williams <jordan@jwillikers.com>
Mon, 22 Apr 2024 16:02:39 +0000 (11:02 -0500)
committerJordan Williams <jordan@jwillikers.com>
Thu, 25 Apr 2024 12:30:55 +0000 (07:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit f71723ef67d4d1ab5762492c4a162498c53e51eb)

meson.build

index d8ff27a0740fb410f3c612431388a0bbb7e01152..8295445b547d799800d95eef80cb964d2e9fabe0 100644 (file)
@@ -787,9 +787,9 @@ int main(void) {
 have = cc.compiles(code, name : 'using __progname')
 conf.set('HAVE___PROGNAME', have ? 1 : false)
 
-have = conf.get('HAVE_PTY_H').to_string() == '1' \
-       and conf.get('HAVE_SYS_SIGNALFD_H').to_string() == '1'
-conf.set('HAVE_PTY', have ? 1 : false)
+have_pty = conf.get('HAVE_PTY_H').to_string() == '1' \
+           and conf.get('HAVE_SYS_SIGNALFD_H').to_string() == '1'
+conf.set('HAVE_PTY', have_pty ? 1 : false)
 
 have_opal_get_status= cc.has_header_symbol('linux/sed-opal.h', 'IOC_OPAL_GET_STATUS')
 conf.set('HAVE_OPAL_GET_STATUS', have_opal_get_status ? 1 : false)
@@ -3266,7 +3266,7 @@ if conf.get('HAVE_OPENAT').to_string() == '1' \
   exes += exe
 endif
 
-if conf.get('HAVE_PTY').to_string() == '1'
+if have_pty
   exe = executable(
     'test_pty',
     pty_session_c,