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

[PATCH] Re: Subversion 1.9.5 --with-serf problem

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 07 Jun 2017 12:33:21 +0000

Gretton, Liam wrote on Wed, 07 Jun 2017 10:44 +0000:
> At some point since 1.8.13 the logic in the configure script for dealing with the --with-serf option has changed.
>
> Now pkg-config overrides the use of the --with-serf value and this breaks the build if serf has been built in a sandbox (i.e. with the --install-sandbox option) as $serf_prefix within configure takes the value of the intended location of serf rather than where it's actually located.

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.

Cheers,

Daniel

[[[
* build/ac-macros/serf.m4: An explicit prefix should take precedence over
    pkg-config.

Found by: Liam Gretton
]]]

[[[
Index: build/ac-macros/serf.m4
===================================================================
--- build/ac-macros/serf.m4 (revision 1797913)
+++ build/ac-macros/serf.m4 (working copy)
@@ -70,12 +70,16 @@ AC_DEFUN(SVN_LIB_SERF,
   ])
 
   if test "$serf_skip" = "no" ; then
- SVN_SERF_PKG_CONFIG()
- if test -n "$serf_prefix" && test "$serf_found" = "no" ; then
+ dnl Try the prefix if one was provided.
+ if test -n "$serf_prefix" ; then
       SVN_SERF_PREFIX_CONFIG()
     fi
+ dnl Either --with-serf wasn't passed, or was passed without argument.
+ if test "$serf_found" = "no" ; then
+ SVN_SERF_PKG_CONFIG()
+ fi
   
- AC_MSG_CHECKING([was serf enabled])
+ AC_MSG_CHECKING([whether to build libsvn_ra_serf])
     if test "$serf_found" = "yes"; then
       AC_MSG_RESULT([yes])
     else
]]]
Received on 2017-06-07 14:33:43 CEST

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

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