19.2. A Loadable Module
A feature of the Sic interpreter is that it will use the 'unknown' built in to handle any command line not handled by any of the other registered built-in callback functions. This mechanism is very powerful and enables me to look up unhandled built ins in the user's 'PATH', for instance.
Before adding any modules to the project, I have created a separate subdirectory, 'modules', to put the module source code into. Not forgetting to list this new subdirectory in the AC_OUTPUT macro in 'configure.in', and the SUBDIRS macro in the top-level 'Makefile.am', a new 'Makefile.am' is needed to build the loadable modules:
## Makefile.am — Process this file with automake to produce Makefile.in INCLUDES = -I$(top_builddir) -I$(top_srcdir) ...
Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.