[PATCH] Fix configure detection of demangle.h on Debian based systems

Mark Wielaard mark@klomp.org
Sat Apr 15 20:25:56 GMT 2023


---
 configure.ac | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4cd97ef..29813d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,9 +152,13 @@ AC_TYPE_UINT64_T
 
 # Check for demangle.h header, note the "empty" includes to make sure
 # libiberty.h isn't getting confused by the use of configure detected
-# include headers.
+# include headers. On Fedora based systems libiberty.h and demangle.h
+# are installed by binutils-devel in /usr/include. On Debian based
+# systems those headers come from the libiberty-dev package and are
+# placed under /usr/include/libiberty.
+CPPFLAGS="$CPPFLAGS -I/usr/include/libiberty"
 AC_CHECK_HEADER([demangle.h], [],
-		[AC_MSG_ERROR([binutils-devel demangle.h header not found])],
+		[AC_MSG_ERROR([libiberty-dev/binutils-devel demangle.h header not found])],
 		[ ])
 
 AM_CONDITIONAL([COND_DOCS],       [test "$with_docs" != no])
-- 
2.31.1



More information about the Annobin mailing list