Back: A Complex GNU Autotools Project
Forward: Initialising the Module Loader
FastBack: A Complex GNU Autotools Project
Up: A Complex GNU Autotools Project
FastForward: A Loadable Module
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document

20.1 A Module Loading Subsystem

As you saw in 18. Using GNU libltdl, I need to put an invocation of the macro `AC_LIBTOOL_DLOPEN' just before `AC_PROG_LIBTOOL', in the file `'. But, as well as being able to use libtoolize --ltdl, which adds libltdl in a subdirectory with its own subconfigure, you can also manually copy just the ltdl source files into your project(45), and use AC_LIB_LTDL in your existing `'. At the time of writing, this is still a very new and (as yet) undocumented feature, with a few kinks that need to be ironed out. In any case you probably shouldn't use this method to add `ltdl.lo' to a C++ library, since `ltdl.c' is written in C. If you do want to use libltdl with a C++ library, things will work much better if you build it in a subdirectory generated with libtoolize --ltdl.

For this project, lets:

$ cp /usr/share/libtool/libltdl/ltdl.[ch] sic/

The Sic module loader is probably as complicated as any you will ever need to write, since it must support two kinds of modules: modules which contain additional built-in commands for the interpreter; and modules which extend the Sic syntax table. A single module can also provide both syntax extensions and additional built-in commands.

This document was generated by Gary V. Vaughan on November, 13 2000 using texi2html