Skip to content

Commit e3adf21

Browse files
committed
fix for pecl
1 parent adf2d5b commit e3adf21

File tree

4 files changed

+140
-247
lines changed

4 files changed

+140
-247
lines changed

Makefile

Lines changed: 0 additions & 193 deletions
This file was deleted.

config.m4

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,46 +17,27 @@ dnl Make sure that the comment is aligned:
1717
dnl [ --enable-connect_pool Enable connect_pool support])
1818

1919
if test "$PHP_CONNECT_POOL" != "no"; then
20-
dnl Write more examples of tests here...
2120

22-
dnl # --with-connect_pool -> check with-path
23-
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
24-
dnl SEARCH_FOR="/include/connect_pool.h" # you most likely want to change this
25-
dnl if test -r $PHP_CONNECT_POOL/$SEARCH_FOR; then # path given as parameter
26-
dnl CONNECT_POOL_DIR=$PHP_CONNECT_POOL
27-
dnl else # search default path list
28-
dnl AC_MSG_CHECKING([for connect_pool files in default path])
29-
dnl for i in $SEARCH_PATH ; do
30-
dnl if test -r $i/$SEARCH_FOR; then
31-
dnl CONNECT_POOL_DIR=$i
32-
dnl AC_MSG_RESULT(found in $i)
33-
dnl fi
34-
dnl done
35-
dnl fi
36-
dnl
37-
dnl if test -z "$CONNECT_POOL_DIR"; then
38-
dnl AC_MSG_RESULT([not found])
39-
dnl AC_MSG_ERROR([Please reinstall the connect_pool distribution])
40-
dnl fi
21+
AC_MSG_CHECKING(PHP version)
22+
AC_TRY_COMPILE([#include "$phpincludedir/main/php_version.h"], [
23+
#if PHP_MAJOR_VERSION < 5
24+
#error this extension requires at least PHP version 5 or newer
25+
#endif
26+
],
27+
[AC_MSG_RESULT(ok)],
28+
[AC_MSG_ERROR([need at least PHP 5 or newer])])
4129

42-
dnl # --with-connect_pool -> add include path
43-
dnl PHP_ADD_INCLUDE($CONNECT_POOL_DIR/include)
4430

45-
dnl # --with-connect_pool -> check for lib and symbol presence
46-
dnl LIBNAME=connect_pool # you may want to change this
47-
dnl LIBSYMBOL=connect_pool # you most likely want to change this
31+
AC_MSG_CHECKING(ZTS)
32+
AC_TRY_COMPILE([#include "$phpincludedir/main/php_config.h"], [
33+
#ifdef ZTS
34+
#error this extension requires no zts, please do not add ' --enable-maintainer-zts' when you configure php
35+
#endif
36+
],
37+
[AC_MSG_RESULT(ok)],
38+
[AC_MSG_ERROR([need php no zts, please do not add ' --enable-maintainer-zts' when you configure php])])
39+
4840

49-
dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
50-
dnl [
51-
dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $CONNECT_POOL_DIR/lib, CONNECT_POOL_SHARED_LIBADD)
52-
dnl AC_DEFINE(HAVE_CONNECT_POOLLIB,1,[ ])
53-
dnl ],[
54-
dnl AC_MSG_ERROR([wrong connect_pool lib version or lib not found])
55-
dnl ],[
56-
dnl -L$CONNECT_POOL_DIR/lib -lm
57-
dnl ])
58-
dnl
59-
dnl PHP_SUBST(CONNECT_POOL_SHARED_LIBADD)
6041

6142
PHP_NEW_EXTENSION(connect_pool, connect_pool.c cpServer.c cpWorker.c \
6243
connect_pool_client.c \

0 commit comments

Comments
 (0)