Next: , Previous: , Up: Programming language support   [Contents][Index]

10.9 Go

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).

Macro: AC_PROG_GO ([compiler-search-list])

Find the Go compiler to use. Check whether the environment variable GOC is set; if so, then set output variable GOC to 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 set GOC to gccgo.

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 GOFLAGS was not already set, set it to -g -O2. If your package does not like this default, GOFLAGS may be set before AC_PROG_GO.