diff --git a/configure b/configure index 6a4b32728..c21e71d0e 100755 --- a/configure +++ b/configure @@ -1824,7 +1824,7 @@ name: enchant */ #define QC_ENCHANT -bool qc_enchant_have = false; +bool qc_enchant_have = false; QStringList qc_enchant_defs; QStringList qc_enchant_incs; QStringList qc_enchant_libs; @@ -1832,42 +1832,43 @@ QStringList qc_enchant_libs; //---------------------------------------------------------------------------- // qc_enchant //---------------------------------------------------------------------------- -class qc_enchant : public ConfObj -{ +class qc_enchant : public ConfObj { public: - qc_enchant(Conf *c) : ConfObj(c) {} - QString name() const { return "enchant"; } - QString shortname() const { return "enchant"; } + qc_enchant(Conf *c) : ConfObj(c) { } + QString name() const { return "enchant"; } + QString shortname() const { return "enchant"; } - // no output - QString checkString() const { return QString(); } + // no output + QString checkString() const { return QString(); } - bool exec() - { - // on mac, always use built-in spell check + bool exec() + { + // on mac, always use built-in spell check #ifdef Q_OS_MAC - return false; + return false; #endif - qc_enchant_have = false; - qc_enchant_defs.clear(); - qc_enchant_incs.clear(); - qc_enchant_libs.clear(); + qc_enchant_have = false; + qc_enchant_defs.clear(); + qc_enchant_incs.clear(); + qc_enchant_libs.clear(); - QStringList incs; - QString version, libs, other; - if(!conf->findPkgConfig("enchant", VersionMin, "1.3.0", &version, &incs, &libs, &other)) - return false; - if(conf->findPkgConfig("enchant", VersionMin, "2.0.0", &version, &incs, &libs, &other)) - qc_enchant_defs += "HAVE_ENCHANT2"; + QStringList incs; + QString version, libs, other; + if (!conf->findPkgConfig("enchant", VersionMin, "1.3.0", &version, &incs, &libs, &other)) + if (conf->findPkgConfig("enchant-2", VersionMin, "2.0.0", &version, &incs, &libs, &other)) { + qc_enchant_defs += "HAVE_ENCHANT2"; + } else { + return false; + } - qc_enchant_defs += "HAVE_ENCHANT"; - qc_enchant_incs += incs; - qc_enchant_libs += libs; - qc_enchant_have = true; + qc_enchant_defs += "HAVE_ENCHANT"; + qc_enchant_incs += incs; + qc_enchant_libs += libs; + qc_enchant_have = true; - return true; - } + return true; + } }; #line 1 "hunspell.qcm" /* diff --git a/configure.exe b/configure.exe index 7ed24f18e..c9b276a17 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/qcm/enchant.qcm b/qcm/enchant.qcm index af27fbd35..a2316dba9 100644 --- a/qcm/enchant.qcm +++ b/qcm/enchant.qcm @@ -5,7 +5,7 @@ name: enchant */ #define QC_ENCHANT -bool qc_enchant_have = false; +bool qc_enchant_have = false; QStringList qc_enchant_defs; QStringList qc_enchant_incs; QStringList qc_enchant_libs; @@ -13,40 +13,41 @@ QStringList qc_enchant_libs; //---------------------------------------------------------------------------- // qc_enchant //---------------------------------------------------------------------------- -class qc_enchant : public ConfObj -{ +class qc_enchant : public ConfObj { public: - qc_enchant(Conf *c) : ConfObj(c) {} - QString name() const { return "enchant"; } - QString shortname() const { return "enchant"; } + qc_enchant(Conf *c) : ConfObj(c) { } + QString name() const { return "enchant"; } + QString shortname() const { return "enchant"; } - // no output - QString checkString() const { return QString(); } + // no output + QString checkString() const { return QString(); } - bool exec() - { - // on mac, always use built-in spell check + bool exec() + { + // on mac, always use built-in spell check #ifdef Q_OS_MAC - return false; + return false; #endif - qc_enchant_have = false; - qc_enchant_defs.clear(); - qc_enchant_incs.clear(); - qc_enchant_libs.clear(); - - QStringList incs; - QString version, libs, other; - if(!conf->findPkgConfig("enchant", VersionMin, "1.3.0", &version, &incs, &libs, &other)) - return false; - if(conf->findPkgConfig("enchant", VersionMin, "2.0.0", &version, &incs, &libs, &other)) - qc_enchant_defs += "HAVE_ENCHANT2"; - - qc_enchant_defs += "HAVE_ENCHANT"; - qc_enchant_incs += incs; - qc_enchant_libs += libs; - qc_enchant_have = true; - - return true; - } + qc_enchant_have = false; + qc_enchant_defs.clear(); + qc_enchant_incs.clear(); + qc_enchant_libs.clear(); + + QStringList incs; + QString version, libs, other; + if (!conf->findPkgConfig("enchant", VersionMin, "1.3.0", &version, &incs, &libs, &other)) + if (conf->findPkgConfig("enchant-2", VersionMin, "2.0.0", &version, &incs, &libs, &other)) { + qc_enchant_defs += "HAVE_ENCHANT2"; + } else { + return false; + } + + qc_enchant_defs += "HAVE_ENCHANT"; + qc_enchant_incs += incs; + qc_enchant_libs += libs; + qc_enchant_have = true; + + return true; + } };