configure: make library sources fail more verbosely

log a message in all unsuccessful exit paths.

Task-number: QTBUG-57217
Change-Id: I8b0f2685d327da583c3e42c8149327e05b2a66cc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2016-12-23 15:48:54 +01:00
parent 70a7276840
commit 8292326f1b
3 changed files with 12 additions and 4 deletions

View File

@ -503,12 +503,16 @@ defineTest(qtConfLibrary_makeSpec) {
# the library is found via pkg-config.
defineTest(qtConfLibrary_pkgConfig) {
pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
isEmpty(pkg_config): \
isEmpty(pkg_config) {
qtLog("pkg-config use disabled globally.")
return(false)
}
args = $$qtConfPrepareArgs($$eval($${1}.args))
!qtConfPkgConfigPackageExists($$pkg_config, $$args): \
!qtConfPkgConfigPackageExists($$pkg_config, $$args) {
qtLog("pkg-config did not find package.")
return(false)
}
qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false)
qtRunLoggedCommand("$$pkg_config --libs-only-L --libs-only-l $$args", $${1}.libs)|return(false)
@ -619,8 +623,9 @@ defineTest(qtConfHandleLibrary) {
qtLog("Trying source $$s (type $$t) of library $${1} ...")
!$$qtConfEvaluate($$eval($${spfx}.condition)) {
qtLog(" => source failed condition.")
cond = $$eval($${spfx}.condition)
!$$qtConfEvaluate($$cond) {
qtLog(" => source failed condition '$$cond'.")
next()
}

View File

@ -7,6 +7,7 @@ defineTest(qtConfLibrary_openssl) {
export($${1}.libs)
return(true)
}
qtLog("$OPENSSL_LIBS is not set.")
return(false)
}

View File

@ -26,6 +26,7 @@ defineTest(qtConfLibrary_psqlConfig) {
export($${1}.includedir)
return(true)
}
qtLog("pg_config not found.")
return(false)
}
@ -74,6 +75,7 @@ defineTest(qtConfLibrary_mysqlConfig) {
export($${1}.includedir)
return(true)
}
qtLog("mysql_config not found.")
return(false)
}