linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libgpiod] [PATCH] build: check for python-config in configure
@ 2019-10-04 16:11 joelsavitz
  0 siblings, 0 replies; only message in thread
From: joelsavitz @ 2019-10-04 16:11 UTC (permalink / raw)
  To: linux-gpio; +Cc: Joel Savitz, fedora-rpi

From: Joel Savitz <joelsavitz@gmail.com>

Currently, configure succeeds when python is installed without its
development components, i.e. python-config and headers. The subsequent
make will fail when gcc cannot locate Python.h.

This patch fixes that behavior by throwing an error at configure-time if
python-config cannot be found.

Signed-off-by: Joel Savitz <joelsavitz@gmail.com>
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 41321c1..066c1ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,6 +183,8 @@ if test "x$with_bindings_python" = xtrue
 then
 	AM_PATH_PYTHON([3.0], [],
 		[AC_MSG_ERROR([python3 not found - needed for python bindings])])
+	AC_CHECK_FILE(["$PYTHON-config"], [],
+		[AC_MSG_ERROR([python3-config not found - needed for python bindings])])
 	AS_IF([test -z "$PYTHON_CPPFLAGS"],
 		[AC_SUBST(PYTHON_CPPFLAGS, [`$PYTHON-config --includes`])])
 	AS_IF([test -z "$PYTHON_LIBS"],
-- 
2.21.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-04 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-04 16:11 [libgpiod] [PATCH] build: check for python-config in configure joelsavitz

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 NNTP newsgroup(s).