Thanks very much for this patch, it does indeed fix the problem for me.

My use case is pretty much as you describe. I'm building a Subversion client 
RPM which includes serf.

During the %build phase serf is built as so:

scons PREFIX=%{prefix} install --install-sandbox=%{buildroot}

It therefore installs into %buildroot rather than %prefix, but the serf-1.pc 
file used by pkg-config will contain %prefix paths. When the subversion 
configure step runs I use --with-serf=%buildroot but because it now uses 
pkg-config in preference to the --with-serf value, %prefix is assumed and the 
include files etc don't get found.

-- 
Liam Gretton                                    liam.gret...@le.ac.uk
Systems Specialist                            http://www.le.ac.uk/its
IT Services                                   Tel: +44 (0)116 2522254
University of Leicester, University Road
Leicestershire LE1 7RH, United Kingdom


> -----Original Message-----
> From: Daniel Shahaf [mailto:d...@daniel.shahaf.name]
> Sent: 07 June 2017 13:33
> To: Gretton, Liam <liam.gret...@leicester.ac.uk>
> Cc: users@subversion.apache.org
> Subject: [PATCH] Re: Subversion 1.9.5 --with-serf problem
> 
> Could you explain in more detail what use-case is broken?  The configure
> logic for serf (build/ac-macros/serf.m4), when --with-serf=foo is
> passed, first tries foo/lib/pkgconfig/serf-1.pc and if that fails falls
> back to looking for serf under foo without pkg-config.  At no point does
> it try the system pkg-config dirs.
> 
> Are you saying that you installed serf to a non-empty $(DESTDIR), and
> then configure finds a *.pc file under that directory that points the
> build system to the designated installation path (= the same path
> without the $(DESTDIR) prefix)?
> 
> In that case, the following patch might work, although it needs
> to be amended to explain the above.
> 
> The AC_MSG_CHECKING() could probably use better wording,
> suggestions welcome.

Reply via email to