emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/aptel/dynamic-modules-rc3 772cb16 01/25: add liblt


From: Teodor Zlatanov
Subject: [Emacs-diffs] feature/aptel/dynamic-modules-rc3 772cb16 01/25: add libltdl configure option/dependency.
Date: Wed, 04 Feb 2015 22:56:09 +0000

branch: feature/aptel/dynamic-modules-rc3
commit 772cb16a718618f91892cbc58354d4f840ff96bc
Author: Aurélien Aptel <address@hidden>
Commit: Aurélien Aptel <address@hidden>

    add libltdl configure option/dependency.
    
    Add --with-ltdl and --without-ltdl to add or remove dymanic module
    support.
    
    Dynamic modules need access to emacs' symbol. This is done with
    the -Wl,--export-dynamic flag.
---
 configure.ac    |   17 ++++++++++++++++-
 src/Makefile.in |    4 +++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5d71c2f..b403884 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,6 +325,8 @@ OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings 
support])
 OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
 OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
 OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
+OPTION_DEFAULT_ON([ltdl], [don't compile with dynamic module loading support])
+
 
 AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
  [use a file notification library (LIB one of: yes, gfile, inotify, w32, 
no)])],
@@ -3148,6 +3150,18 @@ if test "${HAVE_ZLIB}" = "yes"; then
 fi
 AC_SUBST(LIBZ)
 
+HAVE_LTDL=no
+LIBLTDL=
+if test "${with_ltdl}" != "no"; then
+  AC_CHECK_HEADER(ltdl.h, HAVE_LTDL=yes, HAVE_LTDL=no)
+  AC_CHECK_LIB(ltdl, lt_dlopen, HAVE_LTDL=yes, HAVE_LTDL=no)
+fi
+if test "${HAVE_LTDL}" = "yes"; then
+  AC_DEFINE(HAVE_LTDL, 1, [Define to 1 if you have the ltdl library (-lltdl).])
+  LIBLTDL="-lltdl -Wl,--export-dynamic"
+fi
+AC_SUBST(LIBLTDL)
+
 ### Use -lpng if available, unless `--with-png=no'.
 HAVE_PNG=no
 LIBPNG=
@@ -5018,7 +5032,7 @@ optsep=
 emacs_config_features=
 for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS \
   GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
-  LIBOTF XFT ZLIB; do
+  LIBOTF XFT ZLIB LTDL; do
 
     case $opt in
       NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
@@ -5057,6 +5071,7 @@ echo "  Does Emacs use -lm17n-flt?                        
      ${HAVE_M17N_FLT}
 echo "  Does Emacs use -lotf?                                   ${HAVE_LIBOTF}"
 echo "  Does Emacs use -lxft?                                   ${HAVE_XFT}"
 echo "  Does Emacs directly use zlib?                           ${HAVE_ZLIB}"
+echo "  Does Emacs use -lltdl?                                  ${HAVE_LTDL}"
 
 echo "  Does Emacs use toolkit scroll bars?                     
${USE_TOOLKIT_SCROLL_BARS}"
 echo
diff --git a/src/Makefile.in b/src/Makefile.in
index 270119e..fcda4b6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -226,6 +226,8 @@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
 
 LIBZ = @LIBZ@
 
+LIBLTDL = @LIBLTDL@
+
 XRANDR_LIBS = @XRANDR_LIBS@
 XRANDR_CFLAGS = @XRANDR_CFLAGS@
 
@@ -429,7 +431,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) 
$(LIBIMAGE) \
    $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
    $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
    $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) \
-   $(GFILENOTIFY_LIBS) $(LIB_MATH) $(LIBZ)
+   $(GFILENOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBLTDL)
 
 all: emacs$(EXEEXT) $(OTHER_FILES)
 .PHONY: all



reply via email to

[Prev in Thread] Current Thread [Next in Thread]