+ // found the first file in LD_LIBRARY_PATH with this name
+ wxString libPath("/lib:/usr/lib"); // system path first
+ const char *envLibPath = getenv("LD_LIBRARY_PATH");
+ if ( envLibPath )
+ libPath << ':' << envLibPath;
+ wxStringTokenizer tokenizer(libPath, _T(':'));
+ while ( tokenizer.HasMoreToken() )
+ {
+ wxString fullname(tokenizer.NextToken());
+
+ fullname << '/' << lib_name;
+ if ( wxFileExists(fullname) )
+ {
+ lib_name = fullname;
+
+ // found the library
+ break;
+ }
+ }
+ //else: not found in the path, leave the name as is (secutiry risk?)
+