cmake.m4 CMAKE_FIND_PACKAGE ignores any previously set flags/libs
When calling CMAKE_FIND_PACKAGE from the cmake.m4 file for a given package, the test of the FLAGS and LIBS variable length is non zero (test -n) and then sets the flag/lib variable to the output of the cmake --find-package.
It should be check with the FLAG/LIB vriable is already set to something (test -z) and only setting it to the cmake value IF it is not already set.