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.

56 lines
1.9KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_include_strcasecmp.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_INCLUDE_STRCASECMP
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro tries to find a header for strcasecmp() in strings.h, then
  12. # string.h, and AC_DEFINEs AX_STRCASECMP_HEADER to the value it found. Use
  13. # it in your source like so:
  14. #
  15. # #ifdef AX_STRCASECMP_HEADER
  16. # #include AX_STRCASECMP_HEADER
  17. # #endif
  18. #
  19. # LICENSE
  20. #
  21. # Copyright (c) 2012 Leo Davis <ldavis@speechfxinc.com>
  22. #
  23. # Copying and distribution of this file, with or without modification, are
  24. # permitted in any medium without royalty provided the copyright notice
  25. # and this notice are preserved. This file is offered as-is, without any
  26. # warranty.
  27. #serial 2
  28. AC_DEFUN([AX_INCLUDE_STRCASECMP],
  29. [
  30. AC_CACHE_CHECK([for strcasecmp header file], [ax_cv_include_strcasecmp_found], [
  31. ax_cv_include_strcasecmp_found=no
  32. AC_TRY_LINK(
  33. [ #include <strings.h> ],
  34. [ strcasecmp("foo", "bar"); ],
  35. [ax_cv_include_strcasecmp_found='<strings.h>'],
  36. [ax_cv_include_strcasecmp_found=no])
  37. if test x"$ax_cv_include_strcasecmp_found" = "xno"
  38. then
  39. AC_TRY_LINK(
  40. [ #include <string.h> ],
  41. [ strcasecmp("foo", "bar"); ],
  42. [ax_cv_include_strcasecmp_found='<string.h>'],
  43. [ax_cv_include_strcasecmp_found=no])
  44. fi
  45. ])
  46. if test x"$ax_cv_include_strcasecmp_found" != "xno"
  47. then
  48. AC_DEFINE_UNQUOTED([AX_STRCASECMP_HEADER], [$ax_cv_include_strcasecmp_found],
  49. [Defined to <strings.h> or <string.h> if strcasecmp is found])
  50. fi
  51. ]) dnl AX_INCLUDE_STRCASECMP