Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 73552)
+++ /trunk/Config.kmk	(revision 73553)
@@ -5998,8 +5998,6 @@
  ifeq ($(KBUILD_TARGET),linux)
   TEMPLATE_VBoxR3ExtPack_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
- else
-  if !defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
+ else if !defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
    TEMPLATE_VBoxR3ExtPack_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/../../..' $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
-  endif
  endif
  ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
@@ -6022,4 +6020,32 @@
  endif
 
+ TEMPLATE_VBoxR3ExtPackApi = For the ring-3 context extension pack modules using the Main API.
+ TEMPLATE_VBoxR3ExtPackApi_EXTENDS = VBOXMAINDLL
+ TEMPLATE_VBoxR3ExtPackApi_DEFS = $(TEMPLATE_VBOXMAINDLL_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3
+ TEMPLATE_VBoxR3ExtPackApi_INST = $(INST_EXTPACK)YouShallOverrideThis/
+ ifeq ($(KBUILD_TARGET),linux)
+  TEMPLATE_VBoxR3ExtPackApi_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXMAINDLL_LDFLAGS))
+ else if !defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
+   TEMPLATE_VBoxR3ExtPackApi_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/../../..' $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXMAINDLL_LDFLAGS))
+ endif
+ ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+  if1of ($(KBUILD_TARGET), win os2)
+   TEMPLATE_VBoxR3ExtPackApi_LIBS = \
+   	$(TEMPLATE_LIBS_VBOXR3) \
+   	$(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB), $(VBOX_LIB_VMM_LAZY)) \
+   	$(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_LIB)
+  else
+   TEMPLATE_VBoxR3ExtPackApi_LIBS = \
+   	$(TEMPLATE_LIBS_VBOXR3) \
+   	$(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL), $(VBOX_LIB_VMM_LAZY)) \
+   	$(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_DLL)
+  endif
+ else
+  TEMPLATE_VBoxR3ExtPackApi_LIBS = \
+  	$(TEMPLATE_LIBS_VBOXR3) \
+  	$(LIB_RUNTIME) \
+  	$(VBOX_LIB_VMM_LAZY)
+ endif
+
  TEMPLATE_VBoxR0ExtPack = For the ring-0 context extension pack modules.
  TEMPLATE_VBoxR0ExtPack_EXTENDS = VBoxR0
@@ -6055,4 +6081,9 @@
   TEMPLATE_VBoxR3ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
   TEMPLATE_VBoxR3ExtPackPuel_DEFS = $(TEMPLATE_VBoxR3ExtPack_DEFS) VBOX_IN_PUEL_EXTPACK
+
+  TEMPLATE_VBoxR3ExtPackApiPuel = For the ring-3 context modules in the PUEL extension pack.
+  TEMPLATE_VBoxR3ExtPackApiPuel_EXTENDS = VBoxR3ExtPackApi
+  TEMPLATE_VBoxR3ExtPackApiPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+  TEMPLATE_VBoxR3ExtPackApiPuel_DEFS = $(TEMPLATE_VBoxR3ExtPackApi_DEFS) VBOX_IN_PUEL_EXTPACK
 
   TEMPLATE_VBoxR3ExtPackPuelWithOpenSsl = For the ring-3 context modules in the PUEL extension pack using ExtPack OpenSSL.
Index: /trunk/src/VBox/Main/src-server/CloudUserProfileManagerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/CloudUserProfileManagerImpl.cpp	(revision 73552)
+++ /trunk/src/VBox/Main/src-server/CloudUserProfileManagerImpl.cpp	(revision 73553)
@@ -69,5 +69,5 @@
     unconst(mParent) = aParent;
 
-#ifdef CLOUD_PROVIDERS_IN_EXTPACK
+#ifdef VBOX_WITH_CLOUD_PROVIDERS_IN_EXTPACK
     /*
      * Engage the extension pack manager and get all the implementations of this class.
@@ -106,5 +106,5 @@
 HRESULT CloudUserProfileManager::getSupportedProviders(std::vector<CloudProviderId_T> &aSupportedProviders)
 {
-#ifdef CLOUD_PROVIDERS_IN_EXTPACK
+#ifdef VBOX_WITH_CLOUD_PROVIDERS_IN_EXTPACK
     /*
      * Collect all the provider names from all the extension pack objects.
@@ -132,5 +132,5 @@
 HRESULT CloudUserProfileManager::getAllProfiles(std::vector<ComPtr<ICloudUserProfiles> > &aProfilesList)
 {
-#ifdef CLOUD_PROVIDERS_IN_EXTPACK
+#ifdef VBOX_WITH_CLOUD_PROVIDERS_IN_EXTPACK
     /*
      * Collect all the cloud providers from all the extension pack objects.
@@ -174,5 +174,5 @@
                                                        ComPtr<ICloudUserProfiles> &aProfiles)
 {
-#ifdef CLOUD_PROVIDERS_IN_EXTPACK
+#ifdef VBOX_WITH_CLOUD_PROVIDERS_IN_EXTPACK
     /*
      * Return the first provider we get.
