[vlc-devel] [PATCH 4/8] add compiler detection variables and apply the correct optimization flags

Francois Cartegnie fcvlcdev at free.fr
Thu Apr 15 14:21:04 CEST 2010


Le jeudi 15 avril 2010, vous avez écrit :
> Have a look at
>  http://www.gnu.org/software/autoconf/manual/html_node/C-Compiler.html#C-Co
> mpiler
> 
> "GCC" shell variable is defined when using gcc, no need for custom check
Thanks. Would remove one test, but it's still only targeting gcc and we have 
no way to know which other compiler is 'cc'. Same problem for retrieving the 
VLC_COMPILER version string, which is also at different places (head/tail) and 
is shown by different switches (-v -V).

I'm thinking about retrieving the result from a compilation instead of 
trying/checking different command lines outputs.
#if defined(__GNUC__)
 printf("%s", __VERSION__)
#elif defined(__SUNPRO_C)
 printf("Sun Studio %s", __SUNPRO_C)
#endif


Francois



More information about the vlc-devel mailing list