diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index e13c571..1f10bb7 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -59,6 +59,11 @@ case "$host_os" in | |||
| 59 | esac | 59 | esac |
| 60 | AC_SUBST(LIBIRECOVERYLDFLAGS) | 60 | AC_SUBST(LIBIRECOVERYLDFLAGS) |
| 61 | 61 | ||
| 62 | AC_ARG_WITH([dummy], | ||
| 63 | [AS_HELP_STRING([--with-dummy], [Use no USB driver at all [default=no]. This is only useful if you just want to query the device list by product type or hardware model. All other operations are no-ops or will return IRECV_E_UNSUPPORTED.])], | ||
| 64 | [], | ||
| 65 | [with_dummy=no]) | ||
| 66 | |||
| 62 | AS_IF([test "x$have_iokit" = "xyes"], [ | 67 | AS_IF([test "x$have_iokit" = "xyes"], [ |
| 63 | AC_ARG_WITH([iokit], | 68 | AC_ARG_WITH([iokit], |
| 64 | [AS_HELP_STRING([--with-iokit], [Use IOKit instead of libusb on OS X [default=yes]])], | 69 | [AS_HELP_STRING([--with-iokit], [Use IOKit instead of libusb on OS X [default=yes]])], |
| @@ -67,17 +72,22 @@ AS_IF([test "x$have_iokit" = "xyes"], [ | |||
| 67 | ], [] | 72 | ], [] |
| 68 | ) | 73 | ) |
| 69 | 74 | ||
| 70 | AS_IF([test "x$with_iokit" = "xyes" && test "x$have_iokit" = "xyes"] , [ | 75 | AS_IF([test "x$with_dummy" = "xyes"], [ |
| 71 | AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit]) | 76 | AC_DEFINE(USE_DUMMY, 1, [Define if we are using dummy USB driver]) |
| 72 | USB_BACKEND="IOKit" | 77 | USB_BACKEND="dummy" |
| 73 | ], | 78 | ], [ |
| 74 | [ | 79 | AS_IF([test "x$with_iokit" = "xyes" && test "x$have_iokit" = "xyes"] , [ |
| 75 | PKG_CHECK_MODULES(libusb, libusb-1.0 >= $LIBUSB_VERSION) | 80 | AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit]) |
| 76 | USB_BACKEND="libusb `$PKG_CONFIG --modversion libusb-1.0`" | 81 | USB_BACKEND="IOKit" |
| 77 | LIBUSB_REQUIRED="libusb-1.0 >= $LIBUSB_VERSION" | 82 | ], |
| 78 | AC_SUBST(LIBUSB_REQUIRED) | 83 | [ |
| 79 | ] | 84 | PKG_CHECK_MODULES(libusb, libusb-1.0 >= $LIBUSB_VERSION) |
| 80 | ) | 85 | USB_BACKEND="libusb `$PKG_CONFIG --modversion libusb-1.0`" |
| 86 | LIBUSB_REQUIRED="libusb-1.0 >= $LIBUSB_VERSION" | ||
| 87 | AC_SUBST(LIBUSB_REQUIRED) | ||
| 88 | ] | ||
| 89 | ) | ||
| 90 | ]) | ||
| 81 | 91 | ||
| 82 | # Checks for header files. | 92 | # Checks for header files. |
| 83 | AC_HEADER_STDC | 93 | AC_HEADER_STDC |
