msgpack / msgpack-c

MessagePack implementation for C and C++ / msgpack.org[C/C++]
Other
3.03k stars 883 forks source link

Won't compile without GCC #99

Open csstup opened 10 years ago

csstup commented 10 years ago

configure requires a gcc style compiler. It assumes (incorrectly) that -Wall is a valid option. The configure.in template should not assume CFLAGS options, but allow the user to set valid options with configure directly.

I'm testing on AIX with the native compiler.

redboltz commented 10 years ago

Hi @csstup, thank you for reporting the issue. In order to solve this problem, I should recognize the compilers and set appropriate compiler specific options as follows:

http://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake

This is an example of cmake, but I believe that autotools have similar solution. I don't have much about AIX native compiler. Could you tell me what is the appropriate warining option for that? And how to recognize AIX native compiler?

csstup commented 10 years ago

Thanks for the reply and followup! I do know its considered a no-no to set variables like CPPFLAGS directly in your config.in. See: http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html

I don't know if there's a "I want all warnings options enabled for the various compilers, please enable that for me" setting in automake. I'm not a big autotools user. Automake does detect the native compilers and handles the differences from GCC (libtool handles the differences for shared libaries, etc). But I don't know what the automake-option is to specify the more generic compiler-options.

Technically the "I want all warnings" option in AIX's native compiler would be "-qinfo=all". Its gonna be really really really verbose. :-)