1

I am working on a project that requires the targets in Makefile.am change with the flags passed during ./configure.

To be more specific, if ./configure is invoked with the --enable-threads option, then the check target for make should also execute the relevant tests. So in Makefile.am I would like to be able to identify if configure was called with --enable-threads or no.

4

1 回答 1

3

使用automake conditional是最简单的。只需使用. AM_CONDITIONAL_ 我假设那里至少设置了一个变量,您可以使用它来设置. 然后将条件内的测试添加到检查目标。configure.acAC_ARG_ENABLE(threads,...)AM_CONDITIONALMakefile.am

于 2013-10-02T15:26:59.447 回答