From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5ZqEINdDlmEXMgAAWB0awg (envelope-from ) for ; Thu, 18 Nov 2021 07:15:19 -0500 Received: by simark.ca (Postfix, from userid 112) id 739421F0C1; Thu, 18 Nov 2021 07:15:19 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 A40021E813 for ; Thu, 18 Nov 2021 07:15:15 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6F1E8385AC26 for ; Thu, 18 Nov 2021 12:15:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F1E8385AC26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637237714; bh=Aj8wv+vZpptQIkp2+BnYjuvLjsWu4hfvbHQtj61Alzo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=hzlh5JSyj44kP9gxwbbwFx4IqucdSEdWcu6Bj47rJAVDQzy9p7oNfmKjaG7pObxDh uT45MKHiKG2YZlZtlQ2IzNvOLmb3GelyiioCGlxOWh/VrmI6y+4fzJy0QfcTsefvJ+ gtIrC8Lq9SaAyPQRfgcjdLoYxW11mB8ViF++V7pQ= Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with UTF8SMTPS id 292AC385841C for ; Thu, 18 Nov 2021 12:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 292AC385841C Received: by mail-ed1-x532.google.com with SMTP id l25so9625174eda.11 for ; Thu, 18 Nov 2021 04:14:53 -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:mime-version :content-transfer-encoding; bh=Aj8wv+vZpptQIkp2+BnYjuvLjsWu4hfvbHQtj61Alzo=; b=RrQJcOdgI3JThd2eX+tbaL6RDbk9wes1xT2miAu0pqmPh1nvUN2qdHd+9y0M4+p6QB 4T2K3BpsDvySjqokSVhtuMEawfOGdEk2BNMp/BetgjUsi4neDs4rQqCaQT0nhN8+AMpv +jTg06PTjNos3P0LK7RI/xbhmX14ypnWba/bpzq6uQIIJN5bZ6XHWyMcUalESs9vxzuB 35N6GOTVZcnV5o14G+NFxrbHoJjZzBWLRwFjwWwJobYWqDNPCBOHoAZRtY8YeJiQcabC v2dGUyBV7K8TfI93QR/sBKcFiz/9AmyCvJIDn+zFCqHawCMC5fR9pvk7tqCr180er6dC b5Xg== X-Gm-Message-State: AOAM531yVpeX1XXJOCyDfTnleY5oi+vM0EWASuzehkpC2B2zguegMo2C gxNg7AUhjjREU1RLZ+x2q9ZSifaoLYIlUg== X-Google-Smtp-Source: ABdhPJzOKrEWfQqRnTOcLTLC8t/+2UUvi8nSqvHIftdt0mrZTg5xqzHDRLu6wPky26ec/BljKXmT3Q== X-Received: by 2002:aa7:cc0c:: with SMTP id q12mr10559277edt.169.1637237692049; Thu, 18 Nov 2021 04:14:52 -0800 (PST) Received: from picard.redhat.com (ip-244-183.pel.cz. [213.226.244.183]) by smtp.gmail.com with ESMTPSA id yc24sm589328ejb.104.2021.11.18.04.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 04:14:51 -0800 (PST) X-Google-Original-From: Alexandra Hájková ahajkova@redhat.com To: gdb-patches@sourceware.org Subject: [PATCH] configure.ac: Check for the readline.h explicitly Date: Thu, 18 Nov 2021 13:14:40 +0100 Message-Id: <20211118121440.558038-1-ahajkova@redhat.com> X-Mailer: git-send-email 2.26.3 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. --- configure | 14 +++++++++++++- gdb/config.in | 3 +++ gdb/configure | 31 ++++++++++++++++++++++++++++++- gdb/configure.ac | 4 ++++ gdb/testsuite/configure | 14 +++++++++++++- 5 files changed, 63 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 787fcf89100..6a1da1665d8 100755 --- a/configure +++ b/configure @@ -755,6 +755,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -919,6 +920,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1171,6 +1173,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1308,7 +1319,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1468,6 +1479,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] 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 6e2dfb766c8..229103730dc 100755 --- a/gdb/configure +++ b/gdb/configure @@ -848,6 +848,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -998,6 +999,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1250,6 +1252,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1387,7 +1398,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1540,6 +1551,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -9224,6 +9236,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 d4cfb6a7624..eab45f6d263 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], diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure index 3b0d4ed8ad3..482427f948b 100755 --- a/gdb/testsuite/configure +++ b/gdb/testsuite/configure @@ -672,6 +672,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -745,6 +746,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -997,6 +999,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1134,7 +1145,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1287,6 +1298,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] -- 2.33.1