diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 79e8fc535..3eba0c924 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -29,6 +29,9 @@ * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ +#if LL_LINUX && defined(LL_STANDALONE) +#include +#endif #include "llviewerprecompiledheaders.h" #include "llvoiceclient.h" @@ -1635,9 +1638,22 @@ void LLVoiceClient::stateMachine() { // Launch the voice daemon - // *FIX:Mani - Using the executable dir instead - // of mAppRODataDir, the working directory from which the app - // is launched. +#if LL_LINUX && defined(LL_STANDALONE) + // Look for the vivox daemon in the executable path list + // using glib first. + char *voice_path = g_find_program_in_path ("SLVoice"); + std::string exe_path; + if (voice_path) { + exe_path = llformat("%s", voice_path); + free(voice_path); + } else { + exe_path = gDirUtilp->getExecutableDir() + + gDirUtilp->getDirDelimiter() + "SLVoice"; + } +#else + // *FIX:Mani - Using the executable dir instead + // of mAppRODataDir, the working directory from which the + // app is launched. //std::string exe_path = gDirUtilp->getAppRODataDir(); std::string exe_path = gDirUtilp->getExecutableDir(); exe_path += gDirUtilp->getDirDelimiter(); @@ -1647,6 +1663,7 @@ void LLVoiceClient::stateMachine() exe_path += "../Resources/SLVoice"; #else exe_path += "SLVoice"; +#endif #endif // See if the vivox executable exists llstat s;