VirtualBox

Changeset 20235 in vbox


Ignore:
Timestamp:
Jun 3, 2009 4:22:25 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48090
Message:

configure.vbs: several OSE fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.vbs

    r20025 r20235  
    17661766
    17671767''
     1768' Checks for openssl
     1769sub CheckForSsl(strOptSsl)
     1770   dim strPathSsl, str
     1771   PrintHdr "openssl"
     1772
     1773   '
     1774   ' Try find some openssl dll/lib.
     1775   '
     1776   strPathSsl = ""
     1777   if (strPathSsl = "") And (strOptSsl <> "") then
     1778      if CheckForSslSub(strOptSsl) then strPathSsl = strOptSsl
     1779   end if
     1780
     1781   if strPathSsl = "" Then
     1782      str = Which("ssleay32.lib")
     1783      if str <> "" Then
     1784         str = PathParent(PathStripFilename(str))
     1785         if CheckForSslSub(str) then strPathSsl = str
     1786      end if
     1787   end if
     1788
     1789   ' Ignore failure if we're in 'internal' mode.
     1790   if (strPathSsl = "") and g_blnInternalMode then
     1791      PrintResult "openssl", "ignored (internal mode)"
     1792      exit sub
     1793   end if
     1794
     1795   ' Success?
     1796   if strPathSsl = "" then
     1797      if strOptSsl = "" then
     1798         MsgError "Can't locate openssl. Try specify the path with the --with-openssl=<path> argument. " _
     1799                & "If still no luck, consult the configure.log and the build requirements."
     1800      else
     1801         MsgError "Can't locate openssl. Please consult the configure.log and the build requirements."
     1802      end if
     1803      exit sub
     1804   end if
     1805
     1806   strPathSsl = UnixSlashes(PathAbs(strPathSsl))
     1807   CfgPrint "SDK_VBOX_OPENSSL_INCS := " & strPathSsl & "/include"
     1808   CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib"
     1809
     1810   PrintResult "openssl", strPathSsl
     1811end sub
     1812
     1813''
     1814' Checks if the specified path points to an usable openssl or not.
     1815function CheckForSslSub(strPathSsl)
     1816
     1817   CheckForSslSub = False
     1818   LogPrint "trying: strPathSsl=" & strPathSsl
     1819   if   LogFileExists(strPathSsl, "include/openssl/md5.h") _
     1820    And LogFindFile(strPathSsl, "bin/ssleay32.dll") <> "" _
     1821    And LogFindFile(strPathSsl, "lib/ssleay32.lib") <> "" _
     1822    And LogFindFile(strPathSsl, "bin/libeay32.dll") <> "" _
     1823    And LogFindFile(strPathSsl, "lib/libeay32.lib") <> "" _
     1824      then
     1825         CheckForSslSub = True
     1826      end if
     1827end function
     1828
     1829
     1830''
     1831' Checks for libcurl
     1832sub CheckForCurl(strOptCurl)
     1833   dim strPathCurl, str
     1834   PrintHdr "libcurl"
     1835
     1836   '
     1837   ' Try find some cURL dll/lib.
     1838   '
     1839   strPathCurl = ""
     1840   if (strPathCurl = "") And (strOptCurl <> "") then
     1841      if CheckForCurlSub(strOptCurl) then strPathCurl = strOptCurl
     1842   end if
     1843
     1844   if strPathCurl = "" Then
     1845      str = Which("ssleay32.lib")
     1846      if str <> "" Then
     1847         str = PathParent(PathStripFilename(str))
     1848         if CheckForCurlSub(str) then strPathCurl = str
     1849      end if
     1850   end if
     1851
     1852   ' Ignore failure if we're in 'internal' mode.
     1853   if (strPathCurl = "") and g_blnInternalMode then
     1854      PrintResult "curl", "ignored (internal mode)"
     1855      exit sub
     1856   end if
     1857
     1858   ' Success?
     1859   if strPathCurl = "" then
     1860      if strOptCurl = "" then
     1861         MsgError "Can't locate libcurl. Try specify the path with the --with-libcurl=<path> argument. " _
     1862                & "If still no luck, consult the configure.log and the build requirements."
     1863      else
     1864         MsgError "Can't locate libcurl. Please consult the configure.log and the build requirements."
     1865      end if
     1866      exit sub
     1867   end if
     1868
     1869   strPathCurl = UnixSlashes(PathAbs(strPathCurl))
     1870   CfgPrint "SDK_VBOX_LIBCURL_INCS := " & strPathCurl & "/include"
     1871   CfgPrint "SDK_VBOX_LIBCURL_LIBS := " & strPathCurl & "/libcurl_imp.lib"
     1872
     1873   PrintResult "libcurl", strPathCurl
     1874end sub
     1875
     1876''
     1877' Checks if the specified path points to an usable libcurl or not.
     1878function CheckForCurlSub(strPathCurl)
     1879
     1880   CheckForCurlSub = False
     1881   LogPrint "trying: strPathCurl=" & strPathCurl
     1882   if   LogFileExists(strPathCurl, "include/curl/curl.h") _
     1883    And LogFindFile(strPathCurl, "curllib.dll") <> "" _
     1884    And LogFindFile(strPathCurl, "libcurl_imp.lib") <> "" _
     1885      then
     1886         CheckForCurlSub = True
     1887      end if
     1888end function
     1889
     1890
     1891
     1892''
    17681893''
    17691894' Checks for any Qt4 binaries.
     
    18201945end function
    18211946
     1947
     1948'
     1949'
     1950function CheckForPython(strPathPython)
     1951
     1952   PrintHdr "Python"
     1953
     1954   CheckForPython = False
     1955   LogPrint "trying: strPathPython=" & strPathPython
     1956
     1957   if LogFileExists(strPathPython, "python.exe") then
     1958      CfgPrint "VBOX_BLD_PYTHON       := " & strPathPython & "\python.exe"
     1959      CheckForPython = True
     1960   end if
     1961 
     1962   PrintResult "Python ", strPathPython
     1963end function
    18221964
    18231965''
     
    18481990   Print "  --with-libxml2=PATH   "
    18491991   Print "  --with-libxslt=PATH   "
     1992   Print "  --with-openssl=PATH   "
     1993   Print "  --with-libcurl=PATH   "
     1994   Print "  --with-python=PATH    "
    18501995end sub
    18511996
     
    18802025   strOptXml2 = ""
    18812026   strOptXslt = ""
     2027   strOptSsl = ""
     2028   strOptCurl = ""
     2029   strOptPython = ""
    18822030   blnOptDisableCOM = False
    18832031   for i = 1 to Wscript.Arguments.Count
     
    19232071         case "--with-libxslt"
    19242072            strOptXslt = strPath
     2073         case "--with-openssl"
     2074            strOptSsl = strPath
     2075         case "--with-libcurl"
     2076            strOptCurl = strPath
     2077         case "--with-python"
     2078            strOptPython = strPath
    19252079         case "--disable-com"
    19262080            blnOptDisableCOM = True
     
    19832137      CheckForXslt strOptXslt
    19842138   end if
     2139   CheckForSsl strOptSsl
     2140   CheckForCurl strOptCurl
    19852141   CheckForQt4 strOptQt4
     2142   if (strOptPython <> "") then
     2143     CheckForPython strOptPython
     2144   end if
    19862145   if g_blnInternalMode then
    19872146      EnvPrint "call " & g_strPathDev & "/env.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9"
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette