diff options
author | Brett Witherspoon <brett.witherspoon@comcast.net> | 2010-09-20 12:18:08 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-09-20 12:18:08 +0100 |
commit | 53611449eefe3dd8de61be8b9e89cdf71b9d54e0 (patch) | |
tree | 9be9bf7a419185de4d746ad740d0cb8c101c70a4 /configure.ac | |
parent | 260e62d872f6433348469500247b4db3ae11dd7b (diff) | |
download | upower-53611449eefe3dd8de61be8b9e89cdf71b9d54e0.tar.gz |
Allow explicitly disabling libimobiledevice support
Signed-off-by: Richard Hughes <richard@hughsie.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index d727e72..44ba7fc 100644 --- a/configure.ac +++ b/configure.ac @@ -189,17 +189,20 @@ AC_DEFINE_UNQUOTED(BACKEND, "$with_backend", [backend]) AC_SUBST(BACKEND, "$with_backend") # only need GUdev on linux -with_idevice=no +have_idevice=no if test x$with_backend = xlinux; then PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= 001]) PKG_CHECK_MODULES(USB, [libusb-1.0 >= 1.0.0]) - PKG_CHECK_MODULES(IDEVICE, libimobiledevice-1.0 >= 0.9.7, with_idevice=yes, with_idevice=no) - if test x$with_idevice = xyes; then - AC_DEFINE(HAVE_IDEVICE, 1, [Define to 1 if AFC is going to be built]) - fi + AC_ARG_WITH(idevice, AS_HELP_STRING([--without-idevice],[Build without libimobiledevice]), + with_idevice=$withval,with_idevice=yes) + AS_IF([test "x$with_idevice" != "xno"], + [PKG_CHECK_MODULES(IDEVICE, libimobiledevice-1.0 >= 0.9.7, have_idevice=yes, have_idevice=no)], + [have_idevice=no]) + AS_IF([test "x$have_idevice" = "xyes"], + [AC_DEFINE(HAVE_IDEVICE, 1, [Define to 1 if AFC is going to be built])]) fi -AM_CONDITIONAL(HAVE_IDEVICE, [test x$with_idevice = xyes]) +AM_CONDITIONAL(HAVE_IDEVICE, [test x$have_idevice = xyes]) # export to Makefile.am AM_CONDITIONAL(BACKEND_TYPE_DUMMY, [test x$with_backend = xdummy]) @@ -265,7 +268,7 @@ echo " xsltproc: ${XSLTPROC} Backend: ${with_backend} - libimobiledevice support: ${with_idevice} + libimobiledevice support: ${have_idevice} Maintainer mode: ${USE_MAINTAINER_MODE} Building api docs: ${enable_gtk_doc} Building man pages: ${enable_man_pages} |