AC_PROG_CC_C99 should prefer "c99" as name of compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think it might be a good idea if AC_PROG_CC_C99 used "c99" in
preference to other command names ("cc") for the name of the C
compiler.

POSIX requires this command to be available:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html#tag_20_11

Why do I make this suggestion? It's due to a problem I had compiling a
program under OpenIndiana 11. The configure script found "cc" as the
compiler, and it passed the checks for C99 features. However, the
source code had

#define _XOPEN_SOURCE 600

before including system headers, and this led to an error message:

#error: "Compiler or options invalid; UNIX 03 and POSIX.1-2001
    applications       require the use of c99"

The system headers refuse to allow the program to compile, even though
it would in all likelihood be fine.

I wondered who was to blame for being nonconformant to standards:
OpenIndiana, or the autoconf script? OpenIndiana did have a C99
compiler and POSIX headers, but the right compiler just wasn't used. I
can't see any argument to say that OpenIndiana is the problem here. If
autoconf had tried for the C compiler under the standardized name
first, there wouldn't have been a problem.

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux