Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_prog_modprobe.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PROG_MODPROBE
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro searches for a modprobe command, such as can be found on
  12. # Linux systems with loadable kernel module support. PATH is checked
  13. # first, then the default location(s).
  14. #
  15. # This is one of several autoconf macros intended to assist in configuring
  16. # and installing loadable kernel modules.
  17. #
  18. # LICENSE
  19. #
  20. # Copyright (c) 2008 Kaelin Colclasure <kaelin@acm.org>
  21. #
  22. # Copying and distribution of this file, with or without modification, are
  23. # permitted in any medium without royalty provided the copyright notice
  24. # and this notice are preserved. This file is offered as-is, without any
  25. # warranty.
  26. #serial 6
  27. AU_ALIAS([AC_PROG_MODPROBE], [AX_PROG_MODPROBE])
  28. AC_DEFUN([AX_PROG_MODPROBE],[
  29. AC_PATH_PROG(MODPROBE, modprobe, , $PATH:/sbin)
  30. if test -z "$MODPROBE"; then
  31. AC_MSG_WARN([no support for loadable kernel modules])
  32. else
  33. AC_MSG_CHECKING([for module_prefix])
  34. module_prefix=`$MODPROBE -c | grep path.kernel.= \
  35. | sed -e '2,$d' -e 's/.*=//' -e 's/.kernel//'`
  36. AC_MSG_RESULT($module_prefix)
  37. AC_SUBST(module_prefix)
  38. fi
  39. ])