/config/ac_exec.m4

https://code.google.com/ · m4 · 39 lines · 19 code · 2 blank · 18 comment · 0 complexity · 93f44d171c1ffd6886e0cb871d3027cd MD5 · raw file

  1. ##*****************************************************************************
  2. ## $Id$
  3. ##*****************************************************************************
  4. # AUTHOR:
  5. # Albert Chu
  6. #
  7. # SYNOPSIS:
  8. # AC_EXEC
  9. #
  10. # DESCRIPTION:
  11. # Check if user wants to compile execcmd
  12. #
  13. # WARNINGS:
  14. # This macro must be placed after AC_PROG_CC or equivalent.
  15. ##*****************************************************************************
  16. AC_DEFUN([AC_EXEC],
  17. [
  18. #
  19. # Check for whether to include exec module
  20. #
  21. AC_MSG_CHECKING([for whether to build exec module])
  22. AC_ARG_WITH([exec],
  23. AC_HELP_STRING([--with-exec], [Build exec module]),
  24. [ case "$withval" in
  25. no) ac_with_exec=no ;;
  26. yes) ac_with_exec=yes ;;
  27. *) AC_MSG_RESULT([doh!])
  28. AC_MSG_ERROR([bad value "$withval" for --with-exec]) ;;
  29. esac
  30. ]
  31. )
  32. AC_MSG_RESULT([${ac_with_exec=yes}])
  33. if test "$ac_with_exec" = "yes"; then
  34. ac_have_exec=yes
  35. AC_ADD_STATIC_MODULE("execcmd")
  36. fi
  37. ])