From: Jordan Williams Date: Mon, 22 Apr 2024 16:02:39 +0000 (-0500) Subject: meson: Add have_pty variable to check if pty is available X-Git-Tag: v2.40.1-rc1~9^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd94707a207255a5841db5250a986f787ace51ac;p=thirdparty%2Futil-linux.git meson: Add have_pty variable to check if pty is available Signed-off-by: Jordan Williams (cherry picked from commit f71723ef67d4d1ab5762492c4a162498c53e51eb) --- diff --git a/meson.build b/meson.build index d8ff27a07..8295445b5 100644 --- a/meson.build +++ b/meson.build @@ -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,