Zombo
Zombo

Reputation: 1

gcc configure, set defaults?

When I run gcc configure, e.g

./configure

I do it like this

./configure \
    --host=x86_64-w64-mingw32 \
    --prefix=/usr/x86_64-w64-mingw/sys-root/mingw

Is there a way to make these settings the default, for all invokations of configure? Perhaps an environment variable?

Upvotes: 1

Views: 440

Answers (1)

John Marshall
John Marshall

Reputation: 7005

For configure scripts generated with Autoconf, there is indeed a facility using the environment variable CONFIG_SITE.

Use export CONFIG_SITE=/path/to/my.config.site, where the contents of that file are a script along the lines of

test -z "$host_alias" && host_alias=x86_64-w64-mingw32
test "$prefix" = NONE && prefix=/usr/x86_64-w64-mingw/sys-root/mingw

Upvotes: 1

Related Questions