summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2015-11-16 00:47:04 +0100
committerTed Zlatanov <tzz@lifelogs.com>2015-11-18 14:24:19 -0500
commit307e76c79979736c109cfa6de07b1567700231f3 (patch)
tree02105101ce7cad65e199c32cb902167687a73066 /src/emacs.c
parentf69cd6bfa114ea02f3d10ddb2fe809a26eafb9a4 (diff)
downloademacs-307e76c79979736c109cfa6de07b1567700231f3.tar.gz
Add dynamic module module support
* configure.ac: Add '--with-modules' option. Conditionally add dynlib.o and module.o to the list of objects. Add any system specific flags to the linker flags to support dynamic libraries. * m4/ax_gcc_var_attribute.m4: Add autoconf extension to test gcc attributes. * src/Makefile.in: Conditionally add module objects and linker flags. * src/alloc.c (garbage_collect_1): protect module local values from GC. * src/lisp.h: Add 'module_init' and 'syms_of_module' prototypes. * src/emacs_module.h: New header file included by modules. Public module API. * src/module.c: New module implementation file. Co-authored-by: Philipp Stephani <phst@google.com>
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index b4052b851d7..ba71ceb84ce 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -776,6 +776,10 @@ main (int argc, char **argv)
atexit (close_output_streams);
+#ifdef HAVE_MODULES
+ module_init ();
+#endif
+
sort_args (argc, argv);
argc = 0;
while (argv[argc]) argc++;
@@ -1450,6 +1454,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
syms_of_terminal ();
syms_of_term ();
syms_of_undo ();
+
+#ifdef HAVE_MODULES
+ syms_of_module ();
+#endif
+
#ifdef HAVE_SOUND
syms_of_sound ();
#endif