aria2_arg.m4 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. dnl ARIA2_ARG_WITH(PACKAGE)
  2. dnl wrapper for AC_ARG_WITH with default value 'no'.
  3. dnl If --with-$1 is given explicitly, set with_$1_requested to given value.
  4. AC_DEFUN([ARIA2_ARG_WITH],
  5. [AC_ARG_WITH([$1],
  6. AS_HELP_STRING([--with-$1], [Use $1.]),
  7. [with_$1_requested=$withval with_$1=$withval], [with_$1=no])]
  8. )
  9. dnl ARIA2_ARG_WITHOUT(PACKAGE)
  10. dnl wrapper for AC_ARG_WITH with default value 'yes'.
  11. dnl If --with-$1 is given explicitly, set with_$1_requested to given value.
  12. AC_DEFUN([ARIA2_ARG_WITHOUT],
  13. [AC_ARG_WITH([$1],
  14. AS_HELP_STRING([--without-$1], [Do not use $1. [default=check]]),
  15. [with_$1_requested=$withval with_$1=$withval], [with_$1=yes])]
  16. )
  17. dnl ARIA2_ARG_ENABLE(FEATURE)
  18. dnl wrapper for AC_ARG_ENABLE with default value 'no'.
  19. dnl If --enable-$1 is given explicitly, set enable_$1_requested to given value.
  20. AC_DEFUN([ARIA2_ARG_ENABLE],
  21. [AC_ARG_ENABLE([$1],
  22. AS_HELP_STRING([--enable-$1], [Enable $1 support.]),
  23. [enable_$1_requested=$enableval enable_$1=$enableval], [enable_$1=no])]
  24. )
  25. dnl ARIA2_ARG_DISABLE(FEATURE)
  26. dnl wrapper for AC_ARG_ENABLE with default value 'yes'.
  27. dnl If --enable-$1 is given explicitly, set enable_$1_requested to given value.
  28. AC_DEFUN([ARIA2_ARG_DISABLE],
  29. [AC_ARG_ENABLE([$1],
  30. AS_HELP_STRING([--disable-$1], [Disable $1 support. [default=check]]),
  31. [enable_$1_requested=$enableval enable_$1=$enableval], [enable_$1=yes])]
  32. )
  33. dnl ARIA2_DEP_NOT_MET(PACKAGE)
  34. dnl Show error message PACKAGE is missing and exit.
  35. AC_DEFUN([ARIA2_DEP_NOT_MET],
  36. [AC_MSG_FAILURE([$1 is requested but not found in the system.])])
  37. dnl ARIA2_FET_NOT_SUPPORTED(FEATURE)
  38. dnl Show error message FEATURE can not be enabled and exit.
  39. AC_DEFUN([ARIA2_FET_NOT_SUPPORTED],
  40. [AC_MSG_FAILURE([$1 is requested but cannot be enabled with current\
  41. configuration.\
  42. Make sure that dependent libraries are installed and configure script options\
  43. are correct.])])