lib: don't detach kernel driver by default

Since this feature also disconnects running instances
of librtlsdr that claimed the device, it is now disabled
by default and can only be enabled at compile time.

To enable it when building with cmake:
cmake . -DDETACH_KERNEL_DRIVER=ON

To enable it when building with automake:
./configure --enable-driver-detach

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Steve Markgraf
2013-06-04 14:47:16 +02:00
parent ce341fe53b
commit 3e17ef2b55
3 changed files with 26 additions and 0 deletions

View File

@ -64,6 +64,12 @@ AC_TRY_COMPILE([],[],
AC_MSG_RESULT(no)
CFLAGS="$old_CFLAGS")
AC_ARG_ENABLE(driver-detach,
[ --enable-driver-detach Enable detaching of kernel driver (disabled by default)],
[if test x$enableval = xyes; then
CFLAGS="$CFLAGS -DDETACH_KERNEL_DRIVER"
fi])
dnl Generate the output
AC_CONFIG_HEADER(config.h)