[lug] autoconf/automake

Tom Tromey tromey at redhat.com
Tue Mar 6 10:44:43 MST 2001


>>>>> ">" == D Stimits <stimits at idcomm.com> writes:

>> I'm trying to convert a project for autoconf/automake, primarily on
>> Linux. I'm having problems getting the setup to recognize
>> subdirectories when looking for source files.

In general I recommend asking autoconf questions on `autoconf at gnu.org'
and automake questions on `automake at gnu.org'.

>> If I include a SUBDIRS line in
>> Makefile.am, it apparently ignores this, and ./configure will end up
>> saying:
>> configure: error: can not find sources in . or ..

I believe this means that the file you mention in the argument to
AC_INIT does not exist.

>> Can anyone here tell me how to set up subdirectories if the base of the
>> project has a subdirectory "src", and that in turn has a subdirectory
>> for a particular program (several programs in the package) in
>> subdirectory "server"? E.G., ./src/server/ has a project, ./src/client/
>> has a project. Subdirectories seem to break everything.

In configure.in:

    AC_OUTPUT(Makefile src/Makefile src/client/Makefile src/server/Makefile)

In top-level Makefile.am:

    SUBDIRS = src

In src/Makefile.am:

    SUBDIRS = client server

Tom



More information about the LUG mailing list