From 31468563892a184d0a45cb0fdd7a91fa0da681e7 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Wed, 14 Nov 2012 14:33:16 -0200 Subject: configure.exe: add inotify auto detection support This patch complements already existing functionality in the configure shell script. Change-Id: I09f4875cbe7ec60d36bb33774d28944a34cc8470 Reviewed-by: Nicolas Arnaud-Cormos Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index dfc3d216c3..239060e4d2 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -240,6 +240,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "POSIX_IPC" ] = "no"; dictionary[ "QT_GLIB" ] = "no"; dictionary[ "QT_ICONV" ] = "auto"; + dictionary[ "QT_INOTIFY" ] = "auto"; dictionary[ "QT_CUPS" ] = "auto"; dictionary[ "CFG_GCC_SYSROOT" ] = "yes"; dictionary[ "SLOG2" ] = "no"; @@ -1182,6 +1183,12 @@ void Configure::parseCmdLine() dictionary["QT_ICONV"] = "gnu"; } + else if (configCmdLine.at(i) == "-inotify") { + dictionary["QT_INOTIFY"] = "yes"; + } else if (configCmdLine.at(i) == "-no-inotify") { + dictionary["QT_INOTIFY"] = "no"; + } + else if (configCmdLine.at(i) == "-neon") { dictionary["NEON"] = "yes"; } else if (configCmdLine.at(i) == "-no-neon") { @@ -1684,6 +1691,9 @@ bool Configure::displayHelp() desc("QT_ICONV", "yes", "-sun-iconv", "Enable support for iconv(3) using sun-iconv."); desc("QT_ICONV", "yes", "-gnu-iconv", "Enable support for iconv(3) using gnu-libiconv.\n"); + desc("QT_INOTIFY", "yes", "-inotify", "Explicitly enable Qt inotify(7) support."); + desc("QT_INOTIFY", "no", "-no-inotify", "Explicitly disable Qt inotify(7) support.\n"); + desc("LARGE_FILE", "yes", "-largefile", "Enables Qt to access files larger than 4 GB.\n"); desc("FONT_CONFIG", "yes", "-fontconfig", "Build with FontConfig support."); @@ -2072,6 +2082,8 @@ bool Configure::checkAvailability(const QString &part) available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib"); } else if (part == "ICONV") { available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv"); + } else if (part == "INOTIFY") { + available = tryCompileProject("unix/inotify"); } else if (part == "CUPS") { available = (platform() != WINDOWS) && (platform() != WINDOWS_CE) && tryCompileProject("unix/cups"); } else if (part == "STACK_PROTECTOR_STRONG") { @@ -2196,6 +2208,10 @@ void Configure::autoDetection() if (dictionary["QT_ICONV"] == "auto") dictionary["QT_ICONV"] = checkAvailability("ICONV") ? "yes" : "no"; + // Detection of inotify + if (dictionary["QT_INOTIFY"] == "auto") + dictionary["QT_INOTIFY"] = checkAvailability("INOTIFY") ? "yes" : "no"; + // Detection of cups support if (dictionary["QT_CUPS"] == "auto") dictionary["QT_CUPS"] = checkAvailability("CUPS") ? "yes" : "no"; @@ -3349,6 +3365,7 @@ void Configure::displayConfig() sout << "Large File support.........." << dictionary[ "LARGE_FILE" ] << endl; sout << "NIS support................." << dictionary[ "NIS" ] << endl; sout << "Iconv support..............." << dictionary[ "QT_ICONV" ] << endl; + sout << "Inotify support............." << dictionary[ "QT_INOTIFY" ] << endl; sout << "Glib support................" << dictionary[ "QT_GLIB" ] << endl; sout << "CUPS support................" << dictionary[ "QT_CUPS" ] << endl; sout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; -- cgit v1.2.3