Blame m4/inttypes-pri.m4

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