[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] look for installed APR and APRUTIL

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-10-24 23:39:51 CEST

Karl Fogel wrote:

>Matt Kraai <kraai@alumni.cmu.edu> writes:
>
>
>>>Last time this came up I tried the patch, it broke compilation of
>>>apr/apr-util in the Subversion source dir.
>>>
>>>Has that changed?
>>>
>>>
>>Does it still favor the installed version over the one in the source
>>directory? Yes.
>>
>>How about the following patch, which documents why it doesn't check
>>for an installed version?
>>
>>
>
>If we have in-tree apr and/or apr-util, we should try them first,
>where "try" means see if they satisfy whatever version requirement
>Subversion has.
>
>

Here's the general recipe we should follow with _any_ external dependency:

    lib.enabled = (some default)
    lib.required = (some default)
    lib.standard_places = (list of standard places)

    if have_option('--without-lib'):
      lib.enabled = False
    if have_option('--with-lib'):
      lib.enabled = True

    if lib.enabled:
      if have_option('--with-lib=DIR'):
        if not lib.find_in('DIR'): FAIL()
        lib.use_from('DIR')
      elif lib.find_in(srcdir):
         lib.use_from(srcdir)
      else
        place = lib.find_in(lib.standard_places)
        if not place: FAIL()
        lib.use_from(place)
    else if lib.required:
      FAIL()

In some (most?) cases we'll have version checks in there, too (as part
of the find_in method), but I don't think there's likely to be case
where we'd want different priorities.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 24 23:40:38 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.