Ralf Wildenhues <[EMAIL PROTECTED]> writes: >> For legacy reasons a ODBC driver is installed into "/usr/lib" or >> "/usr/local/lib" even if more to be considered a "plugin" than a >> normal shared library (i.e. it will be loaded with dlopen()). > > I suppose at this point I should be promoting libltdl, and its > lt_dlopen/lt_dlopenext as portable dlopen wrappers, and its facilities > for search paths.
It is the driver manager that does the loading, something I have no control over. But at least unixODBC uses libltdl I think. >> Together with building and installing the driver, I also want to put >> the path of the installed driver into a script generated in the build. >> A script to register the driver with an ODBC manager. But the script >> needs to contain the path to the driver install location, including >> possible ".so", ".dylib", ".sl" or similar shared library extension. > > Look at the generated .la file. 'libdir' contains the directory. > Either 'dlname', or, if empty, the last entry of 'library_names', is > the library name to open. Look in libltdl/ltdl.c for details. You may > have to do extra work on w32. Thank you for the hint. >> I was thinking of something like in the make file > [...] >> DRIVER_PATH=`libtool --print-shared-install-path libdriver.la` > > A convenient interface such as you suggest does not exist, sorry. > > Hope that helps. You are providing the best free support anyone can ask for :-) Thanks! kent -- Kent Boortz, Senior Production Engineer MySQL AB, www.mysql.com Office: +46 18 174400 ext. 4450 (VoIP) Office: +46 19 182931 Mobile: +46 70 2791171 _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool
