configure.ac 890B

12345678910111213141516171819202122232425262728293031323334
  1. AC_INIT([light], [1.2-dev], [https://github.com/haikarainen/light/issues])
  2. AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
  3. AM_SILENT_RULES([yes])
  4. AC_CONFIG_SRCDIR([src/light.c])
  5. AC_CONFIG_HEADER([config.h])
  6. AC_CONFIG_FILES([Makefile src/Makefile])
  7. AC_PROG_CC
  8. AC_PROG_INSTALL
  9. AC_HEADER_STDC
  10. AC_ARG_WITH([udev],
  11. AS_HELP_STRING([--with-udev@<:@=PATH@:>@], [use udev instead of SUID root, optional rules.d path]),
  12. [udev=$withval], [udev=no])
  13. AC_MSG_CHECKING(for udev rules.d)
  14. AS_IF([test "x$udev" != "xno"], [
  15. AS_IF([test "x$udev" = "xyes"], [
  16. udevdir="\${prefix}/lib/udev/rules.d"
  17. ],[
  18. udevdir="$udev"
  19. ])
  20. AC_SUBST(udevdir)
  21. AC_MSG_RESULT([$udevdir])
  22. ],[
  23. AC_MSG_RESULT([disabled, classic SUID root mode])
  24. ])
  25. # Allow classic SUID root behavior if udev rule is not used
  26. AM_CONDITIONAL(UDEV, [test "x$udev" != "xno"])
  27. AM_CONDITIONAL(CLASSIC, [test "x$udev" = "xno"])
  28. AC_OUTPUT