+2010-07-08 Peter Rosin <peda@lysator.liu.se>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Make preloading heed libname_spec.
+ Fixes testsuite failure for lt_dladvise.at on MSYS/MSVC.
+ * libltdl/ltdl.c (libprefix): New static variable describing
+ the prefix of static archives.
+ (try_dlopen): Use libprefix.
+ * libltdl/m4/ltdl.m4 (_LTDL_SETUP): Export prefix of static
+ archives to config.h. Also fix assignment of LTDLOPEN to be more
+ efficient and less error prone while at it.
+
2010-07-08 Gary V. Vaughan <gary@gnu.org>
Rename _LT_PROG_XSI_REPLACE macro to _LT_PROG_FUNCTION_REPLACE.
# define LT_LIBEXT "a"
#endif
+#if !defined(LT_LIBPREFIX)
+# define LT_LIBPREFIX "lib"
+#endif
+
/* This is the maximum symbol size that won't require malloc/free */
#undef LT_SYMBOL_LENGTH
#define LT_SYMBOL_LENGTH 128
static const char objdir[] = LT_OBJDIR;
static const char archive_ext[] = LT_ARCHIVE_EXT;
static const char libext[] = LT_LIBEXT;
+static const char libprefix[] = LT_LIBPREFIX;
#if defined(LT_MODULE_EXT)
static const char shlib_ext[] = LT_MODULE_EXT;
#endif
if (vtable)
{
- /* name + "." + libext + NULL */
- archive_name = MALLOC (char, LT_STRLEN (name) + strlen (libext) + 2);
+ /* libprefix + name + "." + libext + NULL */
+ archive_name = MALLOC (char, strlen (libprefix) + LT_STRLEN (name) + strlen (libext) + 2);
*phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
if ((*phandle == NULL) || (archive_name == NULL))
/* Preloaded modules are always named according to their old
archive name. */
- sprintf (archive_name, "%s.%s", name, libext);
+ if (strncmp(name, "lib", 3) == 0)
+ {
+ sprintf (archive_name, "%s%s.%s", libprefix, name + 3, libext);
+ }
+ else
+ {
+ sprintf (archive_name, "%s.%s", name, libext);
+ }
if (tryall_dlopen (&newhandle, archive_name, advise, vtable) == 0)
{
m4_pattern_allow([LT_LIBEXT])dnl
AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
+name=
+eval "lt_libprefix=\"$libname_spec\""
+m4_pattern_allow([LT_LIBPREFIX])dnl
+AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
+
name=ltdl
-LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+eval "LTDLOPEN=\"$libname_spec\""
AC_SUBST([LTDLOPEN])
])# _LTDL_SETUP