2010-04-05 00:10:28 +09:00
|
|
|
dnl config.m4 for extension msgpack
|
|
|
|
|
2010-07-17 18:46:28 +09:00
|
|
|
dnl Comments in this file start with the string 'dnl'.
|
|
|
|
dnl Remove where necessary. This file will not work
|
|
|
|
dnl without editing.
|
|
|
|
|
|
|
|
dnl Check PHP version:
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(PHP version)
|
2011-08-20 16:36:06 +09:00
|
|
|
AC_TRY_COMPILE([#include "$phpincludedir/main/php_version.h"], [
|
2010-12-27 11:09:14 +09:00
|
|
|
#if PHP_MAJOR_VERSION < 5
|
|
|
|
#error this extension requires at least PHP version 5 or newer
|
2010-07-17 18:46:28 +09:00
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[AC_MSG_RESULT(ok)],
|
2010-12-27 11:09:14 +09:00
|
|
|
[AC_MSG_ERROR([need at least PHP 5 or newer])])
|
2010-07-17 18:46:28 +09:00
|
|
|
|
|
|
|
dnl If your extension references something external, use with:
|
|
|
|
|
|
|
|
PHP_ARG_WITH(msgpack, for msgpack support,
|
2010-04-05 00:10:28 +09:00
|
|
|
Make sure that the comment is aligned:
|
2010-07-17 18:46:28 +09:00
|
|
|
[ --with-msgpack Include msgpack support])
|
|
|
|
|
2010-04-05 00:10:28 +09:00
|
|
|
if test "$PHP_MSGPACK" != "no"; then
|
2011-01-16 17:35:10 +09:00
|
|
|
PHP_NEW_EXTENSION(msgpack, msgpack.c msgpack_pack.c msgpack_unpack.c msgpack_class.c msgpack_convert.c, $ext_shared)
|
2010-04-05 00:10:28 +09:00
|
|
|
|
2010-12-27 11:09:14 +09:00
|
|
|
ifdef([PHP_INSTALL_HEADERS],
|
|
|
|
[
|
|
|
|
PHP_INSTALL_HEADERS([ext/msgpack], [php_msgpack.h])
|
|
|
|
], [
|
|
|
|
PHP_ADD_MAKEFILE_FRAGMENT
|
|
|
|
])
|
2010-04-05 00:10:28 +09:00
|
|
|
fi
|