3

I want to build a library with a specific tool instead of GCC. The regular build sequence is:

./configure
make
make install

Where should I replace the GCC settings (I think that the configure was created with AutoMake)?

Max
  • 33
  • 1
  • 4

1 Answers1

4

It is usually worth reading output of ./configure --help. This suggest to run configure as

./configure CFLAGS="-ggdb3 -O0"
make
make install

Overriding CFLAGS (or LDFLAGS, CPPFLAGS, depending on your needs) as follows works as well:

CFLAGS="-ggdb3 -O0" ./configure
make
make install

If you need to use a compiler other than gcc, you have to override the CC variable.

Kevin
  • 40,087
  • 16
  • 88
  • 112
Petr Uzel
  • 7,157
  • 4
  • 30
  • 26