inttypes-pri.m4 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. # inttypes-pri.m4 serial 1 (gettext-0.11.4)
  2. dnl Copyright (C) 1997-2002 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. # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
  8. # macros to non-string values. This is the case on AIX 4.3.3.
  9. AC_DEFUN([gt_INTTYPES_PRI],
  10. [
  11. AC_REQUIRE([gt_HEADER_INTTYPES_H])
  12. if test $gt_cv_header_inttypes_h = yes; then
  13. AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
  14. gt_cv_inttypes_pri_broken,
  15. [
  16. AC_TRY_COMPILE([#include <inttypes.h>
  17. #ifdef PRId32
  18. char *p = PRId32;
  19. #endif
  20. ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
  21. ])
  22. fi
  23. if test "$gt_cv_inttypes_pri_broken" = yes; then
  24. AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
  25. [Define if <inttypes.h> exists and defines unusable PRI* macros.])
  26. fi
  27. ])