xref: /PHP-5.3/ext/dom/config.m4 (revision 7ed3c453)
1dnl
2dnl $Id$
3dnl
4
5PHP_ARG_ENABLE(dom, whether to enable DOM support,
6[  --disable-dom           Disable DOM support], yes)
7
8if test -z "$PHP_LIBXML_DIR"; then
9  PHP_ARG_WITH(libxml-dir, libxml2 install dir,
10  [  --with-libxml-dir[=DIR]   DOM: libxml2 install prefix], no, no)
11fi
12
13if test "$PHP_DOM" != "no"; then
14
15  if test "$PHP_LIBXML" = "no"; then
16    AC_MSG_ERROR([DOM extension requires LIBXML extension, add --enable-libxml])
17  fi
18
19  PHP_SETUP_LIBXML(DOM_SHARED_LIBADD, [
20    AC_DEFINE(HAVE_DOM,1,[ ])
21    PHP_NEW_EXTENSION(dom, [php_dom.c attr.c document.c domerrorhandler.c \
22                            domstringlist.c domexception.c namelist.c \
23                            processinginstruction.c cdatasection.c \
24                            documentfragment.c domimplementation.c \
25                            element.c node.c string_extend.c characterdata.c \
26                            documenttype.c domimplementationlist.c entity.c \
27                            nodelist.c text.c comment.c domconfiguration.c \
28                            domimplementationsource.c entityreference.c \
29                            notation.c xpath.c dom_iterators.c \
30                            typeinfo.c domerror.c domlocator.c namednodemap.c userdatahandler.c],
31                            $ext_shared)
32    PHP_SUBST(DOM_SHARED_LIBADD)
33    PHP_INSTALL_HEADERS([ext/dom/xml_common.h])
34    PHP_ADD_EXTENSION_DEP(dom, libxml)
35  ], [
36    AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
37  ])
38fi
39