Hello community,

here is the log from the commit of package qconf for openSUSE:Factory checked 
in at 2016-04-30 23:31:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qconf (Old)
 and      /work/SRC/openSUSE:Factory/.qconf.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qconf"

Changes:
--------
--- /work/SRC/openSUSE:Factory/qconf/qconf.changes      2015-09-30 
05:53:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.qconf.new/qconf.changes 2016-04-30 
23:31:47.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Apr 21 08:53:50 UTC 2016 - [email protected]
+
+- update to 20160309
+  * drop qt3 support
+  * better qt5 support
+  * many small fixes
+
+-------------------------------------------------------------------

Old:
----
  qconf-20150608.4a9c329ba879.tar.xz

New:
----
  qconf-20160309.61a9b87f4f.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qconf.spec ++++++
--- /var/tmp/diff_new_pack.7YWF9W/_old  2016-04-30 23:31:48.000000000 +0200
+++ /var/tmp/diff_new_pack.7YWF9W/_new  2016-04-30 23:31:48.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package qconf
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,9 +20,11 @@
 %define with_qt5 1
 %endif
 
+%define version_unconverted 20160309.61a9b87f4f
+
 Name:           qconf
 Url:            http://delta.affinix.com/qconf/
-Version:        20150608.4a9c329ba879
+Version:        20160309.61a9b87f4f
 Release:        0
 Summary:        Configuration tool for qmake
 License:        GPL-2.0
@@ -59,7 +61,7 @@
 
 %files
 %defattr(-,root,root)
-%doc COPYING README TODO
+%doc COPYING README.md TODO
 %{_bindir}/qconf
 %{_datadir}/%{name}
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.7YWF9W/_old  2016-04-30 23:31:48.000000000 +0200
+++ /var/tmp/diff_new_pack.7YWF9W/_new  2016-04-30 23:31:48.000000000 +0200
@@ -2,6 +2,7 @@
   <service mode="localonly" name="tar_scm">
     <param name="url">git://github.com/psi-plus/qconf.git</param>
     <param name="scm">git</param>
+    <param name="exclude">configure.exe</param>
     <param name="filename">qconf</param>
     <param name="versionformat">%ad.%h</param>
   </service>

++++++ qconf-20150608.4a9c329ba879.tar.xz -> qconf-20160309.61a9b87f4f.tar.xz 
++++++
++++ 1615 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/AUTHORS new/qconf-20160309.61a9b87f4f/AUTHORS
--- old/qconf-20150608.4a9c329ba879/AUTHORS     2015-09-29 14:54:51.000000000 
+0200
+++ new/qconf-20160309.61a9b87f4f/AUTHORS       2016-04-21 14:39:18.000000000 
+0200
@@ -1 +1,3 @@
 Justin Karneges <[email protected]>
