Test for EBCDIC platform

This commit is contained in:
Martin Kraemer 2000-04-13 12:24:28 +00:00
parent efabab1a34
commit 06e504d32a
2 changed files with 22 additions and 0 deletions

View File

@ -604,3 +604,22 @@ AC_DEFUN(PHP_DECLARED_TIMEZONE,[
AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone]) AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
fi fi
]) ])
AC_DEFUN(PHP_EBCDIC,[
AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
AC_TRY_RUN( [
int main(void) {
return (unsigned char)'A' != (unsigned char)0xC1;
}
],[
ac_cv_ebcdic="yes"
],[
ac_cv_ebcdic="no"
],[
ac_cv_ebcdic="no"
])])
if test "$ac_cv_ebcdic" = "yes"; then
AC_DEFINE(CHARSET_EBCDIC,, [Define if system uses EBCDIC])
fi
])

View File

@ -153,6 +153,9 @@ if test -n "$PROG_SENDMAIL"; then
AC_DEFINE(HAVE_SENDMAIL) AC_DEFINE(HAVE_SENDMAIL)
fi fi
dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset
PHP_EBCDIC
dnl dnl
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs. dnl and source packages. This should be harmless on other OSs.