automake: Libtool Modules
1
1 8.3.6 Libtool Modules
1 ---------------------
1
1 These are libtool libraries meant to be dlopened. They are indicated to
1 libtool by passing ‘-module’ at link-time.
1
1 pkglib_LTLIBRARIES = mymodule.la
1 mymodule_la_SOURCES = doit.c
1 mymodule_la_LDFLAGS = -module
1
1 Ordinarily, Automake requires that a library’s name start with ‘lib’.
1 However, when building a dynamically loadable module you might wish to
1 use a "nonstandard" name. Automake will not complain about such
1 nonstandard names if it knows the library being built is a libtool
1 module, i.e., if ‘-module’ explicitly appears in the library’s
1 ‘_LDFLAGS’ variable (or in the common ‘AM_LDFLAGS’ variable when no
1 per-library ‘_LDFLAGS’ variable is defined).
1
1 As always, ‘AC_SUBST’ variables are black boxes to Automake since
1 their values are not yet known when ‘automake’ is run. Therefore if
1 ‘-module’ is set via such a variable, Automake cannot notice it and will
1 proceed as if the library was an ordinary libtool library, with strict
1 naming.
1
1 If ‘mymodule_la_SOURCES’ is not specified, then it defaults to the
1 single file ‘mymodule.c’ (⇒Default _SOURCES).
1