This repository has been archived by the owner on Jan 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
config.m4
74 lines (64 loc) · 2.22 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
dnl Gearman PHP Extension
dnl
dnl Copyright (C) 2008 James M. Luedke <[email protected]>,
dnl Eric Day <[email protected]>
dnl All rights reserved.
dnl
dnl Use and distribution licensed under the PHP license. See
dnl the LICENSE file in this directory for full text.
CFLAGS="$CFLAGS -Wall"
PHP_ARG_WITH(gearman, whether to enable gearman support,
[[ --with-gearman[=PATH] Include gearman support]])
if test "$PHP_GEARMAN" != "no"; then
for i in $PHP_GEARMAN /usr/local /usr /opt/local; do
if test -r $i/include/libgearman-1.0/gearman.h; then
GEARMAN_LIB_DIR=$i/lib
GEARMAN_INC_DIR=$i/include
AC_MSG_RESULT([found in $i])
break
fi
done
if test -z "$GEARMAN_LIB_DIR" -o -z "$GEARMAN_INC_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Please install libgearman])
fi
PHP_CHECK_LIBRARY(gearman, gearman_client_set_context,
[
PHP_ADD_LIBRARY_WITH_PATH(gearman, $GEARMAN_LIB_DIR, GEARMAN_SHARED_LIBADD)
AC_DEFINE(HAVE_GEARMAN, 1, [Whether you have gearman])
],[
AC_MSG_ERROR([libgearman version 0.10 or later required])
],[
-L$GEARMAN_LIB_DIR -R$GEARMAN_LIB_DIR
])
PHP_CHECK_LIBRARY(gearman, gearman_worker_set_server_option,
[
PHP_ADD_LIBRARY_WITH_PATH(gearman, $GEARMAN_LIB_DIR, GEARMAN_SHARED_LIBADD)
AC_DEFINE(HAVE_GEARMAN, 1, [Whether you have gearman])
],[
AC_MSG_ERROR([libgearman version 0.21 or later required])
],[
-L$GEARMAN_LIB_DIR -R$GEARMAN_LIB_DIR
])
PHP_CHECK_LIBRARY(gearman, gearman_job_error,
[
PHP_ADD_LIBRARY_WITH_PATH(gearman, $GEARMAN_LIB_DIR, GEARMAN_SHARED_LIBADD)
AC_DEFINE(HAVE_GEARMAN, 1, [Whether you have gearman])
],[
AC_MSG_ERROR([libgearman version 1.1.0 or later required])
],[
-L$GEARMAN_LIB_DIR -R$GEARMAN_LIB_DIR
])
PHP_CHECK_LIBRARY(gearman, gearman_client_unique_status,
[
PHP_ADD_LIBRARY_WITH_PATH(gearman, $GEARMAN_LIB_DIR, GEARMAN_SHARED_LIBADD)
AC_DEFINE(HAVE_GEARMAN, 1, [Whether you have gearman])
],[
AC_MSG_ERROR([libgearman version 1.1.0 or later required])
],[
-L$GEARMAN_LIB_DIR -R$GEARMAN_LIB_DIR
])
PHP_SUBST(GEARMAN_SHARED_LIBADD)
PHP_ADD_INCLUDE($GEARMAN_INC_DIR)
PHP_NEW_EXTENSION(gearman, php_gearman.c, $ext_shared)
fi