[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Libtool API suggestion: LTDL_SHLIB_PRE and/or char* ltdl_map_shared_
From: |
Albert Chin |
Subject: |
Re: Libtool API suggestion: LTDL_SHLIB_PRE and/or char* ltdl_map_shared_name(const char* name) |
Date: |
Tue, 23 Aug 2005 14:40:38 -0500 |
User-agent: |
Mutt/1.5.6i |
On Tue, Aug 23, 2005 at 08:20:42PM +0200, Dalibor Topic wrote:
> It would be nice if libtool provided a way to either map a short dynamic
> library name to a full name (say, something -> libsomething.so) or
> offered an autoconfish way to get the platform-specifc shared library
> prefix, like it does for the suffix.
>
> I've seen that a similar problem occured for GNU readline on cygwin[1],
> and they went for a platform-specific set of properties in the
> makefiles. I guess it would be more efficient if libtool provided a
> central API for that, rather than to see projects reinventing the wheel.
>
> It also seems that ltdl.c uses the "lib" prefix specifically in one case
> [2] , where it may or may not make sense to use a hypothetical
> LTDL_SHLIB_PRE.
so:
if x$need_lib_prefix = xno; then
LTDL_SHLIB_PRE=
else
LTDL_SHLIB_PRE="lib"
fi
> [2] ltdl.c from HEAD:
> 812 if (strncmp(p, "-l", 2) == 0)
> 813 {
> 814 size_t name_len = 3+ /* "lib" */ LT_STRLEN (p
> + 2);
> 815 name = MALLOC (char, 1+ name_len);
> 816 if (name)
> 817 sprintf (name, "lib%s", p+2);
> 818 }
>From inspection, this appears wrong. It doesn't honor
$need_lib_prefix. Should we have a separate prefix variable like
$shrext_cmds so we don't have to do things like:
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} |
$SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
;;
--
albert chin (address@hidden)