Changeset 14460 in vbox
- Timestamp:
- Nov 21, 2008 2:10:28 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39734
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.vbs
r8155 r14460 51 51 g_strDisableCOM = "" 52 52 53 ' The internal mode is primarily for skipping the xerces and xalan monsters.53 ' The internal mode is primarily for skipping some large libraries. 54 54 dim g_blnInternalMode 55 55 g_blnInternalMode = False … … 1282 1282 ' Skip if no COM/ATL. 1283 1283 if g_blnDisableCOM then 1284 PrintResult " Xerces", "Skipped (" & g_strDisableCOM & ")"1284 PrintResult "Midl", "Skipped (" & g_strDisableCOM & ")" 1285 1285 exit sub 1286 1286 end if … … 1610 1610 1611 1611 1612 dim g_strXercesVer 1613 g_strXercesVer = "" 1614 1615 '' 1616 ' Checks for xerces. 1617 sub CheckForXerces(strOptXerces) 1618 dim strPathXerces, str 1619 PrintHdr "Xerces" 1612 '' 1613 ' Checks for libxml2. 1614 sub CheckForXml2(strOptXml2) 1615 dim strPathXml2, str 1616 PrintHdr "libxml2" 1620 1617 1621 1618 ' Skip if no COM/ATL. 1622 1619 if g_blnDisableCOM then 1623 PrintResult " Xerces", "Skipped (" & g_strDisableCOM & ")"1620 PrintResult "libxml2", "Skipped (" & g_strDisableCOM & ")" 1624 1621 exit sub 1625 1622 end if 1626 1623 1627 1624 ' 1628 ' Try find some xerces dll/lib. 1629 ' 1630 strPathXerces = "" 1631 if (strPathXerces = "") And (strOptXerces <> "") then 1632 if CheckForXercesSub(strOptXerces) then strPathXerces = strOptXerces 1633 end if 1634 1635 if strPathXerces = "" Then 1636 str = Which("xerces-c_2_9.lib") 1637 if str = "" then str = Which("xerces-c_2_8.lib") 1638 if str = "" then str = Which("xerces-c_2_7.lib") 1639 if str = "" then str = Which("xerces-c_2_6.lib") 1625 ' Try find some xml2 dll/lib. 1626 ' 1627 strPathXml2 = "" 1628 if (strPathXml2 = "") And (strOptXml2 <> "") then 1629 if CheckForXml2Sub(strOptXml2) then strPathXml2 = strOptXml2 1630 end if 1631 1632 if strPathXml2 = "" Then 1633 str = Which("libxml2.lib") 1640 1634 if str <> "" Then 1641 1635 str = PathParent(PathStripFilename(str)) 1642 if CheckForXercesSub(str) then strPathXerces = str 1643 end if 1644 end if 1645 1646 if strPathXerces = "" Then 1647 str = Which("xerces-c_2_9.dll") 1648 if str = "" then str = Which("xerces-c_2_8.dll") 1649 if str = "" then str = Which("xerces-c_2_7.dll") 1650 if str = "" then str = Which("xerces-c_2_6.dll") 1636 if CheckForXml2Sub(str) then strPathXml2 = str 1637 end if 1638 end if 1639 1640 ' Ignore failure if we're in 'internal' mode. 1641 if (strPathXml2 = "") and g_blnInternalMode then 1642 PrintResult "libxml2", "ignored (internal mode)" 1643 exit sub 1644 end if 1645 1646 ' Success? 1647 if strPathXml2 = "" then 1648 if strOptXml2 = "" then 1649 MsgError "Can't locate libxml2. Try specify the path with the --with-libxml2=<path> argument. " _ 1650 & "If still no luck, consult the configure.log and the build requirements." 1651 else 1652 MsgError "Can't locate libxml2. Please consult the configure.log and the build requirements." 1653 end if 1654 exit sub 1655 end if 1656 1657 strPathXml2 = UnixSlashes(PathAbs(strPathXml2)) 1658 CfgPrint "SDK_VBOX_LIBXML2_INCS := " & strPathXml2 & "/include" 1659 CfgPrint "SDK_VBOX_LIBXML2_LIBS := " & strPathXml2 & "/lib/libxml2.lib" 1660 1661 PrintResult "libxml2", strPathXml2 1662 end sub 1663 1664 '' 1665 ' Checks if the specified path points to an usable libxml2 or not. 1666 function CheckForXml2Sub(strPathXml2) 1667 dim str 1668 1669 CheckForXml2Sub = False 1670 LogPrint "trying: strPathXml2=" & strPathXml2 1671 if LogFileExists(strPathXml2, "include/libxml/xmlexports.h") _ 1672 And LogFileExists(strPathXml2, "include/libxml/xmlreader.h") _ 1673 then 1674 str = LogFindFile(strPathXml2, "bin/libxml2.dll") 1675 if str <> "" then 1676 if LogFindFile(strPathXml2, "lib/libxml2.lib") then 1677 CheckForXml2Sub = True 1678 end if 1679 end if 1680 end if 1681 end function 1682 1683 1684 '' 1685 ' Checks for libxslt. 1686 sub CheckForXslt(strOptXslt) 1687 dim strPathXslt, str 1688 PrintHdr "libxslt" 1689 1690 ' Skip if no COM/ATL. 1691 if g_blnDisableCOM then 1692 PrintResult "libxslt", "Skipped (" & g_strDisableCOM & ")" 1693 exit sub 1694 end if 1695 1696 ' 1697 ' Try find some libxslt dll/lib. 1698 ' 1699 strPathXslt = "" 1700 if (strPathXslt = "") And (strOptXslt <> "") then 1701 if CheckForXsltSub(strOptXslt) then strPathXslt = strOptXslt 1702 end if 1703 1704 if strPathXslt = "" Then 1705 str = Which("libxslt.lib") 1651 1706 if str <> "" Then 1652 1707 str = PathParent(PathStripFilename(str)) 1653 if CheckForXercesSub(str) then strPathXerces = str 1708 if CheckForXsltSub(str) then strPathXslt = str 1709 end if 1710 end if 1711 1712 if strPathXslt = "" Then 1713 str = Which("libxslt.dll") 1714 if str <> "" Then 1715 str = PathParent(PathStripFilename(str)) 1716 if CheckForXsltSub(str) then strPathXslt = str 1654 1717 end if 1655 1718 end if 1656 1719 1657 1720 ' Ignore failure if we're in 'internal' mode. 1658 if (strPathX erces= "") and g_blnInternalMode then1659 PrintResult " Xerces", "ignored (internal mode)"1721 if (strPathXslt = "") and g_blnInternalMode then 1722 PrintResult "libxslt", "ignored (internal mode)" 1660 1723 exit sub 1661 1724 end if 1662 1725 1663 1726 ' Success? 1664 if strPathX erces= "" then1665 if strOptX erces= "" then1666 MsgError "Can't locate Xerces. Try specify the path with the --with-xerces=<path> argument. " _1727 if strPathXslt = "" then 1728 if strOptXslt = "" then 1729 MsgError "Can't locate libxslt. Try specify the path with the --with-libxslt=<path> argument. " _ 1667 1730 & "If still no luck, consult the configure.log and the build requirements." 1668 1731 else 1669 MsgError "Can't locate Xerces. Please consult the configure.log and the build requirements."1732 MsgError "Can't locate libxslt. Please consult the configure.log and the build requirements." 1670 1733 end if 1671 1734 exit sub 1672 1735 end if 1673 1736 1674 strPathXerces = UnixSlashes(PathAbs(strPathXerces)) 1675 CfgPrint "SDK_VBOX_XERCES_INCS := " & strPathXerces & "/include" 1676 CfgPrint "SDK_VBOX_XERCES_LIBS := " & strPathXerces & "/lib/xerces-c_" & Left(g_strXercesVer, 1) & ".lib" 1677 CfgPrint "DLL_SDK_VBOX_XERCES_XERCES := " & strPathXerces & "/bin/xerces-c_" & g_strXercesVer & ".dll" 1678 1679 PrintResult "Xerces", strPathXerces 1680 end sub 1681 1682 '' 1683 ' Checks if the specified path points to an usable libSDL or not. 1684 function CheckForXercesSub(strPathXerces) 1737 strPathXslt = UnixSlashes(PathAbs(strPathXslt)) 1738 CfgPrint "SDK_VBOX_LIBXSLT_INCS := " & strPathXslt & "/include" 1739 CfgPrint "SDK_VBOX_LIBXSLT_LIBS := " & strPathXslt & "/lib/libxslt.lib" 1740 1741 PrintResult "libxslt", strPathXslt 1742 end sub 1743 1744 '' 1745 ' Checks if the specified path points to an usable libxslt or not. 1746 function CheckForXsltSub(strPathXslt) 1685 1747 dim str 1686 1748 1687 CheckForXercersSub = False 1688 LogPrint "trying: strPathXerces=" & strPathXerces 1689 if LogFileExists(strPathXerces, "include/xercesc/dom/DOM.hpp") _ 1690 And LogFileExists(strPathXerces, "include/xercesc/validators/datatype/DatatypeValidator.hpp") _ 1749 CheckForXsltSub = False 1750 LogPrint "trying: strPathXslt=" & strPathXslt 1751 1752 if LogFileExists(strPathXslt, "include/libxslt/namespaces.h") _ 1753 And LogFileExists(strPathXslt, "include/libxslt/xsltutils.h") _ 1691 1754 then 1692 ' The version is encoded in the dll/lib name, so try first 1693 ' to find the dll and then a matching lib. 1694 str = LogFindFile(strPathXerces, "bin/xerces-c_*.dll") 1755 str = LogFindFile(strPathXslt, "lib/libxslt.dll") 1695 1756 if str <> "" then 1696 g_strXercesVer = Mid(str, Len("xerces-c_") + 1, Len(str) - Len("xerces-c_.dll")) 1697 ' the library omits the minor version (in the current distro). 1698 if LogFileExists(strPathXerces, "lib/xerces-c_" & Left(g_strXercesVer, 1) & ".lib") then 1699 CheckForXercesSub = True 1700 end if 1701 end if 1702 end if 1703 end function 1704 1705 1706 dim g_strXalanVer 1707 g_strXalanVer = "" 1708 1709 '' 1710 ' Checks for Xalan. 1711 sub CheckForXalan(strOptXalan) 1712 dim strPathXalan, str 1713 PrintHdr "Xalan" 1714 1715 ' Skip if no COM/ATL. 1716 if g_blnDisableCOM then 1717 PrintResult "Xalan", "Skipped (" & g_strDisableCOM & ")" 1718 exit sub 1719 end if 1720 1721 ' 1722 ' Try find some Xalan dll/lib. 1723 ' 1724 strPathXalan = "" 1725 if (strPathXalan = "") And (strOptXalan <> "") then 1726 if CheckForXalanSub(strOptXalan) then strPathXalan = strOptXalan 1727 end if 1728 1729 if strPathXalan = "" Then 1730 str = Which("Xalan-c_1_12.lib") 1731 if str = "" then str = Which("Xalan-c_1_11.lib") 1732 if str = "" then str = Which("Xalan-c_1_10.lib") 1733 if str = "" then str = Which("Xalan-c_1_9.lib") 1734 if str <> "" Then 1735 str = PathParent(PathStripFilename(str)) 1736 if CheckForXalanSub(str) then strPathXalan = str 1737 end if 1738 end if 1739 1740 if strPathXalan = "" Then 1741 str = Which("Xalan-c_1_12.dll") 1742 if str = "" then str = Which("Xalan-c_1_11.dll") 1743 if str = "" then str = Which("Xalan-c_1_10.dll") 1744 if str = "" then str = Which("Xalan-c_1_9.dll") 1745 if str <> "" Then 1746 str = PathParent(PathStripFilename(str)) 1747 if CheckForXalanSub(str) then strPathXalan = str 1748 end if 1749 end if 1750 1751 ' Ignore failure if we're in 'internal' mode. 1752 if (strPathXalan = "") and g_blnInternalMode then 1753 PrintResult "Xalan", "ignored (internal mode)" 1754 exit sub 1755 end if 1756 1757 ' Success? 1758 if strPathXalan = "" then 1759 if strOptXalan = "" then 1760 MsgError "Can't locate Xalan. Try specify the path with the --with-Xalan=<path> argument. " _ 1761 & "If still no luck, consult the configure.log and the build requirements." 1762 else 1763 MsgError "Can't locate Xalan. Please consult the configure.log and the build requirements." 1764 end if 1765 exit sub 1766 end if 1767 1768 strPathXalan = UnixSlashes(PathAbs(strPathXalan)) 1769 CfgPrint "SDK_VBOX_XALAN_INCS := " & strPathXalan & "/include" 1770 CfgPrint "SDK_VBOX_XALAN_LIBS := " & strPathXalan & "/lib/Xalan-C_" & Left(g_strXalanVer, 1) & ".lib" 1771 CfgPrint "DLL_SDK_VBOX_XALAN_XALAN := " & strPathXalan & "/bin/Xalan-C_" & g_strXalanVer & ".dll" 1772 CfgPrint "DLL_SDK_VBOX_XALAN_XALAN-MESSAGES := " & strPathXalan & "/bin/XalanMessages_" & g_strXalanVer & ".dll" 1773 1774 PrintResult "Xalan", strPathXalan 1775 end sub 1776 1777 '' 1778 ' Checks if the specified path points to an usable Xalan or not. 1779 function CheckForXalanSub(strPathXalan) 1780 dim str 1781 1782 CheckForXercersSub = False 1783 LogPrint "trying: strPathXalan=" & strPathXalan 1784 1785 if LogFileExists(strPathXalan, "include/xalanc/DOMSupport/DOMSupport.hpp") _ 1786 And LogFileExists(strPathXalan, "include/xalanc/XalanDOM/XalanText.hpp") _ 1787 then 1788 ' The version is encoded in the dll/lib name, so try first 1789 ' to find the dll and then a matching lib. 1790 str = LogFindFile(strPathXalan, "bin/Xalan-C_*.dll") 1791 if str <> "" then 1792 g_strXalanVer = Mid(str, Len("Xalan-C_") + 1, Len(str) - Len("Xalan-C_.dll")) 1793 ' the library omits the minor version (in the current distro). 1794 if LogFileExists(strPathXalan, "bin/XalanMessages_" & g_strXalanVer & ".dll") _ 1795 And LogFileExists(strPathXalan, "lib/Xalan-C_" & Left(g_strXalanVer, 1) & ".lib") _ 1757 if LogFileExists(strPathXslt, "lib/libxslt.lib") _ 1796 1758 then 1797 CheckForX alanSub = True1759 CheckForXsltSub = True 1798 1760 end if 1799 1761 end if … … 1999 1961 Print " --with-VC-Express-Edition" 2000 1962 Print " --with-W32API=PATH " 2001 Print " --with- Xalan=PATH"2002 Print " --with- Xerces=PATH"1963 Print " --with-libxml3=PATH " 1964 Print " --with-libxslt=PATH " 2003 1965 end sub 2004 1966 … … 2031 1993 blnOptVCExpressEdition = False 2032 1994 strOptW32API = "" 2033 blnOptX alan= ""2034 blnOptX erces= ""1995 blnOptXml2 = "" 1996 blnOptXslt = "" 2035 1997 blnOptDisableCOM = False 2036 1998 for i = 1 to Wscript.Arguments.Count … … 2072 2034 case "--with-w32api" 2073 2035 strOptW32API = strPath 2074 case "--with- xalan"2075 strOptX alan= strPath2076 case "--with- xerces"2077 strOptX erces= strPath2036 case "--with-libxml2" 2037 strOptXml2 = strPath 2038 case "--with-libxslt" 2039 strOptXslt = strPath 2078 2040 case "--disable-com" 2079 2041 blnOptDisableCOM = True … … 2128 2090 CheckForMingW strOptMingw, strOptW32API 2129 2091 CheckForlibSDL strOptlibSDL 2130 CheckForX erces strOptXerces2131 CheckForX alan strOptXalan2092 CheckForXml2 strOptXml2 2093 CheckForXslt strOptXslt 2132 2094 CheckForQt strOptQt 2133 2095 if g_blnInternalMode then
Note:
See TracChangeset
for help on using the changeset viewer.