[PATCH] select the right moc binary during configure
Sjoerd Simons
sjoerd at luon.net
Sun Dec 4 13:37:24 PST 2005
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
--
What does not destroy me, makes me stronger.
-- Nietzsche
-------------- next part --------------
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)
More information about the dbus
mailing list