without the presence of the associated ".la" file. This caused the Win32
nightly snapshots to be unusable (as they're static-built libtool).
At present, a search for a preloaded module occurs first, before the ".la"
is even looked for.
Noticed by: Oliver <mybox@ollysoft.de>
* libtool.m4: Define new config.h variable LIBTOOL_LIBEXT that is the
extension used for static libraries (e.g. ".a"). This is the extension used
for preloaded symbols.
* ltdl.c (lt_dlopenext): Add first search function to find filename.a prior
to other searches (.la and .so), so preloaded symbols are hit first.
svn path=/trunk/yasm/; revision=1157
#ifdef LTDL_SHLIB_EXT
static const char shlib_ext[] = LTDL_SHLIB_EXT;
#endif
+#ifdef LIBTOOL_LIBEXT
+static const char lib_ext[] = LIBTOOL_LIBEXT;
+#endif
#ifdef LTDL_SYSSEARCHPATH
static const char sys_search_path[] = LTDL_SYSSEARCHPATH;
#endif
return lt_dlopen (filename);
}
+#ifdef LIBTOOL_LIBEXT
+ /* Try appending LIBTOOL_LIBEXT. */
+ tmp = LT_EMALLOC (char, len + LT_STRLEN (lib_ext) + 1);
+ if (!tmp)
+ return 0;
+
+ strcpy (tmp, filename);
+ strcat (tmp, lib_ext);
+ errors = try_dlopen (&handle, tmp);
+
+ LT_DLFREE (tmp);
+ if (handle)
+ return handle;
+#endif
+
/* First try appending ARCHIVE_EXT. */
tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1);
if (!tmp)
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+AC_DEFINE_UNQUOTED(LIBTOOL_LIBEXT, ".$libext",
+ [Define to the extension used for static libraries, say, ".a".])
+
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"