summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri50
1 files changed, 50 insertions, 0 deletions
diff --git a/configure.pri b/configure.pri
index 7cd48c043..f8ecd3db6 100644
--- a/configure.pri
+++ b/configure.pri
@@ -41,6 +41,56 @@ defineTest(qtConfTest_detectPython2) {
return(true)
}
+defineTest(qtConfTest_detectGperf) {
+ gperf = $$qtConfFindInPath("gperf$$EXE_SUFFIX")
+ isEmpty(gperf) {
+ qtLog("Required gperf could not be found.")
+ return(false)
+ }
+ qtLog("Found gperf from path: $$gperf")
+ return(true)
+}
+
+defineTest(qtConfTest_detectBison) {
+ bison = $$qtConfFindInPath("bison$$EXE_SUFFIX")
+ isEmpty(bison) {
+ qtLog("Required bison could not be found.")
+ return(false)
+ }
+ qtLog("Found bison from path: $$bison")
+ return(true)
+}
+
+defineTest(qtConfTest_detectFlex) {
+ flex = $$qtConfFindInPath("flex$$EXE_SUFFIX")
+ isEmpty(flex) {
+ qtLog("Required flex could not be found.")
+ return(false)
+ }
+ qtLog("Found flex from path: $$flex")
+ return(true)
+}
+
+defineTest(qtConfTest_detectGlibc) {
+ ldd = $$qtConfFindInPath("ldd")
+ !isEmpty(ldd) {
+ qtLog("Found ldd from path: $$ldd")
+ qtRunLoggedCommand("$$ldd --version", version)|return(true)
+ version ~= 's/^.*[^0-9]\([0-9]*\.[0-9]*\).*$/\1/'
+ version = $$first(version)
+ qtLog("Found libc version: $$version")
+ version = $$split(version,'.')
+ version = $$member(version, 1)
+ greaterThan(version, 16) {
+ return(true)
+ }
+ qtLog("Detected too old version of glibc. Required min 2.17.")
+ return(false)
+ }
+ qtLog("No ldd found. Assuming right version of glibc.")
+ return(true)
+}
+
defineTest(qtConfTest_detectNinja) {
ninja = $$qtConfFindInPath("ninja$$EXE_SUFFIX")
!isEmpty(ninja) {