Blame m4/inttypes-pri.m4

Packit 971217
# inttypes-pri.m4 serial 4 (gettext-0.16)
Packit 971217
dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
Packit 971217
dnl This file is free software; the Free Software Foundation
Packit 971217
dnl gives unlimited permission to copy and/or distribute it,
Packit 971217
dnl with or without modifications, as long as this notice is preserved.
Packit 971217
Packit 971217
dnl From Bruno Haible.
Packit 971217
Packit 971217
AC_PREREQ(2.52)
Packit 971217
Packit 971217
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
Packit 971217
# macros to non-string values.  This is the case on AIX 4.3.3.
Packit 971217
Packit 971217
AC_DEFUN([gt_INTTYPES_PRI],
Packit 971217
[
Packit 971217
  AC_CHECK_HEADERS([inttypes.h])
Packit 971217
  if test $ac_cv_header_inttypes_h = yes; then
Packit 971217
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
Packit 971217
      gt_cv_inttypes_pri_broken,
Packit 971217
      [
Packit 971217
        AC_TRY_COMPILE([#include <inttypes.h>
Packit 971217
#ifdef PRId32
Packit 971217
char *p = PRId32;
Packit 971217
#endif
Packit 971217
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
Packit 971217
      ])
Packit 971217
  fi
Packit 971217
  if test "$gt_cv_inttypes_pri_broken" = yes; then
Packit 971217
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
Packit 971217
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
Packit 971217
    PRI_MACROS_BROKEN=1
Packit 971217
  else
Packit 971217
    PRI_MACROS_BROKEN=0
Packit 971217
  fi
Packit 971217
  AC_SUBST([PRI_MACROS_BROKEN])
Packit 971217
])