+Sergey Ilinykh <[email protected]>
+Ivan Romanov <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/README new/qconf-20160309.61a9b87f4f/README
--- old/qconf-20150608.4a9c329ba879/README      2015-09-29 14:54:51.000000000 
+0200
+++ new/qconf-20160309.61a9b87f4f/README        1970-01-01 01:00:00.000000000 
+0100
@@ -1,115 +0,0 @@
-QConf v1.5
-----------
-Date: May 30th, 2008
-Website: http://delta.affinix.com/qconf/
-Mailing List: Delta Project <[email protected]>
-
-Author: Justin Karneges <[email protected]>
-
-Description:
-
-  QConf allows you to have a nice configure script for your qmake-based
-  project.  It is intended for developers who don't need (or want) to use
-  the more complex GNU autotools.
-
-  Scripts generated by QConf are meant for unix.  This means it should only
-  be used with projects based on Qt/X11, Qt/Mac, or Qt/Embedded.  No effort
-  has been made in supporting Qt/Windows based projects (yet).
-
-  NOTE: QConf is a Qt 4 program as of version 1.2.  However, it can still
-    generate configure scripts for Qt 3 apps.  See below for information.
-
-
-Using QConf is easy:
-
-  1) First, install qconf:
-
-     $ ./configure
-     $ make
-     # make install
-
-  2) Now, create a project.qc file.  It is in an XML format:
-     <qconf>
-       <name>MyProject</name>         <-- a friendly string
-       <profile>project.pro</profile> <-- your qmake profile
-     </qconf>
-
-  3) Then run qconf on your file:
-
-     $ qconf project.qc
-
-     Assuming all goes well, this will output a 'configure' script.  Simply
-     copy this into your application package.  Make sure to include(conf.pri)
-     in your project.pro file.
-
-  Tip: If qconf is launched with no arguments, it will use the first .qc
-    file it can find in the current directory.  If there is no .qc file,
-    then it will look for a .pro file, and create a .qc for you based on it.
-
-
-Running 'configure':
-
-  Once the configure script has been created, it is immediately usable.  The
-  script simply performs the following tasks:
-
-    1) Check for a proper Qt build environment.  This is done by compiling
-       the 'conf' program, which ensures that the Qt library, qmake, and
-       necessary compiler tools are present and functioning.
-
-    2) 'conf' is launched, which does any needed dependency checking and
-       creates a suitable conf.pri.  This operation also ensures that
-       not only can we successfully build Qt-based programs, but launch
-       them as well.
-
-    3) qmake is invoked on the project's .pro file.
-
-  Assuming configuration was a success, the Makefile should be generated and
-  the user can now type 'make'.
-
-  The script does not touch any of your project files.  It is up to you to
-  actually include conf.pri in your .pro file.
-
-  Tip: Passing the '--verbose' option to configure can aid in diagnosing
-    configuration problems.
-
-
-Q & A
------
-Q: How do I specify dependencies?
-A: List them in your .qc file using the <dep> element.  Follow sampledeps.qc
-   for a hint.
-
-Q: My dependency is not supported!
-A: You will need to make it.  Look in the 'modules' folder to see how it is
-   done.  If you find that you need to make a lot of these, perhaps you
-   should consider GNU autotools. ;-)
-
-Q: How does qconf find modules?
-A: Modules are found in the 'modules' subdirectory within the configured
-   libdir (default is /usr/local/share/qconf).  Additional directories
-   can be specified using the <moddir> element.  For instance:
-     <moddir>qcm</moddir>
-   would cause qconf to look for modules in the relative directory 'qcm'.
-   This is useful if you want to bundle modules within your application
-   distribution.
-
-Q: How do I perform custom processing or add project-specific arguments?
-A: The recommended way of doing this is to create an extra.qcm file that
-   does the processing you need, and then just add it to your .qc file like
-   any normal dependency.  Implement checkString() in your module to return
-   an empty QString if you want to suppress output.
-
-Q: How can I install more than just the binary with 'make install'?
-A: You need to specify the extra files using the qmake INSTALLS variable
-   (see qmake docs for details).
-
-Q: What environment variables are available?
-A: Main variables: PREFIX, BINDIR, LIBDIR, QTDIR.
-   All other variables are written as QC_FOO, where FOO is the option name
-   in all caps.  Boolean variables are set to 'Y' when flagged.
-
-Q: How do I generate scripts for Qt 3 projects?
-A: Include the <qt3/> element in the project's .qc file.  Modules will not
-   be able to take advantage of most new qconf features, and everything
-   should work as they did with qconf 1.1.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/README.md 
new/qconf-20160309.61a9b87f4f/README.md
--- old/qconf-20150608.4a9c329ba879/README.md   1970-01-01 01:00:00.000000000 
+0100
+++ new/qconf-20160309.61a9b87f4f/README.md     2016-04-21 14:39:18.000000000 
+0200
@@ -0,0 +1,83 @@
+QConf v2.0
+==========
+
+Authors: Justin Karneges <[email protected]>, Sergey Ilinykh 
<[email protected]>, Ivan Romanov <[email protected]>  
+Mailing List: Delta Project <[email protected]>  
+Website: http://delta.affinix.com/qconf/
+
+QConf allows you to have a nice configure script for your qmake-based project. 
It is intended for developers who don't need (or want) to use the more complex 
GNU autotools. QConf also generates a configure.exe program for use on Windows.
+
+Install
+-------
+
+```sh
+./configure
+make
+make install
+```
+
+Usage
+-----
+
+First, create a project.qc file. It is in an XML format:
+
+```xml
+<qconf>
+  <name>MyProject</name>         <!-- a friendly string  -->
+  <profile>project.pro</profile> <!-- your qmake profile -->
+</qconf>
+```
+
+Then, run qconf on your file:
+
+```sh
+qconf project.qc
+```
+
+Assuming all goes well, this will output `configure` and `configure.exe` 
programs. Simply copy these files into your application package. Make sure to 
`include(conf.pri)` in your project.pro file.
+
+Tip: If qconf is launched with no arguments, it will use the first .qc file it 
can find in the current directory. If there is no .qc file, then it will look 
for a .pro file, and create a .qc for you based on it.
+
+The Configure Programs
+----------------------
+
+Once the configure programs have been created, they are immediately usable. 
The programs perform the following tasks:
+
+1. Check for a proper Qt build environment. This is done by compiling the 
`conf` program, which ensures that the Qt library, qmake, and necessary 
compiler tools are present and functioning.
+
+2. `conf` is launched, which does any needed dependency checking and creates a 
suitable `conf.pri`. This operation also ensures that not only can Qt-based 
programs be successfully built, but launched as well.
+
+3. qmake is invoked on the project's .pro file.
+
+Assuming configuration was a success, a `Makefile` should be generated and the 
user can now run the make tool (e.g. `make`).
+
+The script does not touch any of your project files. The only output is a 
`conf.pri` file. It is up to you to actually include `conf.pri` in your .pro 
file.
+
+Tip: Passing the `--verbose` option to configure can aid in diagnosing 
configuration problems.
+
+Q & A
+-----
+
+Q: How do I specify dependencies?  
+A: List them in your .qc file using the `<dep>` element. Follow sampledeps.qc 
for a hint.
+
+Q: My dependency is not supported!  
+A: You will need to make it. Look in the `modules` folder to see how it is 
done. If you find that you need to make a lot of these, perhaps you should 
consider GNU autotools or CMake.
+
+Q: How does qconf find modules?  
+A: Modules are found in the `modules` subdirectory within the configured 
libdir (default is `/usr/local/share/qconf`). Additional directories can be 
specified using the `<moddir>` element. For instance:
+
+```xml
+<moddir>qcm</moddir>
+```
+
+The above element would cause qconf to look for modules in the relative 
directory `qcm`. This is useful if you want to bundle modules within your 
application distribution.
+
+Q: How do I perform custom processing or add project-specific arguments?  
+A: The recommended way of doing this is to create an extra.qcm file that does 
the processing you need, and then just add it to your .qc file like any normal 
dependency. Implement `checkString()` in your module to return an empty QString 
if you want to suppress output.
+
+Q: How can I install more than just the binary with 'make install'?  
+A: You need to specify the extra files using the qmake `INSTALLS` variable 
(see qmake docs for details).
+
+Q: What environment variables are available?  
+A: Main variables: `PREFIX`, `BINDIR`, `LIBDIR`, `QTDIR`. All other variables 
are written as `QC_FOO`, where `FOO` is the option name in all caps. Boolean 
variables are set to `Y` when flagged.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/conf/conf4.cpp 
new/qconf-20160309.61a9b87f4f/conf/conf4.cpp
--- old/qconf-20150608.4a9c329ba879/conf/conf4.cpp      2015-09-29 
14:54:51.000000000 +0200
+++ new/qconf-20160309.61a9b87f4f/conf/conf4.cpp        2016-04-21 
14:39:18.000000000 +0200
@@ -290,11 +290,13 @@
        QString path = str.trimmed();
        path = qc_trim_char(path, QLatin1Char('"'));
        path = qc_trim_char(path, QLatin1Char('\''));
-#ifdef Q_OS_WIN
-       QLatin1Char nativeSep('\\');
-       path.replace(QLatin1Char('/'), QLatin1Char('\\'));
-#else
+
+       // It's OK to use unix style'/' pathes on windows Qt handles this 
without any problems.
+       // Using Windows-style '\\' can leads strange compilation error with 
MSYS which uses
+       // unix style.
        QLatin1Char nativeSep('/');
