From 161016b55f41ece476946836b1ff0ebf6c5ac89f Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 8 May 2007 10:46:30 +0000 Subject: =?UTF-8?q?2007-05-08=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * configure.ac: Check for working PRIxPTR. --- cpukit/configure.ac | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'cpukit/configure.ac') diff --git a/cpukit/configure.ac b/cpukit/configure.ac index f4452b2d5f..e743c2d537 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -75,6 +75,27 @@ AC_CHECK_TYPES([uint64_t, int64_t]) AC_CHECK_TYPES([uintmax_t, intmax_t]) AC_CHECK_TYPES([uintptr_t, intptr_t]) +AC_CACHE_CHECK([if PRIxPTR works], +[rtems_cv_PRIxPTR],[ + AS_IF([test x"$GCC" = xyes],[ + save_CFLAGS=$CFLAGS + CFLAGS=-Werror]) + + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + #include + #include + ],[ + void *ptr; + printf("%" PRIxPTR "\n", (intptr_t) ptr); + ])], + [rtems_cv_PRIxPTR=yes], + [rtems_cv_PRIxPTR=no]) + + AS_IF([test x"$GCC" = xyes],[ + CFLAGS=$save_CFLAGS]) +]) + # These are conditionally defined by the toolchain # FIXME: we should either conditionally compile those parts in # RTEMS depending on them, or abort - For now, simply check. -- cgit v1.2.3