Hello Maxim, I recommend you to read the tutorial at http://www.lrde.epita.fr/~adl/autotools.html . It addresses all of your questions. See below: > i am triing to produce such functionality: > 1) source file from one subdirectory can include source file from another > directory. For example, source file from base/err/err.cpp can include > "utils/ascii_window.h" or include "ascii_window.h" (maybe second variant > is better?) You can refer to any subdirectory in the source with $(srcdir)/your_subdirectory. For including purposes you'd use - I$(srcdir)/directory. > 2) all source files will be compile from all subdirectories You can put full paths to these files in your Makefile.am or create one Makefile.am for every subdirectory and refer each file by its name. See SUBDIRS in the tutorial. > 3) allow turn off compilation of some subdirectory. For example - user > haven't installed lib sdl, but he have another supported lib (like > OpenGL). In makefile i must have some flag like "enable of compilation of > lib/sdl sources" This is covered on page 92 of the tutorial, "Conditinals: usage" > 4) object from lib/sdl must be compiled as shared lib, > and linked with main source file good.cpp You can link with system libraries or with libraries created in your own project. Alberto _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf