New in 0.13
-----------
+* Build .spec file via configuere.in (Intra2net)
* Fixed "libusb-config --cflags" call (Mike Frysinger and Intra2net)
-* Always set usb configuration (Mike Frysinger)
+* Always set usb configuration (Mike Frysinger and Intra2net)
* Improved libusb-win32 support (Mike Frysinger)
New in 0.12
SUBDIRS = src examples doc
-EXTRA_DIST = libftdi.spec COPYING.LIB README AUTHORS ChangeLog libftdi-config.in
+EXTRA_DIST = libftdi.spec libftdi.spec.in COPYING.LIB README AUTHORS ChangeLog libftdi-config.in
bin_SCRIPTS = libftdi-config
AC_MSG_RESULT(yes)
fi
+ENABLE_ASYNC_MODE=0
AC_ARG_WITH(async-mode,
[ --with-async-mode enable experimental async mode. Linux only.],
[
AC_MSG_CHECKING(for experimental linux async mode)
if test "$withval" != "no"; then
+ ENABLE_ASYNC_MODE=1
CFLAGS="$CFLAGS -DLIBFTDI_LINUX_ASYNC_MODE"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
])
+AC_SUBST(ENABLE_ASYNC_MODE)
dnl check for doxygen
AC_PATH_PROG(DOXYGEN, doxygen)
AM_CONDITIONAL(HAVE_DOXYGEN, test -n $DOXYGEN)
AC_OUTPUT([libftdi-config],[chmod a+x libftdi-config])
-AC_OUTPUT(Makefile src/Makefile examples/Makefile doc/Doxyfile doc/Makefile libftdi.pc)
+AC_OUTPUT(Makefile src/Makefile examples/Makefile doc/Doxyfile doc/Makefile libftdi.pc libftdi.spec)
+%define enable_async_mode @ENABLE_ASYNC_MODE@
Summary: Library to program and control the FTDI USB controller
Name: libftdi
-Version: 0.13
+Version: @VERSION@
Release: 1
Copyright: LGPL
Group: System Environment/Libraries
%setup -q
%build
-./configure --prefix=%{prefix} --with-async-mode
+
+PARAMS=""
+./configure --prefix=%{prefix} \
+%if %{enable_async_mode}
+ --with-async-mode \
+%endif
+
make
%install
ftdi_error_return(-4, "usb_open() failed");
#ifdef LIBUSB_HAS_GET_DRIVER_NP
- // Try to detach ftdi_sio kernel module
- // Returns ENODATA if driver is not loaded
+ // Try to detach ftdi_sio kernel module.
+ // Returns ENODATA if driver is not loaded.
+ //
+ // The return code is kept in a separate variable and only parsed
+ // if usb_set_configuration() or usb_claim_interface() fails as the
+ // detach operation might be denied and everything still works fine.
+ // Likely scenario is a static ftdi_sio kernel module.
if (usb_detach_kernel_driver_np(ftdi->usb_dev, ftdi->interface) != 0 && errno != ENODATA)
detach_errno = errno;
#endif