> Why not use the same approach used for "$prefix" in
configure.ac?
>
> case "$prefix" in
> NONE) prefix_QUOTED=`echo $ac_default_prefix | sed 's/:/\\\\:/g'`;;
> *) prefix_QUOTED=`echo $prefix | sed 's/:/\\\\:/g'`;;
> esac
>
> If libdir is set, use it, if not, use a defualt value.
Would you please send a patch? If it works well, I'd like to take it.
> IIUC, the files referenced by gtags.conf end up as arguments to a dlopen() call.
> Why not name the .so files directly, or their platform-specific equivalent
> depending on the compilation target?
Because I don't want to make gtags.conf for each OS. '.so' is not a common
extension. But now rereading the libtools manual, I have found lt_dlopenext()
function. Using this, we can load library without extension.
[derived from libtool manual]
-----------------------------
@deftypefun lt_dlhandle lt_dlopenext (const char address@hidden)
The same as @code{lt_dlopen}, except that it tries to append
different file name extensions to the file name.
If the file with the file name @var{filename} cannot be found
libltdl tries to append the following extensions:
@enumerate 1
@item the libtool archive extension @file{.la}
@item the extension used for native dynamically loadable modules on the host platform, e.g., @file{.so}, @file{.sl}, etc.
@end enumerate
-----------------------------
I will rewrite dynamic loading code using this. It will be like follows:
if (lt_dlopen('
foo.la') == FAILED)
if (lt_dlopenext('foo') == FAILED)
error_and_exit();
This code should work without '.la' files.
Thank you for giving me a chance of re-investigation.
Regards,
Shigio