Hi there,

On Thu, Sep 01, 2011 at 06:25:04PM -0300, Ariel Constenla-Haile wrote:
> * enabling KDE 4, moc can't be found:
> 
> checking for Qt4 headers... /usr/include
> checking for Qt4 libraries... /usr/lib64
> checking for moc... no
> configure: error: Qt Meta Object Compiler not found.  Please specify
> the root of your Qt installation by exporting QT4DIR before running 
> "configure".
> 
> exporting QT4DIR=/usr/lib64/qt4 does not help. 
> Hard-coding MOC4="/usr/bin/moc-qt4" in configure allowed to move on until 
> next error:
> 
> checking for moc... /usr/bin/moc-qt4
> checking for KDE4 headers... no
> configure: error: KDE4 headers not found.  Please specify the root of your 
> KDE4 installation by exporting KDE4DIR before running "configure".
> 
> exporting KDE4DIR does not work, either. I didn't have time to look at these, 
> so I simply disabled kde4.

in qt4 the moc binary is named moc-qt4 in most linux distros I checked
(Fedora, OpenSuse, Ubuntu), configure should try first to look for this
executable, and only the for moc.

On Fedora and other distros KDE includes happen to be in /usr/include/kde4
and KDE libraries in /usr/lib[64]/kde4/devel

The attached patch allows Qt4/KDE4 detection (tested only in Fedora 15).

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina
diff --git a/configure.in b/configure.in
index 1c60441..0cd99d8 100644
--- a/configure.in
+++ b/configure.in
@@ -6466,12 +6466,12 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" 
; then
    qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
    qt_libdirs="$QT4LIB /usr/lib $x_libraries"
    
-   kde_incdirs="/usr/include $x_includes"
-   kde_libdirs="/usr/lib $x_libraries"
+   kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
+   kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
    
    if test "$build_cpu" = "x86_64" ; then
       qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
-      kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
+      kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 
/usr/lib64/kde4/devel"
    fi
 
    if test -n "$KDE4DIR" ; then
@@ -6518,10 +6518,13 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" 
; then
    fi
 
    dnl Check for Meta Object Compiler
-   AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
-   if test "$MOC4" = "no" ; then
-      AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
-the root of your Qt installation by exporting QT4DIR before running 
"configure".])
+   AC_PATH_PROG( MOCQT4, moc-qt4, no, [$QT4DIR/bin:$PATH] )
+   MOC4="$MOCQT4"
+   if test "SMOC4" = "no" ; then
+      AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
+      if test "$MOC4" = "no" ; then
+         AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify the 
root of your Qt installation by exporting QT4DIR before running "configure".])
+      fi
    fi
 
    dnl Check for KDE4 headers

Attachment: pgp7KgASlxUmp.pgp
Description: PGP signature

Reply via email to