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.

53 lines
1.7KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_string_strcasecmp.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_STRING_STRCASECMP
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro tries to find strcasecmp() in string.h.
  12. #
  13. # Use this macro in conjunction with AX_STRINGS_STRCASECMP in your
  14. # configure.in like so:
  15. #
  16. # AX_STRING_STRCASECMP
  17. # if test x"$ac_cv_string_strcasecmp" = "xno" ; then
  18. # AX_STRINGS_STRCASECMP
  19. # fi
  20. #
  21. # This will cause either HAVE_STRING_STRCASECMP or HAVE_STRINGS_STRCASECMP
  22. # to be defined in config.h, which will tell your code what header to
  23. # include to get strcasecmp()'s prototype.
  24. #
  25. # LICENSE
  26. #
  27. # Copyright (c) 2008 Warren Young <warren@etr-usa.com>
  28. #
  29. # Copying and distribution of this file, with or without modification, are
  30. # permitted in any medium without royalty provided the copyright notice
  31. # and this notice are preserved. This file is offered as-is, without any
  32. # warranty.
  33. #serial 8
  34. AU_ALIAS([ETR_STRING_STRCASECMP], [AX_STRING_STRCASECMP])
  35. AC_DEFUN([AX_STRING_STRCASECMP],
  36. [
  37. AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
  38. AC_TRY_LINK(
  39. [ #include <string.h> ],
  40. [ strcasecmp("foo", "bar"); ],
  41. ac_cv_string_strcasecmp=yes,
  42. ac_cv_string_strcasecmp=no)
  43. ])
  44. if test x"$ac_cv_string_strcasecmp" = "xyes"
  45. then
  46. AC_DEFINE(HAVE_STRING_STRCASECMP, 1,
  47. [ Define if your system has strcasecmp() in string.h ])
  48. fi
  49. ]) dnl AX_STRING_STRCASECMP