On 10/22/2010 01:44 PM, Matthias Bolte wrote:
This partly reverts df90ca7661b0a789bd790ccf8258a4527c13eb8d.
Don't disable the VirtualBox driver when configure can't find
VBoxXPCOMC.so, rely on detection at runtime again instead.
Keep --with-vbox=/path/to/virtualbox intact, added to for:
https://bugzilla.redhat.com/show_bug.cgi?id=609185
Detection order for VBoxXPCOMC.so:
1. VBOX_APP_HOME environment variable
2. configure provided location
3. hardcoded list of known locations
4. dynamic linker search path
Also cleanup the glue code and improve error reporting.
-if test "x$with_vbox" = "xyes" || test "x$with_vbox" =
"xcheck"; then
- AC_MSG_CHECKING([for VirtualBox XPCOMC location])
-
- for vbox in \
- /usr/lib/virtualbox/VBoxXPCOMC.so \
- /usr/lib64/virtualbox/VBoxXPCOMC.so \
- /usr/lib/VirtualBox/VBoxXPCOMC.so \
- /opt/virtualbox/VBoxXPCOMC.so \
- /opt/VirtualBox/VBoxXPCOMC.so \
- /opt/virtualbox/i386/VBoxXPCOMC.so \
- /opt/VirtualBox/i386/VBoxXPCOMC.so \
- /opt/virtualbox/amd64/VBoxXPCOMC.so \
- /opt/VirtualBox/amd64/VBoxXPCOMC.so \
- /usr/local/lib/virtualbox/VBoxXPCOMC.so \
- /usr/local/lib/VirtualBox/VBoxXPCOMC.so \
- /Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMC.dylib \
- ; do
- if test -f "$vbox"; then
- vbox_xpcomc_dir=`AS_DIRNAME(["$vbox"])`
- break
- fi
- done
I'm wondering if we still want to keep this configure-time loop anyways.
As in:
--with-vbox=yes => configure-time check; fatal if not found
--with-vbox=no => no vbox
--with-vbox=check => configure-time of check; if it passes, use that
path; if not, fall back dynamic check
--with-vbox=path => hard-code path at configure time
in which case, the default of --with-vbox=check still makes sense, but
the reaction to not finding anything in the loop changes from disabling
vbox over to the better action of enabling vbox via the dynamic search
fallback.
+static int tryLoadOne(const char *dir, bool setAppHome, bool
ignoreMissing)
{
- size_t cchHome = pszHome ? strlen(pszHome) : 0;
- size_t cbBufNeeded;
- char szName[4096];
- int rc = -1;
+ int result = -1;
+ char *name = NULL;
+ PFNVBOXGETXPCOMCFUNCTIONS pfnGetFunctions;
WESHOULDALLTALKINALLCAPSWITHNOSPACES :) What a horrid upstream coding
convention. But not your fault.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org