+#ifdef Q_OS_WIN
+       path.replace(QLatin1Char('\\'), QLatin1Char('/'));
 #endif
        // trim trailing slashes
        while (path.length() && path[path.length() - 1] == nativeSep) {
@@ -996,19 +998,19 @@
                str += "# qconf\n\n";
 
                QString var;
-               var = qc_getenv("PREFIX");
+               var = qc_normalize_path(qc_getenv("PREFIX"));
                if(!var.isEmpty())
                        str += QString("PREFIX = %1\n").arg(var);
-               var = qc_getenv("BINDIR");
+               var = qc_normalize_path(qc_getenv("BINDIR"));
                if(!var.isEmpty())
                        str += QString("BINDIR = %1\n").arg(var);
-               var = qc_getenv("INCDIR");
+               var = qc_normalize_path(qc_getenv("INCDIR"));
                if(!var.isEmpty())
                        str += QString("INCDIR = %1\n").arg(var);
-               var = qc_getenv("LIBDIR");
+               var = qc_normalize_path(qc_getenv("LIBDIR"));
                if(!var.isEmpty())
                        str += QString("LIBDIR = %1\n").arg(var);
-               var = qc_getenv("DATADIR");
+               var = qc_normalize_path(qc_getenv("DATADIR"));
                if(!var.isEmpty())
                        str += QString("DATADIR = %1\n").arg(var);
                str += '\n';
Files old/qconf-20150608.4a9c329ba879/configure.exe and 
new/qconf-20160309.61a9b87f4f/configure.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/modules/qt31.qcm 
new/qconf-20160309.61a9b87f4f/modules/qt31.qcm
--- old/qconf-20150608.4a9c329ba879/modules/qt31.qcm    2015-09-29 
14:54:51.000000000 +0200
+++ new/qconf-20160309.61a9b87f4f/modules/qt31.qcm      1970-01-01 
01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-/*
-Copyright (C) 2003-2008  Justin Karneges
-
-This file is free software; unlimited permission is given to copy and/or
-distribute it, with or without modifications, as long as this notice is
-preserved.
-
-QCM (QConf Module) Howto:
-
- - Modules are Qt/C++ files that are compiled and run during configure time.
- - Name your file "feature.qcm".
- - Create a "BEGIN QCMOD" block like the one below, and specify a friendly
-   name for the feature.  This block should be placed in a C comment, so
-   that it does not disrupt the compiler.
- - If you want arguments for this feature, then add extra lines to the
-   QCMOD block in the format: "arg: {name}(=[{value}]),description".  For
-   example:
-     arg: enable-foo,Enable the Foo feature
-     arg: with-foo-inc=[path],Path to Foo include files
-   These are set as environment variables, which your module can use
-   conf->getenv() to examine.
- - Create a class like the one below, named qc_feature (yes, the same
-   word used in the filename), that inherits ConfObj.
- - Derive name() to produce a friendly string.  This should probably be
-   identical to the string used in the QCMOD block.  It is this text
-   that is used when configure outputs "Checking for {name} ..."
- - Derive shortname() to return "feature".
- - You may also derive checkString() and resultString() if you want to
-   use different text than the usual "Checking for" and "yes/no" response.
-   For resultString(), you'll want to maintain the result of the last
-   call to exec(), so that you can output an appropriate string based on
-   the result.
-
- Below you will find a sample module that simply checks for Qt >= 3.1
-
------BEGIN QCMOD-----
-name: Qt >= 3.1
------END QCMOD-----
-*/
-class qc_qt31 : public ConfObj
-{
-public:
-       qc_qt31(Conf *c) : ConfObj(c) {}
-       QString name() const { return "Qt >= 3.1"; }
-       QString shortname() const { return "qt31"; }
-       bool exec()
-       {
-               conf->debug(QString("QT_VERSION = %1").arg(QT_VERSION));
-               if(QT_VERSION >= 0x030100)
-                       return true;
-               else
-                       return false;
-       }
-};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/package.sh 
new/qconf-20160309.61a9b87f4f/package.sh
--- old/qconf-20150608.4a9c329ba879/package.sh  1970-01-01 01:00:00.000000000 
+0100
+++ new/qconf-20160309.61a9b87f4f/package.sh    2016-04-21 14:39:18.000000000 
+0200
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+if [ $# -lt 1 ]; then
+       echo "usage: $0 [version]"
+       exit 1
+fi
+
+VERSION=$1
+
+mkdir -p build/qconf-$VERSION
+cp -a AUTHORS COPYING README.md TODO conf configure configure.exe examples 
modules qconf.* src build/qconf-$VERSION
+cd build
+tar jcvf qconf-$VERSION.tar.bz2 qconf-$VERSION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/qconf.pro 
new/qconf-20160309.61a9b87f4f/qconf.pro
--- old/qconf-20150608.4a9c329ba879/qconf.pro   2015-09-29 14:54:51.000000000 
+0200
+++ new/qconf-20160309.61a9b87f4f/qconf.pro     2016-04-21 14:39:18.000000000 
+0200
@@ -7,7 +7,18 @@
 HEADERS += src/stringhelp.h
 SOURCES += src/stringhelp.cpp src/qconf.cpp
 
-include($$OUT_PWD/conf.pri)
+exists($$OUT_PWD/conf.pri) {
+       include($$OUT_PWD/conf.pri)
+}
+
+isEmpty(CXXFLAGS) {
+       CXXFLAGS=$$(CXXFLAGS)
+}
+
+!isEmpty(CXXFLAGS) {
+       QMAKE_CXXFLAGS_DEBUG = $$CXXFLAGS
+       QMAKE_CXXFLAGS_RELEASE = $$CXXFLAGS
+}
 
 !isEmpty(DATADIR) {
        contains($$list($$[QT_VERSION]), 4.0.*|4.1.*) {
@@ -21,7 +32,7 @@
 
 # install
 # we check for empty BINDIR here in case we're debugging with configexe on unix
-unix:!isEmpty(BINDIR) {
+!isEmpty(BINDIR):!isEmpty(DATADIR) {
        #CONFIG += no_fixpath
        target.path = $$BINDIR
        INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/src/configexe/configexe.c 
new/qconf-20160309.61a9b87f4f/src/configexe/configexe.c
--- old/qconf-20150608.4a9c329ba879/src/configexe/configexe.c   2015-09-29 
14:54:51.000000000 +0200
+++ new/qconf-20160309.61a9b87f4f/src/configexe/configexe.c     2016-04-21 
14:39:18.000000000 +0200
@@ -25,12 +25,22 @@
 
 #ifdef QC_OS_WIN
 static char *qconftemp_path = "qconftemp";
+static char path_separator = ';';
 #else
 static char *qconftemp_path = ".qconftemp";
+static char path_separator = ':';
 #endif
 
 static int qc_verbose = 0;
-static char *ex_qtdir = 0;
+static char *ex_qtdir = NULL;
+static char *qc_qtselect = NULL;
+static char *qtsearchtext="4 or 5";
+
+static char *prefix = NULL;
+static char *bindir = NULL;
+static char *includedir = NULL;
+static char *libdir = NULL;
+static char *datadir = NULL;
 
 enum ArgType
 {
@@ -342,9 +352,9 @@
 
        str = separators_to_native(qtdir);
 #ifdef QC_OS_WIN
-       str = append_free(str, "\\bin\\qmake.exe");
+       str = append_free(str, "\\qmake.exe");
 #else
-       str = append_free(str, "/bin/qmake");
+       str = append_free(str, "/qmake");
 #endif
        if(file_exists(str))
        {
@@ -357,19 +367,76 @@
        }
 }
 
+int check_qtversion(char *path, char *version)
+{
+       FILE *file;
+       int res = 0;
+
+       if (version)
+       {
+               char command[PATH_MAX];
+               int cnt = snprintf(command, sizeof(command) - 1, "%s -query 
QT_VERSION", path);
+               if (cnt > 0 && cnt < (int)sizeof(command))
+               {
+                       command[sizeof(command) - 1] = '\0'; // To be sure line 
has null-terminator
+                       file = popen(command, "r");
+                       if (file)
+                       {
+                               char buf[20]; // version string output always 
small
+                               if (fread(buf, 1, sizeof(buf), file) > 0)
+                               {
+                                       buf[sizeof(buf) - 1] = '\0';
+                                       int at = index_of(buf, '.');
+                                       if (at > 0)
+                                       {
+                                               // Compare major version
+                                               buf[at] = '\0';
+                                               res = !strcmp(version, buf);
+                                               if (!res && qc_verbose)
+                                               {
+                                                       printf("Warning: %s not 
for Qt %s\n", path, qtsearchtext);
+                                               }
+                                       }
+                               }
+                               pclose(file);
+                       }
+               }
+       }
+       else
+       {
+               res = 1;
+       }
+
+       return res;
+}
+
 static char *find_qmake()
 {
        char *qtdir;
        char *path;
-       FILE *qmp;
        char try_syspath = 1;
 
+       if (!qc_qtselect)
+       {
+               qc_qtselect = strdup(get_envvar("QT_SELECT"));
+               if (qc_qtselect)
+                       qtsearchtext = qc_qtselect;
+       }
+
+
        qtdir = ex_qtdir;
        if(qtdir)
        {
+               qtdir = append_free(strdup(qtdir), "\\bin");
                path = check_qmake_path(qtdir);
+               free(qtdir);
+
                if(path)
+               {
+                       if (!check_qtversion(path, qc_qtselect))
+                               return NULL;
                        return path;
+               }
                try_syspath = 0;
        }
        if(qc_verbose)
@@ -378,9 +445,16 @@
        qtdir = get_envvar("QTDIR");
        if(qtdir)
        {
+               qtdir = append_free(strdup(qtdir), "\\bin");
                path = check_qmake_path(qtdir);
+               free(qtdir);
+
                if(path)
+               {
+                       if (!check_qtversion(path, qc_qtselect))
+                               return NULL;
                        return path;
+               }
                try_syspath = 0;
        }
        if(qc_verbose)
@@ -388,38 +462,26 @@
 
        /* if not set explicitly try something implicit */
        if (try_syspath) {
-               char *dname = 0;
-               int len;
-               qmp = popen("qmake -query QT_INSTALL_BINS", "r");
-               if (qmp) {
-                       char buf[PATH_MAX];
-                       int cnt;
-                       while ((cnt = fread(buf, 1, PATH_MAX - 1, qmp))) {
-                               buf[cnt] = 0;
-                               if (!dname) {
-                                       dname = strdup(buf);
-                               } else {
-                                       dname = append_free(dname, buf);
-                               }
-                       }
-                       pclose(qmp);
-               }
-               if (dname) {
-                       len = strlen(dname);
-                       while (len && dname[len - 1] < ' ')
-                               dname[--len] = '\0';
-                       if (len && file_exists(dname)) {
-#ifdef QC_OS_WIN
-                               dname = append_free(dname, "/qmake.exe"); /* it 
coud be *.cmd but we don't care */
-#else
-                               dname = append_free(dname, "/qmake");
-#endif
-                               char *ndname = separators_to_native(dname);
-                               free(dname);
-                               return ndname;
+               char *paths = strdup(get_envvar("PATH"));
+               qtdir = paths;
+               while (1)
+               {
+                       int at = index_of(qtdir, path_separator);
+                       if (at > 0)
+                               qtdir[at] = '\0';
+                       path = check_qmake_path(qtdir);
+                       if (path && check_qtversion(path, qc_qtselect))
+                       {
+                               free(paths);
+                               return path;
                        }
-                       free(dname);
+
+                       if (at > 0)
+                               qtdir += at + 1;
+                       else
+                               break;
                }
+               free(paths);
        }
 
        if(qc_verbose)
@@ -521,13 +583,13 @@
 
 #ifdef QC_OS_WIN
        str = strdup("deltree /y ");
-       str = append_free(str, qconftemp_path);
+       str = append_free(str, path);
        ret = run_silent_all(str);
        free(str);
        if(ret != 0)
        {
                str = strdup("rmdir /s /q ");
-               str = append_free(str, qconftemp_path);
+               str = append_free(str, path);
                ret = run_silent_all(str);
                free(str);
        }
@@ -703,7 +765,7 @@
                        try_print_var(q->args[n].envvar, q->args[n].val);
        }
 
-       printf("Verifying Qt 4+ build environment ... ");
+       printf("Verifying Qt build environment ... ");
        fflush(stdout);
 
        if(qc_verbose)
@@ -717,7 +779,7 @@
                else
                        printf("fail\n");
                printf("\n");
-               printf("Reason: Unable to find the 'qmake' tool for Qt 4.\n");
+               printf("Reason: Unable to find the 'qmake' tool for Qt %s.\n", 
qtsearchtext);
                printf("\n");
                printf("%s", q->qtinfo);
                return 0;
@@ -859,6 +921,34 @@
                        qc_verbose = 1;
                        set_envvar("QC_VERBOSE", "Y");
                }
+               else if(strcmp(var, "prefix") == 0)
+               {
+                       prefix = strdup(val);
+               }
+               else if(strcmp(var, "bindir") == 0)
+               {
+                       bindir = strdup(val);
+               }
+               else if(strcmp(var, "includedir") == 0)
+               {
+                       includedir = strdup(val);
+               }
+               else if(strcmp(var, "datadir") == 0)
+               {
+                       datadir = strdup(val);
+               }
+               else if(strcmp(var, "libdir") == 0)
+               {
+                       libdir = strdup(val);
+               }
+               else if(strcmp(var, "qtselect") == 0)
+               {
+                       if (val && strlen(val))
+                       {
+                               qc_qtselect = strdup(val);
+                               qtsearchtext = qc_qtselect;
+                       }
+               }
                else
                {
                        at = find_arg(q->args, q->args_count, var);
@@ -899,14 +989,82 @@
                qcdata_delete(q);
                if(ex_qtdir)
                        free(ex_qtdir);
+
+               if(qc_qtselect)
+                       free(qc_qtselect);
+
+               if(prefix)
+                       free(prefix);
+
+               if(bindir)
+                       free(bindir);
+
+               if(includedir)
+                       free(includedir);
+
+               if(libdir)
+                       free(libdir);
+
+               if(datadir)
+                       free(datadir);
+               
                return 1;
        }
 
+       if(prefix)
+       {
+               set_envvar("PREFIX", prefix);
+               if(!libdir)
+                       libdir = append_str(prefix, "/lib");
+
+               if(!bindir)
+                       bindir = append_str(prefix, "/bin");
+
+               if(!includedir)
+                       includedir = append_str(prefix, "/include");
+
+               if(!datadir)
+                       datadir = append_str(prefix, "/share");
+       }
+
+       if(libdir)
+               set_envvar("LIBDIR", libdir);
+
+       if(bindir)
+               set_envvar("BINDIR", bindir);
+
+       if(includedir)
+               set_envvar("INCLUDEDIR", includedir);
+
+       if(datadir)
+               set_envvar("DATADIR", datadir);
+
+       if(libdir)
+               set_envvar("LIBDIR", libdir);
+
        n = do_conf(q, argv[0]);
        qcdata_delete(q);
        if(ex_qtdir)
                free(ex_qtdir);
 
+       if(qc_qtselect)
+               free(qc_qtselect);
+
+       if(prefix)
+               free(prefix);
+
+       if(bindir)
+               free(bindir);
+
+       if(includedir)
+               free(includedir);
+
+       if(libdir)
+               free(libdir);
+
+       if(datadir)
+               free(datadir);
+
        if(n)
                return 0;
        else
Files old/qconf-20150608.4a9c329ba879/src/configexe/configexe_stub.exe and 
new/qconf-20160309.61a9b87f4f/src/configexe/configexe_stub.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qconf-20150608.4a9c329ba879/src/qconf.cpp 
new/qconf-20160309.61a9b87f4f/src/qconf.cpp
--- old/qconf-20150608.4a9c329ba879/src/qconf.cpp       2015-09-29 
14:54:51.000000000 +0200
+++ new/qconf-20160309.61a9b87f4f/src/qconf.cpp 2016-04-21 14:39:18.000000000 
+0200
@@ -26,7 +26,7 @@
 
 #include "stringhelp.h"
 
-#define VERSION "1.5"
+#define VERSION "2.0"
 
 #define CONF_USAGE_SPACE 4
 #define CONF_WRAP        78
@@ -166,11 +166,11 @@
 }
 
 const char *qt4_info_str =
-       "Be sure you have a proper Qt 4.0 build environment set up.  This means 
not just Qt, "
+       "Be sure you have a proper Qt 4.0+ build environment set up.  This 
means not just Qt, "
        "but also a C++ compiler, a make tool, and any other packages necessary 
"
        "for compiling C++ programs.\n"
        "\n"
-       "If you are certain everything is installed, then it could be that Qt 4 
is not being "
+       "If you are certain everything is installed, then it could be that Qt 
is not being "
        "recognized or that a different version of Qt is being detected by 
mistake (for example, "
        "this could happen if \\$QTDIR is pointing to a Qt 3 installation).  At 
least one of "
        "the following conditions must be satisfied:\n"
@@ -185,17 +185,18 @@
        "\n";
 
 const char *qt4_info_str_win =
-       "Be sure you have a proper Qt 4.0 build environment set up.  This means 
not just Qt, "
+       "Be sure you have a proper Qt 4.0+ build environment set up.  This 
means not just Qt, "
        "but also a C++ compiler, a make tool, and any other packages necessary 
"
        "for compiling C++ programs.\n"
        "\n"
-       "If you are certain everything is installed, then it could be that Qt 4 
is not being "
+       "If you are certain everything is installed, then it could be that Qt 
is not being "
        "recognized or that a different version of Qt is being detected by 
mistake (for example, "
        "this could happen if %QTDIR% is pointing to a Qt 3 installation).  At 
least one of "
        "the following conditions must be satisfied:\n"
        "\n"
        " 1) --qtdir is set to the location of Qt\n"
        " 2) %QTDIR% is set to the location of Qt\n"
+       " 3) qmake is in the %PATH%\n"
        "\n"
        "This program will use the first one it finds to be true, checked in 
the above order.\n"
        "\n";
@@ -334,7 +335,7 @@
                if(libmode)
                        mainopts += ConfOpt("static", QString(), "QC_STATIC", 
"Create a static library instead of shared.");
 
-               mainopts += ConfOpt("extraconf", "conf", "QC_EXTRACONF", "Extra 
configuration for nonstandard cases");
+               mainopts += ConfOpt("extraconf", "conf", "QC_EXTRACONF", "Extra 
configuration for nonstandard cases.");
 
                QString str;
                str += genHeader();
@@ -399,14 +400,10 @@
                                str += "qm=$PWD/byoq/qt/bin/qmake\n\n";
                        }
 
-                       str += "printf \"Verifying Qt 4 build environment ... 
\"\n\n";
+                       str += "printf \"Verifying Qt build environment ... 
\"\n\n";
                        if(!byoq)
                                str += genQt4Checks();
                }
-               else {
-                       str += "printf \"Verifying Qt 3.x Multithreaded (MT) 
build environment ... \"\n\n";
-                       str += genQt3Checks();
-               }
 
                str += genEmbeddedFiles();
 
@@ -437,6 +434,18 @@
                mainopts.clear();
                mainopts += ConfOpt("qtdir", "path", "EX_QTDIR", "Directory 
where Qt is installed.");
 
+               if(usePrefix) {
+                       mainopts += ConfOpt("prefix", "path", "PREFIX", "Base 
path for build/install.  No default.");
+                       if(useBindir)
+                               mainopts += ConfOpt("bindir", "path", "BINDIR", 
"Directory for binaries.  Default: PREFIX/bin");
+                       if(useIncdir)
+                               mainopts += ConfOpt("includedir", "path", 
"INCDIR", "Directory for headers.  Default: PREFIX/include");
+                       if(useLibdir)
+                               mainopts += ConfOpt("libdir", "path", "LIBDIR", 
"Directory for libraries.  Default: PREFIX/lib");
+                       if(useDatadir)
+                               mainopts += ConfOpt("datadir", "path", 
"DATADIR", "Directory for data.  Default: PREFIX/share");
+               }
+
                if(libmode)
                        mainopts += ConfOpt("static", QString(), "QC_STATIC", 
"Create a static library instead of shared.");
 
@@ -511,8 +520,6 @@
                //"else\n"
                if(qt4)
                        str += "echo \"Good, your configure finished.  Now run 
$MAKE.\"\n";
-               else
-                       str += "echo \"Good, your configure finished.  Now run 
'make'.\"\n";
                //"fi\n"
                str += "echo\n";
                return str;
@@ -563,7 +570,7 @@
 
                QList<ConfUsageOpt> list = optsToUsage(mainopts);
                list += ConfUsageOpt("verbose",  "",   "Show extra configure 
output.");
-               list += ConfUsageOpt("qtselect",  "N",   "Select major Qt 
verion (4 or 5).");
+               list += ConfUsageOpt("qtselect",  "N",   "Select major Qt 
version (4 or 5).");
                list += ConfUsageOpt("help",   "",     "This help text.");
                str += genUsageSection("Main options:", list);
 
@@ -589,7 +596,7 @@
 
                QList<ConfUsageOpt> list = optsToUsage(mainopts);
                list += ConfUsageOpt("verbose",  "",   "Show extra configure 
output.");
-               list += ConfUsageOpt("qtselect",  "N",   "Select major Qt 
verion (4 or 5).");
+               list += ConfUsageOpt("qtselect",  "N",   "Select major Qt 
version (4 or 5).");
                list += ConfUsageOpt("help",   "",     "This help text.");
                str += genUsageSection("Main options:", list);
 
@@ -614,6 +621,12 @@
                str +=
                "# which/make detection adapted from Qt\n"
                "which_command() {\n"
+               "       ALL_MATCHES=\n"
+               "       if [ \"$1\" = \"-a\" ]; then\n"
+               "               ALL_MATCHES=\"-a\"\n"
+               "               shift\n"
+               "       fi\n"
+               "\n"
                "       OLD_HOME=$HOME\n"
                "       HOME=/dev/null\n"
                "       export HOME\n"
@@ -628,39 +641,35 @@
                "                       for a in /usr/ucb /usr/bin /bin 
/usr/local/bin; do\n"
                "                               if [ -x $a/which ]; then\n"
                "                                       WHICH=$a/which\n"
-               "                                       break;\n"
+               "                                       break\n"
                "                               fi\n"
                "                       done\n"
                "               fi\n"
                "       fi\n"
                "\n"
+               "       RET_CODE=1\n"
                "       if [ -z \"$WHICH\" ]; then\n"
                "               OLD_IFS=$IFS\n"
                "               IFS=:\n"
                "               for a in $PATH; do\n"
                "                       if [ -x $a/$1 ]; then\n"
                "                               echo \"$a/$1\"\n"
-               "                               IFS=$OLD_IFS\n"
-               "                               export IFS\n"
-               "                               HOME=$OLD_HOME\n"
-               "                               export HOME\n"
-               "                               return 0\n"
+               "                               RET_CODE=0\n"
+               "                               [ -z \"$ALL_MATCHES\" ] && 
break\n"
                "                       fi\n"
                "               done\n"
                "               IFS=$OLD_IFS\n"
                "               export IFS\n"
                "       else\n"
-               "               a=`\"$WHICH\" \"$1\" 2>/dev/null`\n"
+               "               a=`\"$WHICH\" \"$ALL_MATCHES\" \"$1\" 
2>/dev/null`\n"
                "               if [ ! -z \"$a\" -a -x \"$a\" ]; then\n"
                "                       echo \"$a\"\n"
-               "                       HOME=$OLD_HOME\n"
-               "                       export HOME\n"
-               "                       return 0\n"
+               "                       RET_CODE=0\n"
                "               fi\n"
                "       fi\n"
                "       HOME=$OLD_HOME\n"
                "       export HOME\n"
-               "       return 1\n"
+               "       return $RET_CODE\n"
                "}\n"
                "WHICH=which_command\n"
                "\n";
@@ -733,8 +742,7 @@
                "                       QC_VERBOSE=\"Y\"\n"
                "                       shift\n"
                "                       ;;\n"
-               "               --qtselect*)\n"
-               "                       [ \"$1\" = \"--qtselect\" ] && { shift; 
optarg=\"$1\"; }\n"
+               "               --qtselect=*)\n"
                "                       QC_QTSELECT=\"${optarg}\"\n"
                "                       shift\n"
                "                       ;;\n"
@@ -755,122 +763,43 @@
                return str;
        }
 
-       QString genQt3Checks()
+       QString genQt4Checks()
        {
-               QStringList qtloc;
-               qtloc += "/usr/lib/qt";
-               qtloc += "/usr/share/qt";
-               qtloc += "/usr/share/qt3";
-               qtloc += "/usr/local/lib/qt";
-               qtloc += "/usr/local/share/qt";
-               qtloc += "/usr/lib/qt3";
-               qtloc += "/usr/local/lib/qt3";
-               qtloc += "/usr/X11R6/share/qt";
-               qtloc += "/usr/qt/3";
-
-               QString for_items;
-               for(QStringList::ConstIterator it = qtloc.begin(); it != 
qtloc.end(); ++it) {
-                       for_items += (*it) + ' ';
-               }
-
                QString str =
-               "if [ -z \"$QTDIR\" ]; then\n"
-               "       if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "               echo \\$QTDIR not set... trying to find Qt 
manually\n"
-               "       fi\n";
-               str += QString(
-               "       for p in %1; do\n"
-               ).arg(for_items);
-               str +=
-               "               if [ -d \"$p/mkspecs\" ]; then\n"
-               "                       QTDIR=$p\n"
-               "                       break;\n"
-               "               fi;\n"
-               "       done\n"
-               "       if [ -z \"$QTDIR\" ]; then\n"
-               "               echo fail\n"
-               "               echo\n"
-               "               echo \"Unable to find Qt 'mkspecs'.  Perhaps 
you need to\"\n"
-               "               echo \"install the Qt 3 development utilities.  
You may download\"\n"
-               "               echo \"them either from the vendor of your 
operating system\"\n"
-               "               echo \"or from http://www.trolltech.com/\"\n";
-               "               echo\n"
-               "               echo \"If you're sure you have the Qt 
development utilities\"\n"
-               "               echo \"installed, you might try using the 
--qtdir option.\"\n"
-               "               echo\n"
-               "               exit 1;\n"
-               "       fi\n"
-               "       if [ ! -x \"$QTDIR/bin/moc\" ]; then\n"
-               "               m=`which moc 2>/dev/null`\n"
-               "               if [ ! -x \"$m\" ]; then\n"
-               "                       echo fail\n"
-               "                       echo\n"
-               "                       echo \"We found Qt in $QTDIR, but we 
were unable to locate\"\n"
-               "                       echo \"the moc utility.  It was not 
found in $QTDIR/bin\"\n"
-               "                       echo \"nor in PATH.  This seems to be a 
very unusual setup.\"\n"
-               "                       echo \"You might try using the --qtdir 
option.\"\n"
-               "                       echo\n"
-               "                       exit 1;\n"
-               "               fi\n"
-               "               qtpre=`echo $m | awk '{ n = index($0, 
\"/bin/moc\"); if (!n) { exit 1; } print substr($0, 0, n-1); exit 0; }' 
2>/dev/null`\n"
-               "               ret=\"$?\"\n"
-               "               if [ \"$ret\" != \"0\" ]; then\n"
-               "                       echo fail\n"
-               "                       echo\n"
-               "                       echo \"We found Qt in $QTDIR, but the 
location of moc\"\n"
-               "                       echo \"($m) is not suitable for use 
with this build system.\"\n"
-               "                       echo \"This is a VERY unusual and 
likely-broken setup.  You\"\n"
-               "                       echo \"should contact the maintainer of 
your Qt package.\"\n"
-               "                       echo\n"
-               "                       exit 1;\n"
-               "               fi\n"
-               "               QTDIR=$qtpre\n"
-               "       fi\n"
+               "if [ -z \"$QC_QTSELECT\" ]; then\n"
+               "       QC_QTSELECT=\"$QT_SELECT\"\n"
                "fi\n"
                "\n"
-               "if [ ! -x \"$QTDIR/bin/qmake\" ]; then\n"
-               "       if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "               echo Warning: qmake not in \\$QTDIR/bin/qmake\n"
-               "               echo trying to find it in \\$PATH\n"
-               "       fi\n"
-               "       qm=`which qmake 2>/dev/null`\n"
-               "       if [ -x \"$qm\" ]; then\n"
-               "               if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "                       echo qmake found in $qm\n"
-               "               fi\n"
-               "       else\n"
-               "               echo fail\n"
-               "               echo\n"
-               "               echo Sorry, you seem to have a very unusual 
setup,\n"
-               "               echo or I missdetected \\$QTDIR=$QTDIR\n"
-               "               echo\n"
-               "               echo Please set \\$QTDIR manually and make sure 
that\n"
-               "               echo \\$QTDIR/bin/qmake exists.\n"
-               "               echo\n"
-               "               exit 1;\n"
-               "       fi\n"
+               "if [ ! -z \"$QC_QTSELECT\" ]; then\n"
+               "       QTSEARCHTEXT=\"$QC_QTSELECT\"\n"
                "else\n"
-               "       qm=$QTDIR/bin/qmake\n"
-               "fi\n\n";
-               return str;
-       }
-
-       QString genQt4Checks()
-       {
-               QString str =
-               "QTSEARCHTTEXT=\"$QC_QTSELECT\"\n"
-               "[ -z \"$QC_QTSELECT\" ] && QTSEARCHTTEXT=\"4 or 5\"\n"
+               "       QTSEARCHTEXT=\"4 or 5\"\n"
+               "fi\n"
                "\n"
-               "# run qmake -v and check version\n"
-               "qmake_check_v4() {\n"
+               "# run qmake and check version\n"
+               "qmake_check() {\n"
                "       if [ -x \"$1\" ]; then\n"
-               "               local v=`$1 -query QT_VERSION 2>&1`\n"
-               "               vmaj=\"${v%%.*}\"\n"
-               "               case \"${v}\" in ?.?.?) [ -z \"$QC_QTSELECT\" ] 
&& [ \"$vmaj\" = 4 -o \"$vmaj\" = 5 ] && return 0;\n"
-               "                        [ -n \"$QC_QTSELECT\" ] && [ \"$vmaj\" 
= \"$QC_QTSELECT\" ] && return 0; ;;\n"
+               "               cmd=\"\\\"$1\\\" -query QT_VERSION\"\n"
+               "               if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
+               "                       echo \"running: $cmd\"\n"
+               "               fi\n"
+               "               vout=`/bin/sh -c \"$cmd\" 2>&1`\n"
+               "               case \"${vout}\" in\n"
+               "                       ?.?.?)\n"
+               "                               vmaj=\"${vout%%.*}\"\n"
+               "                               if [ ! -z \"$QC_QTSELECT\" ]; 
then\n"
+               "                                       if [ \"$vmaj\" = 
\"$QC_QTSELECT\" ]; then\n"
+               "                                               return 0\n"
+               "                                       fi\n"
+               "                               else\n"
+               "                                       if [ \"$vmaj\" = \"4\" 
] || [ \"$vmaj\" = \"5\" ]; then\n"
+               "                                               return 0\n"
+               "                                       fi\n"
+               "                               fi\n"
+               "                               ;;\n"
                "               esac\n"
                "               if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "                       echo \"Warning: $1 not for Qt 
${QTSEARCHTTEXT}\"\n"
+               "                       echo \"Warning: $1 not for Qt 
${QTSEARCHTEXT}\"\n"
                "               fi\n"
                "       fi\n"
                "       return 1\n"
@@ -889,17 +818,20 @@
                "if [ -z \"$QC_QTSELECT\" ]; then\n"
                "       names=\"${qt5_names} ${qt4_names} $names\"\n"
                "else\n"
-               "       [ \"$QC_QTSELECT\" = \"4\" ] && names=\"${qt4_names} 
$names\"\n"
-               "       [ \"$QC_QTSELECT\" -ge \"5\" ] && names=\"${qt5_names} 
$names\"\n"
+               "       if [ \"$QC_QTSELECT\" = \"4\" ]; then\n"
+               "               names=\"${qt4_names} $names\"\n"
+               "       elif [ \"$QC_QTSELECT\" -ge \"5\" ]; then\n"
+               "               names=\"${qt5_names} $names\"\n"
+               "       fi\n"
                "fi\n"
                "\n"
                "if [ -z \"$qm\" ] && [ ! -z \"$EX_QTDIR\" ]; then\n"
-               "# qt4 check: --qtdir\n"
+               "       # qt4 check: --qtdir\n"
                "       for n in $names; do\n"
                "               qstr=$EX_QTDIR/bin/$n\n"
-               "               if qmake_check_v4 \"$qstr\"; then\n"
+               "               if qmake_check \"$qstr\"; then\n"
                "                       qm=$qstr\n"
-               "                       break;\n"
+               "                       break\n"
                "               fi\n"
                "       done\n"
                "       if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
@@ -907,12 +839,12 @@
                "       fi\n"
                "\n"
                "elif [ -z \"$qm\" ] && [ ! -z \"$QTDIR\" ]; then\n"
-               "# qt4 check: QTDIR\n"
+               "       # qt4 check: QTDIR\n"
                "       for n in $names; do\n"
                "               qstr=$QTDIR/bin/$n\n"
-               "               if qmake_check_v4 \"$qstr\"; then\n"
+               "               if qmake_check \"$qstr\"; then\n"
                "                       qm=$qstr\n"
-               "                       break;\n"
+               "                       break\n"
                "               fi\n"
                "       done\n"
                "       if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
@@ -920,57 +852,79 @@
                "       fi\n"
                "\n"
                "else\n"
+               "       # Try all other implicit checks\n"
                "\n"
-               "# Try all other implicit checks\n"
+               "       # qtchooser\n"
+               "       if [ -z \"$qm\" ]; then\n"
+               "               qtchooser=$($WHICH qtchooser 2>/dev/null)\n"
+               "               if [ ! -z \"$qtchooser\" ]; then\n"
+               "                       if [ ! -z \"$QC_QTSELECT\" ]; then\n"
+               "                               versions=\"$QC_QTSELECT\"\n"
+               "                       else\n"
+               "                               cmd=\"$qtchooser 
--list-versions\"\n"
+               "                               if [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
+               "                                       echo \"running: 
$cmd\"\n"
+               "                               fi\n"
+               "                               versions=`$cmd`\n"
+               "                       fi\n"
+               "                       for version in $versions; do\n"
+               "                               cmd=\"$qtchooser 
-run-tool=qmake -qt=${version} -query QT_INSTALL_BINS\"\n"
+               "                               if [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
+               "                                       echo \"running: 
$cmd\"\n"
+               "                               fi\n"
+               "                               qtbins=`$cmd 2>/dev/null`\n"
+               "                               if [ ! -z \"$qtbins\" ] && 
qmake_check \"$qtbins/qmake\"; then\n"
+               "                                       qm=\"$qtbins/qmake\"\n"
+               "                                       break\n"
+               "                               fi\n"
+               "                       done\n"
+               "               fi\n"
+               "       fi\n"
+               "       if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
+               "               echo \"Warning: qmake not found via 
qtchooser\"\n"
+               "       fi\n"
                "\n"
-               "# qtchooser\n"
-               "if [ -z \"$qm\" ]; then\n"
-               "       qtchooser=$($WHICH qtchooser 2>/dev/null)\n"
-               "       if [ ! -z \"$qtchooser\" ]; then\n"
-               "               cmd=\"$qtchooser -run-tool=qmake 
-qt=${QC_QTSELECT}\"\n"
-               "               qtbins=\"$($cmd -query QT_INSTALL_BINS 
2>/dev/null)\"\n"
-               "               if [ -n \"$qtbins\" ] && qmake_check_v4 
\"$qtbins/qmake\"; then\n"
-               "                       qm=\"$qtbins/qmake\"\n"
-               "                       break;\n"
+               "       # qt4: pkg-config\n"
+               "       if [ -z \"$qm\" ]; then\n"
+               "               cmd=\"pkg-config QtCore 
--variable=exec_prefix\"\n"
+               "               if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
+               "                       echo \"running: $cmd\"\n"
+               "               fi\n"
+               "               str=`$cmd 2>/dev/null`\n"
+               "               if [ ! -z \"$str\" ]; then\n"
+               "                       for n in $names; do\n"
+               "                               qstr=$str/bin/$n\n"
+               "                               if qmake_check \"$qstr\"; 
then\n"
+               "                                       qm=$qstr\n"
+               "                                       break\n"
+               "                               fi\n"
+               "                       done\n"
                "               fi\n"
                "       fi\n"
-               "fi\n"
-               "if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "       echo \"Warning: qmake not found via qtchooser\"\n"
-               "fi\n"
+               "       if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
+               "               echo \"Warning: qmake not found via 
pkg-config\"\n"
+               "       fi\n"
                "\n"
-               "# qt4 check: pkg-config\n"
-               "if [ -z \"$qm\" ]; then\n"
-               "       str=`pkg-config QtCore --variable=exec_prefix 
2>/dev/null`\n"
-               "       if [ ! -z \"$str\" ]; then\n"
+               "       # qmake in PATH\n"
+               "       if [ -z \"$qm\" ]; then\n"
                "               for n in $names; do\n"
-               "                       qstr=$str/bin/$n\n"
-               "                       if qmake_check_v4 \"$qstr\"; then\n"
-               "                               qm=$qstr\n"
-               "                               break;\n"
+               "                       qstr=`$WHICH -a $n 2>/dev/null`\n"
+               "                       for q in $qstr; do\n"
+               "                               if qmake_check \"$q\"; then\n"
+               "                                       qm=\"$q\"\n"
+               "                                       break\n"
+               "                               fi\n"
+               "                       done\n"
+               "                       if [ ! -z \"$qm\" ]; then\n"
+               "                               break\n"
                "                       fi\n"
                "               done\n"
                "       fi\n"
-               "fi\n"
-               "if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "       echo \"Warning: qmake not found via pkg-config\"\n"
-               "fi\n"
-               "\n"
-               "# qt4 check: PATH\n"
-               "if [ -z \"$qm\" ]; then\n"
-               "       for n in $names; do\n"
-               "               qstr=`$WHICH $n 2>/dev/null`\n"
-               "               if qmake_check_v4 \"$qstr\"; then\n"
-               "                       qm=$qstr\n"
-               "                       break;\n"
-               "               fi\n"
-               "       done\n"
-               "fi\n"
-               "if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "       echo \"Warning: qmake not found via \\$PATH\"\n"
-               "fi\n"
+               "       if [ -z \"$qm\" ] && [ \"$QC_VERBOSE\" = \"Y\" ]; 
then\n"
+               "               echo \"Warning: qmake not found via \\$PATH\"\n"
+               "       fi\n"
                "\n"
-               "# end of implicit checks\n"
+               "       # end of implicit checks\n"
                "fi\n"
                "\n"
                "if [ -z \"$qm\" ]; then\n"
@@ -982,7 +936,7 @@
 
                str += echoBlock(1,
                "\n"
-               "Reason: Unable to find the 'qmake' tool for Qt 
${QTSEARCHTTEXT}.\n"
+               "Reason: Unable to find the 'qmake' tool for Qt 
${QTSEARCHTEXT}.\n"
                "\n");
                str +=
                "       show_qt_info\n";
@@ -990,7 +944,7 @@
                "       exit 1;\n"
                "fi\n"
                "if [ \"$QC_VERBOSE\" = \"Y\" ]; then\n"
-               "       echo qmake found in $qm\n"
+               "       echo qmake found in \"$qm\"\n"
                "fi\n\n";
 
                str +=
@@ -1001,7 +955,7 @@
                "               READLINK=`$WHICH readlink`\n"
                "       fi\n"
                "       if [ ! -z \"$READLINK\" ]; then\n"
-               "               qt_mkspecsdir=`$qm -query 
QT_INSTALL_DATA`/mkspecs\n"
+               "               qt_mkspecsdir=`\"$qm\" -query 
QT_INSTALL_DATA`/mkspecs\n"
                "               if [ -d \"$qt_mkspecsdir\" ] && [ -h 
\"$qt_mkspecsdir/default\" ]; then\n"
                "                       defmakespec=`$READLINK 
$qt_mkspecsdir/default`\n"
                "               fi\n"
@@ -1044,19 +998,13 @@
                if(qt4) {
                        str +=
                        "       if [ ! -z \"$qm_spec\" ]; then\n"
-                       "               $qm -spec $qm_spec conf4.pro 
>/dev/null\n"
+                       "               \"$qm\" -spec $qm_spec conf4.pro 
>/dev/null\n"
                        "       else\n"
-                       "               $qm conf4.pro >/dev/null\n"
+                       "               \"$qm\" conf4.pro >/dev/null\n"
                        "       fi\n"
                        "       $MAKE clean >/dev/null 2>&1\n"
                        "       $MAKE >../conf.log 2>&1\n";
                }
-               else {
-                       str +=
-                       "       $qm conf.pro >/dev/null\n"
-                       "       QTDIR=$QTDIR make clean >/dev/null 2>&1\n"
-                       "       QTDIR=$QTDIR make >../conf.log 2>&1\n";
-               }
                str += ")\n\n";
 
                if(qt4) {
@@ -1089,26 +1037,6 @@
                        "       exit 1;\n"
                        "fi\n\n";
                }
-               else {
-                       str += QString(
-                       "if [ \"$?\" != \"0\" ]; then\n"
-                       "       %1\n"
-                       "       echo fail\n"
-                       "       echo\n"
-                       "       echo \"There was an error compiling 'conf'.  Be 
sure you have a proper\"\n"
-                       "       echo \"Qt 3.x Multithreaded (MT) build 
environment set up.  This\"\n"
-                       "       echo \"means not just Qt, but also a C++ 
compiler, the 'make' command,\"\n"
-                       "       echo \"and any other packages necessary to 
compile C++ programs.\"\n"
-                       "       echo \"See conf.log for details.\"\n"
-                       "       if [ ! -f \"$QTDIR/lib/libqt-mt.so.3\" ]; 
then\n"
-                       "               echo\n"
-                       "               echo \"One possible reason is that you 
don't have\"\n"
-                       "               echo \"libqt-mt.so.3 installed in 
$QTDIR/lib/.\"\n"
-                       "       fi\n"
-                       "       echo\n"
-                       "       exit 1;\n"
-                       "fi\n\n").arg(cleanup);
-               }
 
                if(qt4) {
                        str += QString("QC_COMMAND=$0\n");
@@ -1142,14 +1070,10 @@
                        "                       echo \"fail\"\n"
                        "               fi\n";
                }
-               else
-                       str += "                echo fail\n";
 
                str += "                echo\n";
                if(qt4)
                        str += "                echo \"Reason: Unexpected error 
launching 'conf'\"\n";
-               else
-                       str += "                echo \"Unexpected error 
launching 'conf'\"\n";
                str += "                echo\n";
                str += "                exit 1;\n";
                str += "        fi\n";
@@ -1172,7 +1096,7 @@
        {
                QString str;
                str += "# run qmake\n";
-               str += QString("$qm %1\n").arg(profile);
+               str += QString("\"$qm\" %1\n").arg(profile);
                str +=
                "if [ \"$?\" != \"0\" ]; then\n"
                "       echo\n"
@@ -1570,8 +1494,15 @@
 
        QDir confdir(confdirpath);
        if(!confdir.exists()) {
-               printf("qconf: %s does not exist.\n", 
qPrintable(confdir.path()));
-               return 1;
+#ifdef Q_OS_WIN
+               confdir = QDir(appdir + "/../share/qconf/conf");
+               if(!confdir.exists()) {
+#endif
+                       printf("qconf: %s does not exist.\n", 
qPrintable(confdir.absolutePath()));
+                       return 1;
+#ifdef Q_OS_WIN
+               }
+#endif
        }
 
        QFile f;


Reply via email to