Fall back to using pkg-config if cppunit-config is not found

Latest versions of CppUnit removed cppunit-config and use pkg-config instead,
so try the latter if the former is not found to detect CppUnit under Fedora 24
for example.

Closes #17387.
This commit is contained in:
Scott Talbert
2016-02-22 23:25:47 -05:00
committed by Vadim Zeitlin
parent abd4d80ebe
commit b4d33e95df
2 changed files with 92 additions and 3 deletions

View File

@@ -8040,7 +8040,15 @@ else
SUBDIRS="samples utils"
fi
dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected
AM_PATH_CPPUNIT(1.8.0, [SUBDIRS="$SUBDIRS tests"])
AM_PATH_CPPUNIT(1.8.0,
[SUBDIRS="$SUBDIRS tests"],
[
PKG_CHECK_MODULES(CPPUNIT, [cppunit >= 1.8.0],
[SUBDIRS="$SUBDIRS tests"],
[AC_MSG_WARN([cppunit not found])]
)
]
)
for subdir in $SUBDIRS; do
if test -d ${srcdir}/${subdir} ; then