--- /dev/null
+AM_CFLAGS=-I$(top_srcdir)
+
+avahiincludedir=$(includedir)/avahi-qt
+
+lib_LTLIBRARIES =
+BUILT_SOURCES =
+
+if HAVE_QT3
+
+avahiinclude_HEADERS = \
+ qt-watch.h
+
+lib_LTLIBRARIES += \
+ libavahi-qt3.la
+
+BUILT_SOURCES += qt-watch.moc3
+
+libavahi_qt3_la_SOURCES = \
+ qt-watch.cpp
+
+qt-watch.moc3:
+ $(MOC_QT3) qt-watch.cpp > $@
+
+
+libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS)
+libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS)
+libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info 0:1:0
+
+endif
+
+
+if HAVE_QT4
+
+avahiinclude_HEADERS = \
+ qt-watch.h
+
+lib_LTLIBRARIES += \
+ libavahi-qt4.la
+
+BUILT_SOURCES += qt-watch.moc4
+
+libavahi_qt4_la_SOURCES = \
+ qt-watch.cpp
+
+qt-watch.moc4:
+ $(MOC_QT4) qt-watch.cpp > $@
+
+
+libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4
+libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS)
+libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info 0:1:0
+
+endif
\ No newline at end of file
static AvahiPoll qt_poll;
-const AvahiPoll* avahi_qt_poll_get()
+const AvahiPoll* avahi_qt_poll_get(void)
{
qt_poll.userdata=0;
qt_poll.watch_new = q_watch_new;
return &qt_poll;
}
-#include "qt-watch.moc"
+#ifdef QT4
+#include "qt-watch.moc4"
+#else
+#include "qt-watch.moc3"
+#endif
fi
AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
+#
+# Check for Qt 3
+#
+AC_ARG_ENABLE(qt3,
+ AS_HELP_STRING([--disable-qt3],[Disable building of Qt3 mainloop integration]),
+ [case "${enableval}" in
+ yes) HAVE_QT3=yes ;;
+ no) HAVE_QT3=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt3) ;;
+ esac],
+ [HAVE_QT3=yes])
+
+if test "x$HAVE_QT3" = "xyes" ; then
+ PKG_CHECK_MODULES( QT3, [ qt-mt >= 3.0.0 ], [
+ AC_SUBST(QT3_CFLAGS)
+ AC_SUBST(QT3_LIBS)
+ QT3_PREFIX="`$PKG_CONFIG --variable=prefix qt-mt`/bin"
+ MOC_QT3="no"
+ AC_CHECK_FILE( "$QT3_PREFIX/moc-qt3", [ MOC_QT3=$QT3_PREFIX/moc-qt3 ], [
+ AC_CHECK_FILE("$QT3_PREFIX/moc", [ MOC_QT3=$QT3_PREFIX/moc ], [ HAVE_QT3=no ] )
+ ] )
+ AC_SUBST(MOC_QT3)
+ ], [ HAVE_QT3=no ] )
+fi
+AM_CONDITIONAL(HAVE_QT3, test "x$HAVE_QT3" = "xyes")
+
+#
+# Check for Qt 4
+#
+AC_ARG_ENABLE(qt4,
+ AS_HELP_STRING([--disable-qt4],[Disable building of Qt4Core mainloop integration]),
+ [case "${enableval}" in
+ yes) HAVE_QT4=yes ;;
+ no) HAVE_QT4=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt4) ;;
+ esac],
+ [HAVE_QT4=yes])
+
+if test "x$HAVE_QT4" = "xyes" ; then
+ PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ], [
+ AC_SUBST(QT4_CFLAGS)
+ AC_SUBST(QT4_LIBS)
+ QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
+ MOC_QT4="no"
+ AC_CHECK_FILE( "$QT4_PREFIX/moc-qt4", [ MOC_QT4=$QT4_PREFIX/moc-qt4 ], [
+ AC_CHECK_FILE("$QT4_PREFIX/moc", [ MOC_QT4=$QT4_PREFIX/moc ], [ HAVE_QT4=no ] )
+ ] )
+ AC_SUBST(MOC_QT4)
+ ], [ HAVE_QT4=no ] )
+fi
+AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
+
+
#
# Check for GTK+
#
avahi-common/Makefile
avahi-core/Makefile
avahi-glib/Makefile
+avahi-qt/Makefile
avahi-daemon/Makefile
avahi-daemon/avahi-dbus.conf
avahi-discover-standalone/Makefile