From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id adCbOphAmWEYLwAAWB0awg (envelope-from ) for ; Sat, 20 Nov 2021 13:38:16 -0500 Received: by simark.ca (Postfix, from userid 112) id E067D1F0CE; Sat, 20 Nov 2021 13:38:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6E42E1ECEB for ; Sat, 20 Nov 2021 13:38:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39CFE3858024 for ; Sat, 20 Nov 2021 18:38:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39CFE3858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637433492; bh=bj65cSulWrOao5fQ7EJxz0SwifBI+u0DQAjiXreHRHo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vkVJVb9Z08H2/FRr411T0lcEjIvLhAcP0+wQf41VJoEOBL2rljpSjmPyMskZte9vt 17FBtq3UH7Xw1B5EWSMc5BbFCPdJ3Xj8smQQ7l4VlIb+ue0pJfaZ4MLwszL3/K+gJf Q64a/XQVopK8l0UmnuY9DTLNyOe8lCKiJI7cEHDU= Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by sourceware.org (Postfix) with UTF8SMTPS id 9376E3858D39 for ; Sat, 20 Nov 2021 18:37:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9376E3858D39 Received: by mail-ed1-x52c.google.com with SMTP id l25so40721442eda.11 for ; Sat, 20 Nov 2021 10:37:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bj65cSulWrOao5fQ7EJxz0SwifBI+u0DQAjiXreHRHo=; b=aQfQdUIlKZ5T273nJqG3haTc61nECQ54gs4et2t0S4xwmLYcmcRIgvey3xH3qfvX/Z 4eVZReoyCklW1LKyvhUdpq70EubqJcjn2ZV7iz+EgaiTPnzqaBfEYdaRK2tOsrjOGrnl TlVGFjpQVqE3G/nLWq1PqTL3ilTZ1amALZGIuoKHDlNLJlLDAU45fJOBHPstaFniGfFw 2RytuidbiNu7Gttjto5x7GOW+F6Cebyh7A33XG6wNsIxzfNnEHjeIMFdVPNKRB0mN6dw FWsMO4bIdb45uwdbwvsDYyt4xvX88udLN/8ORkKsSKSbFBd6i0Sxb/HVY7MwUOB8SoRI VAOA== X-Gm-Message-State: AOAM532O7pxYGJFt9498lVzDewQygkCvW9L41S8liz0avHcNwXKseI0g fsXCBIWSJ4qXaZ1CIm/ujLj6ulrF42OhNQ== X-Google-Smtp-Source: ABdhPJysev3agOpXNs16tOC3WctCl8E/IJMheeP/iG3DO/6qPTbSobc7sc7vn7dic+01Xx3DBed2wA== X-Received: by 2002:a17:907:7d8f:: with SMTP id oz15mr9042403ejc.245.1637433470624; Sat, 20 Nov 2021 10:37:50 -0800 (PST) Received: from picard.redhat.com (ip-244-183.pel.cz. [213.226.244.183]) by smtp.gmail.com with ESMTPSA id h10sm1554449edj.1.2021.11.20.10.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Nov 2021 10:37:49 -0800 (PST) X-Google-Original-From: Alexandra Hájková ahajkova@redhat.com To: gdb-patches@sourceware.org Subject: [PATCH v2] configure.ac: Check for the readline.h explicitly Date: Sat, 20 Nov 2021 19:37:38 +0100 Message-Id: <20211120183738.690960-1-ahajkova@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211118121440.558038-1-ahajkova@redhat.com> References: <20211118121440.558038-1-ahajkova@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Alexandra_H=C3=A1jkov=C3=A1_via_Gdb-patches?= Reply-To: =?UTF-8?Q?Alexandra_H=C3=A1jkov=C3=A1?= Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" From: Alexandra Hájková When readline development package is missing make fails with "configure: error: system readline is not new enough" which might be confusing. This patch checks for the readline.h explicitly and makes make to warn about the missing package. --- v2: use proper version of autoconf for regenerating configure gdb/config.in | 3 +++ gdb/configure | 17 +++++++++++++++++ gdb/configure.ac | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/gdb/config.in b/gdb/config.in index 773a0ba91ef..4b8f1f7e1c6 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -382,6 +382,9 @@ /* Define if Python interpreter is being linked in. */ #undef HAVE_PYTHON +/* Define to 1 if you have the header file. */ +#undef HAVE_READLINE_READLINE_H + /* Define to 1 if you have the `resize_term' function. */ #undef HAVE_RESIZE_TERM diff --git a/gdb/configure b/gdb/configure index fe685f2d3d5..90c1e3d7948 100755 --- a/gdb/configure +++ b/gdb/configure @@ -9224,6 +9224,23 @@ fi if test "$with_system_readline" = yes; then + for ac_header in readline/readline.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_readline_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_READLINE_READLINE_H 1 +_ACEOF + readline_h=yes +else + readline_h=no +fi + +done + + if test "$readline_h" = "no"; then + as_fn_error $? "readline development packages are probably missing" "$LINENO" 5 + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 $as_echo_n "checking whether system readline is new enough... " >&6; } if ${gdb_cv_readline_ok+:} false; then : diff --git a/gdb/configure.ac b/gdb/configure.ac index 56e8a2d8044..29c1c4589c9 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -596,6 +596,10 @@ AC_ARG_WITH([system-readline], [use installed readline library])]) if test "$with_system_readline" = yes; then + AC_CHECK_HEADERS(readline/readline.h, [readline_h=yes], [readline_h=no]) + if test "$readline_h" = "no"; then + AC_MSG_ERROR([readline development packages are probably missing]) + fi AC_CACHE_CHECK( [whether system readline is new enough], [gdb_cv_readline_ok], -- 2.33.1