inttypes-pri.m4 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # inttypes-pri.m4 serial 7 (gettext-0.18.2)
  2. dnl Copyright (C) 1997-2002, 2006, 2008-2017 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. dnl From Bruno Haible.
  7. AC_PREREQ([2.53])
  8. # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
  9. # macros to non-string values. This is the case on AIX 4.3.3.
  10. AC_DEFUN([gt_INTTYPES_PRI],
  11. [
  12. AC_CHECK_HEADERS([inttypes.h])
  13. if test $ac_cv_header_inttypes_h = yes; then
  14. AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
  15. [gt_cv_inttypes_pri_broken],
  16. [
  17. AC_COMPILE_IFELSE(
  18. [AC_LANG_PROGRAM(
  19. [[
  20. #include <inttypes.h>
  21. #ifdef PRId32
  22. char *p = PRId32;
  23. #endif
  24. ]],
  25. [[]])],
  26. [gt_cv_inttypes_pri_broken=no],
  27. [gt_cv_inttypes_pri_broken=yes])
  28. ])
  29. fi
  30. if test "$gt_cv_inttypes_pri_broken" = yes; then
  31. AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
  32. [Define if <inttypes.h> exists and defines unusable PRI* macros.])
  33. PRI_MACROS_BROKEN=1
  34. else
  35. PRI_MACROS_BROKEN=0
  36. fi
  37. AC_SUBST([PRI_MACROS_BROKEN])
  38. ])