From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Cc: jose.marchesi@oracle.com, guillermo.e.martinez@oracle.com
Subject: [PATCH, applied] configure: Enable the CTF front-end by default
Date: Thu, 05 Jan 2023 14:29:23 +0100 [thread overview]
Message-ID: <87tu15kt3g.fsf@redhat.com> (raw)
Hello,
The patch enables the CTF front-end by default, if the
ctf.h header file and its associated libctf.so shared library are
detected at configure time. That front-end can of course still be
disabled by using the --disable-ctf option.
* configure.ac: If --disable-ctf hasn't been passed, test for the
presence of ctf.h and then for libctf.so. If both are found then
enable the CTF front end.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
configure.ac | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6c7856cd..a009fbc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,7 +199,7 @@ AC_ARG_ENABLE(ctf,
AS_HELP_STRING([--enable-ctf=yes|no],
[disable support of ctf files)]),
ENABLE_CTF=$enableval,
- ENABLE_CTF=no)
+ ENABLE_CTF=auto)
dnl *************************************************
dnl check for dependencies
@@ -317,17 +317,24 @@ AC_SUBST([ELF_LIBS])
dnl check for libctf presence if CTF code has been enabled by command line
dnl argument, and then define CTF flag (to build CTF file code) if libctf is
dnl found on the system
-CTF_LIBS=
-if test x$ENABLE_CTF = xyes; then
+if test x$ENABLE_CTF != xno; then
+ CTF_HEADER=no
+ AC_CHECK_HEADER([ctf.h],
+ [CTF_HEADER=yes],
+ [AC_MSG_NOTICE([could not find ctf.h, going to disable CTF support])])
LIBCTF=
- AC_CHECK_LIB(ctf, ctf_open, [LIBCTF=yes], [LIBCTF=no])
+ if test x$CTF_HEADER = xyes; then
+ AC_CHECK_LIB(ctf, ctf_open, [LIBCTF=yes], [LIBCTF=no])
+ fi
+
if test x$LIBCTF = xyes; then
- AC_MSG_NOTICE([activating CTF code])
+ AC_MSG_NOTICE([CTF support enabled])
AC_DEFINE([WITH_CTF], 1,
[Defined if user enables and system has the libctf library])
CTF_LIBS=-lctf
+ ENABLE_CTF=yes
else
- AC_MSG_NOTICE([CTF enabled but no libctf found])
+ AC_MSG_NOTICE([no libctf found, CTF support was disabled])
ENABLE_CTF=no
fi
fi
--
2.39.0
--
Dodji
reply other threads:[~2023-01-05 13:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu15kt3g.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=guillermo.e.martinez@oracle.com \
--cc=jose.marchesi@oracle.com \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).