xref: /aosp_15_r20/external/cronet/third_party/libxml/src/configure.ac (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ([2.63])
3
4m4_define([MAJOR_VERSION], 2)
5m4_define([MINOR_VERSION], 13)
6m4_define([MICRO_VERSION], 0)
7
8AC_INIT([libxml2],[MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
9AC_CONFIG_SRCDIR([entities.c])
10AC_CONFIG_HEADERS([config.h])
11AC_CONFIG_MACRO_DIR([m4])
12AC_CANONICAL_HOST
13
14LIBXML_MAJOR_VERSION=MAJOR_VERSION
15LIBXML_MINOR_VERSION=MINOR_VERSION
16LIBXML_MICRO_VERSION=MICRO_VERSION
17LIBXML_MICRO_VERSION_SUFFIX=
18LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
19LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
20
21LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
22
23if test -d .git ; then
24  extra=`git describe 2>/dev/null`
25  echo extra=$extra
26  if test "$extra" != ""
27  then
28      LIBXML_VERSION_EXTRA="-GIT$extra"
29  fi
30fi
31
32AC_SUBST(LIBXML_MAJOR_VERSION)
33AC_SUBST(LIBXML_MINOR_VERSION)
34AC_SUBST(LIBXML_MICRO_VERSION)
35AC_SUBST(LIBXML_VERSION)
36AC_SUBST(LIBXML_VERSION_INFO)
37AC_SUBST(LIBXML_VERSION_NUMBER)
38AC_SUBST(LIBXML_VERSION_EXTRA)
39
40VERSION=${LIBXML_VERSION}
41
42AM_INIT_AUTOMAKE([1.16.3 foreign no-dist-gzip dist-xz])
43AM_MAINTAINER_MODE([enable])
44AM_SILENT_RULES([yes])
45
46dnl Checks for programs.
47AC_PROG_CC
48AC_PROG_INSTALL
49AC_PROG_LN_S
50AC_PROG_MKDIR_P
51AC_PATH_PROG(TAR, tar, /bin/tar)
52AC_PATH_PROG(PERL, perl, /usr/bin/perl)
53AC_PATH_PROG(WGET, wget, /usr/bin/wget)
54AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
55PKG_PROG_PKG_CONFIG
56
57LT_INIT([disable-static])
58LT_LIB_M
59
60dnl
61dnl We process the AC_ARG_WITH first so that later we can modify
62dnl some of them to try to prevent impossible combinations.  This
63dnl also allows up so alphabetize the choices
64dnl
65
66AC_ARG_WITH(c14n,
67[  --with-c14n             Canonical XML 1.0 support (on)])
68AC_ARG_WITH(catalog,
69[  --with-catalog          XML Catalogs support (on)])
70AC_ARG_WITH(debug,
71[  --with-debug            debugging module and shell (on)])
72AC_ARG_WITH(ftp,
73[  --with-ftp              FTP support (off)])
74AC_ARG_WITH(history,
75[  --with-history          history support for shell (off)])
76AC_ARG_WITH(readline,
77[  --with-readline[[=DIR]]   use readline in DIR (for shell history)])
78AC_ARG_WITH(html,
79[  --with-html             HTML parser (on)])
80AC_ARG_WITH(http,
81[  --with-http             HTTP support (on)])
82AC_ARG_WITH(iconv,
83[  --with-iconv[[=DIR]]      iconv support (on)])
84AC_ARG_WITH(icu,
85[  --with-icu              ICU support (off)])
86AC_ARG_WITH(iso8859x,
87[  --with-iso8859x         ISO-8859-X support if no iconv (on)])
88AC_ARG_WITH(lzma,
89[  --with-lzma[[=DIR]]       use liblzma in DIR (on)])
90AC_ARG_WITH(mem_debug,
91[  --with-mem-debug        memory debugging module (off)])
92AC_ARG_WITH(modules,
93[  --with-modules          dynamic modules support (on)])
94AC_ARG_WITH(output,
95[  --with-output           serialization support (on)])
96AC_ARG_WITH(pattern,
97[  --with-pattern          xmlPattern selection interface (on)])
98AC_ARG_WITH(push,
99[  --with-push             push parser interfaces (on)])
100AC_ARG_WITH(python,
101[  --with-python           Python bindings (on)])
102AC_ARG_WITH(reader,
103[  --with-reader           xmlReader parsing interface (on)])
104AC_ARG_WITH(regexps,
105[  --with-regexps          regular expressions support (on)])
106AC_ARG_WITH(sax1,
107[  --with-sax1             older SAX1 interface (on)])
108AC_ARG_WITH(schemas,
109[  --with-schemas          XML Schemas 1.0 and RELAX NG support (on)])
110AC_ARG_WITH(schematron,
111[  --with-schematron       Schematron support (on)])
112AC_ARG_WITH(threads,
113[  --with-threads          multithreading support (on)])
114AC_ARG_WITH(thread-alloc,
115[  --with-thread-alloc     per-thread malloc hooks (off)])
116AC_ARG_WITH(tree,
117[  --with-tree             DOM like tree manipulation APIs (on)])
118AC_ARG_WITH(valid,
119[  --with-valid            DTD validation support (on)])
120AC_ARG_WITH(writer,
121[  --with-writer           xmlWriter serialization interface (on)])
122AC_ARG_WITH(xinclude,
123[  --with-xinclude         XInclude 1.0 support (on)])
124AC_ARG_WITH(xpath,
125[  --with-xpath            XPath 1.0 support (on)])
126AC_ARG_WITH(xptr,
127[  --with-xptr             XPointer support (on)])
128AC_ARG_WITH(xptr-locs,
129[  --with-xptr-locs        XPointer ranges and points (off)])
130AC_ARG_WITH(zlib,
131[  --with-zlib[[=DIR]]       use libz in DIR (on)])
132
133AC_ARG_WITH(minimum,
134[  --with-minimum          build a minimally sized library (off)])
135AC_ARG_WITH(legacy,
136[  --with-legacy           maximum ABI compatibility (off)])
137
138AC_ARG_WITH(tls,
139[  --with-tls              thread-local storage (off)])
140AC_ARG_WITH(fexceptions,
141[  --with-fexceptions      add GCC flag -fexceptions for C++ exceptions (off)])
142AC_ARG_WITH(coverage,
143[  --with-coverage         build for code coverage with GCC (off)])
144
145dnl
146dnl hard dependencies on options
147dnl
148if test "$with_c14n" = "yes"; then
149    if test "$with_output" = "no"; then
150        echo WARNING: --with-c14n overrides --without-output
151    fi
152    with_output=yes
153    if test "$with_xpath" = "no"; then
154        echo WARNING: --with-c14n overrides --without-xpath
155    fi
156    with_xpath=yes
157fi
158if test "$with_schemas" = "yes"; then
159    if test "$with_pattern" = "no"; then
160        echo WARNING: --with-schemas overrides --without-pattern
161    fi
162    with_pattern=yes
163    if test "$with_regexps" = "no"; then
164        echo WARNING: --with-schemas overrides --without-regexps
165    fi
166    with_regexps=yes
167fi
168if test "$with_schematron" = "yes"; then
169    if test "$with_pattern" = "no"; then
170        echo WARNING: --with-schematron overrides --without-pattern
171    fi
172    with_pattern=yes
173    if test "$with_tree" = "no"; then
174        echo WARNING: --with-schematron overrides --without-tree
175    fi
176    with_tree=yes
177    if test "$with_xpath" = "no"; then
178        echo WARNING: --with-schematron overrides --without-xpath
179    fi
180    with_xpath=yes
181fi
182if test "$with_reader" = "yes"; then
183    if test "$with_push" = "no"; then
184        echo WARNING: --with-reader overrides --without-push
185    fi
186    with_push=yes
187    if test "$with_tree" = "no"; then
188        echo WARNING: --with-reader overrides --without-tree
189    fi
190    with_tree=yes
191fi
192if test "$with_writer" = "yes"; then
193    if test "$with_output" = "no"; then
194        echo WARNING: --with-writer overrides --without-output
195    fi
196    with_output=yes
197    if test "$with_push" = "no"; then
198        echo WARNING: --with-writer overrides --without-push
199    fi
200    with_push=yes
201fi
202if test "$with_xinclude" = "yes"; then
203    if test "$with_xpath" = "no"; then
204        echo WARNING: --with-xinclude overrides --without-xpath
205    fi
206    with_xpath=yes
207fi
208if test "$with_xptr_locs" = "yes"; then
209    if test "$with_xptr" = "no"; then
210        echo WARNING: --with-xptr-locs overrides --without-xptr
211    fi
212    with_xptr=yes
213fi
214if test "$with_xptr" = "yes"; then
215    if test "$with_xpath" = "no"; then
216        echo WARNING: --with-xptr overrides --without-xpath
217    fi
218    with_xpath=yes
219fi
220
221if test "$with_minimum" = "yes"; then
222    dnl
223    dnl option to build a minimal libxml2 library
224    dnl
225    echo "Configuring for a minimal library"
226    test "$with_c14n" = "" && with_c14n=no
227    test "$with_catalog" = "" && with_catalog=no
228    test "$with_debug" = "" && with_debug=no
229    test "$with_fexceptions" = "" && with_fexceptions=no
230    test "$with_history" = "" && with_history=no
231    test "$with_html" = "" && with_html=no
232    test "$with_http" = "" && with_http=no
233    test "$with_iconv" = "" && with_iconv=no
234    test "$with_iso8859x" = "" && with_iso8859x=no
235    test "$with_lzma" = "" && with_lzma=no
236    test "$with_mem_debug" = "" && with_mem_debug=no
237    test "$with_output" = "" && with_output=no
238    test "$with_pattern" = "" && with_pattern=no
239    test "$with_push" = "" && with_push=no
240    test "$with_python" = "" && with_python=no
241    test "$with_reader" = "" && with_reader=no
242    test "$with_readline" = "" && with_readline=no
243    test "$with_regexps" = "" && with_regexps=no
244    test "$with_sax1" = "" && with_sax1=no
245    test "$with_schemas" = "" && with_schemas=no
246    test "$with_schematron" = "" && with_schematron=no
247    test "$with_threads" = "" && with_threads=no
248    test "$with_thread_alloc" = "" && with_thread_alloc=no
249    test "$with_tree" = "" && with_tree=no
250    test "$with_valid" = "" && with_valid=no
251    test "$with_writer" = "" && with_writer=no
252    test "$with_xinclude" = "" && with_xinclude=no
253    test "$with_xpath" = "" && with_xpath=no
254    test "$with_xptr" = "" && with_xptr=no
255    test "$with_zlib" = "" && with_zlib=no
256    test "$with_modules" = "" && with_modules=no
257else
258    dnl
259    dnl Disable dependent modules
260    dnl
261    if test "$with_output" = "no"; then
262        with_c14n=no
263        with_writer=no
264    fi
265    if test "$with_pattern" = "no"; then
266        with_schemas=no
267        with_schematron=no
268    fi
269    if test "$with_push" = "no"; then
270        with_reader=no
271        with_writer=no
272    fi
273    if test "$with_regexps" = "no"; then
274        with_schemas=no
275    fi
276    if test "$with_tree" = "no"; then
277        with_reader=no
278        with_schematron=no
279    fi
280    if test "$with_xpath" = "no"; then
281        with_c14n=no
282        with_schematron=no
283        with_xinclude=no
284        with_xptr=no
285    fi
286fi
287
288XML_PRIVATE_LIBS=
289XML_PRIVATE_CFLAGS=
290XML_PC_LIBS=
291XML_PC_REQUIRES=
292
293dnl
294dnl Checks for header files.
295dnl
296AC_CHECK_HEADERS([stdint.h inttypes.h])
297AC_CHECK_HEADERS([fcntl.h unistd.h sys/stat.h])
298AC_CHECK_HEADERS([sys/mman.h])
299AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h netdb.h])
300AC_CHECK_HEADERS([sys/select.h poll.h])
301AC_CHECK_HEADERS([sys/time.h sys/timeb.h])
302AC_CHECK_HEADERS([sys/random.h])
303AC_CHECK_HEADERS([dl.h dlfcn.h])
304AC_CHECK_HEADERS([glob.h])
305AM_CONDITIONAL(WITH_GLOB, test "$ac_cv_header_glob_h" = "yes")
306
307dnl
308dnl Checking types
309dnl
310AC_TYPE_UINT32_T
311
312dnl Checks for library functions.
313AC_CHECK_FUNCS([getentropy gettimeofday ftime isascii stat mmap munmap])
314
315AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
316#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
317#  undef /**/ HAVE_MMAP
318#endif])
319
320dnl
321dnl Checks for inet libraries
322dnl
323if test "$with_http" != "no" || test "with_ftp" = "yes"; then
324    case "$host" in
325        *-*-mingw*)
326            dnl AC_SEARCH_LIBS doesn't work because of non-standard calling
327            dnl conventions on 32-bit Windows.
328            NET_LIBS="$NET_LIBS -lws2_32"
329            ;;
330        *)
331            _libs=$LIBS
332            AC_SEARCH_LIBS(gethostbyname, [nsl], [
333                if test "$ac_cv_search_gethostbyname" != "none required"; then
334                    NET_LIBS="$NET_LIBS $ac_cv_search_gethostbyname"
335                fi], [:], [$NET_LIBS])
336            AC_SEARCH_LIBS(connect, [bsd socket inet], [
337                if test "$ac_cv_search_connect" != "none required"; then
338                    NET_LIBS="$NET_LIBS $ac_cv_search_connect"
339                fi], [:], [$NET_LIBS])
340            LIBS=$_libs
341            ;;
342    esac
343
344    dnl Determine what socket length (socklen_t) data type is
345    AC_MSG_CHECKING([for type of socket length (socklen_t)])
346    AC_TRY_COMPILE2([
347    #include <stddef.h>
348    #ifdef _WIN32
349      #include <ws2tcpip.h>
350    #else
351      #include <sys/socket.h>
352    #endif],[
353    (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
354      AC_MSG_RESULT(socklen_t *)
355      XML_SOCKLEN_T=socklen_t],[
356      AC_TRY_COMPILE2([
357    #include <stddef.h>
358    #include <sys/socket.h>],[
359    (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
360        AC_MSG_RESULT(size_t *)
361        XML_SOCKLEN_T=size_t],[
362        AC_TRY_COMPILE2([
363    #include <stddef.h>
364    #include <sys/socket.h>],[
365    (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
366          AC_MSG_RESULT(int *)
367          XML_SOCKLEN_T=int],[
368          AC_MSG_WARN(could not determine)
369          XML_SOCKLEN_T="int"])])])
370    AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
371
372    dnl
373    dnl Checking for availability of IPv6
374    dnl
375    AC_ARG_ENABLE(ipv6, [  --enable-ipv6[[=yes/no]]  enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
376    if test "$with_minimum" = "yes"
377    then
378        enable_ipv6=no
379    fi
380    if test $enable_ipv6 = yes; then
381        AC_MSG_CHECKING([whether to enable IPv6])
382        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
383            #ifdef _WIN32
384              #include <winsock2.h>
385            #else
386              #include <sys/socket.h>
387              #ifdef HAVE_NETDB_H
388                #include <netdb.h>
389              #endif
390            #endif
391            ]], [[
392            struct sockaddr_storage ss;
393            socket(AF_INET6, SOCK_STREAM, 0);
394            getaddrinfo(0, 0, 0, 0);
395            ]])], [
396            AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
397            AC_MSG_RESULT([yes])], [
398            AC_MSG_RESULT([no])]
399        )
400    fi
401fi
402
403dnl
404dnl Extra flags
405dnl
406XML_LIBDIR='-L${libdir}'
407XML_INCLUDEDIR='-I${includedir}/libxml2'
408XML_CFLAGS=""
409
410dnl Thread-local storage
411if test "$with_tls" = "yes"; then
412    AC_COMPILE_IFELSE([
413        AC_LANG_SOURCE([_Thread_local int v;]) ], [
414        AC_DEFINE([XML_THREAD_LOCAL], [_Thread_local], [TLS specifier]) ], [
415    AC_COMPILE_IFELSE([
416        AC_LANG_SOURCE([__thread int v;]) ], [
417        AC_DEFINE([XML_THREAD_LOCAL], [__thread], [TLS specifier]) ], [
418    AC_COMPILE_IFELSE([
419        AC_LANG_SOURCE([__declspec(thread) int v;]) ], [
420        AC_DEFINE([XML_THREAD_LOCAL], [__declspec(thread)], [TLS specifier]) ], [
421    WARN_NO_TLS=1 ])])])
422fi
423
424dnl Checking whether __attribute__((destructor)) is accepted by the compiler
425AC_MSG_CHECKING([whether __attribute__((destructor)) is accepted])
426AC_TRY_COMPILE2([
427void __attribute__((destructor))
428f(void) {}], [], [
429  AC_MSG_RESULT(yes)
430  AC_DEFINE([HAVE_ATTRIBUTE_DESTRUCTOR], [1],[Define if __attribute__((destructor)) is accepted])
431  AC_DEFINE([ATTRIBUTE_DESTRUCTOR], [__attribute__((destructor))],[A form that will not confuse apibuild.py])],[
432  AC_MSG_RESULT(no)])
433
434dnl
435dnl Linker version scripts for symbol versioning
436dnl
437VERSION_SCRIPT_FLAGS=
438# lt_cv_prog_gnu_ld is from libtool 2.+
439if test "$lt_cv_prog_gnu_ld" = yes; then
440  case $host in
441    *-*-cygwin* | *-*-mingw* | *-*-msys* )
442      ;;
443    *)
444      dnl lld 16 defaults to --no-undefined-version but the version script
445      dnl can contain symbols disabled by configuration options.
446      AX_APPEND_LINK_FLAGS([-Wl,--undefined-version], [VERSION_SCRIPT_FLAGS])
447      AX_APPEND_FLAG([-Wl,--version-script=], [VERSION_SCRIPT_FLAGS])
448      ;;
449  esac
450else
451  case $host in
452  *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
453  esac
454fi
455AC_SUBST(VERSION_SCRIPT_FLAGS)
456AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
457
458dnl
459dnl Workaround for native compilers
460dnl  HP  : http://bugs.gnome.org/db/31/3163.html
461dnl  DEC : Enable NaN/Inf
462dnl
463if test "${GCC}" != "yes" ; then
464    case "${host}" in
465          hppa*-*-hpux* )
466	       AM_CFLAGS="${AM_CFLAGS} -Wp,-H30000"
467	       ;;
468          *-dec-osf* )
469               AM_CFLAGS="${AM_CFLAGS} -ieee"
470               ;;
471	  alpha*-*-linux* )
472	       AM_CFLAGS="${AM_CFLAGS} -ieee"
473	       ;;
474    esac
475else
476    if test "$with_fexceptions" = "yes"
477    then
478        #
479	# Not activated by default because this inflates the code size
480	# Used to allow propagation of C++ exceptions through the library
481	#
482	AM_CFLAGS="${AM_CFLAGS} -fexceptions"
483    fi
484
485    # warnings we'd like to see
486    AM_CFLAGS="${AM_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
487    # warnings we'd like to suppress
488    AM_CFLAGS="${AM_CFLAGS} -Wno-long-long -Wno-format-extra-args"
489    case "${host}" in
490          alpha*-*-linux* )
491	       AM_CFLAGS="${AM_CFLAGS} -mieee"
492	       ;;
493	  alpha*-*-osf* )
494	       AM_CFLAGS="${AM_CFLAGS} -mieee"
495	       ;;
496    esac
497fi
498case ${host} in
499    *-*-solaris*)
500        XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
501        ;;
502    *-*-cygwin* | *-*-mingw* | *-*-msys* )
503        # If the host is Windows, and shared libraries are disabled, we
504        # need to add -DLIBXML_STATIC to AM_CFLAGS in order for linking to
505        # work properly (without it, xmlexports.h would force the use of
506        # DLL imports, which obviously aren't present in a static
507        # library).
508        if test "x$enable_shared" = "xno"; then
509            XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
510            AM_CFLAGS="$AM_CFLAGS -DLIBXML_STATIC"
511        fi
512        ;;
513esac
514
515
516dnl
517dnl Simple API modules
518dnl
519
520if test "$with_tree" = "no" ; then
521    echo Disabling DOM like tree manipulation APIs
522    WITH_TREE=0
523else
524    WITH_TREE=1
525fi
526AC_SUBST(WITH_TREE)
527
528if test "$with_ftp" != "yes" ; then
529    WITH_FTP=0
530else
531    echo Enabling FTP support
532    WITH_FTP=1
533fi
534AC_SUBST(WITH_FTP)
535AM_CONDITIONAL(WITH_FTP_SOURCES, test "$WITH_FTP" = "1")
536
537if test "$with_http" = "no" ; then
538    echo Disabling HTTP support
539    WITH_HTTP=0
540else
541    WITH_HTTP=1
542fi
543AC_SUBST(WITH_HTTP)
544AM_CONDITIONAL(WITH_HTTP_SOURCES, test "$WITH_HTTP" = "1")
545
546if test "$with_legacy" != "yes" ; then
547    WITH_LEGACY=0
548else
549    echo Enabling deprecated APIs
550    WITH_LEGACY=1
551fi
552AC_SUBST(WITH_LEGACY)
553AM_CONDITIONAL(WITH_LEGACY_SOURCES, test "$WITH_LEGACY" = "1")
554
555if test "$with_reader" = "no" ; then
556    echo Disabling the xmlReader parsing interface
557    WITH_READER=0
558else
559    WITH_READER=1
560fi
561AC_SUBST(WITH_READER)
562AM_CONDITIONAL(WITH_READER_SOURCES, test "$WITH_READER" = "1")
563
564if test "$with_writer" = "no" ; then
565    echo Disabling the xmlWriter saving interface
566    WITH_WRITER=0
567else
568    WITH_WRITER=1
569fi
570AC_SUBST(WITH_WRITER)
571AM_CONDITIONAL(WITH_WRITER_SOURCES, test "$WITH_WRITER" = "1")
572
573if test "$with_pattern" = "no" ; then
574    echo Disabling the xmlPattern parsing interface
575    WITH_PATTERN=0
576else
577    WITH_PATTERN=1
578fi
579AC_SUBST(WITH_PATTERN)
580AM_CONDITIONAL(WITH_PATTERN_SOURCES, test "$WITH_PATTERN" = "1")
581
582if test "$with_sax1" = "no" ; then
583    echo Disabling the older SAX1 interface
584    WITH_SAX1=0
585else
586    WITH_SAX1=1
587fi
588AC_SUBST(WITH_SAX1)
589AM_CONDITIONAL(WITH_SAX1_SOURCES, test "$WITH_SAX1" = "1")
590
591if test "$with_push" = "no" ; then
592    echo Disabling the PUSH parser interfaces
593    WITH_PUSH=0
594else
595    WITH_PUSH=1
596fi
597AC_SUBST(WITH_PUSH)
598
599if test "$with_html" = "no" ; then
600    echo Disabling HTML support
601    WITH_HTML=0
602else
603    WITH_HTML=1
604fi
605AC_SUBST(WITH_HTML)
606AM_CONDITIONAL(WITH_HTML_SOURCES, test "$WITH_HTML" = "1")
607
608if test "$with_valid" = "no" ; then
609    echo Disabling DTD validation support
610    WITH_VALID=0
611else
612    WITH_VALID=1
613fi
614AC_SUBST(WITH_VALID)
615AM_CONDITIONAL(WITH_VALID_SOURCES, test "$WITH_VALID" = "1")
616
617if test "$with_catalog" = "no" ; then
618    echo Disabling Catalog support
619    WITH_CATALOG=0
620else
621    WITH_CATALOG=1
622fi
623AC_SUBST(WITH_CATALOG)
624AM_CONDITIONAL(WITH_CATALOG_SOURCES, test "$WITH_CATALOG" = "1")
625
626if test "$with_xptr" = "no" ; then
627    echo Disabling XPointer support
628    WITH_XPTR=0
629    WITH_XPTR_LOCS=0
630else
631    WITH_XPTR=1
632fi
633AC_SUBST(WITH_XPTR)
634AM_CONDITIONAL(WITH_XPTR_SOURCES, test "$WITH_XPTR" = "1")
635
636if test "$with_xptr_locs" != "yes" ; then
637    WITH_XPTR_LOCS=0
638else
639    echo Enabling Xpointer locations support
640    WITH_XPTR_LOCS=1
641fi
642AC_SUBST(WITH_XPTR_LOCS)
643
644if test "$with_c14n" = "no" ; then
645    echo Disabling C14N support
646    WITH_C14N=0
647else
648    WITH_C14N=1
649fi
650AC_SUBST(WITH_C14N)
651AM_CONDITIONAL(WITH_C14N_SOURCES, test "$WITH_C14N" = "1")
652
653if test "$with_xinclude" = "no" ; then
654    echo Disabling XInclude support
655    WITH_XINCLUDE=0
656else
657    WITH_XINCLUDE=1
658fi
659AC_SUBST(WITH_XINCLUDE)
660AM_CONDITIONAL(WITH_XINCLUDE_SOURCES, test "$WITH_XINCLUDE" = "1")
661
662if test "$with_schematron" = "no" ; then
663    echo "Disabling Schematron support"
664    WITH_SCHEMATRON=0
665else
666    WITH_SCHEMATRON=1
667fi
668AC_SUBST(WITH_SCHEMATRON)
669AM_CONDITIONAL(WITH_SCHEMATRON_SOURCES, test "$WITH_SCHEMATRON" = "1")
670
671if test "$with_xpath" = "no" ; then
672    echo Disabling XPATH support
673    WITH_XPATH=0
674else
675    WITH_XPATH=1
676fi
677AC_SUBST(WITH_XPATH)
678AM_CONDITIONAL(WITH_XPATH_SOURCES, test "$WITH_XPATH" = "1")
679
680if test "$with_output" = "no" ; then
681    echo Disabling serialization/saving support
682    WITH_OUTPUT=0
683else
684    WITH_OUTPUT=1
685fi
686AC_SUBST(WITH_OUTPUT)
687AM_CONDITIONAL(WITH_OUTPUT_SOURCES, test "$WITH_OUTPUT" = "1")
688
689if test "$WITH_ICONV" != "1" && test "$with_iso8859x" = "no" ; then
690    echo Disabling ISO8859X support
691    WITH_ISO8859X=0
692else
693    WITH_ISO8859X=1
694fi
695AC_SUBST(WITH_ISO8859X)
696
697if test "$with_schemas" = "no" ; then
698    echo "Disabling Schemas/Relax-NG support"
699    WITH_SCHEMAS=0
700else
701    WITH_SCHEMAS=1
702fi
703AC_SUBST(WITH_SCHEMAS)
704AM_CONDITIONAL(WITH_SCHEMAS_SOURCES, test "$WITH_SCHEMAS" = "1")
705
706if test "$with_regexps" = "no" ; then
707    echo Disabling Regexps support
708    WITH_REGEXPS=0
709else
710    WITH_REGEXPS=1
711fi
712AC_SUBST(WITH_REGEXPS)
713AM_CONDITIONAL(WITH_REGEXPS_SOURCES, test "$WITH_REGEXPS" = "1")
714
715if test "$with_debug" = "no" ; then
716    echo Disabling DEBUG support
717    WITH_DEBUG=0
718else
719    WITH_DEBUG=1
720fi
721AC_SUBST(WITH_DEBUG)
722AM_CONDITIONAL(WITH_DEBUG_SOURCES, test "$WITH_DEBUG" = "1")
723
724if test "$with_mem_debug" = "yes" ; then
725    if test "$with_thread_alloc" = "yes" ; then
726        echo Disabling memory debug - cannot use mem-debug with thread-alloc!
727	WITH_MEM_DEBUG=0
728    else
729        echo Enabling memory debug support
730        WITH_MEM_DEBUG=1
731    fi
732else
733    WITH_MEM_DEBUG=0
734fi
735AC_SUBST(WITH_MEM_DEBUG)
736
737dnl
738dnl Check for Python
739dnl
740
741AS_IF([test "x$with_python" != "xno"], [
742    AM_PATH_PYTHON
743    PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
744])
745AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"])
746
747dnl
748dnl Extra Python flags for Windows
749dnl
750PYTHON_LDFLAGS=
751if test "${PYTHON}" != ""; then
752    case "$host" in
753        *-*-mingw* )
754            PYTHON_LDFLAGS="-no-undefined -shrext .pyd"
755            ;;
756        *-*-cygwin* |*-*-msys* )
757            PYTHON_LDFLAGS="-no-undefined"
758            ;;
759    esac
760fi
761AC_SUBST(PYTHON_LDFLAGS)
762
763dnl
764dnl Check for DSO support
765dnl
766WITH_MODULES=0
767
768if test "$with_modules" != "no" ; then
769    case "$host" in
770        *-*-cygwin* | *-*-msys* )
771            MODULE_EXTENSION=".dll"
772            ;;
773        *-*-mingw*)
774            MODULE_EXTENSION=".dll"
775            WITH_MODULES=1
776            ;;
777        *-*-hpux*)
778	    MODULE_EXTENSION=".sl"
779	    ;;
780        *)
781	    MODULE_EXTENSION=".so"
782	    ;;
783    esac
784
785    if test "$WITH_MODULES" = "0"; then
786        _libs=$LIBS
787        AC_SEARCH_LIBS([dlopen], [dl], [
788            WITH_MODULES=1
789            if test "$ac_cv_search_dlopen" != "none required"; then
790                MODULE_PLATFORM_LIBS=$ac_cv_search_dlopen
791            fi
792            AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])], [
793            AC_SEARCH_LIBS([shl_load], [dld], [
794                WITH_MODULES=1
795                if test "$ac_cv_search_shl_load" != "none required"; then
796                    MODULE_PLATFORM_LIBS=$ac_cv_search_shl_load
797                fi
798                AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])])])
799        LIBS=$_libs
800    fi
801fi
802
803AC_SUBST(WITH_MODULES)
804AC_SUBST(MODULE_PLATFORM_LIBS)
805AC_SUBST(MODULE_EXTENSION)
806AM_CONDITIONAL(WITH_MODULES_SOURCES, test "$WITH_MODULES" = "1")
807
808dnl
809dnl Thread-related stuff
810dnl
811THREAD_LIBS=""
812BASE_THREAD_LIBS=""
813WITH_THREADS=0
814THREAD_CFLAGS=""
815WITH_THREAD_ALLOC=0
816
817if test "$with_threads" = "no" ; then
818    echo Disabling multithreaded support
819else
820    case $host_os in
821        *mingw*)
822            dnl Default to native threads on Windows
823            WITH_THREADS="1"
824            ;;
825        *)
826            dnl Use pthread by default in other cases
827            _libs=$LIBS
828            AC_CHECK_HEADERS(pthread.h,
829                AC_SEARCH_LIBS([pthread_join], [pthread], [
830                    WITH_THREADS="1"
831                    if test "$ac_cv_search_pthread_join" != "none required"; then
832                        THREAD_LIBS=$ac_cv_search_pthread_join
833                    fi
834                    AC_DEFINE([HAVE_PTHREAD_H], [],
835                              [Define if <pthread.h> is there])]))
836            LIBS=$_libs
837            ;;
838    esac
839
840    case $host_os in
841        *linux*)
842            if test "${GCC}" = "yes" ; then
843                BASE_THREAD_LIBS="$THREAD_LIBS"
844                THREAD_LIBS=""
845            fi
846            ;;
847    esac
848
849    if test "$WITH_THREADS" = "1" ; then
850	THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
851    fi
852fi
853if test "$with_thread_alloc" = "yes" && test "$WITH_THREADS" = "1" ; then
854    WITH_THREAD_ALLOC=1
855fi
856
857AC_SUBST(THREAD_LIBS)
858AC_SUBST(BASE_THREAD_LIBS)
859AC_SUBST(WITH_THREADS)
860AC_SUBST(THREAD_CFLAGS)
861AC_SUBST(WITH_THREAD_ALLOC)
862
863dnl
864dnl xmllint shell history
865dnl
866if test "$with_history" = "yes" && test "$with_readline" != "no"; then
867    echo Enabling xmllint shell history
868    dnl check for terminal library. this is a very cool solution
869    dnl from octave's configure.in
870    unset tcap
871    for termlib in ncurses curses termcap terminfo termlib; do
872	AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
873	test -n "$tcap" && break
874    done
875
876    _cppflags=$CPPFLAGS
877    _libs=$LIBS
878    if test "$with_readline" != "" && test "$with_readline" != "yes"; then
879        RDL_DIR=$with_readline
880        CPPFLAGS="${CPPFLAGS} -I$RDL_DIR/include"
881        LIBS="${LIBS} -L$RDL_DIR/lib"
882    fi
883    AC_CHECK_HEADER(readline/history.h,
884	AC_CHECK_LIB(history, append_history,[
885	    RDL_LIBS="-lhistory"
886            if test "x${RDL_DIR}" != "x"; then
887                RDL_CFLAGS="-I$RDL_DIR/include"
888                RDL_LIBS="-L$RDL_DIR/lib $RDL_LIBS"
889            fi
890	    AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
891    AC_CHECK_HEADER(readline/readline.h,
892	AC_CHECK_LIB(readline, readline,[
893	    RDL_LIBS="-lreadline $RDL_LIBS $tcap"
894            if test "x$RDL_DIR" != "x"; then
895                RDL_CFLAGS="-I$RDL_DIR/include"
896                RDL_LIBS="-L$RDL_DIR/lib $RDL_LIBS"
897            fi
898	    AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
899    CPPFLAGS=$_cppflags
900    LIBS=$_libs
901fi
902AC_SUBST(RDL_CFLAGS)
903AC_SUBST(RDL_LIBS)
904
905dnl
906dnl Checks for zlib library.
907dnl
908WITH_ZLIB=0
909
910if test "$with_zlib" = "no"; then
911    echo "Disabling zlib compression support"
912else
913    if test "$with_zlib" != "yes"; then
914        Z_DIR=$with_zlib
915    fi
916
917    # Don't run pkg-config if with_zlib contains a path.
918    if test "x$Z_DIR" = "x"; then
919        # Try pkg-config first so that static linking works.
920        PKG_CHECK_MODULES([Z],[zlib],
921            [WITH_ZLIB=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} zlib"],
922            [:])
923    fi
924
925    if test "$WITH_ZLIB" = "0"; then
926        _cppflags=$CPPFLAGS
927        _libs=$LIBS
928        if test "x$Z_DIR" != "x"; then
929            CPPFLAGS="${CPPFLAGS} -I$Z_DIR/include"
930            LIBS="${LIBS} -L$Z_DIR/lib"
931        fi
932        AC_CHECK_HEADERS(zlib.h,
933            AC_CHECK_LIB(z, gzread,[
934                WITH_ZLIB=1
935                if test "x${Z_DIR}" != "x"; then
936                    Z_CFLAGS="-I${Z_DIR}/include"
937                    Z_LIBS="-L${Z_DIR}/lib -lz"
938                    [case ${host} in
939                        *-*-solaris*)
940                            Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
941                            ;;
942                    esac]
943                else
944                    Z_LIBS="-lz"
945                fi])
946                XML_PC_LIBS="${XML_PC_LIBS} ${Z_LIBS}"
947            )
948        CPPFLAGS=$_cppflags
949        LIBS=$_libs
950    fi
951
952    XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${Z_CFLAGS}"
953    XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${Z_LIBS}"
954fi
955AC_SUBST(WITH_ZLIB)
956
957dnl
958dnl Checks for lzma library.
959dnl
960WITH_LZMA=0
961
962if test "$with_lzma" = "no"; then
963    echo "Disabling lzma compression support"
964else
965    if test "$with_lzma" != "yes"; then
966        LZMA_DIR=$with_lzma
967    fi
968
969    # Don't run pkg-config if with_lzma contains a path.
970    if test "x$LZMA_DIR" = "x"; then
971        # Try pkg-config first so that static linking works.
972        PKG_CHECK_MODULES([LZMA],[liblzma],
973            [WITH_LZMA=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} liblzma"],
974            [:])
975    fi
976
977    # If pkg-config failed, fall back to AC_CHECK_LIB. This
978    # will not pick up the necessary LIBS flags for liblzma's
979    # private dependencies, though, so static linking may fail.
980    if test "$WITH_LZMA" = "0"; then
981        _cppflags=$CPPFLAGS
982        _libs=$LIBS
983        if test "x$LZMA_DIR" != "x"; then
984            CPPFLAGS="${CPPFLAGS} -I$LZMA_DIR/include"
985            LIBS="${LIBS} -L$LZMA_DIR/lib"
986        fi
987        AC_CHECK_HEADERS(lzma.h,
988            AC_CHECK_LIB(lzma, lzma_code,[
989                WITH_LZMA=1
990                if test "x${LZMA_DIR}" != "x"; then
991                    LZMA_CFLAGS="-I${LZMA_DIR}/include"
992                    LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
993                else
994                    LZMA_LIBS="-llzma"
995                fi])
996                XML_PC_LIBS="${XML_PC_LIBS} ${LZMA_LIBS}"
997            )
998        CPPFLAGS=$_cppflags
999        LIBS=$_libs
1000    fi
1001
1002    XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${LZMA_CFLAGS}"
1003    XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${LZMA_LIBS}"
1004fi
1005AC_SUBST(WITH_LZMA)
1006AM_CONDITIONAL(WITH_LZMA_SOURCES, test "$WITH_LZMA" = "1")
1007
1008dnl
1009dnl Checks for iconv library.
1010dnl
1011WITH_ICONV=0
1012
1013if test "$with_iconv" = "no" ; then
1014    echo Disabling ICONV support
1015else
1016    _cppflags=$CPPFLAGS
1017    _libs=$LIBS
1018    if test "$with_iconv" != "yes" && test "$with_iconv" != "" ; then
1019	ICONV_DIR=$with_iconv
1020	CPPFLAGS="$CPPFLAGS -I$ICONV_DIR/include"
1021	LIBS="$LIBS -L$ICONV_DIR/lib"
1022    fi
1023    AC_MSG_CHECKING([for libiconv])
1024    AC_LINK_IFELSE([
1025        AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0,0);])
1026    ], [
1027        WITH_ICONV=1
1028        AC_MSG_RESULT([none required])
1029    ], [
1030        LIBS="$LIBS -liconv"
1031        AC_LINK_IFELSE([
1032            AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0,0);])
1033        ], [
1034            WITH_ICONV=1
1035            ICONV_LIBS="-liconv"
1036            AC_MSG_RESULT([yes])
1037        ], [
1038            AC_MSG_RESULT([no])
1039        ])
1040    ])
1041    if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then
1042        ICONV_CFLAGS="-I$ICONV_DIR/include"
1043        ICONV_LIBS="-L$ICONV_DIR/lib $ICONV_LIBS"
1044	# Export this since our headers include iconv.h
1045	XML_INCLUDEDIR="$XML_INCLUDEDIR -I$ICONV_DIR/include"
1046    fi
1047    CPPFLAGS=$_cppflags
1048    LIBS=$_libs
1049fi
1050AC_SUBST(WITH_ICONV)
1051AC_SUBST(ICONV_CFLAGS)
1052
1053dnl
1054dnl Checks for ICU library.
1055dnl
1056WITH_ICU=0
1057
1058if test "$with_icu" = "no" || test "$with_icu" = "" ; then
1059    echo Disabling ICU support
1060else
1061    # Try pkg-config first so that static linking works.
1062    # If this succeeeds, we ignore the WITH_ICU directory.
1063    PKG_CHECK_MODULES([ICU], [icu-i18n], [
1064        WITH_ICU=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} icu-i18n"
1065        m4_ifdef([PKG_CHECK_VAR],
1066            [PKG_CHECK_VAR([ICU_DEFS], [icu-i18n], [DEFS])])
1067        if test "x$ICU_DEFS" != "x"; then
1068            ICU_CFLAGS="$ICU_CFLAGS $ICU_DEFS"
1069        fi],[:])
1070
1071    if test "$WITH_ICU" = "0"; then
1072        ICU_CONFIG=icu-config
1073        if ${ICU_CONFIG} --cflags >/dev/null 2>&1
1074        then
1075            WITH_ICU=1
1076            ICU_CFLAGS=`${ICU_CONFIG} --cflags`
1077            ICU_LIBS=`${ICU_CONFIG} --ldflags`
1078            XML_PC_LIBS="${XML_PC_LIBS} ${ICU_LIBS}"
1079        else
1080            _cppflags="${CPPFLAGS}"
1081            _libs="${LIBS}"
1082            if test "$with_icu" != "yes" ; then
1083                ICU_DIR=$with_icu
1084                CPPFLAGS="${CPPFLAGS} -I$ICU_DIR/include"
1085                LIBS="${LIBS} -L$ICU_DIR/lib"
1086            fi
1087
1088            AC_CHECK_HEADER(unicode/ucnv.h, [
1089                AC_CHECK_LIB([icucore], [ucnv_open], [
1090                    WITH_ICU=1
1091                    ICU_LIBS=-licucore
1092                    if test "$ICU_DIR" != ""; then
1093                        ICU_CFLAGS="-I$ICU_DIR/include"
1094                        ICU_LIBS="-L$ICU_DIR/lib $ICU_LIBS"
1095                    fi])])
1096                    XML_PC_LIBS="${XML_PC_LIBS} ${ICU_LIBS}"
1097            CPPFLAGS=$_cppflags
1098            LIBS=$_libs
1099        fi
1100    fi
1101
1102    XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${ICU_CFLAGS}"
1103    XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${ICU_LIBS}"
1104fi
1105AC_SUBST(WITH_ICU)
1106
1107dnl
1108dnl Crypto libraries
1109dnl
1110case "$host" in
1111    *-*-mingw*)
1112        CRYPTO_LIBS="-lbcrypt"
1113        ;;
1114esac
1115
1116if test "$with_coverage" = "yes" && test "${GCC}" = "yes"
1117then
1118    echo Enabling code coverage for GCC
1119    AM_CFLAGS="$AM_CFLAGS -fprofile-arcs -ftest-coverage"
1120    AM_LDFLAGS="$AM_LDFLAGS -fprofile-arcs -ftest-coverage"
1121else
1122    echo Disabling code coverage for GCC
1123fi
1124
1125XML_LIBS="-lxml2"
1126XML_LIBTOOLLIBS="libxml2.la"
1127NON_PC_LIBS="${THREAD_LIBS} ${ICONV_LIBS} ${LIBM} ${NET_LIBS} ${CRYPTO_LIBS}"
1128XML_PC_LIBS="${XML_PC_LIBS} ${NON_PC_LIBS}"
1129XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${NON_PC_LIBS}"
1130XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${THREAD_CFLAGS} ${ICONV_CFLAGS}"
1131
1132dnl When static-only:
1133dnl * Duplicate xml-config static --libs into --dynamic.
1134dnl * Fold pkg-config private fields into main fields.
1135if test "x$enable_shared" = "xno"; then
1136  XML_PRIVATE_LIBS_NO_SHARED="${XML_PRIVATE_LIBS}"
1137  XML_PC_PRIVATE=
1138  XML_PC_LIBS_PRIVATE=
1139else
1140  XML_PRIVATE_LIBS_NO_SHARED=
1141  XML_PC_PRIVATE=".private"
1142  XML_PC_LIBS_PRIVATE="
1143Libs.private:"
1144fi
1145AC_SUBST(XML_PRIVATE_LIBS_NO_SHARED)
1146AC_SUBST(XML_PC_PRIVATE)
1147AC_SUBST(XML_PC_LIBS_PRIVATE)
1148AM_SUBST_NOTMAKE(XML_PRIVATE_LIBS_NO_SHARED)
1149AM_SUBST_NOTMAKE(XML_PC_PRIVATE)
1150AM_SUBST_NOTMAKE(XML_PC_LIBS_PRIVATE)
1151
1152AC_SUBST(XML_PC_LIBS)
1153AC_SUBST(XML_PC_REQUIRES)
1154AM_SUBST_NOTMAKE(XML_PC_LIBS)
1155AM_SUBST_NOTMAKE(XML_PC_REQUIRES)
1156
1157AC_SUBST(AM_CFLAGS)
1158AC_SUBST(AM_LDFLAGS)
1159AC_SUBST(XML_CFLAGS)
1160
1161AC_SUBST(XML_LIBDIR)
1162AC_SUBST(XML_LIBS)
1163AC_SUBST(XML_PRIVATE_LIBS)
1164AC_SUBST(XML_PRIVATE_CFLAGS)
1165AC_SUBST(XML_LIBTOOLLIBS)
1166AC_SUBST(XML_INCLUDEDIR)
1167
1168dnl for the spec file
1169RELDATE=`date +'%a %b %e %Y'`
1170AC_SUBST(RELDATE)
1171
1172# keep on one line for cygwin c.f. #130896
1173AC_CONFIG_FILES([Makefile include/Makefile include/libxml/Makefile include/private/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile fuzz/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
1174AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
1175AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
1176AC_OUTPUT
1177
1178if test "$WARN_NO_TLS" != ""; then
1179    echo "================================================================"
1180    echo "WARNING: Your C compiler appears to not support thread-local"
1181    echo "storage. Future versions of libxml2 will require this feature"
1182    echo "for multi-threading."
1183    echo "================================================================"
1184fi
1185