Blame m4/inttypes-pri.m4

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