autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is srcdir passed as .


From: Ben Woodard
Subject: Re: Why is srcdir passed as .
Date: Thu, 26 Oct 2000 15:10:04 -0700

> On Oct 25, 2000, Ben Woodard <address@hidden> wrote:
> 
> > I am having a problem with my configure script where when configure is
> > called for the subprojects a parameter --srcdir=. is passed into them
> > when I just do configure.
> 
> srcdir is supposed to be the top-level directory of the project (or
> subproject), not the top-level of the whole tree.
> 
> The rationale is that you can just grab whatever set of packages, put
> them as sub-directories of your package, create a top-level configure
> and Makefile and everything will just work.
> 

The problem that I'm having is dealing with interelationships between
the projects. I have one project with 8 sub projects. Several of these
are libraries. The rest of the subpackages depend on these libraries.

The difficult thing is to communicating to the subpackages that build
applications that depend on the libraries where to find the hader
files libraries.

The top level configure script knows that all the libraries are
available and knows where they are. However passing this information
down to the subpackages in such a way that their configure scripts
find everything in the right place is proving very very difficult. 

If anyone knows of an application that does this, I would sure be
appriciative. What I have now is:

AC_CHECK_LIB(tdb,tdb_exists,[
  build_tdb=false
  AC_CHECK_HEADERS(tdb.h,[],[
    AC_MSG_ERROR(The tdb libraries were found but the header files were 
missing. Please either install the headers or uninstall the library and the 
version of tdb that is bundled with gnulpr will be intsalled.)
])],[
  ac_configure_args="${ac_configure_args} --enable-local-tdb=${srcdir}/tdb"
  subpackages="tdb ${subpackages}"
  build_tdb=true
  TDB_DIR="${srcdir}/tdb"
])
AM_CONDITIONAL(BUILD_TDB, $build_tdb)
AC_SUBST(TDB_DIR)


> 
> 
> If instead --srcdir were passed as the top-level directory, you'd have
> to adjust every sub-package so as to ``know'' it's been packaged
> differently.

This is not true in my experience. If I use Mo's trick and set srcdir
to `cd $srcdir;pwd` or if I remove the special case for '.' then it
still works with no modification to the subpackages configuration
scripts.

-ben

> 
> -- 
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  address@hidden, redhat.com}
> CS PhD student at IC-Unicamp        address@hidden, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me




reply via email to

[Prev in Thread] Current Thread [Next in Thread]