forked from fujimoto/php-tokyo-dystopia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.m4
39 lines (35 loc) · 1.64 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
PHP_ARG_ENABLE(tokyo_dystopia, whether to enable tokyo dystopia support,
[ --enable-tokyo-dystopia enable tokyo dystopia support])
if test -z "$PHP_TOKYO_DYSTOPIA_DIR"; then
PHP_ARG_WITH(tokyo-dystopia-dir, for the location of tokyo dystopia,
[ --with-tokyo-dystopia-dir[=DIR] Set the path to tokyo dystopia install prefix.], no, no)
fi
if test "$PHP_TOKYO_DYSTOPIA" = "yes"; then
if test "$PHP_TOKYO_DYSTOPIA_DIR" != "no" && test "$PHP_TOKYO_DYSTOPIA_DIR" != "yes"; then
if test -f "$PHP_TOKYO_DYSTOPIA_DIR/include/dystopia.h"; then
PHP_TOKYO_DYSTOPIA_DIR="$PHP_TOKYO_DYSTOPIA_DIR"
PHP_TOKYO_DYSTOPIA_INCDIR="$PHP_TOKYO_DYSTOPIA_DIR/include"
else
AC_MSG_ERROR([Can't find tokyo dystopia headers under "$PHP_TOKYO_DYSTOPIA_DIR"])
fi
else
for i in /usr/local /usr; do
if test -f "$i/include/dystopia.h"; then
PHP_TOKYO_DYSTOPIA_DIR="$i"
PHP_TOKYO_DYSTOPIA_INCDIR="$i/include"
fi
done
fi
dnl # cairo
AC_MSG_CHECKING([for the location of tokyo dystopia])
if test "$PHP_TOKYO_DYSTOPIA_DIR" = "no"; then
AC_MSG_ERROR([tokyo dystopia extension requires tokyo dystopia installation. Use --with-tokyo-dystopia-dir=<DIR> to specify prefix where tokyo dystopia include and library are located])
else
AC_MSG_RESULT([$PHP_TOKYO_DYSTOPIA_DIR])
PHP_ADD_INCLUDE($PHP_TOKYO_DYSTOPIA_INCDIR)
fi
AC_DEFINE(HAVE_TOKYO_DYSTOPIA, 1, [Whether you have tokyo dystopia or not])
PHP_ADD_LIBRARY_WITH_PATH(tokyodystopia, $PHP_TOKYO_DYSTOPIA_DIR/lib, TOKYO_DYSTOPIA_SHARED_LIBADD)
PHP_NEW_EXTENSION(tokyo_dystopia, tokyo_dystopia.c, $ext_shared)
PHP_SUBST(TOKYO_DYSTOPIA_SHARED_LIBADD)
fi