-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathconfig.m4
41 lines (33 loc) · 1.11 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
dnl $Id$
dnl config.m4 for extension vips
PHP_ARG_WITH(vips, for vips support,
[ --with-vips Include vips support])
VIPS_MIN_VERSION=8.3
if test x"$PHP_VIPS" != x"no"; then
if ! pkg-config --atleast-pkgconfig-version 0.2; then
AC_MSG_ERROR([you need at least pkg-config 0.2 for this module])
PHP_VIPS=no
fi
fi
if test x"$PHP_VIPS" != x"no"; then
if ! pkg-config vips --atleast-version $VIPS_MIN_VERSION; then
AC_MSG_ERROR([you need at least vips $VIPS_MIN_VERSION for this module])
PHP_VIPS=no
fi
fi
if test x"$PHP_VIPS" != x"no"; then
VIPS_CFLAGS=`pkg-config vips --cflags-only-other`
VIPS_INCS=`pkg-config vips --cflags-only-I`
VIPS_LIBS=`pkg-config vips --libs`
PHP_CHECK_LIBRARY(vips, vips_init,
[
PHP_EVAL_INCLINE($VIPS_INCS)
PHP_EVAL_LIBLINE($VIPS_LIBS, VIPS_SHARED_LIBADD)
],[
AC_MSG_ERROR([libvips not found. Check config.log for more information.])
],[$VIPS_LIBS]
)
AC_DEFINE(HAVE_VIPS, 1, [Whether you have vips])
PHP_NEW_EXTENSION(vips, vips.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $VIPS_CFLAGS)
PHP_SUBST(VIPS_SHARED_LIBADD)
fi