Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure autoreconf to use a different compiler than GCC

I am trying to compile the code for one of the projects and the source file uses autoreconf for generating the makefiles.

" autoreconf --verbose --force --make "

The problem is that this somehow generates the makefiles that uses the compiler as GCC. I want it to generate the configuration files with a different compiler. How can I do it?

I can issue the command as make CC= but this throws an error in the libtool that is used later on.

Thank You


1 Answers

Typically autoreconf just regenerates the configure script and the autoconf makefile templates, it doesn't create any actual makefiles.

Makefiles get created when configure is run, and that's when you want to override the compiler:

configure CC=clang CXX=clang++

that should create makefiles that use CC=clang and CXX=clang++

like image 140
Jonathan Wakely Avatar answered Oct 17 '25 10:10

Jonathan Wakely



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!