@@ -17,46 +17,27 @@ dnl Make sure that the comment is aligned:
17
17
dnl [ --enable-connect_pool Enable connect_pool support])
18
18
19
19
if test "$PHP_CONNECT_POOL" != "no"; then
20
- dnl Write more examples of tests here...
21
20
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] ) ] )
41
29
42
- dnl # --with-connect_pool -> add include path
43
- dnl PHP_ADD_INCLUDE($CONNECT_POOL_DIR/include)
44
30
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
+
48
40
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)
60
41
61
42
PHP_NEW_EXTENSION(connect_pool, connect_pool.c cpServer.c cpWorker.c \
62
43
connect_pool_client.c \
0 commit comments