inttypes-pri.m4 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # inttypes-pri.m4 serial 6 (gettext-0.18)
  2. dnl Copyright (C) 1997-2002, 2006, 2008-2010 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.52])
  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_TRY_COMPILE([#include <inttypes.h>
  18. #ifdef PRId32
  19. char *p = PRId32;
  20. #endif
  21. ], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes])
  22. ])
  23. fi
  24. if test "$gt_cv_inttypes_pri_broken" = yes; then
  25. AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
  26. [Define if <inttypes.h> exists and defines unusable PRI* macros.])
  27. PRI_MACROS_BROKEN=1
  28. else
  29. PRI_MACROS_BROKEN=0
  30. fi
  31. AC_SUBST([PRI_MACROS_BROKEN])
  32. ])