if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
-
- dnl This creates a file so it has to be after above macros
- PHP_CHECK_TYPES([int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t], [
- ext/mysqlnd/php_mysqlnd_config.h
- ],[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
- ])
fi
-
- dnl
- dnl Check if the compiler supports Decimal32/64/128 types from the IEEE-754 2008 version
- dnl References: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1657.pdf
- dnl http://speleotrove.com/decimal/
- dnl
- AC_CACHE_CHECK([whether whether compiler supports Decimal32/64/128 types], ac_cv_decimal_fp_supported,[
- AC_TRY_RUN( [
- #include <stdio.h>
- #include <string.h>
-
- int main(int argc, char **argv) {
- typedef float dec32 __attribute__((mode(SD)));
- dec32 k = 99.49f;
- double d2 = (double)k;
- const char *check_str = "99.49";
- char print_str[32];
-
- snprintf(print_str, 32, "%f", d2);
- return memcmp(print_str, check_str, 5);
- }
- ],[
- ac_cv_decimal_fp_supported=yes
- ],[
- ac_cv_decimal_fp_supported=no
- ],[
- ac_cv_decimal_fp_supported=no
- ])])
- if test "$ac_cv_decimal_fp_supported" = "yes"; then
- AC_DEFINE(HAVE_DECIMAL_FP_SUPPORT, 1, [Define if the compiler supports Decimal32/64/128 types.])
- fi