|
1 | | -' $Id: configure.vbs 110684 2025-08-11 17:18:47Z klaus.espenlaub@oracle.com $ |
| 1 | +' $Id: configure.vbs 111744 2025-11-14 15:37:00Z andreas.loeffler@oracle.com $ |
2 | 2 | '' @file |
3 | 3 | ' The purpose of this script is to check for all external tools, headers, and |
4 | 4 | ' libraries VBox OSE depends on. |
@@ -1605,6 +1605,183 @@ function CheckForXml2Sub(strPathXml2) |
1605 | 1605 | end if |
1606 | 1606 | end function |
1607 | 1607 |
|
| 1608 | +'' |
| 1609 | +' Checks for libvpx. |
| 1610 | +' |
| 1611 | +sub CheckForLibVpx(strOptLibVpx) |
| 1612 | + dim strPathLibVpx |
| 1613 | + PrintHdr "libvpx" |
| 1614 | + |
| 1615 | + ' |
| 1616 | + ' Part of tarball / svn, so we can exit immediately if no path was specified. |
| 1617 | + ' |
| 1618 | + if (strOptLibVpx = "") then |
| 1619 | + PrintResultMsg "libvpx", "src/lib/libvpx-*" |
| 1620 | + exit sub |
| 1621 | + end if |
| 1622 | + |
| 1623 | + ' |
| 1624 | + ' Try find some xml2 dll/lib. |
| 1625 | + ' |
| 1626 | + strPathLibVpx = "" |
| 1627 | + if (strOptLibVpx <> "") then |
| 1628 | + if CheckForLibVpxSub(strOptLibVpx) then strPathLibVpx = strOptLibVpx |
| 1629 | + end if |
| 1630 | + |
| 1631 | + ' Success? |
| 1632 | + if strPathLibVpx = "" then |
| 1633 | + if strOptLibVpx = "" then |
| 1634 | + MsgError "Can't locate libvpx. Try specify the path with the --with-libvpx=<path> argument. " _ |
| 1635 | + & "If still no luck, consult the configure.log and the build requirements." |
| 1636 | + else |
| 1637 | + MsgError "Can't locate libvpx. Please consult the configure.log and the build requirements." |
| 1638 | + end if |
| 1639 | + exit sub |
| 1640 | + end if |
| 1641 | + |
| 1642 | + strPathLibVpx = UnixSlashes(PathAbs(strPathLibVpx)) |
| 1643 | + CfgPrintAssign "SDK_VBoxLibVpx_VBOX_DEFAULT_INCS", strPathLibVpx |
| 1644 | + CfgPrintAssign "SDK_VBoxLibVpx_INCS", strPathLibVpx |
| 1645 | + CfgPrintAssign "SDK_VBoxLibVpx_LIBS", strPathLibVpx & "/libvpx.lib" |
| 1646 | + |
| 1647 | + strPathXml2 = UnixSlashes(PathAbs(strPathLibVpx)) |
| 1648 | + PrintResult "libvpx", strPathLibVpx |
| 1649 | +end sub |
| 1650 | + |
| 1651 | +'' Checks if the specified path points to an usable libvpx or not. |
| 1652 | +function CheckForLibVpxSub(strPathLibVpx) |
| 1653 | + dim str |
| 1654 | + |
| 1655 | + CheckForLibVpxSub = False |
| 1656 | + LogPrint "trying: strPathLibVpx=" & strPathLibVpx |
| 1657 | + if LogFileExists(strPathLibVpx, "vpx_version.h") _ |
| 1658 | + And LogFileExists(strPathLibVpx, "vpxenc.h") _ |
| 1659 | + then |
| 1660 | + str = LogFindFile(strPathLibVpx, "libvpx.lib") |
| 1661 | + if str <> "" then |
| 1662 | + CheckForLibVpxSub = True |
| 1663 | + end if |
| 1664 | + end if |
| 1665 | +end function |
| 1666 | + |
| 1667 | +'' |
| 1668 | +' Checks for libogg. |
| 1669 | +' |
| 1670 | +'' |
| 1671 | +' Checks for libogg. |
| 1672 | +' |
| 1673 | +sub CheckForLibOgg(strOptLibOgg) |
| 1674 | + dim strPathLibOgg |
| 1675 | + PrintHdr "libogg" |
| 1676 | + |
| 1677 | + ' |
| 1678 | + ' Part of tarball / svn, so we can exit immediately if no path was specified. |
| 1679 | + ' |
| 1680 | + if (strOptLibOgg = "") then |
| 1681 | + PrintResultMsg "libogg", "src/lib/libogg-*" |
| 1682 | + exit sub |
| 1683 | + end if |
| 1684 | + |
| 1685 | + ' |
| 1686 | + ' Try find some ogg dll/lib. |
| 1687 | + ' |
| 1688 | + strPathLibOgg = "" |
| 1689 | + if (strOptLibOgg <> "") then |
| 1690 | + if CheckForLibOggSub(strOptLibOgg) then strPathLibOgg = strOptLibOgg |
| 1691 | + end if |
| 1692 | + |
| 1693 | + ' Success? |
| 1694 | + if strPathLibOgg = "" then |
| 1695 | + if strOptLibOgg = "" then |
| 1696 | + MsgError "Can't locate libogg. Try specify the path with the --with-libogg=<path> argument. " _ |
| 1697 | + & "If still no luck, consult the configure.log and the build requirements." |
| 1698 | + else |
| 1699 | + MsgError "Can't locate libogg. Please consult the configure.log and the build requirements." |
| 1700 | + end if |
| 1701 | + exit sub |
| 1702 | + end if |
| 1703 | + |
| 1704 | + strPathLibOgg = UnixSlashes(PathAbs(strPathLibOgg)) |
| 1705 | + CfgPrintAssign "SDK_VBoxLibOgg_VBOX_DEFAULT_INCS", strPathLibOgg |
| 1706 | + CfgPrintAssign "SDK_VBoxLibOgg_INCS", strPathLibOgg |
| 1707 | + CfgPrintAssign "SDK_VBoxLibOgg_LIBS", strPathLibOgg & "/src/.libs/libogg.lib" |
| 1708 | + |
| 1709 | + strPathXml2 = UnixSlashes(PathAbs(strPathLibOgg)) |
| 1710 | + PrintResult "libogg", strPathLibOgg |
| 1711 | +end sub |
| 1712 | + |
| 1713 | +'' Checks if the specified path points to an usable libogg or not. |
| 1714 | +function CheckForLibOggSub(strPathLibOgg) |
| 1715 | + dim str |
| 1716 | + |
| 1717 | + CheckForLibOggSub = False |
| 1718 | + LogPrint "trying: strPathLibOgg=" & strPathLibOgg |
| 1719 | + if LogFileExists(strPathLibOgg, "include/ogg/ogg.h") then |
| 1720 | + str = LogFindFile(strPathLibOgg, "src/.libs/libogg.lib") |
| 1721 | + if str <> "" then |
| 1722 | + CheckForLibOggSub = True |
| 1723 | + end if |
| 1724 | + end if |
| 1725 | +end function |
| 1726 | + |
| 1727 | +'' |
| 1728 | +' Checks for libvorbis. |
| 1729 | +' |
| 1730 | +sub CheckForLibVorbis(strOptLibVorbis) |
| 1731 | + dim strPathLibVorbis |
| 1732 | + PrintHdr "libvorbis" |
| 1733 | + |
| 1734 | + ' |
| 1735 | + ' Part of tarball / svn, so we can exit immediately if no path was specified. |
| 1736 | + ' |
| 1737 | + if (strOptLibVorbis = "") then |
| 1738 | + PrintResultMsg "libvorbis", "src/lib/libvorbis-*" |
| 1739 | + exit sub |
| 1740 | + end if |
| 1741 | + |
| 1742 | + ' |
| 1743 | + ' Try find some vorbis dll/lib. |
| 1744 | + ' |
| 1745 | + strPathLibVorbis = "" |
| 1746 | + if (strOptLibVorbis <> "") then |
| 1747 | + if CheckForLibVorbisSub(strOptLibVorbis) then strPathLibVorbis = strOptLibVorbis |
| 1748 | + end if |
| 1749 | + |
| 1750 | + ' Success? |
| 1751 | + if strPathLibVorbis = "" then |
| 1752 | + if strOptLibVorbis = "" then |
| 1753 | + MsgError "Can't locate libvorbis. Try specify the path with the --with-libvorbis=<path> argument. " _ |
| 1754 | + & "If still no luck, consult the configure.log and the build requirements." |
| 1755 | + else |
| 1756 | + MsgError "Can't locate libvorbis. Please consult the configure.log and the build requirements." |
| 1757 | + end if |
| 1758 | + exit sub |
| 1759 | + end if |
| 1760 | + |
| 1761 | + strPathLibVorbis = UnixSlashes(PathAbs(strPathLibVorbis)) |
| 1762 | + CfgPrintAssign "SDK_VBoxLibVorbis_VBOX_DEFAULT_INCS", strPathLibVorbis |
| 1763 | + CfgPrintAssign "SDK_VBoxLibVorbis_INCS", strPathLibVorbis |
| 1764 | + CfgPrintAssign "SDK_VBoxLibVorbis_LIBS", strPathLibVorbis & "/lib/.libs/libvorbis.lib" |
| 1765 | + |
| 1766 | + strPathXml2 = UnixSlashes(PathAbs(strPathLibVorbis)) |
| 1767 | + PrintResult "libvorbis", strPathLibVorbis |
| 1768 | +end sub |
| 1769 | + |
| 1770 | +'' Checks if the specified path points to an usable libvorbis or not. |
| 1771 | +function CheckForLibVorbisSub(strPathLibVorbis) |
| 1772 | + dim str |
| 1773 | + |
| 1774 | + CheckForLibVorbisSub = False |
| 1775 | + LogPrint "trying: strPathLibVorbis=" & strPathLibVorbis |
| 1776 | + if LogFileExists(strPathLibVorbis, "include/vorbis/vorbisenc.h") _ |
| 1777 | + And LogFileExists(strPathLibVorbis, "include/vorbis/vorbisfile.h") _ |
| 1778 | + then |
| 1779 | + str = LogFindFile(strPathLibVorbis, "lib/.libs/libvorbis.lib") |
| 1780 | + if str <> "" then |
| 1781 | + CheckForLibVorbisSub = True |
| 1782 | + end if |
| 1783 | + end if |
| 1784 | +end function |
1608 | 1785 |
|
1609 | 1786 | '' Checks for openssl |
1610 | 1787 | sub CheckForSsl(strOptSsl, bln32Bit) |
@@ -1974,6 +2151,9 @@ sub usage |
1974 | 2151 | Print " --with-nasm=PATH Where NASM is to be found (optional)" |
1975 | 2152 | Print " --with-openwatcom=PATH Where OpenWatcom 1.9 is to be found (optional)." |
1976 | 2153 | Print " --with-libxml2=PATH To use a libxml2 other than the VBox one (opt)." |
| 2154 | + Print " --with-libvpx=PATH To use a libvpx other than the VBox one (opt)." |
| 2155 | + Print " --with-libogg=PATH To use a libogg other than the VBox one (opt)." |
| 2156 | + Print " --with-libvorbis=PATH To use a libvorbis other than the VBox one (opt)." |
1977 | 2157 | Print " --with-openssl=PATH To use an openssl other than the VBox one (opt)." |
1978 | 2158 | Print " --with-openssl32=PATH The 32-bit variant of openssl (optional)." |
1979 | 2159 | Print " --with-libcurl=PATH To use a cURL other than the VBox one (optional)." |
@@ -2022,6 +2202,9 @@ function Main |
2022 | 2202 | strOptNasm = "" |
2023 | 2203 | strOptOpenWatcom = "" |
2024 | 2204 | strOptXml2 = "" |
| 2205 | + strOptLibVpx = "" |
| 2206 | + strOptLibOgg = "" |
| 2207 | + strOptLibVorbis = "" |
2025 | 2208 | strOptSsl = "" |
2026 | 2209 | strOptSsl32 = "" |
2027 | 2210 | strOptCurl = "" |
@@ -2087,6 +2270,12 @@ function Main |
2087 | 2270 | strOptOpenWatcom = strPath |
2088 | 2271 | case "--with-libxml2" |
2089 | 2272 | strOptXml2 = strPath |
| 2273 | + case "--with-libvpx" |
| 2274 | + strOptLibVpx = strPath |
| 2275 | + case "--with-libogg" |
| 2276 | + strOptLibOgg = strPath |
| 2277 | + case "--with-libvorbis" |
| 2278 | + strOptLibVorbis = strPath |
2090 | 2279 | case "--with-openssl" |
2091 | 2280 | strOptSsl = strPath |
2092 | 2281 | case "--with-openssl32" |
@@ -2210,9 +2399,9 @@ function Main |
2210 | 2399 | end if |
2211 | 2400 | CheckForQt strOptQt, strOptQtInfix |
2212 | 2401 | CheckForPython strOptPython |
2213 | | - CfgPrintAssign"VBOX_WITH_LIBVPX", ""'' @todo look for libvpx 1.1.0+ |
2214 | | - CfgPrintAssign"VBOX_WITH_LIBOGG", ""'' @todo look for libogg 1.3.5+ |
2215 | | - CfgPrintAssign"VBOX_WITH_LIBVORBIS",""'' @todo look for libvorbis 1.3.7+ |
| 2402 | + CheckForLibVpx strOptLibVpx |
| 2403 | + CheckForLibOgg strOptLibOgg |
| 2404 | + CheckForLibVorbisstrOptLibVorbis |
2216 | 2405 |
|
2217 | 2406 | EnvPrintAppend "PATH", DosSlashes(g_strPath & "\tools\win." & g_strHostArch & "\bin"), ";" |
2218 | 2407 | if g_strHostArch = "amd64" then |
|
0 commit comments