summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-06-20 11:01:07 +0000
committerfoobar <sniper@php.net>2005-06-20 11:01:07 +0000
commiteb9a7a76e6e9ae0faf94b212b50c492954dfdb28 (patch)
treee5c81fee895700d8910550f308c18108edd8a861
parent643709eb967d841be5111af20535c15be51d7fd6 (diff)
downloadphp-git-eb9a7a76e6e9ae0faf94b212b50c492954dfdb28.tar.gz
- 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.
-rw-r--r--ext/date/lib/timelib.m428
1 files changed, 28 insertions, 0 deletions
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)