[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-25 307e76c 4/6: Add dynamic module module support
From: |
Andreas Schwab |
Subject: |
Re: emacs-25 307e76c 4/6: Add dynamic module module support |
Date: |
Sun, 07 Feb 2016 10:53:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Teodor Zlatanov <address@hidden> writes:
> +### Dynamic modules support
> +LIBMODULES=
> +HAVE_MODULES=no
> +MODULES_OBJ=
> +MODULES_SUFFIX=
> +if test "${with_modules}" != "no"; then
> + if test "$opsys" = "gnu-linux"; then
> + LIBMODULES="-ldl"
> + MODULES_SUFFIX=".so"
> + HAVE_MODULES=yes
> + elif test "$opsys" = "cygwin"; then
> + # XXX: not tested
> + LIBMODULES="-lcygwin"
> + MODULES_SUFFIX=".dll"
> + HAVE_MODULES=yes
> + elif test "$opsys" = "darwin"; then
> + MODULES_SUFFIX=".so"
> + HAVE_MODULES=yes
> + elif test "$opsys" = "mingw32"; then
> + MODULES_SUFFIX=".dll"
> + HAVE_MODULES=yes
> + else
> + # BSD system have dlopen in the libc
> + AC_CHECK_FUNC(dlopen, [MODULES_SUFFIX=".so"]
> + [HAVE_MODULES=yes], [])
> + fi
> +
> + if test "${HAVE_MODULES}" = no; then
> + AC_MSG_ERROR([Dynamic modules are not supported on your system])
> + fi
> +fi
> +
> +if test "${HAVE_MODULES}" = yes; then
> + MODULES_OBJ="dynlib.o module.o"
> + AC_DEFINE(HAVE_MODULES, 1, [Define to 1 if dynamic modules are enabled])
> + AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX", [System extension
> for dynamic libraries])
> +fi
> +AC_SUBST(MODULES_OBJ)
> +AC_SUBST(LIBMODULES)
> +AX_GCC_VAR_ATTRIBUTE(cleanup)
> +AC_CHECK_FUNCS(dladdr)
dladdr requires -ldl, but this check doesn't use LIBMODULES, which means
dladdr is never found here.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- Re: emacs-25 307e76c 4/6: Add dynamic module module support,
Andreas Schwab <=