Exported symbols
================

Def. exported - available for use by applications, external libraries,
                extensions or sublibs.

All exported functions and variables must be listed in a file 'EXPSYMS'
and the Makefile.am must pass '-export-symbols $(srcdir)/EXPSYMS' when
linking the library/sublib.

All exported variables must be defined as 'EXPORTVAR' in the source file
and declared like this in the header file:
/* Exported variables */
#ifdef BUILDING_MYEXTENSIONNAME
extern mytype     myvariable;
#else
IMPORTVAR mytype  myvariable;
#endif
'BUILDING_MYEXTENSIONNAME' should be defined when building the library
itself.

All declarations of variables and functions in a header file must be
enclosed within '__BEGIN_DECLS' and '__END_DECLS' like this:
__BEGIN_DECLS
/* variable declarations */

/* function declarations */
__END_DECLS


Linking
=======

For libraries you should specify the version number with
'-version-info major:minor'.

For sublibs you should turn off versioning with '-avoid-version'.

When linking sublibs you must pass the '-module' flag.

A library may _not_ contain any undefined symbols at link time. You must
link it with any other libraries from which it uses symbols and pass the
'-no-undefined' flag.


Win32 compability for libtool
=============================

When you are sure you have followed the above rules for everything in
your code you should add AC_LIBTOOL_WIN32_DLL before AM_PROG_LIBTOOL in
configure.in. This tells libtool that your code is well written and 
supports Win32 DLLs.
