Hello,
Below I have included a patch which allows one to explicitly
disable the optional libimobiledevice support while configuring autotools
instead of relying on a pkg check only. It will retain your default
behavior if no option is specified or if with-idevice is given, but will
skip the check and disable it if without-idevice is used.
I have been using this for creating binaries distrubuted to
other machines which dont have or need the option. It is also
termendously helpful regarding dependencies on source base distro's that
allow one to enable and disable the option. I hope you will consider
implementing this or something similiar.
Thanks,
C. Brett Witherspoon
--- configure.ac.orig 2010-09-09 21:16:15.554983658 -0500
+++ configure.ac 2010-09-09 21:18:41.531983541 -0500
@@ -189,17 +189,20 @@
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, libimobiledevice1.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 @@
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}
_______________________________________________
devkit-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/devkit-devel