diff options
author | Sebastien Tandel <sebastien@tandel.be> | 2009-05-29 21:10:40 +0000 |
---|---|---|
committer | Sebastien Tandel <sebastien@tandel.be> | 2009-05-29 21:10:40 +0000 |
commit | 52cc5fb1e86ac8007eabe1291bf543d3803f7148 (patch) | |
tree | 0ee2757e438e9d9db9dd0ddab19f0e84f3f29f03 /acinclude.m4 | |
parent | cb4f0a40c23a3247fbb74a74dc117cbef4f83bf4 (diff) | |
download | wireshark-52cc5fb1e86ac8007eabe1291bf543d3803f7148.tar.gz wireshark-52cc5fb1e86ac8007eabe1291bf543d3803f7148.tar.bz2 wireshark-52cc5fb1e86ac8007eabe1291bf543d3803f7148.zip |
python binding for wireshark (first commit)
* ability to write dissectors with python for wireshark.
documentation (http://wiki.wireshark.org/Python)
svn path=/trunk/; revision=28529
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 3f3aa32812..5136b73de0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1597,4 +1597,57 @@ AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK], LIBS="$ac_save_LIBS" ]) - +# +# AC_WIRESHARK_PYTHON_CHECK +# +# Check whether python devel package is present +# +AC_DEFUN([AC_WIRESHARK_PYTHON_CHECK], + [ + # + # Checking whether we have a python devel environment available + # +# AC_CACHE_CHECK([checking python devel package], ac_cv_wireshark_python_devel, +# [ + AC_CHECK_PROG([ac_ws_python_config], [python-config], "yes", "no") + if test ac_ws_python_config = "no"; then + ac_cv_wireshark_python_devel = "no" + else + AC_MSG_CHECKING([python devel]) + ac_save_ws_cflags=$CFLAGS + ac_save_ws_libs=$LIBS + CFLAGS=$(python-config --includes) + LIBS=$(python-config --ldflags) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM( + [[#include <Python.h>]], + [[Py_Initialiaze();]] + ) + ], + [ + # + # Compilation successful, we have python devel available + # + ac_cv_wireshark_python_devel=yes + PY_LIBS=$LIBS + PY_CFLAGS=$CFLAGS + AC_SUBST(PY_LIBS) + AC_SUBST(PY_CFLAGS) + CFLAGS="$ac_save_ws_cflags" + LIBS="$ac_save_ws_libs" + AC_DEFINE(HAVE_PYTHON, 1, [Define if python devel package available]) + AC_MSG_RESULT([yes]) + ], + [ + # + # Compilation unsuccessful, python devel not available + # + ac_cv_wireshark_python_devel=no + CFLAGS=$ac_save_ws_cflags + LIBS=$ac_save_ws_libs + AC_MSG_RESULT([no]) + ]) + fi +# ]) +]) |