chapel-lang/chapel — pull request #452 by bradcray (2014-09-17 00:47:05+00:00)
Title: Building static re2 library only by default

Prior to this change, we built .a and .so libraries for re2. This
causes problems for the Cray module build because the .so carries
dependences in the RPM that we don't intend for it to. Looking
at other third-party packages (qthreads, hwloc), we seem to get
away with building static libraries only, so let's do the same for
re2 to keep things simple.

Unfortunately, implementing this change was not as simple as hoped
since re2 is not an autoconf package (I never thought I'd wish for
an autoconf package). Its makefiles are hardcoded to build both
the .a and .so, so I changed our first build command to target
the .a directly and then had to add a new install-static command
that only installed the static library, not the .so. Because re2
lives its life in git as a bundle, this meant tacking a little
Makefile stub onto the end of their Makefile after unpacking (ugh--
maybe we've crossed the barrier where keeping re2 bundled is not
worth the pain anymore? But I didn't have the guts to make that
change this late in the release cycle).

Tested by clobbering re2, making, inspecting that the .so was not
there and that test/regexp/ferguson/regex.chpl still worked.