summaryrefslogtreecommitdiff
path: root/config/gr_python.m4
diff options
context:
space:
mode:
authorjcorgan2008-11-03 20:08:39 +0000
committerjcorgan2008-11-03 20:08:39 +0000
commit7ea75f891baabf0612f09e14353552bd33413dc8 (patch)
tree4d1471e49e3ea8d2189979920b41840849026c19 /config/gr_python.m4
parentfd5782d6940b262c3db553c6ba6afcf78954a4fa (diff)
downloadgnuradio-7ea75f891baabf0612f09e14353552bd33413dc8.tar.gz
gnuradio-7ea75f891baabf0612f09e14353552bd33413dc8.tar.bz2
gnuradio-7ea75f891baabf0612f09e14353552bd33413dc8.zip
Merged r9881:9917 from jcorgan/deb-wip into trunk. Updates Debian/Ubuntu packaging system to build trunk code on Ubuntu 8.10.
Several new trunk components still need debs created. Impact on non-packaging code: * Renamed libgr_audio_alsa.so to libgnuradio-audio-alsa.so * Renamed libusrp_inband.so to libusrp-inband.so * Added PYTHON_CHECK_MODULE to build system to simplify Python dependency verification Packaging code updates: * Updated build-depends and package dependencies to be current with trunk * Added package for libgruel and libgruel-dev * Renamed library packages to use simplified names, removing the 0 or 0c2a suffix. This may not follow Debian policy, but we can revisit this if we ever go into official Debian or Ubuntu. * Remove gr-comedi from packaging * Restructured sections to eliminate 'contrib'. Since we're not official Debian, we don't need to deal with the sdcc-nf issue. * Consolidated usrp firmware packages into corresponding main packages (same as previous). git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9918 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'config/gr_python.m4')
-rw-r--r--config/gr_python.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/config/gr_python.m4 b/config/gr_python.m4
index 6c862bba3..ea6df49c4 100644
--- a/config/gr_python.m4
+++ b/config/gr_python.m4
@@ -126,3 +126,29 @@ print path
AC_SUBST(PYTHON_LDFLAGS)
fi
])
+
+# PYTHON_CHECK_MODULE
+#
+# Determines if a particular Python module can be imported
+#
+# $1 - module name
+# $2 - module description
+# $3 - action if found
+# $4 - action if not found
+
+AC_DEFUN([PYTHON_CHECK_MODULE],[
+ AC_MSG_CHECKING([for $2])
+ python_cmd='import sys
+try:
+ import $1
+except:
+ sys.exit(1)'
+
+ if ! $PYTHON -c "$python_cmd" ; then
+ AC_MSG_RESULT([no])
+ $4
+ else
+ AC_MSG_RESULT([yes])
+ $3
+ fi
+])