Question

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.

Était-ce utile?

La solution

It'd be easiest to use an automake conditional. Just set an AM_CONDITIONAL in configure.ac using the results of the AC_ARG_ENABLE(threads,...). I'm assuming there's at least one variable set there that you could use to set the AM_CONDITIONAL. Then in Makefile.am add the tests inside the conditional to the check target.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top