[PATCH] select the right moc binary during configure

Robert McQueen robert.mcqueen at collabora.co.uk
Tue Dec 13 12:49:02 PST 2005


Sjoerd Simons wrote:
> Hi,
> 
>   To be able to build both the qt4 and qt3 bindings on one system, it needs to
>   be possible to indicate which moc to use for each one. Attached patch
>   implements this.
> 
>   Sjoerd

Thanks Sjoerd. I've run into this problem, this patch looks a reasonable
solution. Anyone got any objections if I commit?

Regards,
Rob

> ------------------------------------------------------------------------
> 
> Index: configure.in
> ===================================================================
> RCS file: /cvs/dbus/dbus/configure.in,v
> retrieving revision 1.140
> diff -u -r1.140 configure.in
> --- configure.in	22 Nov 2005 20:42:49 -0000	1.140
> +++ configure.in	4 Dec 2005 21:31:14 -0000
> @@ -47,7 +47,9 @@
>  AC_HEADER_STDC
>  
>  AC_ARG_ENABLE(qt,               [  --enable-qt           enable Qt-friendly client library],enable_qt=$enableval,enable_qt=auto)
> +AC_ARG_WITH(qt_moc,             [  --with-qt-moc=<path> moc for Qt])
>  AC_ARG_ENABLE(qt3,              [  --enable-qt3          enable Qt3-friendly client library],enable_qt3=$enableval,enable_qt3=no)
> +AC_ARG_WITH(qt3_moc,            [  --with-qt3-moc=<path> moc for Qt3])
>  AC_ARG_ENABLE(glib,             [  --enable-glib         enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto)
>  AC_ARG_ENABLE(gtk,              [  --enable-gtk          enable GTK-requiring executables],enable_gtk=$enableval,enable_gtk=auto)
>  AC_ARG_ENABLE(tests,            [  --enable-tests        enable unit test code],enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
> @@ -932,7 +934,12 @@
>  
>  
>  dnl Qt3 detection
> -AC_PATH_PROG(QT3_MOC, moc, no)
> +if test -z "$with_qt3_moc" ; then 
> +  AC_PATH_PROG(QT3_MOC, moc, no)
> +else
> +  QT3_MOC=$with_qt3_moc
> +  AC_SUBST(QT3_MOC)
> +fi
>  
>  have_qt3=no
>  AC_MSG_CHECKING([for qglobal.h])
> @@ -992,8 +999,12 @@
>     have_qt=no;
>  fi
>  
> -QT_MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`
> -QT_MOC=${QT_MOC}/bin/moc
> +if test -z "$with_qt_moc" ; then 
> +  QT_MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`
> +  QT_MOC=${QT_MOC}/bin/moc
> +else
> +  QT_MOC=$with_qt_moc
> +fi
>  
>  AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus



More information about the dbus mailing list