In this release we have introduced pkg-config for locating packages and their configuration. The use of pkg-config has several advantages:
local-baseline
is no longer necessary.
Stratego/XT users need to have pkg-config installed on their system before they install Stratego/XT. Pkg-config 0.15 is widely deployed, since it used by most GNOME packages, and should do the job. We don't know what the exact minimal required version is.
You still need to configure Stratego/XT with the location the ATerm
library and the SDF2 Bundle (--with-aterm
) and (--with-sdf
). This
will be no longer necessary when future versions of the SDF2 Bundle
and the ATerm library support pkg-config. Internally, the
PKG_CONFIG_PATH
is set and pkg-config is used to find the required
packages.
For compiling your own Stratego programs, you can now optionally use
pkg-config to find the flags that you need to pass to strc
.
$ pkg-config --variable=strcflags java-front -I /pkg/java-front/2005-03-30-14-06/share/sdf/java-front \ -I /pkg/java-front/2005-03-30-14-06/share/java-front
In my .bashrc
I've defined an alias strcflags to make this common
command more compact:
alias strcflags="pkg-config --variable=strcflags "
You can also specify multiple packages:
$ strcflags java-front dryad -I /pkg/java-front/2005-03-30-14-06/share/sdf/java-front \ -I /pkg/java-front/2005-03-30-14-06/share/java-front \ -I /pkg/dryad/2005-04-04-15-24/share/dryad \ -I /pkg/dryad/2005-04-04-15-24/share/sdf/dryad
Obviously, this is much easier then mentioning all the specific paths of these packages.
If the developer of this package releases a new version, then this
package is more likely to work on future versions of Stratego/XT. You
don't need to configure the package with locations of aterm
, sdf
,
and strategoxt
, since pkg-config is used to find them. Hence, the
package is easier to install.
If you install Stratego/XT in a non standard location, then you need to set the PKG_CONFIG_PATH. See SomeTopic?.
You need pkg-config, preferebly 0.17.2, which is available in the Nix
Packages Collection. The Autoconf macro XT_USE_XT_PACKAGES no longer
defines configure arguments, but uses pkg-config to find the location
of packages. The old style of explicit configuration is still
available in the macro XT_EXPLICTLY_USE_XT_PACKAGES
. Please note
that your package is more likely to break on future Stratego/XT
versions if you use this macro.
You need pkg-config, preferebly 0.17.2, which is available in the Nix
Packages Collection. A Subversion checkout of Stratego/XT requires
configuration --with-strategoxt
for the baseline Stratego/XT,
i.e. pkg-config is not used to find the baseline Stratego/XT, since
this very fragile. Internally, the PKG_CONFIG_PATH is set to the
configuration flags that you provide.