[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] build: Fail autoconf if glib development files are missing



It's better to fail autoconf if a developer trying to do a git
checkout does not have prerequisite macros installed, than it
is to generate a broken ./configure.

Reported-by: Richard Parkins <aleph0hpela-suse@yahoo.co.uk>
Signed-off-by: Eric Blake <eblake@redhat.com>
---

Alternate 1.

 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8714446..dd4d315 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,6 +262,8 @@ AC_CHECK_HEADERS([sys/mount.h],,,
 ]])
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h syslog.h linux/types.h sys/dirent.h sys/uio.h])
 AM_PATH_GLIB_2_0(2.26.0, [HAVE_GLIB=yes], AC_MSG_ERROR([Missing glib]), gthread)
+dnl refuse to create configure if glib development files were not installed
+m4_pattern_forbid([AM_PATH_GLIB])

 my_save_cflags="$CFLAGS"
 CFLAGS="-Wdeprecated-declarations -Werror $GLIB_CFLAGS"
-- 
2.14.3


Reply to: