From edd at debian.org  Fri Sep  9 16:07:08 2016
From: edd at debian.org (Dirk Eddelbuettel)
Date: Fri, 9 Sep 2016 09:07:08 -0500
Subject: [Rd] forgive possible repost: alternate bzip2 library
In-Reply-To: <CA+WKpEvm9LaErgWygwmSm3i5g9AxK=XUQHknp66rh6292o_u6w@mail.gmail.com>
References: <CA+WKpEvm9LaErgWygwmSm3i5g9AxK=XUQHknp66rh6292o_u6w@mail.gmail.com>
Message-ID: <22482.49676.236572.603468@max.nulle.part>


On 9 September 2016 at 12:21, Ram?n Fallon wrote:
| I am resubmitting a question, mainly because I suspect I may have
| inadvertently cancelled it, while it was awaiting moderator approval.
| 
| It's about manually compiling R-3.3.1 and using, not the standard system's
| (ver 1.0.5), but an alternate a bzip2 (v1.0.6) which is located in a
| non-standard location.
| 
| I usually lean on pkg-config to deal with issues like this. I've create an
| appropriate bzip2.pc file for bzip2 for this purpose.
| 
| I've been focusing on the configure script, which at 50K lines is quite
| hefty and my initial question was whether the R compile configure script
| used pkg-config for locating headers and libraries.

You want configure.ac, the source, not configure, the 'compiled' output.
 
| My feeling now is that the answer is "sometimes". In locating
| cairographics, it says it does, but for bzip2 I think it uses autoconf's
| dubious magic. Don't know if anybody can confirm this.
| 
| I could modify the configure so that it looks for bzip2 via pkg-config but
| manual modification of this script is probably not proper practice, as well
| as being very time consuming.

As a (local) one-off, you could. You could continue to locally patch configure.

In general, pkg-config is good (and I just filed a request for another
library to support it).  Maybe here, you could work on a patch to
configure.ac to _first_ use pkg-config for bzip2, and, if no result was
found, fall back on the current behaviour.  It's tricky.  R has a very mature
and very well tested build system, so for all changes you want to make
/really/ sure you are not compromising any existing behaviour.

Dirk


-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] forgive possible repost: alternate bzip2 library
Dirk Eddelbuettel