[applied] configure: Add option to disable abidb

Message ID 87h6fyir5e.fsf@redhat.com
State New
Headers
Series [applied] configure: Add option to disable abidb |

Commit Message

Dodji Seketeli April 18, 2024, 4:15 p.m. UTC
  Hello,

While looking at packaging libabigail for EPEL8, it turned out abidb
requires python 3.9 for the type hints on function definitions.  Yet,
EPEL8 has an older python.

This patch adds a --disable-abidb option to configure to handle EPEL8.

	* configure.ac: Add a --disable-abidb option to configure to
	disable the abidb tool and related tests.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to the master branch.
---
 configure.ac | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
  

Patch

diff --git a/configure.ac b/configure.ac
index 4b115e65..d329490c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,12 @@  AC_ARG_ENABLE([fedabipkgdiff],
 	      ENABLE_FEDABIPKGDIFF=$enableval,
 	      ENABLE_FEDABIPKGDIFF=auto)
 
+AC_ARG_ENABLE(abidb,
+	      AS_HELP_STRING([--enable-abidb=yes|no|auto],
+			     [enable the support of the abidb tool (default is auto)]),
+	      ENABLE_ABIDB=$enableval,
+	      ENABLE_ABIDB=auto)
+
 AC_ARG_ENABLE([python3],
 	      AS_HELP_STRING([--enable-python3=yes|no|auto],
 			     [enable running abigail tools with python3 (default is auto)]),
@@ -817,8 +823,7 @@  except koji.ConfigurationError:
 fi
 
 dnl abidb checks
-ENABLE_ABIDB=no
-if test x$PYTHON3_INTERPRETER != xno; then
+if test x$PYTHON3_INTERPRETER != xno -a x$ENABLE_ABIDB != xno; then
   AX_CHECK_PYTHON_MODULES([git libarchive],
 			  [$PYTHON],
 			  [FOUND_ALL_PYTHON_MODULES=yes],
@@ -830,6 +835,8 @@  if test x$PYTHON3_INTERPRETER != xno; then
   else
     ENABLE_ABIDB=yes
   fi
+else
+    AC_MSG_NOTICE([disabling abidb])
 fi
 AM_CONDITIONAL(ENABLE_ABIDB, test x$ENABLE_ABIDB = xyes)