Improve support for the optional ICU dependency.

For GNU make, conditionally populate the `Requires:` field in `re2.pc`.
Use `pkg-config` to obtain the necessary compiler and linker flags when
building `static-testinstall` and `shared-testinstall`.

For CMake, the dependency has to be expressed to CMake itself, not just
to `pkg-config` as above.

Fixes #407.

Change-Id: Ie5e0ea88e0662f54be011b3bc0c57f2cfa852f88
Reviewed-on: https://code-review.googlesource.com/c/re2/+/60931
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Perry Lorier <perryl@google.com>
4 files changed