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
|
dnl $Id$
dnl config.m4 for extension Sablot
PHP_ARG_WITH(expat-dir, for Sablotron XSL support,
[ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50])
PHP_ARG_WITH(sablot, for Sablotron XSL support,
[ --with-sablot[=DIR] Include Sablotron support])
if test "$PHP_SABLOT" != "no"; then
if test -r $PHP_SABLOT/include/sablot.h; then
SABLOT_DIR=$PHP_SABLOT
else
AC_MSG_CHECKING(for Sablotron in default path)
for i in /usr/local /usr; do
if test -r $i/include/sablot.h; then
SABLOT_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
fi
if test -z "$SABLOT_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the Sablotron distribution)
fi
PHP_ADD_INCLUDE($SABLOT_DIR/include)
PHP_SUBST(SABLOT_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(sablot, $SABLOT_DIR/lib, SABLOT_SHARED_LIBADD)
if test -z "$PHP_EXPAT_DIR"; then
PHP_EXPAT_DIR=""
fi
testval=no
for i in $PHP_EXPAT_DIR $SABLOT_DIR; do
if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.so; then
AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib)
PHP_ADD_INCLUDE($i/include)
AC_CHECK_LIB(sablot, SablotSetEncoding, AC_DEFINE(HAVE_SABLOT_SET_ENCODING,1,[ ]))
testval=yes
fi
done
if test "$testval" = "no"; then
PHP_ADD_LIBRARY(xmlparse)
PHP_ADD_LIBRARY(xmltok)
fi
AC_DEFINE(HAVE_SABLOT,1,[ ])
PHP_EXTENSION(sablot, $ext_shared)
fi
|