On Nov 15, 2007, at 1:29 AM, Yvan Barthélemy wrote:
The point, is that I might do the include while coding. And in that case, I don't wan't to tweak build files myself, I would prefer that this being set automatically when I execute make (since I am working in a IDE, with only my sources visible)
That's fated to fail. Don't the use the autotools in this case.
Firther more, the script assumes, all Qt things are in a global Qt install directory, that's not the case in some distribution (eg. macports)The script assumes that qmake works. If qmake can use the Qt installation, AutoTroll ought to work. If it doesn't, you just found a bug, please send me a bug report :)Sometimes it could be a problem. For example, when the executable name is not qmake, but qmake-qt4, so qmake won't neither be in the path nor in known directories...
Applying the following quasi-trivial patch should fix this issue: From ffc50c5c8f4003079eac1b6ec4609b816d7c0666 Mon Sep 17 00:00:00 2001 From: sigoure <sigoure@f9a80dcf-8710-0410-9714-9a4fb6817a1c> Date: Thu, 15 Nov 2007 07:40:20 +0000 Subject: [PATCH] Search Qt harder. * build-aux/autotroll.m4: Look for common variations of the program names (e.g.: qmake-qt4) and make some variables precious (QT_PATH, QMAKE, MOC, UIC, RCC) so they are advertised in configure --help. Signed-off-by: Benoit Sigoure <tsuna@xxxxxxxxxxxxx> --- build-aux/autotroll.m4 | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build-aux/autotroll.m4 b/build-aux/autotroll.m4 index e7160b0..7eecbc0 100644 --- a/build-aux/autotroll.m4 +++ b/build-aux/autotroll.m4@@ -108,6 +108,7 @@ dnl Memo: AC_ARG_WITH(package, help-string, [if- given], [if-not-given])
[QT_PATH=$withval], [QT_PATH=]) # Find Qt. + AC_ARG_VAR([QT_PATH], [Path to the Qt installation]) if test -d /usr/local/Trolltech; then # Try to find the latest version.tmp_qt_paths=`echo /usr/local/Trolltech/*/bin | tr ' ' '\n' | sort -nr \ @@ -115,24 +116,31 @@ dnl Memo: AC_ARG_WITH(package, help-string, [if- given], [if-not-given])
fi # Find qmake.- AC_PATH_PROGS([QMAKE], [qmake], [missing], [$QT_DIR:$QT_PATH:$PATH: $tmp_qt_paths])
+ AC_ARG_VAR([QMAKE], [Qt Makefile generator command]) + AC_PATH_PROGS([QMAKE], [qmake qmake-qt4 qmake-qt3], [missing], + [$QT_DIR:$QT_PATH:$PATH:$tmp_qt_paths]) if test x"$QMAKE" = xmissing; thenAC_MSG_ERROR([Cannot find qmake in your PATH. Try using --with- qt.])
fi # Find moc (Meta Object Compiler).- AC_PATH_PROGS([MOC], [moc], [missing], [$QT_PATH:$PATH: $tmp_qt_paths])
+ AC_ARG_VAR([MOC], [Qt Meta Object Compiler command]) + AC_PATH_PROGS([MOC], [moc moc-qt4 moc-qt3], [missing], + [$QT_PATH:$PATH:$tmp_qt_paths]) if test x"$MOC" = xmissing; thenAC_MSG_ERROR([Cannot find moc (Meta Object Compiler) in your PATH. Try using --with-qt.])
fi # Find uic (User Interface Compiler).- AC_PATH_PROGS([UIC], [uic], [missing], [$QT_PATH:$PATH: $tmp_qt_paths])
+ AC_ARG_VAR([UIC], [Qt User Interface Compiler command]) + AC_PATH_PROGS([UIC], [uic uic-qt4 uic-qt3 uic3], [missing], + [$QT_PATH:$PATH:$tmp_qt_paths]) if test x"$UIC" = xmissing; thenAC_MSG_ERROR([Cannot find uic (User Interface Compiler) in your PATH. Try using --with-qt.])
fi # Find rcc (Qt Resource Compiler). + AC_ARG_VAR([RCC], [Qt Resource Compiler command]) AC_PATH_PROGS([RCC], [rcc], [false], [$QT_PATH:$PATH:$tmp_qt_paths]) if test x"$UIC" = xfalse; thenAC_MSG_WARN([Cannot find rcc (Qt Resource Compiler) in your PATH. Try using --with-qt.])
(sorry guys, I know this is off-topic WRT autoconf but I assume this ML can also be used as a `help channel' for autoconfers even though they use 3rd-party macros. Let me know if you think this thread ought to be continued somewhere else)
Cheers, -- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf