Browse Source

Make optional dependencies really optional.

Prevent configure from aborting if LibMTP or GIO cannot be found;
those dependencies are optional and gfsecret can be built without
them.
master
Damien Goutte-Gattat 3 years ago
parent
commit
bb70b64c94
  1. 13
      configure.ac

13
configure.ac

@ -28,13 +28,15 @@ PKG_CHECK_MODULES([LIBGFSHARE], [libgfshare])
dnl Check for LibMTP
PKG_CHECK_MODULES([LIBMTP], [libmtp],
[AC_DEFINE([HAVE_LIBMTP], [1], [Define if libmtp is present.])],
[])
[AC_DEFINE([HAVE_LIBMTP], [1], [Define if libmtp is present.])
have_libmtp=yes],
[have_libmtp=no])
dnl Check for GIO
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.22],
[AC_DEFINE([HAVE_GIO], [1], [Define if gio-2.0 is present.])],
[])
[AC_DEFINE([HAVE_GIO], [1], [Define if gio-2.0 is present.])
have_gio=yes],
[have_gio=no])
dnl Set max size for secret
AC_ARG_ENABLE([max-size],
@ -80,5 +82,8 @@ Configuration complete
Prefix: '${prefix}'
Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
MTP support: ${have_libmtp}
GIO support: ${have_gio}
Secret max size: ${max_secret_size_string}
"

Loading…
Cancel
Save