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 14:46:04 -0700

> I think there is two problems here:
> 
> Ben seems to use $srcdir where it meant $top_srcdir :-) (If we build
> in-place, then $srcdir == $builddir in all the tree).
> 
> Mo on the contrary is bothered by the fact that $srcdir is relative; just
> calling "./configure -srcdir=/absolute/path/to/srcdir" shoudl solve the
> problem.
> 

I think you are correct there are two problems.

Regarding "top_srcdir" when I was trying to figure out what which
variable to use, "top_srcdir" seemed like the one that I wanted to
use. However, it always seems to be empty.

The command that I'm using is:

ac_configure_args="${ac_configure_args} --enable-local-tdb=${srcdir}/tdb"

To have the lower level configuration scripts called with an extra parameter.

However:

If I use "--enable-local-tdb=${top_srcdir}/tdb" then it evaluates to
"--enable-local-tdb=/tdb"

If I don't pass any parameters into the top level configure script and
use "--enable-local-tdb=${srcdir}/tdb" then it evalutes to
"--enable-local-tdb=./tdb" which seems to be the same problem with
srcdir being relative that Mo was having.

The way that I am using "srcdir" now is:

srcdir=`cd $srcdir;pwd`
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)

> Regards,
> 
>       Bernard
> 
> PS: IIUC, the special case of "." is just to avoid getting, in some second
> level subdirectory name lib/somelib, srcdir set to
> "../lib/../../lib/somelib" which is almost equivalent (but a lot longer) to
> "." ;-) The "almost" above is for the case where "lib" is in fact a link to
> "../../commonlibs". In this case "." would be correct while
> "../lib/../../lib/somelib" would yield a "file not found" error somewhere
> ;-?

I'm having trouble following your example. Which "lib" is a link to
"../../commonlibs". The directory tree as you portrayed it is:

lib/lib/
lib/somelib/

-ben


> 
> 
> --------------------------------------------
> Bernard Dautrevaux
> Microprocess Ingenierie
> 97 bis, rue de Colombes
> 92400 COURBEVOIE
> FRANCE
> Tel:  +33 (0) 1 47 68 80 80
> Fax:  +33 (0) 1 47 88 97 85
> e-mail:       address@hidden
>               address@hidden
> -------------------------------------------- 
> 




reply via email to

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