diff options
author | Jason Abele <jason@ettus.com> | 2010-07-29 14:57:09 -0700 |
---|---|---|
committer | Jason Abele <jason@ettus.com> | 2010-07-29 16:07:12 -0700 |
commit | b128f6e083deadf39c51a9ab1c2623bdab0a0c02 (patch) | |
tree | 1908afbbfa3baf15f42ba4589319f7990ec6abc2 | |
parent | 1620ab8499a7854ff1248a94782a800fb016d1f2 (diff) |
Fixes ./configure to allow grc to build without an X session
Presently, a ./configure in a terminal with no X $DISPLAY will
fail to build grc because import gtk fails with RuntimeError
exception.
This patch fixes this by catching just the ImportError and
AssertionErrors we need for python module dependencies.
-rw-r--r-- | config/gr_python.m4 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/gr_python.m4 b/config/gr_python.m4 index 43ccfc0157..7aef1662e0 100644 --- a/config/gr_python.m4 +++ b/config/gr_python.m4 @@ -153,14 +153,16 @@ AC_DEFUN([PYTHON_CHECK_MODULE],[ try: import $1 assert $5 -except: exit(1)' +except ImportError, AssertionError: exit(1) +except: pass' dnl ######################################## dnl # import checking only dnl ######################################## else python_cmd=' try: import $1 -except: exit(1)' +except ImportError: exit(1) +except: pass' fi if ! $PYTHON -c "$python_cmd" 2> /dev/null; then AC_MSG_RESULT([no]) |