* 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
46
configure.in
46
configure.in
|
|
@ -171,8 +171,33 @@ AM_PROG_LIBTOOL
|
|||
AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
|
||||
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.
|
||||
|
||||
if test "$use_modules" != no; then
|
||||
AC_LIBOBJ([dynl])
|
||||
fi
|
||||
|
||||
if test "$enable_arrays" = yes; then
|
||||
AC_LIBOBJ([ramap])
|
||||
AC_LIBOBJ([unif])
|
||||
|
|
@ -280,27 +305,6 @@ if test "$MINGW32" = "yes" ; then
|
|||
fi
|
||||
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(LIBLTDL)
|
||||
AC_SUBST(DLPREOPEN)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue