On Thu, Dec 20, 2018 at 2:32 PM Peter Kleiweg <pklei...@xs4all.nl> wrote:
>
> Ian Lance Taylor <i...@golang.org> schreef op 20 december 2018 23:10:17 CET:
> > On Thu, Dec 20, 2018 at 10:58 AM Peter Kleiweg <pklei...@xs4all.nl>
> > wrote:
> > >
> > > Ian Lance Taylor <i...@golang.org> schreef op 20 december 2018
> > 19:20:13 CET:
> > > > Adding the file with the local configuration should work just as
> > well
> > > > when you need to adjust pkg-config results as it would for a
> > package
> > > > that does not use pkg-config.
> > >
> > > No it doesn't. Unless I modify the original code, there is no way to
> > switch off a failing call to pkg-config. I don't think modifying
> > third-party package files is good idea.
> >
> > In your go tool wrapper set the PKG_CONFIG environment variable to
> > something that does what you want.  E.g., does nothing, to let you use
> > the fake .go file that you added.
>
> I prefer to keep package-specific configuration with the package, not 
> polluting the environment unless the package is used. There may be 
> incompatible settings between packages. But it is an option.

With my suggestion I think you should be able to keep the
package-specific configuration with the package.  Add the file you
described earlier, which uses #cgo CFLAGS and #cgo LDFLAGS as needed.
When using the go tool, set PKG_CONFIG to point to a script that
prints nothing.  The go tool should agglomerate the CFLAGS/LDFLAGS
from the new file and from pkg-config (the latter being nothing).  I
hope.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to