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.

61 lines
1.8KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_with_apxs.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_WITH_APXS([value-if-not-found], [path])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Locates an installed apxs binary, placing the result in the precious
  12. # variable $APXS. Accepts a preset $APXS, then --with-apxs, and failing
  13. # that searches for apxs in the given path (which defaults to the system
  14. # path). If apxs is found, $APXS is set to the full path of the binary;
  15. # otherwise it is set to VALUE-IF-NOT-FOUND, which defaults to apxs.
  16. #
  17. # Example:
  18. #
  19. # AX_WITH_APXS(missing)
  20. #
  21. # LICENSE
  22. #
  23. # Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu>
  24. #
  25. # Copying and distribution of this file, with or without modification, are
  26. # permitted in any medium without royalty provided the copyright notice
  27. # and this notice are preserved. This file is offered as-is, without any
  28. # warranty.
  29. #serial 11
  30. AC_DEFUN([AX_WITH_APXS],
  31. [
  32. AC_ARG_VAR([APXS])
  33. dnl unless APXS was supplied to us (as a precious variable)
  34. if test -z "$APXS"
  35. then
  36. AC_MSG_CHECKING(for --with-apxs)
  37. AC_ARG_WITH(apxs,
  38. AS_HELP_STRING([--with-apxs=APXS],
  39. [absolute path name of apxs executable]),
  40. [ if test "$withval" != "yes"
  41. then
  42. APXS="$withval"
  43. AC_MSG_RESULT($withval)
  44. else
  45. AC_MSG_RESULT(no)
  46. fi
  47. ],
  48. [ AC_MSG_RESULT(no)
  49. ])
  50. fi
  51. dnl if it's still not found, check the paths, or use the fallback
  52. if test -z "$APXS"
  53. then
  54. AC_PATH_PROG([APXS], apxs, m4_ifval([$1],[$1],[apxs]), $2)
  55. fi
  56. ])