build: Don't depend on libffi unless we're building libraries

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@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Derek Foreman 2015-06-17 15:13:52 -05:00 committed by Pekka Paalanen
parent 0e979d82d2
commit bc3b66d5c1

View file

@ -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>]])