From f698831f0ae0cd86225eb647ae4aeb813f08d3b5 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 25 Sep 2008 01:51:49 -0400 Subject: Sync with upstream changes --- replace/libreplace_cc.m4 | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'replace/libreplace_cc.m4') diff --git a/replace/libreplace_cc.m4 b/replace/libreplace_cc.m4 index 0ce0958a9..30c63f2f0 100644 --- a/replace/libreplace_cc.m4 +++ b/replace/libreplace_cc.m4 @@ -109,25 +109,34 @@ AC_CHECK_HEADERS([standards.h]) # Solaris needs HAVE_LONG_LONG defined AC_CHECK_TYPES(long long) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(char) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) + AC_CHECK_TYPE(uint_t, unsigned int) AC_CHECK_TYPE(int8_t, char) AC_CHECK_TYPE(uint8_t, unsigned char) AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(uint16_t, unsigned short) + +if test $ac_cv_sizeof_int -eq 4 ; then +AC_CHECK_TYPE(int32_t, int) +AC_CHECK_TYPE(uint32_t, unsigned int) +elif test $ac_cv_size_long -eq 4 ; then AC_CHECK_TYPE(int32_t, long) AC_CHECK_TYPE(uint32_t, unsigned long) +else +AC_MSG_ERROR([LIBREPLACE no 32-bit type found]) +fi + AC_CHECK_TYPE(int64_t, long long) AC_CHECK_TYPE(uint64_t, unsigned long long) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(ssize_t) @@ -158,7 +167,8 @@ AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ FOOBAR y; } f2[] = { {FOO_ONE} - }; + }; + static const FOOBAR f3[] = {FOO_ONE}; ], libreplace_cv_immediate_structures=yes, libreplace_cv_immediate_structures=no, -- cgit