[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9209 - gnuradio/branches/developers/trondeau/qtgui/co
From: |
trondeau |
Subject: |
[Commit-gnuradio] r9209 - gnuradio/branches/developers/trondeau/qtgui/config |
Date: |
Thu, 7 Aug 2008 22:00:10 -0600 (MDT) |
Author: trondeau
Date: 2008-08-07 22:00:09 -0600 (Thu, 07 Aug 2008)
New Revision: 9209
Added:
gnuradio/branches/developers/trondeau/qtgui/config/gr_qwtplot3d.m4
Modified:
gnuradio/branches/developers/trondeau/qtgui/config/gr_qwt.m4
gnuradio/branches/developers/trondeau/qtgui/config/grc_gr_qtgui.m4
Log:
M4 checks for QT and QWT libraries and headers
Modified: gnuradio/branches/developers/trondeau/qtgui/config/gr_qwt.m4
===================================================================
--- gnuradio/branches/developers/trondeau/qtgui/config/gr_qwt.m4
2008-08-08 03:51:51 UTC (rev 9208)
+++ gnuradio/branches/developers/trondeau/qtgui/config/gr_qwt.m4
2008-08-08 04:00:09 UTC (rev 9209)
@@ -1,5 +1,5 @@
dnl
-dnl Copyright 2007 Free Software Foundation, Inc.
+dnl Copyright 2007,2008 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -29,12 +29,17 @@
AC_DEFUN([GR_QWT],
[
+ dnl QWT Library Version
+ QWT_LIBRARY=-lqwt-qt4
+ QWT_INCLUDE_DIR=/usr/include/qwt-qt4
+
dnl Save the environment
AC_LANG_PUSH(C++)
qwt_save_CPPFLAGS="$CPPFLAGS"
qwt_save_LIBS="$LIBS"
libqwt_ok=yes
+ dnl QWT Info
dnl Allow user to specify where QWT files are
AC_ARG_WITH([qwt-libdir],
[ --with-qwt-libdir=path Prefix where QWT library is
installed (optional)],
@@ -42,17 +47,17 @@
AC_ARG_WITH([qwt-incdir],
[ --with-qwt-incdir=path Prefix where QWT include files are
(optional)],
- [qwt_incdir="$withval"], [qwt_incdir=""])
+ [qwt_incdir="$withval"], [qwt_incdir=$QWT_INCLUDE_DIR])
dnl Create QWT_CFLAGS based on user input
AC_MSG_CHECKING(QWT_CFLAGS)
if test "$qwt_incdir" != "" ; then
QWT_CFLAGS="$QWT_CFLAGS -I$qwt_incdir"
fi
- AC_MSG_RESULT($QWT_CFLAGS)
+ #AC_MSG_RESULT($QWT_CFLAGS)
dnl Set CPPFLAGS so C++ tests can operate
- CPPFLAGS="$CPPFLAGS $QT_CFLAGS $QWT_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $QTCORE_CFLAGS $QTGUI_CFLAGS $QWT_CFLAGS"
dnl Check for presence of header files
AC_CHECK_HEADERS([qwt.h],
@@ -62,7 +67,7 @@
dnl Set QWT_LIBS based on user input
AC_MSG_CHECKING(QWT_LIBS)
- QWT_LIBS="$QWT_LIBS -lqwt"
+ QWT_LIBS="$QWT_LIBS $QWT_LIBRARY"
if test "$qwt_libdir" != "" ; then
QWT_LIBS="-L$qwt_libdir $QWT_LIBS"
fi
Added: gnuradio/branches/developers/trondeau/qtgui/config/gr_qwtplot3d.m4
===================================================================
--- gnuradio/branches/developers/trondeau/qtgui/config/gr_qwtplot3d.m4
(rev 0)
+++ gnuradio/branches/developers/trondeau/qtgui/config/gr_qwtplot3d.m4
2008-08-08 04:00:09 UTC (rev 9209)
@@ -0,0 +1,101 @@
+dnl
+dnl Copyright 2008 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+dnl
+
+dnl Configure paths for library qwtplot3d.
+dnl
+dnl GR_QWTPLOT3D([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+dnl Test for library qwtplot3d, set QWTPLOT3D_CFLAGS and QWTPLOT3D_LIBS if
found. Assumes
+dnl QT_CFLAGS and QT_LIBS have already been correctly set.
+dnl
+
+AC_DEFUN([GR_QWTPLOT3D],
+[
+ dnl QWTPLOT3D Library Version
+ QWTPLOT3D_LIBRARY=-lqwtplot3d-qt4
+ QWTPLOT3D_INCLUDE_DIR=/usr/include/qwtplot3d-qt4
+
+ dnl Save the environment
+ AC_LANG_PUSH(C++)
+ qwtplot3d_save_CPPFLAGS="$CPPFLAGS"
+ qwtplot3d_save_LIBS="$LIBS"
+ libqwtplot3d_ok=yes
+
+ dnl Allow user to specify where QWTPLOT3D files are
+ AC_ARG_WITH([qwtplot3d-libdir],
+ [ --with-qwtplot3d-libdir=path Prefix where QWTPLOT3D library
is installed (optional)],
+ [qwtplot3d_libdir="$withval"], [qwtplot3d_libdir=""])
+
+ AC_ARG_WITH([qwtplot3d-incdir],
+ [ --with-qwtplot3d-incdir=path Prefix where QWTPLOT3D include
files are (optional)],
+ [qwtplot3d_incdir="$withval"],
[qwtplot3d_incdir=$QWTPLOT3D_INCLUDE_DIR])
+
+ dnl Create QWTPLOT3D_CFLAGS based on user input
+ AC_MSG_CHECKING(QWTPLOT3D_CFLAGS)
+ if test "$qwtplot3d_incdir" != "" ; then
+ QWTPLOT3D_CFLAGS="$QWTPLOT3D_CFLAGS -I$qwtplot3d_incdir"
+ fi
+ AC_MSG_RESULT($QWTPLOT3D_CFLAGS)
+
+ dnl Set CPPFLAGS so C++ tests can operate
+ CPPFLAGS="$CPPFLAGS $QTCORE_CFLAGS $QTGUI_CFLAGS $QWT_CFLAGS
$QWTPLOT3D_CFLAGS"
+
+ dnl Check for presence of header files
+ AC_CHECK_HEADERS([qwt3d_plot.h],
+ [],
+ [libqwtplot3d_ok=no;AC_MSG_RESULT([cannot find usable
qwtplot3d headers])]
+ )
+
+ dnl Set QWTPLOT3D_LIBS based on user input
+ AC_MSG_CHECKING(QWTPLOT3D_LIBS)
+ QWTPLOT3D_LIBS="$QWTPLOT3D_LIBS $QWTPLOT3D_LIBRARY"
+ if test "$qwtplot3d_libdir" != "" ; then
+ QWTPLOT3D_LIBS="-L$qwtplot3d_libdir $QWTPLOT3D_LIBS"
+ fi
+ AC_MSG_RESULT($QWTPLOT3D_LIBS)
+
+ dnl Set LIBS so C++ link test can operate
+ LIBS="$QWTPLOT3D_LIBS $QT_LIBS $LIBS"
+
+ dnl Check that library files can be linked in
+ AC_CHECK_LIB([qwtplot3d],
+ [main],
+ [], [libqwtplot3d_ok=no;AC_MSG_RESULT([unable to link
QWTPLOT3D library])]
+ )
+
+ dnl Restore saved variables
+ LIBS="$qwtplot3d_save_LIBS"
+ CPPFLAGS="$qwtplot3d_save_CPPFLAGS"
+ AC_LANG_POP
+
+ dnl Execute user actions
+ if test "x$libqwtplot3d_ok" = "xyes" ; then
+ ifelse([$1], , :, [$1])
+ else
+ QWTPLOT3D_CFLAGS=""
+ QWTPLOT3D_LIBDIRS=""
+ ifelse([$2], , :, [$2])
+ fi
+
+ dnl Export our variables
+ AC_SUBST(QWTPLOT3D_CFLAGS)
+ AC_SUBST(QWTPLOT3D_LIBS)
+])
Modified: gnuradio/branches/developers/trondeau/qtgui/config/grc_gr_qtgui.m4
===================================================================
--- gnuradio/branches/developers/trondeau/qtgui/config/grc_gr_qtgui.m4
2008-08-08 03:51:51 UTC (rev 9208)
+++ gnuradio/branches/developers/trondeau/qtgui/config/grc_gr_qtgui.m4
2008-08-08 04:00:09 UTC (rev 9209)
@@ -27,15 +27,33 @@
dnl with : if the --with code didn't error out
dnl yes : if the --enable code passed muster and all dependencies are
met
dnl no : otherwise
- #if test $passed = yes; then
- dnl Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS
- # PKG_CHECK_MODULES(QT, qt >= 3.3, [], [
- # PKG_CHECK_MODULES(QT, qt-mt >= 3.3, [],
- # [passed=no;AC_MSG_RESULT([gr-qtgui requires libqt or libqt-mt,
neither found.])])])
+
+# Check for:
+# GLU
+# GL
+# QtOpenGL
+# QtGui
+# QtCore
+# qwt
+# qwtplot3d
+# qt4
+
+# qt4-core, qt4-gui, qwt5-qt4, qwt5-qt4-dev, libqwtplot3d-qt4,
libqwtplot3d-qt4-dev, qt4-dev-tools
+
+ if test $passed = yes; then
+ dnl Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS
+ PKG_CHECK_MODULES(QTCORE, QtCore >= 4.3.4, [],
+ [passed=no; AC_MSG_RESULT([gr-qtgui requires libQtCore.])])
+ PKG_CHECK_MODULES(QTGUI, QtGui >= 4.3.4, [],
+ [passed=no; AC_MSG_RESULT([gr-qtgui requires libQtGui.])])
+ AC_CHECK_LIB(GL, main, [],
+ [passed=no; AC_MSG_RESULT([gr-qtgui requires libGL.])])
+
dnl Fetch QWT variables
- #GR_QWT([], [passed=no])
- #fi
+ GR_QWT([], [passed=no])
+ GR_QWTPLOT3D([], [passed=no])
+ fi
AC_CONFIG_FILES([ \
gr-qtgui/Makefile \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9209 - gnuradio/branches/developers/trondeau/qtgui/config,
trondeau <=