[Python-Dev] How to configure with icc on Mac?

Stephen J. Turnbull stephen at xemacs.org
Mon Jan 5 05:20:30 CET 2009


skip at pobox.com writes:

 >     >> That failed because of a bug in configure.in:
 >     >> 
 >     >> case $withval in
 >     >> no)     CC=cc
 >     >> without_gcc=yes;;
 >     >> yes)    CC=gcc
 >     >> without_gcc=no;;
 >     >> *)      CC=$withval
 >     >> without_gcc=$withval;;
 >     >> 
 >     >> It ignores the CC value on the command line.
 > 
 >     Martin> I don't think it is a bug. --without-gcc *overrides* the CC
 >     Martin> environment variable, rather than ignoring it.
 > 
 > I don't think that's right.  There's no telling what the non-gcc compiler is
 > called.  As far as I can tell you can't give any arguments to --without-gcc.

That's right.  The theory is that there's a vendor default compiler
installed as "cc" on PATH, and there's GCC.  configure tries to
encourage use of GCC, but you can use the vendor compiler with
--without-gcc, which is 100% equivalent to --with-gcc=no.

But you *can* give arguments to --with-gcc.  If you want to use a
different compiler, use --with-gcc=a-different-compiler.  If autoconf
and configure.in are written correctly, GCC-dependent features will be
bracketed with

    case "$without_gcc" in
    no )
    gcc* )
        # test for and configure GCC feature here
        ;;
    icc* )
        # optional
        # test for and configure similar icc feature here
        ;;
    * )
        # test for and configure similar portable feature here
        ;;

Don't flame me if you agree with me that this is a poor interface.
The option should be --with-compiler, of course.


More information about the Python-Dev mailing list