Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: third_party/libxml/src/configure.ac

Issue 1977213002: Roll libxml to 8effcb578e0590cc01bbcab0f9dccefc6bdbcdbd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 dnl Process this file with autoconf to produce a configure script. 1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ([2.63]) 2 AC_PREREQ([2.63])
3 AC_INIT 3 AC_INIT
4 AC_CONFIG_SRCDIR([entities.c]) 4 AC_CONFIG_SRCDIR([entities.c])
5 AC_CONFIG_HEADERS([config.h]) 5 AC_CONFIG_HEADERS([config.h])
6 AM_MAINTAINER_MODE([enable])
6 AC_CONFIG_MACRO_DIR([m4]) 7 AC_CONFIG_MACRO_DIR([m4])
7 AC_CANONICAL_HOST 8 AC_CANONICAL_HOST
8 9
9 LIBXML_MAJOR_VERSION=2 10 LIBXML_MAJOR_VERSION=2
10 LIBXML_MINOR_VERSION=9 11 LIBXML_MINOR_VERSION=9
11 LIBXML_MICRO_VERSION=3 12 LIBXML_MICRO_VERSION=4
12 LIBXML_MICRO_VERSION_SUFFIX= 13 LIBXML_MICRO_VERSION_SUFFIX=
13 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION $LIBXML_MICRO_VERSION_SUFFIX 14 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION $LIBXML_MICRO_VERSION_SUFFIX
14 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML _MICRO_VERSION:$LIBXML_MINOR_VERSION 15 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML _MICRO_VERSION:$LIBXML_MINOR_VERSION
15 16
16 LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSI ON \* 100 + $LIBXML_MICRO_VERSION` 17 LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSI ON \* 100 + $LIBXML_MICRO_VERSION`
17 18
18 if test -f CVS/Entries ; then 19 if test -f CVS/Entries ; then
19 extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.% % -e s\%/.*$%%` 20 extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.% % -e s\%/.*$%%`
20 echo extra=$extra 21 echo extra=$extra
21 if test "$extra" != "" 22 if test "$extra" != ""
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 fi 384 fi
384 385
385 echo Checking zlib 386 echo Checking zlib
386 387
387 dnl Checks for zlib library. 388 dnl Checks for zlib library.
388 389
389 WITH_ZLIB=0 390 WITH_ZLIB=0
390 if test "$with_zlib" = "no"; then 391 if test "$with_zlib" = "no"; then
391 echo "Disabling compression support" 392 echo "Disabling compression support"
392 else 393 else
393 AC_CHECK_HEADERS(zlib.h, 394 # Try pkg-config first so that static linking works.
394 [SAVE_LDFLAGS="${LDFLAGS}" 395 # If this succeeeds, we ignore the WITH_ZLIB directory.
395 » LDFLAGS="-L${Z_DIR}/lib" 396 PKG_CHECK_MODULES([Z],[zlib],
396 » AC_CHECK_LIB(z, gzread,[ 397 [have_libz=yes],
397 » AC_DEFINE([HAVE_LIBZ], [1], [Have compression library]) 398 [have_libz=no])
398 » WITH_ZLIB=1 399
399 » if test "x${Z_DIR}" != "x"; then 400 if test "x$have_libz" = "xno"; then
400 » » Z_CFLAGS="-I${Z_DIR}/include" 401 AC_CHECK_HEADERS(zlib.h,
401 » » Z_LIBS="-L${Z_DIR}/lib -lz" 402 [SAVE_LDFLAGS="${LDFLAGS}"
402 » » [case ${host} in 403 LDFLAGS="-L${Z_DIR}/lib"
403 » » *-*-solaris*) 404 AC_CHECK_LIB(z, gzread,[
404 » » » Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz" 405 have_libz=yes
405 » » » ;; 406 if test "x${Z_DIR}" != "x"; then
406 » » esac] 407 Z_CFLAGS="-I${Z_DIR}/include"
407 » else 408 Z_LIBS="-L${Z_DIR}/lib -lz"
408 » » Z_LIBS="-lz" 409 [case ${host} in
409 » fi]) 410 *-*-solaris*)
410 » LDFLAGS="${SAVE_LDFLAGS}"]) 411 Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
412 ;;
413 esac]
414 else
415 Z_LIBS="-lz"
416 fi],
417 [have_libz=no])
418 LDFLAGS="${SAVE_LDFLAGS}"])
419 else
420 » # we still need to check for zlib.h header
421 » AC_CHECK_HEADERS([zlib.h])
422 fi
423
424 # Found the library via either method?
425 if test "x$have_libz" = "xyes"; then
426 AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
427 WITH_ZLIB=1
428 fi
411 fi 429 fi
412 430
413 AC_SUBST(Z_CFLAGS) 431 AC_SUBST(Z_CFLAGS)
414 AC_SUBST(Z_LIBS) 432 AC_SUBST(Z_LIBS)
415 AC_SUBST(WITH_ZLIB) 433 AC_SUBST(WITH_ZLIB)
416 434
417 echo Checking lzma 435 echo Checking lzma
418 436
419 dnl Checks for lzma library. 437 dnl Checks for lzma library.
420 438
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 case "$host" in 1490 case "$host" in
1473 *mingw*) M_LIBS="" 1491 *mingw*) M_LIBS=""
1474 ;; 1492 ;;
1475 *beos*) M_LIBS="" 1493 *beos*) M_LIBS=""
1476 ;; 1494 ;;
1477 *haiku*) M_LIBS="" 1495 *haiku*) M_LIBS=""
1478 ;; 1496 ;;
1479 *) M_LIBS="-lm" 1497 *) M_LIBS="-lm"
1480 ;; 1498 ;;
1481 esac 1499 esac
1482 XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
1483 XML_LIBTOOLLIBS="libxml2.la"
1484 AC_SUBST(WITH_ICONV) 1500 AC_SUBST(WITH_ICONV)
1485 1501
1486 WITH_ICU=0 1502 WITH_ICU=0
1487 ICU_LIBS="" 1503 ICU_LIBS=""
1488 if test "$with_icu" != "yes" ; then 1504 if test "$with_icu" != "yes" ; then
1489 echo Disabling ICU support 1505 echo Disabling ICU support
1490 else 1506 else
1491 ICU_CONFIG=icu-config 1507 # Try pkg-config first so that static linking works.
1492 if ${ICU_CONFIG} --cflags >/dev/null 2>&1 1508 # If this succeeeds, we ignore the WITH_ICU directory.
1493 then 1509 PKG_CHECK_MODULES([ICU],[icu-i18n],
1494 ICU_LIBS=`${ICU_CONFIG} --ldflags` 1510 [have_libicu=yes],
1511 [have_libicu=no])
1512
1513 # If pkg-config failed, fall back to AC_CHECK_LIB. This
1514 # will not pick up the necessary LIBS flags for liblzma's
1515 # private dependencies, though, so static linking may fail.
1516 if test "x$have_libicu" = "xno"; then
1517 ICU_CONFIG=icu-config
1518 if ${ICU_CONFIG} --cflags >/dev/null 2>&1
1519 then
1520 ICU_LIBS=`${ICU_CONFIG} --ldflags`
1521 have_libicu=yes
1522 echo Enabling ICU support
1523 else
1524 if test "$with_icu" != "yes" -a "$with_iconv" != "" ; then
1525 CPPFLAGS="${CPPFLAGS} -I$with_icu"
1526 # Export this since our headers include icu.h
1527 XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_icu"
1528 fi
1529
1530 AC_CHECK_HEADER(unicode/ucnv.h,
1531 AC_MSG_CHECKING(for icu)
1532 AC_TRY_LINK([#include <unicode/ucnv.h>],[
1533 UConverter *utf = ucnv_open("UTF-8", NULL);],[
1534 AC_MSG_RESULT(yes)
1535 have_libicu=yes],[
1536 AC_MSG_RESULT(no)
1537 AC_MSG_CHECKING(for icu in -licucore)
1538
1539 _ldflags="${LDFLAGS}"
1540 _libs="${LIBS}"
1541 LDFLAGS="${LDFLAGS} ${ICU_LIBS}"
1542 LIBS="${LIBS} -licucore"
1543
1544 AC_TRY_LINK([#include <unicode/ucnv.h>],[
1545 UConverter *utf = ucnv_open("UTF-8", NULL);],[
1546 AC_MSG_RESULT(yes)
1547 have_libicu=yes
1548 ICU_LIBS="${ICU_LIBS} -licucore"
1549 LIBS="${_libs}"
1550 LDFLAGS="${_ldflags}"],[
1551 AC_MSG_RESULT(no)
1552 LIBS="${_libs}"
1553 LDFLAGS="${_ldflags}"])]))
1554 fi
1555 fi
1556
1557 # Found the library via either method?
1558 if test "x$have_libicu" = "xyes"; then
1495 WITH_ICU=1 1559 WITH_ICU=1
1496 echo Enabling ICU support
1497 else
1498 AC_MSG_ERROR([libicu config program icu-config not found])
1499 fi 1560 fi
1500 fi 1561 fi
1562 XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $ LIBS"
1563 XML_LIBTOOLLIBS="libxml2.la"
1501 AC_SUBST(WITH_ICU) 1564 AC_SUBST(WITH_ICU)
1502 AC_SUBST(ICU_LIBS)
1503 1565
1504 WITH_ISO8859X=1 1566 WITH_ISO8859X=1
1505 if test "$WITH_ICONV" != "1" ; then 1567 if test "$WITH_ICONV" != "1" ; then
1506 if test "$with_iso8859x" = "no" ; then 1568 if test "$with_iso8859x" = "no" ; then
1507 echo Disabling ISO8859X support 1569 echo Disabling ISO8859X support
1508 WITH_ISO8859X=0 1570 WITH_ISO8859X=0
1509 fi 1571 fi
1510 fi 1572 fi
1511 AC_SUBST(WITH_ISO8859X) 1573 AC_SUBST(WITH_ISO8859X)
1512 1574
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 1693
1632 AC_SUBST(CPPFLAGS) 1694 AC_SUBST(CPPFLAGS)
1633 AC_SUBST(CFLAGS) 1695 AC_SUBST(CFLAGS)
1634 AC_SUBST(LDFLAGS) 1696 AC_SUBST(LDFLAGS)
1635 AC_SUBST(XML_CFLAGS) 1697 AC_SUBST(XML_CFLAGS)
1636 1698
1637 AC_SUBST(XML_LIBDIR) 1699 AC_SUBST(XML_LIBDIR)
1638 AC_SUBST(XML_LIBS) 1700 AC_SUBST(XML_LIBS)
1639 AC_SUBST(XML_LIBTOOLLIBS) 1701 AC_SUBST(XML_LIBTOOLLIBS)
1640 AC_SUBST(ICONV_LIBS) 1702 AC_SUBST(ICONV_LIBS)
1703 AC_SUBST(ICU_LIBS)
1641 AC_SUBST(XML_INCLUDEDIR) 1704 AC_SUBST(XML_INCLUDEDIR)
1642 AC_SUBST(HTML_DIR) 1705 AC_SUBST(HTML_DIR)
1643 AC_SUBST(HAVE_ISNAN) 1706 AC_SUBST(HAVE_ISNAN)
1644 AC_SUBST(HAVE_ISINF) 1707 AC_SUBST(HAVE_ISINF)
1645 AC_SUBST(PYTHON) 1708 AC_SUBST(PYTHON)
1646 AC_SUBST(PYTHON_VERSION) 1709 AC_SUBST(PYTHON_VERSION)
1647 AC_SUBST(PYTHON_INCLUDES) 1710 AC_SUBST(PYTHON_INCLUDES)
1648 AC_SUBST(PYTHON_SITE_PACKAGES) 1711 AC_SUBST(PYTHON_SITE_PACKAGES)
1649 1712
1650 AC_SUBST(M_LIBS) 1713 AC_SUBST(M_LIBS)
1651 AC_SUBST(RDL_LIBS) 1714 AC_SUBST(RDL_LIBS)
1652 1715
1653 dnl for the spec file 1716 dnl for the spec file
1654 RELDATE=`date +'%a %b %e %Y'` 1717 RELDATE=`date +'%a %b %e %Y'`
1655 AC_SUBST(RELDATE) 1718 AC_SUBST(RELDATE)
1656 AC_SUBST(PYTHON_TESTS) 1719 AC_SUBST(PYTHON_TESTS)
1657 1720
1658 rm -f COPYING.LIB COPYING 1721 rm -f COPYING.LIB COPYING
1659 ln -s $srcdir/Copyright COPYING 1722 ln -s $srcdir/Copyright COPYING
1660 1723
1661 # keep on one line for cygwin c.f. #130896 1724 # keep on one line for cygwin c.f. #130896
1662 AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/l ibxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/M akefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlve rsion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake]) 1725 AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/l ibxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/M akefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlve rsion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
1663 AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py]) 1726 AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
1664 AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config]) 1727 AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
1665 AC_OUTPUT 1728 AC_OUTPUT
1666 1729
1667 echo Done configuring 1730 echo Done configuring
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698