1PHP_ARG_ENABLE([dom], 2 [whether to enable DOM support], 3 [AS_HELP_STRING([--disable-dom], 4 [Disable DOM support])], 5 [yes]) 6 7if test "$PHP_DOM" != "no"; then 8 PHP_SETUP_LIBXML([DOM_SHARED_LIBADD], [ 9 AC_DEFINE([HAVE_DOM], [1], 10 [Define to 1 if the PHP extension 'dom' is available.]) 11 PHP_LEXBOR_CFLAGS="-I@ext_srcdir@/lexbor -DLEXBOR_STATIC" 12 LEXBOR_DIR="lexbor/lexbor" 13 LEXBOR_SOURCES=m4_normalize([" 14 $LEXBOR_DIR/core/array_obj.c 15 $LEXBOR_DIR/core/array.c 16 $LEXBOR_DIR/core/avl.c 17 $LEXBOR_DIR/core/bst.c 18 $LEXBOR_DIR/core/conv.c 19 $LEXBOR_DIR/core/diyfp.c 20 $LEXBOR_DIR/core/dobject.c 21 $LEXBOR_DIR/core/dtoa.c 22 $LEXBOR_DIR/core/hash.c 23 $LEXBOR_DIR/core/mem.c 24 $LEXBOR_DIR/core/mraw.c 25 $LEXBOR_DIR/core/print.c 26 $LEXBOR_DIR/core/serialize.c 27 $LEXBOR_DIR/core/shs.c 28 $LEXBOR_DIR/core/str.c 29 $LEXBOR_DIR/core/strtod.c 30 $LEXBOR_DIR/css/css.c 31 $LEXBOR_DIR/css/log.c 32 $LEXBOR_DIR/css/parser.c 33 $LEXBOR_DIR/css/selectors/pseudo_state.c 34 $LEXBOR_DIR/css/selectors/pseudo.c 35 $LEXBOR_DIR/css/selectors/selector.c 36 $LEXBOR_DIR/css/selectors/selectors.c 37 $LEXBOR_DIR/css/selectors/state.c 38 $LEXBOR_DIR/css/state.c 39 $LEXBOR_DIR/css/syntax/anb.c 40 $LEXBOR_DIR/css/syntax/parser.c 41 $LEXBOR_DIR/css/syntax/state.c 42 $LEXBOR_DIR/css/syntax/syntax.c 43 $LEXBOR_DIR/css/syntax/token.c 44 $LEXBOR_DIR/css/syntax/tokenizer.c 45 $LEXBOR_DIR/css/syntax/tokenizer/error.c 46 $LEXBOR_DIR/dom/interface.c 47 $LEXBOR_DIR/dom/interfaces/attr.c 48 $LEXBOR_DIR/dom/interfaces/cdata_section.c 49 $LEXBOR_DIR/dom/interfaces/character_data.c 50 $LEXBOR_DIR/dom/interfaces/comment.c 51 $LEXBOR_DIR/dom/interfaces/document_fragment.c 52 $LEXBOR_DIR/dom/interfaces/document_type.c 53 $LEXBOR_DIR/dom/interfaces/document.c 54 $LEXBOR_DIR/dom/interfaces/element.c 55 $LEXBOR_DIR/dom/interfaces/node.c 56 $LEXBOR_DIR/dom/interfaces/processing_instruction.c 57 $LEXBOR_DIR/dom/interfaces/shadow_root.c 58 $LEXBOR_DIR/dom/interfaces/text.c 59 $LEXBOR_DIR/encoding/big5.c 60 $LEXBOR_DIR/encoding/decode.c 61 $LEXBOR_DIR/encoding/encode.c 62 $LEXBOR_DIR/encoding/encoding.c 63 $LEXBOR_DIR/encoding/euc_kr.c 64 $LEXBOR_DIR/encoding/gb18030.c 65 $LEXBOR_DIR/encoding/iso_2022_jp_katakana.c 66 $LEXBOR_DIR/encoding/jis0208.c 67 $LEXBOR_DIR/encoding/jis0212.c 68 $LEXBOR_DIR/encoding/range.c 69 $LEXBOR_DIR/encoding/res.c 70 $LEXBOR_DIR/encoding/single.c 71 $LEXBOR_DIR/html/encoding.c 72 $LEXBOR_DIR/html/interface.c 73 $LEXBOR_DIR/html/interfaces/anchor_element.c 74 $LEXBOR_DIR/html/interfaces/area_element.c 75 $LEXBOR_DIR/html/interfaces/audio_element.c 76 $LEXBOR_DIR/html/interfaces/base_element.c 77 $LEXBOR_DIR/html/interfaces/body_element.c 78 $LEXBOR_DIR/html/interfaces/br_element.c 79 $LEXBOR_DIR/html/interfaces/button_element.c 80 $LEXBOR_DIR/html/interfaces/canvas_element.c 81 $LEXBOR_DIR/html/interfaces/d_list_element.c 82 $LEXBOR_DIR/html/interfaces/data_element.c 83 $LEXBOR_DIR/html/interfaces/data_list_element.c 84 $LEXBOR_DIR/html/interfaces/details_element.c 85 $LEXBOR_DIR/html/interfaces/dialog_element.c 86 $LEXBOR_DIR/html/interfaces/directory_element.c 87 $LEXBOR_DIR/html/interfaces/div_element.c 88 $LEXBOR_DIR/html/interfaces/document.c 89 $LEXBOR_DIR/html/interfaces/element.c 90 $LEXBOR_DIR/html/interfaces/embed_element.c 91 $LEXBOR_DIR/html/interfaces/field_set_element.c 92 $LEXBOR_DIR/html/interfaces/font_element.c 93 $LEXBOR_DIR/html/interfaces/form_element.c 94 $LEXBOR_DIR/html/interfaces/frame_element.c 95 $LEXBOR_DIR/html/interfaces/frame_set_element.c 96 $LEXBOR_DIR/html/interfaces/head_element.c 97 $LEXBOR_DIR/html/interfaces/heading_element.c 98 $LEXBOR_DIR/html/interfaces/hr_element.c 99 $LEXBOR_DIR/html/interfaces/html_element.c 100 $LEXBOR_DIR/html/interfaces/iframe_element.c 101 $LEXBOR_DIR/html/interfaces/image_element.c 102 $LEXBOR_DIR/html/interfaces/input_element.c 103 $LEXBOR_DIR/html/interfaces/label_element.c 104 $LEXBOR_DIR/html/interfaces/legend_element.c 105 $LEXBOR_DIR/html/interfaces/li_element.c 106 $LEXBOR_DIR/html/interfaces/link_element.c 107 $LEXBOR_DIR/html/interfaces/map_element.c 108 $LEXBOR_DIR/html/interfaces/marquee_element.c 109 $LEXBOR_DIR/html/interfaces/media_element.c 110 $LEXBOR_DIR/html/interfaces/menu_element.c 111 $LEXBOR_DIR/html/interfaces/meta_element.c 112 $LEXBOR_DIR/html/interfaces/meter_element.c 113 $LEXBOR_DIR/html/interfaces/mod_element.c 114 $LEXBOR_DIR/html/interfaces/o_list_element.c 115 $LEXBOR_DIR/html/interfaces/object_element.c 116 $LEXBOR_DIR/html/interfaces/opt_group_element.c 117 $LEXBOR_DIR/html/interfaces/option_element.c 118 $LEXBOR_DIR/html/interfaces/output_element.c 119 $LEXBOR_DIR/html/interfaces/paragraph_element.c 120 $LEXBOR_DIR/html/interfaces/param_element.c 121 $LEXBOR_DIR/html/interfaces/picture_element.c 122 $LEXBOR_DIR/html/interfaces/pre_element.c 123 $LEXBOR_DIR/html/interfaces/progress_element.c 124 $LEXBOR_DIR/html/interfaces/quote_element.c 125 $LEXBOR_DIR/html/interfaces/script_element.c 126 $LEXBOR_DIR/html/interfaces/select_element.c 127 $LEXBOR_DIR/html/interfaces/slot_element.c 128 $LEXBOR_DIR/html/interfaces/source_element.c 129 $LEXBOR_DIR/html/interfaces/span_element.c 130 $LEXBOR_DIR/html/interfaces/style_element.c 131 $LEXBOR_DIR/html/interfaces/table_caption_element.c 132 $LEXBOR_DIR/html/interfaces/table_cell_element.c 133 $LEXBOR_DIR/html/interfaces/table_col_element.c 134 $LEXBOR_DIR/html/interfaces/table_element.c 135 $LEXBOR_DIR/html/interfaces/table_row_element.c 136 $LEXBOR_DIR/html/interfaces/table_section_element.c 137 $LEXBOR_DIR/html/interfaces/template_element.c 138 $LEXBOR_DIR/html/interfaces/text_area_element.c 139 $LEXBOR_DIR/html/interfaces/time_element.c 140 $LEXBOR_DIR/html/interfaces/title_element.c 141 $LEXBOR_DIR/html/interfaces/track_element.c 142 $LEXBOR_DIR/html/interfaces/u_list_element.c 143 $LEXBOR_DIR/html/interfaces/unknown_element.c 144 $LEXBOR_DIR/html/interfaces/video_element.c 145 $LEXBOR_DIR/html/interfaces/window.c 146 $LEXBOR_DIR/html/parser.c 147 $LEXBOR_DIR/html/token_attr.c 148 $LEXBOR_DIR/html/token.c 149 $LEXBOR_DIR/html/tokenizer.c 150 $LEXBOR_DIR/html/tokenizer/error.c 151 $LEXBOR_DIR/html/tokenizer/state_comment.c 152 $LEXBOR_DIR/html/tokenizer/state_doctype.c 153 $LEXBOR_DIR/html/tokenizer/state_rawtext.c 154 $LEXBOR_DIR/html/tokenizer/state_rcdata.c 155 $LEXBOR_DIR/html/tokenizer/state_script.c 156 $LEXBOR_DIR/html/tokenizer/state.c 157 $LEXBOR_DIR/html/tree.c 158 $LEXBOR_DIR/html/tree/active_formatting.c 159 $LEXBOR_DIR/html/tree/error.c 160 $LEXBOR_DIR/html/tree/insertion_mode/after_after_body.c 161 $LEXBOR_DIR/html/tree/insertion_mode/after_after_frameset.c 162 $LEXBOR_DIR/html/tree/insertion_mode/after_body.c 163 $LEXBOR_DIR/html/tree/insertion_mode/after_frameset.c 164 $LEXBOR_DIR/html/tree/insertion_mode/after_head.c 165 $LEXBOR_DIR/html/tree/insertion_mode/before_head.c 166 $LEXBOR_DIR/html/tree/insertion_mode/before_html.c 167 $LEXBOR_DIR/html/tree/insertion_mode/foreign_content.c 168 $LEXBOR_DIR/html/tree/insertion_mode/in_body.c 169 $LEXBOR_DIR/html/tree/insertion_mode/in_caption.c 170 $LEXBOR_DIR/html/tree/insertion_mode/in_cell.c 171 $LEXBOR_DIR/html/tree/insertion_mode/in_column_group.c 172 $LEXBOR_DIR/html/tree/insertion_mode/in_frameset.c 173 $LEXBOR_DIR/html/tree/insertion_mode/in_head_noscript.c 174 $LEXBOR_DIR/html/tree/insertion_mode/in_head.c 175 $LEXBOR_DIR/html/tree/insertion_mode/in_row.c 176 $LEXBOR_DIR/html/tree/insertion_mode/in_select_in_table.c 177 $LEXBOR_DIR/html/tree/insertion_mode/in_select.c 178 $LEXBOR_DIR/html/tree/insertion_mode/in_table_body.c 179 $LEXBOR_DIR/html/tree/insertion_mode/in_table_text.c 180 $LEXBOR_DIR/html/tree/insertion_mode/in_table.c 181 $LEXBOR_DIR/html/tree/insertion_mode/in_template.c 182 $LEXBOR_DIR/html/tree/insertion_mode/initial.c 183 $LEXBOR_DIR/html/tree/insertion_mode/text.c 184 $LEXBOR_DIR/html/tree/open_elements.c 185 $LEXBOR_DIR/ns/ns.c 186 $LEXBOR_DIR/ports/posix/lexbor/core/memory.c 187 $LEXBOR_DIR/selectors-adapted/selectors.c 188 $LEXBOR_DIR/tag/tag.c 189 "]) 190 PHP_NEW_EXTENSION([dom], m4_normalize([ 191 attr.c 192 cdatasection.c 193 characterdata.c 194 comment.c 195 document.c 196 documentfragment.c 197 documenttype.c 198 dom_iterators.c 199 domexception.c 200 domimplementation.c 201 element.c 202 entity.c 203 entityreference.c 204 html_collection.c 205 html_document.c 206 html5_parser.c 207 html5_serializer.c 208 infra.c 209 inner_html_mixin.c 210 namednodemap.c 211 namespace_compat.c 212 node.c 213 nodelist.c 214 notation.c 215 parentnode/css_selectors.c 216 parentnode/tree.c 217 php_dom.c 218 private_data.c 219 processinginstruction.c 220 text.c 221 token_list.c 222 xml_document.c 223 xml_serializer.c 224 xpath_callbacks.c 225 xpath.c 226 $LEXBOR_SOURCES 227 ]), 228 [$ext_shared],, 229 [$PHP_LEXBOR_CFLAGS]) 230 PHP_ADD_BUILD_DIR([ 231 $ext_builddir/parentnode 232 $ext_builddir/$LEXBOR_DIR/core 233 $ext_builddir/$LEXBOR_DIR/css/selectors 234 $ext_builddir/$LEXBOR_DIR/css/syntax/tokenizer 235 $ext_builddir/$LEXBOR_DIR/css/tokenizer 236 $ext_builddir/$LEXBOR_DIR/dom/interfaces 237 $ext_builddir/$LEXBOR_DIR/encoding 238 $ext_builddir/$LEXBOR_DIR/html/interfaces 239 $ext_builddir/$LEXBOR_DIR/html/tokenizer 240 $ext_builddir/$LEXBOR_DIR/html/tree/insertion_mode 241 $ext_builddir/$LEXBOR_DIR/ns 242 $ext_builddir/$LEXBOR_DIR/ports/posix/lexbor/core 243 $ext_builddir/$LEXBOR_DIR/selectors-adapted 244 $ext_builddir/$LEXBOR_DIR/tag 245 ]) 246 PHP_SUBST([DOM_SHARED_LIBADD]) 247 PHP_INSTALL_HEADERS([ext/dom], m4_normalize([ 248 dom_ce.h 249 namespace_compat.h 250 xml_common.h 251 xpath_callbacks.h 252 ])) 253 PHP_ADD_EXTENSION_DEP(dom, libxml) 254 ]) 255fi 256