summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrondeau2008-11-09 17:00:34 +0000
committertrondeau2008-11-09 17:00:34 +0000
commit47edb16f8e956fb652947dd79628ce4ec22b4aba (patch)
treedd1616a99ba36c3b324e72d7102de246ac787130
parent72206b4aabe2bde24ba8320b310fceaa9a2bef57 (diff)
downloadgnuradio-47edb16f8e956fb652947dd79628ce4ec22b4aba.tar.gz
gnuradio-47edb16f8e956fb652947dd79628ce4ec22b4aba.tar.bz2
gnuradio-47edb16f8e956fb652947dd79628ce4ec22b4aba.zip
Merged r9946:9957 from trondeau/qt into trunk. make distcheck works on F9, Ubuntu 8.04 and 8.10 with and without qt libraries.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9958 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--config/grc_gr_qtgui.m46
-rw-r--r--gr-qtgui/src/lib/Makefile.am37
2 files changed, 28 insertions, 15 deletions
diff --git a/config/grc_gr_qtgui.m4 b/config/grc_gr_qtgui.m4
index 4a717c658..54bdb2d3b 100644
--- a/config/grc_gr_qtgui.m4
+++ b/config/grc_gr_qtgui.m4
@@ -78,6 +78,12 @@ AC_DEFUN([GRC_GR_QTGUI],[
AC_SUBST(QT_UIC_EXEC)
fi
+ if test "$passed" = "no"; then
+ AM_CONDITIONAL(BUILD_QT, false)
+ else
+ AM_CONDITIONAL(BUILD_QT, true)
+ fi
+
AC_CONFIG_FILES([ \
gr-qtgui/Makefile \
gr-qtgui/src/Makefile \
diff --git a/gr-qtgui/src/lib/Makefile.am b/gr-qtgui/src/lib/Makefile.am
index 928d960dd..913b2bd81 100644
--- a/gr-qtgui/src/lib/Makefile.am
+++ b/gr-qtgui/src/lib/Makefile.am
@@ -21,9 +21,6 @@
include $(top_srcdir)/Makefile.common
-#SUBDIRS=qtspectrum
-#DIST_SUBDIRS=qtspectrum
-
# Install this stuff so that it ends up as the gnuradio.qtgui module
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio/qtgui
@@ -51,15 +48,24 @@ LOCAL_IFILES = \
# The second is the python wrapper that loads the shared library
# and knows how to call our extensions.
-BUILT_SOURCES = \
- qtgui.cc \
- qtgui.py \
+# Only include these files in the build if qtgui passes configure checks
+# This is mostly to help make distcheck pass
+if BUILD_QT
+QMAKE_SOURCES = \
spectrumdisplayform_moc.cc \
FrequencyDisplayPlot_moc.cc \
TimeDomainDisplayPlot_moc.cc \
WaterfallDisplayPlot_moc.cc \
Waterfall3DDisplayPlot_moc.cc \
- spectrumdisplayform_ui.h
+ spectrumdisplayform_ui.h
+endif
+
+EXTRA_DIST = spectrumdisplayform.ui
+
+BUILT_SOURCES = \
+ qtgui.cc \
+ qtgui.py \
+ $(QMAKE_SOURCES)
# This gets qtgui.py installed in the right place
ourpython_PYTHON = \
@@ -82,12 +88,7 @@ libqtgui_la_SOURCES = \
SpectrumGUIClass.cc \
spectrumUpdateEvents.cc \
plot_waterfall.cc \
- spectrumdisplayform.ui \
- spectrumdisplayform_moc.cc \
- FrequencyDisplayPlot_moc.cc \
- TimeDomainDisplayPlot_moc.cc \
- WaterfallDisplayPlot_moc.cc \
- Waterfall3DDisplayPlot_moc.cc \
+ $(QMAKE_SOURCES) \
qtgui_sink_c.cc \
qtgui_sink_f.cc
@@ -111,11 +112,19 @@ grinclude_HEADERS = \
qtgui_sink_c.h \
qtgui_sink_f.h
+if BUILD_QT
%_moc.cc : %.h
$(QT_MOC_EXEC) -DQT_SHARED -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB $< -o $@
%_ui.h : %.ui
$(QT_UIC_EXEC) $< -o $@
+else
+%_moc.cc : %.h
+ touch $@
+
+%_ui.h : %.ui
+ touch $@
+endif
# magic flags
_qtgui_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
@@ -144,8 +153,6 @@ swiginclude_HEADERS = \
MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
-#EXTRA_DIST=qtspectrum/GNUmakefile
-
# Don't distribute output of swig
dist-hook:
@for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done