Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

make install

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

share|improve this question
up vote 4 down vote accepted

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

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

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

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

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

share|improve this answer
Thanks, I will try it. – Max Aug 29 '11 at 8:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.