From nobody Fri May 17 04:49:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623487920364673.4343705625092; Sat, 12 Jun 2021 01:52:00 -0700 (PDT) Received: from localhost ([::1]:54644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrzN0-0006Og-TI for importer@patchew.org; Sat, 12 Jun 2021 04:51:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrzMD-0005hA-OU for qemu-devel@nongnu.org; Sat, 12 Jun 2021 04:51:09 -0400 Received: from p57b42637.dip0.t-ipconnect.de ([87.180.38.55]:55339 helo=mini.fritz.box) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrzMB-00080i-34 for qemu-devel@nongnu.org; Sat, 12 Jun 2021 04:51:09 -0400 Received: by mini.fritz.box (Postfix, from userid 502) id 8ADC4122329D; Sat, 12 Jun 2021 10:51:02 +0200 (CEST) From: Stefan Weil To: qemu-devel@nongnu.org Subject: [PATCH] meson.build: Support ncurses on MacOS Date: Sat, 12 Jun 2021 10:51:01 +0200 Message-Id: <20210612085101.61304-1-sw@weilnetz.de> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=87.180.38.55; envelope-from=stefan@mini.fritz.box; helo=mini.fritz.box X-Spam_score_int: 21 X-Spam_score: 2.1 X-Spam_bar: ++ X-Spam_report: (2.1 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, KHOP_HELO_FCRDNS=0.398, NO_DNS_FOR_FROM=0.001, RCVD_IN_PBL=3.335, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" MacOS provides header files for curses 5.7 with support for wide characters, but requires _XOPEN_SOURCE_EXTENDED=3D1 to activate that. By default those old header files are used even if there is a newer Homebrew installation of ncurses 6.2 available. Change also the old macro definition of NCURSES_WIDECHAR and set it to 1 like it is done in newer versions of curses.h when _XOPEN_SOURCE_EXTENDED=3D1 is defined. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Stefan Weil --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d2a9ce91f5..3ca8faa264 100644 --- a/meson.build +++ b/meson.build @@ -606,7 +606,11 @@ if have_system and not get_option('curses').disabled() endif endforeach msg =3D get_option('curses').enabled() ? 'curses library not found' : '' - curses_compile_args =3D ['-DNCURSES_WIDECHAR'] + if host_machine.system() =3D=3D 'darwin' + curses_compile_args =3D [ '-D_XOPEN_SOURCE_EXTENDED=3D1'] + else + curses_compile_args =3D ['-DNCURSES_WIDECHAR=3D1'] + endif if curses.found() if cc.links(curses_test, args: curses_compile_args, dependencies: [cur= ses]) curses =3D declare_dependency(compile_args: curses_compile_args, dep= endencies: [curses]) --=20 2.30.1 (Apple Git-130)