Hi In one of my projects the test suite requires an extra library to be available that isn't required to build the rest of the package so I would like to make this library an optional dependency and then only build the test suite if configure finds this library. To detect this library I have the following in the projects configure.ac:
# check for lalsupport, needed for test suite PKG_CHECK_MODULES([LALSUPPORT],[lalsupport],[true],[false]) AC_CHECK_LIB([lalsupport],[LALOpenDataFile2],,[lalsupport=false]) AM_CONDITIONAL([LALSUPPORT], [test x$lalsupport = xtrue]) the check finds the library but fails the function check: checking for LALSUPPORT... yes checking for LALOpenDataFile2 in -llalsupport... no and then I have the following in the test/Makefile.am if LALSUPPORT TESTS = StochasticCrossCorrelationStatisticTest \ StochasticHeterodynedCrossCorrelationStatisticTest \ StochasticCrossCorrelationSpectrumTest \ SZeroPadAndFFTTest CZeroPadAndFFTTest \ StochasticOptimalFilterTest \ StochasticOptimalFilterNormalizationTest StochasticOmegaGWTest \ OverlapReductionFunctionTest StochasticInverseNoiseTest \ AstroOmegaTest SimulateSBTest SimulatePopcornTest else TESTS = endif but running make check tries to build the test programs even though the function wasn't found in the library. Shouldn't LALSUPPORT be set to false as this function isn't found, therefore the test programs shouldn't be built. I'm clearly missing something here? Can anyone see what I'm doing wrong? Cheers Adam
