A set of tools for configuring the Logitech G19 keyboard. Based in: https://github.com/Gnome15/gnome15
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.

49 lines
1.2 KiB

4 years ago
  1. # ===========================================================================
  2. # http://www.gnu.org/software/autoconf-archive/ax_python_module.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PYTHON_MODULE(modname[, fatal])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Checks for Python module.
  12. #
  13. # If fatal is non-empty then absence of a module will trigger an error.
  14. #
  15. # LICENSE
  16. #
  17. # Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
  18. #
  19. # Copying and distribution of this file, with or without modification, are
  20. # permitted in any medium without royalty provided the copyright notice
  21. # and this notice are preserved. This file is offered as-is, without any
  22. # warranty.
  23. #serial 5
  24. AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
  25. AC_DEFUN([AX_PYTHON_MODULE],[
  26. if test -z $PYTHON;
  27. then
  28. PYTHON="python"
  29. fi
  30. PYTHON_NAME=`basename $PYTHON`
  31. AC_MSG_CHECKING($PYTHON_NAME module: $1)
  32. $PYTHON -c "import $1" 2>/dev/null
  33. if test $? -eq 0;
  34. then
  35. AC_MSG_RESULT(yes)
  36. eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
  37. else
  38. AC_MSG_RESULT(no)
  39. eval AS_TR_CPP(HAVE_PYMOD_$1)=no
  40. #
  41. if test -n "$2"
  42. then
  43. AC_MSG_ERROR(failed to find required module $1)
  44. exit 1
  45. fi
  46. fi
  47. ])