mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
* dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
defined. They don't do anything useful, especially since the only case where DYNAMIC_LINKING is undefined seems to be when --with-modules=no is given to configure, which is basically requesting that the "dynamic linking module" be omitted. * Makefile.am (libguile_la_SOURCES): move dynl.c from libguile_la_SOURCES to EXTRA_libguile_la_SOURCES. * extensions.c (load_extension): check DYNAMIC_LINKING for scm_dynamic_call. * init.c (scm_init_guile_1): check DYNAMIC_LINKING for scm_init_dynamic_linking. * configure.in: check dynamic linking before modules. Add dynl.c if dynamic linking is available, i.e., unless --with-modules=no was given to configure.
This commit is contained in:
parent
7e7eb95b41
commit
4f6f9ae3d3
7 changed files with 53 additions and 65 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-07-12 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
|
* configure.in: check dynamic linking before modules. Add dynl.c
|
||||||
|
if dynamic linking is available, i.e., unless --with-modules=no
|
||||||
|
was given to configure.
|
||||||
|
|
||||||
2002-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
|
2002-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
|
||||||
|
|
||||||
* autogen.sh: Patch libltdl/ltdl.c to avoid a nasty bug in
|
* autogen.sh: Patch libltdl/ltdl.c to avoid a nasty bug in
|
||||||
|
|
46
configure.in
46
configure.in
|
@ -171,8 +171,33 @@ AM_PROG_LIBTOOL
|
||||||
AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
|
AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
|
||||||
AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
|
AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
|
||||||
|
|
||||||
|
dnl Check for dynamic linking
|
||||||
|
|
||||||
|
use_modules=yes
|
||||||
|
AC_ARG_WITH(modules,
|
||||||
|
[ --with-modules[=FILES] Add support for dynamic modules],
|
||||||
|
use_modules="$withval")
|
||||||
|
test -z "$use_modules" && use_modules=yes
|
||||||
|
DLPREOPEN=
|
||||||
|
if test "$use_modules" != no; then
|
||||||
|
AC_DEFINE(DYNAMIC_LINKING, 1,
|
||||||
|
[Define if you want support for dynamic linking.])
|
||||||
|
if test "$use_modules" = yes; then
|
||||||
|
DLPREOPEN="-dlpreopen force"
|
||||||
|
else
|
||||||
|
DLPREOPEN="-export-dynamic"
|
||||||
|
for module in $use_modules; do
|
||||||
|
DLPREOPEN="$DLPREOPEN -dlopen $module"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl files which are destined for separate modules.
|
dnl files which are destined for separate modules.
|
||||||
|
|
||||||
|
if test "$use_modules" != no; then
|
||||||
|
AC_LIBOBJ([dynl])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$enable_arrays" = yes; then
|
if test "$enable_arrays" = yes; then
|
||||||
AC_LIBOBJ([ramap])
|
AC_LIBOBJ([ramap])
|
||||||
AC_LIBOBJ([unif])
|
AC_LIBOBJ([unif])
|
||||||
|
@ -280,27 +305,6 @@ if test "$MINGW32" = "yes" ; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST(EXTRA_DEFS)
|
AC_SUBST(EXTRA_DEFS)
|
||||||
|
|
||||||
dnl Check for dynamic linking
|
|
||||||
|
|
||||||
use_modules=yes
|
|
||||||
AC_ARG_WITH(modules,
|
|
||||||
[ --with-modules[=FILES] Add support for dynamic modules],
|
|
||||||
use_modules="$withval")
|
|
||||||
test -z "$use_modules" && use_modules=yes
|
|
||||||
DLPREOPEN=
|
|
||||||
if test "$use_modules" != no; then
|
|
||||||
AC_DEFINE(DYNAMIC_LINKING, 1,
|
|
||||||
[Define if you want support for dynamic linking.])
|
|
||||||
if test "$use_modules" = yes; then
|
|
||||||
DLPREOPEN="-dlpreopen force"
|
|
||||||
else
|
|
||||||
DLPREOPEN="-export-dynamic"
|
|
||||||
for module in $use_modules; do
|
|
||||||
DLPREOPEN="$DLPREOPEN -dlopen $module"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(INCLTDL)
|
AC_SUBST(INCLTDL)
|
||||||
AC_SUBST(LIBLTDL)
|
AC_SUBST(LIBLTDL)
|
||||||
AC_SUBST(DLPREOPEN)
|
AC_SUBST(DLPREOPEN)
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
2002-07-12 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
|
* dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
|
||||||
|
defined. They don't do anything useful, especially since the
|
||||||
|
only case where DYNAMIC_LINKING is undefined seems to be
|
||||||
|
when --with-modules=no is given to configure, which is basically
|
||||||
|
requesting that the "dynamic linking module" be omitted.
|
||||||
|
|
||||||
|
* Makefile.am (libguile_la_SOURCES): move dynl.c from
|
||||||
|
libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
|
||||||
|
|
||||||
|
* extensions.c (load_extension): check DYNAMIC_LINKING for
|
||||||
|
scm_dynamic_call.
|
||||||
|
* init.c (scm_init_guile_1): check DYNAMIC_LINKING for
|
||||||
|
scm_init_dynamic_linking.
|
||||||
|
|
||||||
2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
|
2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
|
||||||
|
|
||||||
* guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
|
* guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
|
||||||
|
|
|
@ -61,7 +61,7 @@ guile_LDADD = libguile.la
|
||||||
guile_LDFLAGS = @DLPREOPEN@
|
guile_LDFLAGS = @DLPREOPEN@
|
||||||
|
|
||||||
libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
|
libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
|
||||||
chars.c continuations.c convert.c debug.c deprecation.c dynl.c \
|
chars.c continuations.c convert.c debug.c deprecation.c \
|
||||||
dynwind.c environments.c eq.c error.c eval.c evalext.c extensions.c \
|
dynwind.c environments.c eq.c error.c eval.c evalext.c extensions.c \
|
||||||
feature.c fluids.c fports.c \
|
feature.c fluids.c fports.c \
|
||||||
gc.c gc_os_dep.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c \
|
gc.c gc_os_dep.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c \
|
||||||
|
@ -113,7 +113,7 @@ BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h scmconfig.h \
|
||||||
|
|
||||||
EXTRA_libguile_la_SOURCES = _scm.h \
|
EXTRA_libguile_la_SOURCES = _scm.h \
|
||||||
alloca.c inet_aton.c memmove.c putenv.c strerror.c \
|
alloca.c inet_aton.c memmove.c putenv.c strerror.c \
|
||||||
threads.c regex-posix.c \
|
dynl.c threads.c regex-posix.c \
|
||||||
filesys.c posix.c net_db.c socket.c \
|
filesys.c posix.c net_db.c socket.c \
|
||||||
ramap.c unif.c debug-malloc.c mkstemp.c \
|
ramap.c unif.c debug-malloc.c mkstemp.c \
|
||||||
win32-uname.c win32-dirent.c win32-socket.c
|
win32-uname.c win32-dirent.c win32-socket.c
|
||||||
|
|
|
@ -75,8 +75,6 @@ maybe_drag_in_eprintf ()
|
||||||
#include "libguile/lang.h"
|
#include "libguile/lang.h"
|
||||||
#include "libguile/validate.h"
|
#include "libguile/validate.h"
|
||||||
|
|
||||||
#ifdef DYNAMIC_LINKING
|
|
||||||
|
|
||||||
#include "libltdl/ltdl.h"
|
#include "libltdl/ltdl.h"
|
||||||
|
|
||||||
/* From the libtool manual: "Note that libltdl is not threadsafe,
|
/* From the libtool manual: "Note that libltdl is not threadsafe,
|
||||||
|
@ -133,46 +131,6 @@ sysdep_dynl_init ()
|
||||||
lt_dlinit ();
|
lt_dlinit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* no dynamic linking available, throw errors. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
sysdep_dynl_init (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
no_dynl_error (const char *subr)
|
|
||||||
{
|
|
||||||
scm_misc_error (subr, "dynamic linking not available", SCM_EOL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
sysdep_dynl_link (const char *filename, const char *subr)
|
|
||||||
{
|
|
||||||
no_dynl_error (subr);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
sysdep_dynl_unlink (void *handle,
|
|
||||||
const char *subr)
|
|
||||||
{
|
|
||||||
no_dynl_error (subr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
sysdep_dynl_func (const char *symbol,
|
|
||||||
void *handle,
|
|
||||||
const char *subr)
|
|
||||||
{
|
|
||||||
no_dynl_error (subr);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
scm_t_bits scm_tc16_dynamic_obj;
|
scm_t_bits scm_tc16_dynamic_obj;
|
||||||
|
|
||||||
#define DYNL_FILENAME(x) (SCM_CELL_OBJECT_1 (x))
|
#define DYNL_FILENAME(x) (SCM_CELL_OBJECT_1 (x))
|
||||||
|
|
|
@ -103,9 +103,11 @@ load_extension (SCM lib, SCM init)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (DYNAMIC_LINKING)
|
||||||
/* Dynamically link the library. */
|
/* Dynamically link the library. */
|
||||||
|
|
||||||
scm_dynamic_call (init, scm_dynamic_link (lib));
|
scm_dynamic_call (init, scm_dynamic_link (lib));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -556,7 +556,9 @@ scm_init_guile_1 (SCM_STACKITEM *base)
|
||||||
scm_init_simpos ();
|
scm_init_simpos ();
|
||||||
scm_init_load_path ();
|
scm_init_load_path ();
|
||||||
scm_init_standard_ports (); /* Requires fports */
|
scm_init_standard_ports (); /* Requires fports */
|
||||||
|
#ifdef DYNAMIC_LINKING
|
||||||
scm_init_dynamic_linking ();
|
scm_init_dynamic_linking ();
|
||||||
|
#endif
|
||||||
#ifdef SCM_ENABLE_ELISP
|
#ifdef SCM_ENABLE_ELISP
|
||||||
scm_init_lang ();
|
scm_init_lang ();
|
||||||
#endif /* SCM_ENABLE_ELISP */
|
#endif /* SCM_ENABLE_ELISP */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue