msgpack/php/config.m4

29 lines
885 B
Plaintext
Raw Normal View History

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)
AC_TRY_COMPILE([#include "php/main/php_version.h"], [
#if PHP_MAJOR_VERSION < 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 2)
#error this extension requires at least PHP version 5.2.0
#endif
],
[AC_MSG_RESULT(ok)],
[AC_MSG_ERROR([need at least PHP 5.2.0])])
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
2010-07-17 18:46:28 +09:00
PHP_NEW_EXTENSION(msgpack, msgpack.c msgpack_pack.c msgpack_unpack.c msgpack_class.c, $ext_shared)
2010-04-05 00:10:28 +09:00
2010-07-17 18:46:28 +09:00
PHP_INSTALL_HEADERS([ext/msgpack], [php_msgpack.h])
2010-04-05 00:10:28 +09:00
fi