This repository has been archived by the owner on May 27, 2022. It is now read-only.
forked from phadej/igbinary
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.m4
39 lines (30 loc) · 1.45 KB
/
config.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
dnl config.m4 for extension igbinary
dnl Comments in this file start with the string 'dnl'.
dnl Remove where necessary. This file will not work
dnl without editing.
dnl If your extension references something external, use with:
dnl PHP_ARG_WITH(igbinary, for igbinary support,
dnl Make sure that the comment is aligned:
dnl [ --with-igbinary Include igbinary support])
dnl Otherwise use enable:
PHP_ARG_ENABLE(igbinary, whether to enable igbinary support,
[ --enable-igbinary Enable igbinary support])
if test "$PHP_IGBINARY" != "no"; then
AC_CHECK_HEADERS([stdbool.h],, AC_MSG_ERROR([stdbool.h not exists]))
AC_CHECK_HEADERS([stddef.h],, AC_MSG_ERROR([stddef.h not exists]))
AC_CHECK_HEADERS([stdint.h],, AC_MSG_ERROR([stdint.h not exists]))
AC_CHECK_SIZEOF([long])
dnl GCC
AC_MSG_CHECKING(compiler type)
if test ! -z "`$CC --version | grep -i GCC`"; then
AC_MSG_RESULT(gcc)
PHP_IGBINARY_CFLAGS="-Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wshadow -Wwrite-strings -Wswitch -Winline -finline-limit=10000 --param large-function-growth=10000 --param inline-unit-growth=10000"
elif test ! -z "`$CC --version | grep -i ICC`"; then
AC_MSG_RESULT(icc)
PHP_IGBINARY_CFLAGS="-no-prec-div -O3 -x0 -unroll2"
else
AC_MSG_RESULT(other)
fi
PHP_INSTALL_HEADERS([ext/igbinary], [igbinary.h])
PHP_NEW_EXTENSION(igbinary, igbinary.c hash_si.c hash_function.c, $ext_shared,, $PHP_IGBINARY_CFLAGS)
fi