From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820085; cv=none; d=zoho.com; s=zohoarc; b=DsH6EYY8jGY216yPeMoqjicjlArLYFuQ9DBmhbl7/erF3v8csgKdAMV8wMm41BxvScYmKQnL1+MEpZ56PC+eo22N8Vh+8VSpHrC1Q5nCDOHGes+gWSxruIyXTFefd7/Kql1YX6MR/3Crnpb2CPo8ty+5pw04nHbABPFTw5Eqh3U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820085; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=H/EDLGLjRT962IhwGG1+VWwy6tbNq2ohl9Aiqn4rhrg=; b=jPLzYXvsEcWEOCnJgRhxbfCemx1bEQol+9/0TU6oh2IB0ebsY/ALC379Zx/kFo9GTgup9M72rpicVC4uNkrZ7gJt2X1ez6pIIBk3gJTBgtQCVUzIfeJvo1371QXZ3FVt/JTZeD1qkAYkSjF2cyf3O0wWE+6e1/yNCTvPTEMrP/c= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820085976817.1339303950834; Tue, 9 Apr 2019 07:28:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CE263002E19; Tue, 9 Apr 2019 14:28:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3014817F60; Tue, 9 Apr 2019 14:28:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E308A3FA48; Tue, 9 Apr 2019 14:28:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ERt03024232 for ; Tue, 9 Apr 2019 10:27:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id B1ABE21EFC; Tue, 9 Apr 2019 14:27:55 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 383F72639F for ; Tue, 9 Apr 2019 14:27:55 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:44 +0200 Message-Id: <20190409142750.32034-2-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/7] tools: vsh: Drop obsolete readline compatibility code X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 09 Apr 2019 14:28:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This code is needed to use readline older than 4.1, but all our target platforms ship with at least 6.0 these days so we can safely get rid of it. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- tools/vsh.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 65b96f87d5..f2486498c9 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2945,32 +2945,15 @@ vshReadlineInit(vshControl *ctl) /* Opaque data for autocomplete callbacks. */ autoCompleteOpaque =3D ctl; =20 - /* Allow conditional parsing of the ~/.inputrc file. - * Work around ancient readline 4.1 (hello Mac OS X), - * which declared it as 'char *' instead of 'const char *'. - */ -# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_readline_name =3D ctl->name; -# else - rl_readline_name =3D (char *) ctl->name; -# endif =20 /* Tell the completer that we want a crack first. */ rl_attempted_completion_function =3D vshReadlineCompletion; =20 -# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_basic_word_break_characters =3D break_characters; -# else - rl_basic_word_break_characters =3D (char *) break_characters; -# endif =20 -# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_completer_quote_characters =3D quote_characters; rl_char_is_quoted_p =3D vshReadlineCharIsQuoted; -# else - rl_completer_quote_characters =3D (char *) quote_characters; - rl_char_is_quoted_p =3D (Function *) vshReadlineCharIsQuoted; -# endif =20 if (virAsprintf(&histsize_env, "%s_HISTSIZE", ctl->env_prefix) < 0) goto cleanup; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820088; cv=none; d=zoho.com; s=zohoarc; b=En+ujoQXi37csOQ509pNF5LOyp41tU1PsmFgInrxJ+mpIBttI2BbkgK8XjywQZyJnG8l3dmlz5B8S36Y0n0Ou3mBdUYYV4pbx673htRr6rSqKgbkPrAgUuz8/Kq0KvTWS5+Y5ChhlRRmsbV3Eq10vcoHAsETL/tUiGio9QbuPvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820088; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=H4XB0njvUF7MbKRtAdvxh+wxTuCaTmkDPAkqRacGonw=; b=YuGwNuTATI7XspBqxutErlGMetK8J8GzcWLkeNO4i9pXURRBJkgye/anj06spHJBEbxwhzdgVNuWeWoswuccptU+lRAgPSVMUlXz40V8027+toq+tR9OTf3qV3idjcW7n9ili5mAaOhupxl3sTDJ+E6UfcJxs2rUBCGBjU6iwHQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820088330235.46282913935784; Tue, 9 Apr 2019 07:28:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F4FD307D978; Tue, 9 Apr 2019 14:28:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 42D5F18786; Tue, 9 Apr 2019 14:28:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D49D5181B9E2; Tue, 9 Apr 2019 14:28:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ERuos024238 for ; Tue, 9 Apr 2019 10:27:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 85D401975E; Tue, 9 Apr 2019 14:27:56 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0CFD619C7B for ; Tue, 9 Apr 2019 14:27:55 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:45 +0200 Message-Id: <20190409142750.32034-3-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/7] m4: readline: Fix indentation X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 09 Apr 2019 14:28:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-readline.m4 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 34b3ff3c4a..4823a27788 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -32,8 +32,7 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ AC_SEARCH_LIBS([tgetent], [ncurses curses termcap termlib]) case $LIBS in no*) ;; # handle "no" and "none required" - *) # anything else is a -lLIBRARY - extra_LIBS=3D$LIBS ;; + *) extra_LIBS=3D$LIBS ;; # anything else is a -lLIBRARY esac LIBS=3D"$lv_saved_libs $extra_LIBS" fi @@ -41,7 +40,7 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ AC_CHECK_DECLS([rl_completion_quote_character], [], [], [[#include - #include ]]) + #include ]]) =20 if test "$ac_cv_have_decl_rl_completion_quote_character" =3D "no" ; then if test "$with_readline" =3D "yes" ; then @@ -58,9 +57,9 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ # function, to ensure we aren't being confused by caching. LIBS=3D$lv_saved_libs AC_CHECK_LIB([readline], [rl_initialize], - [READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" - AC_SUBST(READLINE_CFLAGS)], - [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) + [READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" + AC_SUBST(READLINE_CFLAGS)], + [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) LIBS=3D$lv_saved_libs ]) =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820080; cv=none; d=zoho.com; s=zohoarc; b=SvThb6LICrPuDP8J+WsX9R0wVvSQoviCl8y5BjhOBVCK8SGNsOPojEE8XboC+tVBlN5UI5nZOlVzAYuT6koYIlUtU4EbtCYXtm8A9STjL9fbptVNKL4rrvs+QWl92vgGvYQ3bPbfJefsNKRi3+EgFJBoABvW5WgPoYatAeIBacc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820080; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DTWt30AWTWeNBd/wKCbN68Yxnjmw/YzsWL9SZrPJcB0=; b=NVfmbT6fHlvCSzEctSD2Ng9bGuaiWX1xt2F2HzcA0QPDlruSfm2yKh7R/4vWLwOCfVMu/TbdDWV30fyz4/ArBxB10iuhTjhtCPs3Nr8Gd6p59XYgBtcGSDu11P93ZY3I1o64ss5COkzqMQO7dhVOKyE+qNcNYduyqn9ZJmK8V9c= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820080107597.0527724136681; Tue, 9 Apr 2019 07:28:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BED6C130704; Tue, 9 Apr 2019 14:27:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7586917ACF; Tue, 9 Apr 2019 14:27:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4035A181AC8F; Tue, 9 Apr 2019 14:27:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ERvsl024250 for ; Tue, 9 Apr 2019 10:27:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5731419C7F; Tue, 9 Apr 2019 14:27:57 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D37F319C7B for ; Tue, 9 Apr 2019 14:27:56 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:46 +0200 Message-Id: <20190409142750.32034-4-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/7] m4: readline: Comment rl_completion_quote_character() check X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 09 Apr 2019 14:27:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The check was added in 74416b1d4849 without offering any explanation outside of the commit message. Introduce a comment to make digging through the git history unnecessary. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-readline.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 4823a27788..649a52edfa 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -37,6 +37,12 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ LIBS=3D"$lv_saved_libs $extra_LIBS" fi =20 + # This function is present in all reasonable (5.0+) readline versions; + # however, the macOS base system contains a library called libedit which + # takes over the readline name despite lacking many of its features. We + # want to make sure we only enable readline support when linking against + # the actual readline library, and the availability of this specific + # functions is as good a witness for that fact as any. AC_CHECK_DECLS([rl_completion_quote_character], [], [], [[#include --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820085; cv=none; d=zoho.com; s=zohoarc; b=jyJhraClDGAMW0rLvDnXLk10hCkiDvZ2ytMqUpvdS8yW4d/w5fZCyy+CfnF2c3sEDZfPx2PMRgPhlxDsM7jUypnQL38XduPjP2+0caO2/cSD87txyA4c1YjYWXkmUtbeIzME9njv4E78DbSC9/7riZW5xKbRRcyqpqt1LhtaeAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820085; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=2uj0NgZJQohgTjRGe26Kjo7mIBgLdXsxhDcJH+w3Lps=; b=aVQRqUYgun4J9AcrrBrwiUCTXSTNJARFVNjuelnkMWS/IPrjha9h1gjKdICB3UeGkOdqp2YH5SJFhjLZe2fmHK79wUSpyscJVTtndA4nHYvC/YHoHJvlmsWPauliU9ucq7nw3bYG9CQGxFiYQlglrTBe6TJbsfjY9PBUSUeW2DQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820085138377.78434750253575; Tue, 9 Apr 2019 07:28:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 763A33082B59; Tue, 9 Apr 2019 14:28:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DDE717AC1; Tue, 9 Apr 2019 14:28:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 056C6181AC47; Tue, 9 Apr 2019 14:28:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ERwwQ024257 for ; Tue, 9 Apr 2019 10:27:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2825717F60; Tue, 9 Apr 2019 14:27:58 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A49DF17B56 for ; Tue, 9 Apr 2019 14:27:57 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:47 +0200 Message-Id: <20190409142750.32034-5-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/7] m4: readline: Extract code setting -D_FUNCTION_DEF X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 09 Apr 2019 14:28:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The current code is a bit awkward, and we're going to need to share it later anyway. We can drop the call to AC_SUBST() while we're at it, since LIBVIRT_CHECK_LIB() already marks READLINE_CFLAGS for substitution. The new code goes to some extra length to avoid setting -D_FUNCTION_DEF twice: this is mostly for cosmetic reasons, and it's necessary because LIBVIRT_CHECK_READLINE() is called twice: once on its own, and then once more as part of LIBVIRT_CHECK_BASH_COMPLETION(). Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-readline.m4 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 649a52edfa..998b891d53 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -63,10 +63,18 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ # function, to ensure we aren't being confused by caching. LIBS=3D$lv_saved_libs AC_CHECK_LIB([readline], [rl_initialize], - [READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" - AC_SUBST(READLINE_CFLAGS)], + [], [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) LIBS=3D$lv_saved_libs + + # We need this to avoid compilation issues with modern compilers. + # See 9ea3424a178 for a more detailed explanation + if test "$with_readline" =3D "yes" ; then + case "$READLINE_CFLAGS" in + *-D_FUNCTION_DEF*) ;; + *) READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" ;; + esac + fi ]) =20 AC_DEFUN([LIBVIRT_RESULT_READLINE],[ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820092; cv=none; d=zoho.com; s=zohoarc; b=QkSBe2v+t1qmlt7qgZOM4ikSFhrGXIqy06uQQHPU1jINBwpXwlzGrdPau17cuxeHboEoa1VEO13rVLWGeLwIvcDFF26weFX3NWWLztD4/QYviVY7Y+rPdDbZF9GhSrPVkTnhDEkfpkEgd4Ze35fK1Y7oH/mz5MWPjBdQuZHGTII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820092; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jG1Lgvi0fTcyiDVb3DSnAjaT/78jx61XSBuk9eA1BAQ=; b=NCXo/puxNwlpuhTicse2SHxU2tutSXNNZz12bgioN6UGQ1W45q4/xFnSNpQLf7if+KiwRKeS34tY6ymH5JXKkOK0/BliqfCQtH5CC6CwizubCiJNTy3GxWY5pSiEMoU5ZLqcCJpw8Lyz5UWzfHtmUJsm2cYLSJEL06gpepsmmgI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820092631851.0807065198998; Tue, 9 Apr 2019 07:28:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4BF63078ADD; Tue, 9 Apr 2019 14:28:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B103217CE4; Tue, 9 Apr 2019 14:28:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 56062181B9ED; Tue, 9 Apr 2019 14:28:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ERwSv024265 for ; Tue, 9 Apr 2019 10:27:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id EF4DF19731; Tue, 9 Apr 2019 14:27:58 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75D7817B56 for ; Tue, 9 Apr 2019 14:27:58 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:48 +0200 Message-Id: <20190409142750.32034-6-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 5/7] m4: readline: Drop extra_LIBS machinery X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 09 Apr 2019 14:28:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The first implementation of this logic was introduced with commit 2ec759fc58fe all the way back in 2007; looking at the build logs from our CI environment, however, it's apparent that none of the platforms we currently target are actually using it, so we can assume whatever issue it was working around has been fixed at some point in the last 12 years. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-readline.m4 | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 998b891d53..6f0090056a 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -22,20 +22,6 @@ AC_DEFUN([LIBVIRT_ARG_READLINE],[ ]) =20 AC_DEFUN([LIBVIRT_CHECK_READLINE],[ - extra_LIBS=3D - lv_saved_libs=3D$LIBS - if test "x$with_readline" !=3D xno; then - # Linking with -lreadline may require some termcap-related code, e.g., - # from one of the following libraries. Add it to LIBS before using - # canned library checks; then verify later if it was needed. - LIBS=3D - AC_SEARCH_LIBS([tgetent], [ncurses curses termcap termlib]) - case $LIBS in - no*) ;; # handle "no" and "none required" - *) extra_LIBS=3D$LIBS ;; # anything else is a -lLIBRARY - esac - LIBS=3D"$lv_saved_libs $extra_LIBS" - fi =20 # This function is present in all reasonable (5.0+) readline versions; # however, the macOS base system contains a library called libedit which @@ -59,14 +45,6 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ # The normal library check... LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readline= .h]) =20 - # Touch things up to avoid $extra_LIBS, if possible. Test a second - # function, to ensure we aren't being confused by caching. - LIBS=3D$lv_saved_libs - AC_CHECK_LIB([readline], [rl_initialize], - [], - [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) - LIBS=3D$lv_saved_libs - # We need this to avoid compilation issues with modern compilers. # See 9ea3424a178 for a more detailed explanation if test "$with_readline" =3D "yes" ; then --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820088; cv=none; d=zoho.com; s=zohoarc; b=Ld7e719TIA3EO8cq2i5j5orrHVf7QTilr/UgJkdGqgR/vBAFOycv4mlFGFnA9SqodQ7xelFVfL/8dyxmBSw9Zbhao+8uI36JYcwSxIddy1farxv0GuqjgmG+o77A+pjuOOm3Y5AdEML3adZj/HToRyfOxdnwitU2txZKBTAvGoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820088; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=tPzmG1IdB226W9c9mImcx5wVxsTBJE6gmh2ujFaawH4=; b=U5EXy2muIDImLbaHj1UeDkPEJSQZIXlwzr6qL7K3AeXjOzo25TS9BP07MEKFRh0ufkmqZumGOiGDIgtpByUak5kDMDGxSOBRj23t8YajHYwO9VPGhULD8ht0a9Pgn5RrpUkzJa2Xj9gOuexSlR7MPsdJTGTmnnW8ozysfcBhia4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820088543846.9318403763269; Tue, 9 Apr 2019 07:28:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC0D230018E6; Tue, 9 Apr 2019 14:28:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A2DF5D961; Tue, 9 Apr 2019 14:28:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1EDE7181B9E6; Tue, 9 Apr 2019 14:28:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ERxL0024278 for ; Tue, 9 Apr 2019 10:27:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id BE5C919731; Tue, 9 Apr 2019 14:27:59 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46FEE19C7B for ; Tue, 9 Apr 2019 14:27:59 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:49 +0200 Message-Id: <20190409142750.32034-7-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 6/7] m4: readline: Use pkg-config where possible X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 09 Apr 2019 14:28:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" With the 7.0 release, readline has finally started shipping pkg-config support in the form of a readline.pc file. Unfortunately, most downstreams have yet to catch up with this change: among Linux distributions in particular, Fedora Rawhide seems to be the only one installing it at the moment. Non-Linux operating systems have been faring much better in this regard: both FreeBSD (through ports) and macOS (through homebrew) include pkg-config support in their readline package. This is great news for us, since those are the platforms where pkg-config is more useful on account of them installing headers and libraries outside of the respective default search paths. Our implementation checks whether readline is registered as a pkg-config package, and if so obtains CFLAGS and LIBS using the tool; if not, we just keep using the existing logic. This commit is best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-readline.m4 | 47 +++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 6f0090056a..1bec5deb22 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -23,27 +23,36 @@ AC_DEFUN([LIBVIRT_ARG_READLINE],[ =20 AC_DEFUN([LIBVIRT_CHECK_READLINE],[ =20 - # This function is present in all reasonable (5.0+) readline versions; - # however, the macOS base system contains a library called libedit which - # takes over the readline name despite lacking many of its features. We - # want to make sure we only enable readline support when linking against - # the actual readline library, and the availability of this specific - # functions is as good a witness for that fact as any. - AC_CHECK_DECLS([rl_completion_quote_character], - [], [], - [[#include - #include ]]) - - if test "$ac_cv_have_decl_rl_completion_quote_character" =3D "no" ; then - if test "$with_readline" =3D "yes" ; then - AC_MSG_ERROR([readline is missing rl_completion_quote_character]) - else - with_readline=3Dno; + # We have to check for readline.pc's presence beforehand because for + # the longest time the library didn't ship a .pc file at all + PKG_CHECK_EXISTS([readline], [use_pkgconfig=3D1], [use_pkgconfig=3D0]) + + if test $use_pkgconfig =3D 1; then + # readline 7.0 is the first version which includes pkg-config support + LIBVIRT_CHECK_PKG([READLINE], [readline], [7.0]) + else + # This function is present in all reasonable (5.0+) readline versions; + # however, the macOS base system contains a library called libedit whi= ch + # takes over the readline name despite lacking many of its features. We + # want to make sure we only enable readline support when linking again= st + # the actual readline library, and the availability of this specific + # functions is as good a witness for that fact as any. + AC_CHECK_DECLS([rl_completion_quote_character], + [], [], + [[#include + #include ]]) + + if test "$ac_cv_have_decl_rl_completion_quote_character" =3D "no" ; th= en + if test "$with_readline" =3D "yes" ; then + AC_MSG_ERROR([readline is missing rl_completion_quote_character]) + else + with_readline=3Dno; + fi fi - fi =20 - # The normal library check... - LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readline= .h]) + # The normal library check... + LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readli= ne.h]) + fi =20 # We need this to avoid compilation issues with modern compilers. # See 9ea3424a178 for a more detailed explanation --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 19:01:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554820092; cv=none; d=zoho.com; s=zohoarc; b=igrjVQlhWl7EBGHo252Us8TwdMcxfOzEe1rfUoCGLmrEYS6wBDYQ0lIOE7SQsd9pX7eY6rA2Kk78pFrHbt7FDEIMzvKUxYuELsM8l1J/7bobGjvA4f/cr1gXO2gkGlq0pqs2qa3LjLhnaBSAfAhKxtJRqzbNaGmE3+S4MOFyAMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554820092; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=GUw1TxWdeAUJFStISztDDIYXJVG6ytcJoJkiFVYnAG8=; b=gVOFlMUKxmNR4bV/Nr0dOvr3TVDC/J75gOlm/9v+ylOjd5zXFUCEV3ePtGcHG8Tt4C5GAVtP9In0qrpgIF9I6ven77Ta7ZH7uVmKd+h/gOXZTYFxuB4i6P0MWk9pE+pF/bUZE1JyY6xbZFps/oFzftbS67cUu23BDcWjRnxsm38= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554820092962609.9524633159137; Tue, 9 Apr 2019 07:28:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F9DE3087942; Tue, 9 Apr 2019 14:28:11 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C86A064296; Tue, 9 Apr 2019 14:28:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 764713FA49; Tue, 9 Apr 2019 14:28:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39ES0Wg024283 for ; Tue, 9 Apr 2019 10:28:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 90E7919731; Tue, 9 Apr 2019 14:28:00 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 192EE19C7B for ; Tue, 9 Apr 2019 14:27:59 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 16:27:50 +0200 Message-Id: <20190409142750.32034-8-abologna@redhat.com> In-Reply-To: <20190409142750.32034-1-abologna@redhat.com> References: <20190409142750.32034-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 7/7] m4: readline: Add gross kludge for include path X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 09 Apr 2019 14:28:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Unfortunately the data reported by pkg-config is not completely accurate, so until the issue has been fixed in readline we need to work around it in libvirt. The good news is that we only need the fix to land in FreeBSD ports and macOS homebrew before we can drop the kludge, so we're talking months rather than years. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-readline.m4 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 1bec5deb22..cd12110c4e 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -62,6 +62,23 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ *) READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" ;; esac fi + + # Gross kludge for readline include path obtained through pkg-config. + # + # As of 8.0, upstream readline.pc has -I${includedir}/readline among + # its Cflags, which is clearly wrong. This does not affect Linux + # because ${includedir} is already part of the default include path, + # but on other platforms that's not the case and the result is that + # can't be located, causing the build to fail. + # A patch solving this issue has already been posted upstream, so once + # the fix has landed in FreeBSD ports and macOS homebrew we can safely + # drop the kludge and rely on pkg-config alone on those platforms. + # + # [1] http://lists.gnu.org/archive/html/bug-readline/2019-04/msg00007.ht= ml + case "$READLINE_CFLAGS" in + *include/readline*) READLINE_CFLAGS=3D$(echo $READLINE_CFLAGS | sed s,= include/readline,include,g) ;; + *) ;; + esac ]) =20 AC_DEFUN([LIBVIRT_RESULT_READLINE],[ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list