我如何获得autotools编译与英特尔编译器? [英] How do I get autotools to compile with the Intel compiler?
问题描述
我想让我的代码与英特尔编译器或gcc / g ++编译根据配置参数。这可能吗?
I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen?
推荐答案
如果你想要在我的configure.ac和Makefile.am文件在编译时使用非gcc的编译器,将'CC = / path / to / compile'作为参数传递给configure。 (即,运行./configure CC = / path。不要使用形式CC = / path ./configure。)如果你希望默认编译器不是gcc,你可以把
If you want to use a compiler other than gcc when you compile, pass 'CC=/path/to/compiler' as an argument to configure. (That is, run ./configure CC=/path. Do not use the form CC=/path ./configure.) If you want the default compiler to be something other than gcc, you can put
CC=${CC-/path/to/default/compiler}
在configure.ac中,然后调用AC_PROG_CC。
in configure.ac before the invocation of AC_PROG_CC.
这篇关于我如何获得autotools编译与英特尔编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!