aria2_arg.m4 1.1 KB

123456789101112131415161718192021222324252627282930
  1. dnl ARIA2_ARG_WITH(PACKAGE)
  2. dnl wrapper for AC_ARG_WITH with default value 'yes'.
  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 if it is installed.]),
  7. [with_$1_requested=$withval with_$1=$withval], [with_$1=yes])]
  8. )
  9. dnl ARIA2_ARG_ENABLE(FEATURE)
  10. dnl wrapper for AC_ARG_ENABLE with default value 'yes'.
  11. dnl If --enable-$1 is given explicitly, set enable_$1_requested to given value.
  12. AC_DEFUN([ARIA2_ARG_ENABLE],
  13. [AC_ARG_ENABLE([$1],
  14. AS_HELP_STRING([--enable-$1], [Enable $1 support.]),
  15. [enable_$1_requested=$enableval enable_$1=$enableval], [enable_$1=yes])]
  16. )
  17. dnl ARIA2_DEP_NOT_MET(PACKAGE)
  18. dnl Show error message PACKAGE is missing and exit.
  19. AC_DEFUN([ARIA2_DEP_NOT_MET],
  20. [AC_MSG_FAILURE([$1 is requested but not found in the system.])])
  21. dnl ARIA2_FET_NOT_SUPPORTED(FEATURE)
  22. dnl Show error message FEATURE can not be enabled and exit.
  23. AC_DEFUN([ARIA2_FET_NOT_SUPPORTED],
  24. [AC_MSG_FAILURE([$1 is requested but cannot be enabled with current\
  25. configuration.\
  26. Make sure that dependent libraries are installed and configure script options\
  27. are correct.])])