build: Allow disabling the update of udev rules
We can only create the udev rules file when we're not cross-compiling, so allow people to disable updating the file when building from tarballs. If you run with --enable-udev-rules=no and the 60-fprint-autosuspend.rules doesn't exist, you're on your own.
This commit is contained in:
parent
d05c69698c
commit
3b409c767c
2 changed files with 12 additions and 0 deletions
10
configure.ac
10
configure.ac
|
@ -129,6 +129,16 @@ AC_SUBST(GLIB_LIBS)
|
|||
imagemagick_found=no
|
||||
gdkpixbuf_found=no
|
||||
|
||||
AC_ARG_ENABLE(udev-rules,
|
||||
AC_HELP_STRING([--enable-udev-rules],[Update the udev rules]),
|
||||
[case "${enableval}" in
|
||||
yes) ENABLE_UDEV_RULES=yes ;;
|
||||
no) ENABLE_UDEV_RULES=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-udev-rules) ;;
|
||||
esac],
|
||||
[ENABLE_UDEV_RULES=yes]) dnl Default value
|
||||
AM_CONDITIONAL(ENABLE_UDEV_RULES, test x$ENABLE_UDEV_RULES = "xyes")
|
||||
|
||||
AC_ARG_WITH(udev-rules-dir,
|
||||
AS_HELP_STRING([--with-udev-rules-dir=DIR],[Installation path for udev rules @<:@auto@:>@]),
|
||||
[ac_with_udev_rules_dir=$withval],
|
||||
|
|
|
@ -81,8 +81,10 @@ fprint_list_udev_rules_LDADD = $(builddir)/libfprint.la
|
|||
|
||||
udev_rules_DATA = 60-fprint-autosuspend.rules
|
||||
|
||||
if ENABLE_UDEV_RULES
|
||||
$(udev_rules_DATA): fprint-list-udev-rules
|
||||
$(builddir)/fprint-list-udev-rules > $@
|
||||
endif
|
||||
|
||||
if ENABLE_UPEKE2
|
||||
DRIVER_SRC += $(UPEKE2_SRC)
|
||||
|
|
Loading…
Reference in a new issue