From eb9a7a76e6e9ae0faf94b212b50c492954dfdb28 Mon Sep 17 00:00:00 2001 From: foobar Date: Mon, 20 Jun 2005 11:01:07 +0000 Subject: [PATCH] - Added AC_TIMELIB_C_BIGENDIAN # No need to add it to config.m4, it's run in PHP configure.in already. # Only added here so that the standalone configure.in (to be added later) # can use it. --- ext/date/lib/timelib.m4 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 index b99dc0c786..6fd8504efe 100644 --- a/ext/date/lib/timelib.m4 +++ b/ext/date/lib/timelib.m4 @@ -33,6 +33,34 @@ if test "$ac_cv_int_type_$1" = "yes"; then fi ])dnl +dnl +dnl AC_TIMELIB_C_BIGENDIAN +dnl Replacement macro for AC_C_BIGENDIAN +dnl +AC_DEFUN([AC_TIMELIB_C_BIGENDIAN], +[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php, + [ + ac_cv_c_bigendian_php=unknown + AC_TRY_RUN( + [ +int main(void) +{ + short one = 1; + char *cp = (char *)&one; + + if (*cp == 0) { + return(0); + } else { + return(1); + } +} + ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) + ]) + if test $ac_cv_c_bigendian_php = yes; then + AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word]) + fi +])dnl + dnl Check for types, sizes, etc. needed by timelib AC_CHECK_SIZEOF(long, 8) AC_CHECK_SIZEOF(int, 4) -- 2.40.0