Blame gettext-runtime/m4/inttypes-pri.m4

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