Autoconf provides basic support for the Go programming language when
using the gccgo compiler (there is currently no support for the
6g and 8g compilers).
Find the Go compiler to use. Check whether the environment variable
GOCis set; if so, then set output variableGOCto its value.Otherwise, if the macro is invoked without an argument, then search for a Go compiler named
gccgo. If it is not found, then as a last resort setGOCtogccgo.This macro may be invoked with an optional first argument which, if specified, must be a blank-separated list of Go compilers to search for.
If output variable
GOFLAGSwas not already set, set it to -g -O2. If your package does not like this default,GOFLAGSmay be set beforeAC_PROG_GO.