Reputation: 5190
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.
Upvotes: 1
Views: 561
Reputation: 16315
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.
Upvotes: 3