mirror of
https://github.com/php/php-src.git
synced 2024-12-04 15:23:44 +08:00
improve utf8_mime2text() signature detection
look also for U8T_CANONICAL, which must exist if new signature was detected
This commit is contained in:
parent
e4cd5235fd
commit
8e06ebbc1f
@ -117,27 +117,49 @@ if test "$PHP_IMAP" != "no"; then
|
||||
AC_EGREP_HEADER(mail_fetch_overview_sequence, $IMAP_INC_DIR/mail.h, [
|
||||
AC_DEFINE(HAVE_IMAP2004,1,[ ])
|
||||
])
|
||||
|
||||
|
||||
dnl Check for new version of the utf8_mime2text() function
|
||||
old_CFLAGS=$CFLAGS
|
||||
CFLAGS="-I$IMAP_INC_DIR"
|
||||
AC_CACHE_CHECK(for utf8_mime2text signature, ac_cv_utf8_mime2text,
|
||||
AC_TRY_COMPILE([
|
||||
AC_CACHE_CHECK(for utf8_mime2text signature, ac_cv_utf8_mime2text,
|
||||
AC_TRY_COMPILE([
|
||||
#include <c-client.h>
|
||||
],[
|
||||
SIZEDTEXT *src, *dst;
|
||||
utf8_mime2text(src, dst);
|
||||
],[
|
||||
ac_cv_utf8_mime2text=old
|
||||
],[
|
||||
ac_cv_utf8_mime2text=new
|
||||
])
|
||||
],[
|
||||
SIZEDTEXT *src, *dst;
|
||||
utf8_mime2text(src, dst);
|
||||
],[
|
||||
ac_cv_utf8_mime2text=old
|
||||
],[
|
||||
ac_cv_utf8_mime2text=new
|
||||
])
|
||||
)
|
||||
if test "$ac_cv_utf8_mime2text" = "new"; then
|
||||
AC_DEFINE(HAVE_NEW_MIME2TEXT, 1, [Whether utf8_mime2text() has new signature])
|
||||
fi
|
||||
CFLAGS=$old_CPPFLAGS
|
||||
|
||||
old_CFLAGS=$CFLAGS
|
||||
CFLAGS="-I$IMAP_INC_DIR"
|
||||
AC_CACHE_CHECK(for U8T_CANONICAL, ac_cv_u8t_canonical,
|
||||
AC_TRY_COMPILE([
|
||||
#include <c-client.h>
|
||||
],[
|
||||
int i = U8T_CANONICAL;
|
||||
],[
|
||||
ac_cv_u8t_canonical=yes
|
||||
],[
|
||||
ac_cv_u8t_canonical=no
|
||||
])
|
||||
)
|
||||
CFLAGS=$old_CPPFLAGS
|
||||
|
||||
if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then
|
||||
AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.])
|
||||
fi
|
||||
if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then
|
||||
AC_MSG_ERROR([utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information.])
|
||||
fi
|
||||
|
||||
dnl Check for c-client version 2001
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$IMAP_INC_DIR
|
||||
|
Loading…
Reference in New Issue
Block a user