From 3b409c767cb5c0c27229994ac47edf47c1c59804 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 14 Aug 2012 15:19:35 +0100 Subject: [PATCH] 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. --- configure.ac | 10 ++++++++++ libfprint/Makefile.am | 2 ++ 2 files changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 6a2886cd..4b8a7654 100644 --- a/configure.ac +++ b/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], diff --git a/libfprint/Makefile.am b/libfprint/Makefile.am index cd0a5740..fa0b54dd 100644 --- a/libfprint/Makefile.am +++ b/libfprint/Makefile.am @@ -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)