2000-09-03 Alexandre Oliva <aoliva@redhat.com>
+ * libltdl/ltdl.c (lt_dlopen): Set dlname from library_names if
+ dlname is empty.
+
* libltdl/configure.in (HAVE_LIBDL): Look for dlopen in -lsvld.
* ltconfig.in: Likewise.
/* ltdl.c -- system independent dlopen wrapper
- Copyright (C) 1998-1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@ffii.org>
This file is part of GNU Libtool.
else
if (strcmp(line, "installed=no\n") == 0)
installed = 0;
+ else
+# undef STR_LIBRARY_NAMES
+# define STR_LIBRARY_NAMES "library_names="
+ if (! dlname &&
+ strncmp(line, STR_LIBRARY_NAMES,
+ sizeof(STR_LIBRARY_NAMES) - 1) == 0) {
+ char *last_libname;
+ error = trim(&dlname,
+ &line[sizeof(STR_LIBRARY_NAMES) - 1]);
+ if (! error && dlname &&
+ (last_libname = strrchr(dlname, ' ')) != NULL) {
+ last_libname = strdup(last_libname + 1);
+ free(dlname);
+ dlname = last_libname;
+ }
+ }
if (error)
break;
}