forked from ceph/phprados
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.m4
57 lines (49 loc) · 1.74 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
PHP_ARG_ENABLE(rados, [Enable the rados extension],
[ --enable-rados[=DIR] Enable "RADOS" extension support], no)
if test $PHP_RADOS != "no"; then
AC_MSG_CHECKING([for RADOS files (librados.h)])
for i in $PHP_RADOS /usr/local /usr; do
if test -r $i/include/rados/librados.h; then
RADOS_DIR=$i
AC_MSG_RESULT(found in $i)
break
fi
done
if test -z "$RADOS_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Please reinstall the RADOS library from http://www.ceph.com])
else
PHP_ADD_LIBRARY_WITH_PATH(rados, $RADOS_DIR/$PHP_LIBDIR, RADOS_SHARED_LIBADD)
PHP_ADD_INCLUDE($RADOS_DIR/include)
fi
AC_MSG_CHECKING([for libatomic-ops files (atomic_ops.h)])
for i in $PHP_RADOS /usr/local /usr; do
if test -r $i/include/atomic_ops.h; then
ATOMIC_DIR=$i
AC_MSG_RESULT(found in $i)
break
fi
done
if test -z "$ATOMIC_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Please reinstall the libatomic-ops library!])
else
PHP_ADD_INCLUDE($ATOMIC_DIR/include)
fi
AC_MSG_CHECKING([for libSSL files (crypto.h)])
for i in $PHP_RADOS /usr/local /usr; do
if test -r $i/include/openssl/crypto.h; then
CRYPTO_DIR=$i
AC_MSG_RESULT(found in $i)
break
fi
done
if test -z "$CRYPTO_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Please reinstall the libssl library from http://www.openssl.org/])
else
PHP_ADD_LIBRARY_WITH_PATH(crypto, $CRYPTO_DIR/$PHP_LIBDIR, RADOS_SHARED_LIBADD)
fi
PHP_SUBST(RADOS_SHARED_LIBADD)
PHP_NEW_EXTENSION(rados, [rados.c], $ext_shared)
fi