[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make libltdl work on platforms without loader
From: |
Gary V. Vaughan |
Subject: |
Re: make libltdl work on platforms without loader |
Date: |
Sun, 28 Nov 2004 21:04:44 +0000 |
User-agent: |
Mozilla Thunderbird 0.9 (Macintosh/20041103) |
Ralf Wildenhues wrote:
* Gary V. Vaughan wrote on Sun, Nov 28, 2004 at 01:31:52PM CET:
>
> I expect we'll need to fix the annoying need-a-.la-file-even-to-dlopen-
> a-preloaded-module bug too :-(
Do you mean the issue that currently prevents libdlloader.la from
being convenience-only? Haven't looked yet, but might soon.
Yip.
Back to above (rightfully) rejected patch. This one seems to do
the trick. Not beautiful, but much shorter. OK to apply? Does
HAVE_NO_DLLOADER constitute disallowed infringement on autoconf
namespace?
No that's fine wrt namespace. It seems odd to say #ifndef HAVE_NO_FOO
when #ifdef HAVE_FOO is more idiomatic though...
(what about my dietlibc patches?)
They arrived just as I was on my way out so I didn't look at them yet :-)
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.217.2.3
diff -u -r1.217.2.3 ltdl.c
--- libltdl/ltdl.c 1 Nov 2004 14:05:02 -0000 1.217.2.3
+++ libltdl/ltdl.c 28 Nov 2004 19:01:56 -0000
@@ -189,7 +189,9 @@
#define preloaded_symbols LT_CONC3(lt_, LTDLOPEN, _LTX_preloaded_symbols)
LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data);
+#ifndef HAVE_NO_DLLOADER
#ifdef HAVE_LIBDLLOADER
LT_SCOPE lt_dlsymlist preloaded_symbols;
+#endif
/* Initialize libltdl. */
int
@@ -211,6 +213,7 @@
/* Now open all the preloaded module loaders, so the application
can use _them_ to lt_dlopen its own modules. */
+#ifndef HAVE_NO_DLLOADER
#ifdef HAVE_LIBDLLOADER
if (!errors)
{
errors += lt_dlpreload (&preloaded_symbols);
[[snip]]
Index: m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltdl.m4,v
retrieving revision 1.20.2.2
diff -u -r1.20.2.2 ltdl.m4
--- m4/ltdl.m4 10 Nov 2004 13:20:52 -0000 1.20.2.2
+++ m4/ltdl.m4 28 Nov 2004 19:02:03 -0000
@@ -413,7 +413,9 @@
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS dlopen.la"])])])
+ LT_DLLOADERS="$LT_DLLOADERS dlopen.la"],
+ [AC_DEFINE([HAVE_NO_DLLOADER], [1],
+ [Define if no native dlloader present on this
platform.])])])])
if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen"
= xyes
then
lt_save_LIBS="$LIBS"
Instead of this hunk, near the end of LT_LIB_DLLOAD just before
AC_LANG_POP (completely untested btw!):
m4_pattern_allow([^LT_DLPREOPEN$])
LT_DLPREOPEN=
if test -n "$LT_DLLOADERS"
then
for lt_loader in $LT_DLLOADERS; do
LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen loaders/$lt_loader "
done
else
AC_DEFINE([HAVE_LIBDLLOADER], [1],
[Define if libdlloader will be built on this platform])
fi
AC_SUBST([LT_DLPREOPEN])
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature