[PATCH wayland 5/5] build: Don't depend on libffi unless we're building libraries

Derek Foreman derekf at osg.samsung.com
Wed Jun 17 13:13:52 PDT 2015


When building just the scanner or docs it's not required.

This can reduce requirements for a host cross compiling wayland,
since only the scanner needs to be built natively.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 39e3107..3fa3cf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,6 @@ LT_PREREQ([2.2])
 LT_INIT
 
 PKG_PROG_PKG_CONFIG()
-PKG_CHECK_MODULES(FFI, [libffi])
 
 if test "x$GCC" = "xyes"; then
 	GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
@@ -82,6 +81,7 @@ AC_ARG_WITH(icondir, [  --with-icondir=<dir>    Look for cursor icons here],
 AC_SUBST([ICONDIR])
 
 if test "x$enable_libraries" = "xyes"; then
+	PKG_CHECK_MODULES(FFI, [libffi])
 	AC_CHECK_DECL(SFD_CLOEXEC,[],
 		      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland libraries")],
 		      [[#include <sys/signalfd.h>]])
-- 
2.1.4



More information about the wayland-devel mailing list