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