AC_PROG_MAKE_SET
AC_PROG_CC
AM_PROG_LIBTOOL
+python=no
+mdw_PROG_PYTHON([2.3],
+ [python=yes
+ pyscripts='${PYTHONSCRIPTS}'
+ pymans='${PYTHONMANS}'])
+AC_SUBST([pyscripts]) AC_SUBST([pymans])
+
+if test $python = yes; then
+ mdw_CHECK_PYTHON([2.3])
+ AC_CACHE_CHECK([for pygtk], [mdw_cv_pygtk], [
+ mdw_cv_pygtk=no
+ python -c >&5 2>&5 '
+import pygtk
+pygtk.require("2.0")
+import gtk
+' && mdw_cv_pygtk=yes
+ ])
+ if test $mdw_cv_pygtk = yes; then
+ pygtkscripts='${PYGTKSCRIPTS}'
+ pygtkmans='${PYGTKMANS}'
+ fi
+fi
+AC_SUBST([pygtkscripts]) AC_SUBST([pygtkmans])
+
AC_CHECK_HEADERS([stdarg.h])
mdw_GCC_FLAGS([-Wall])
mdw_OPT_TRACE
[logfile=tripe.log])
DIRS=""
-ETHEREAL_CFLAGS=""
-ETHEREAL_PLUGIN_DIR="unknown"
-AC_ARG_WITH([ethereal],
-[ --with-ethereal build and install Ethereal plugin],
+WIRESHARK_CFLAGS=""
+WIRESHARK_PLUGIN_DIR="unknown"
+AC_ARG_WITH([wireshark],
+[ --with-wireshark build and install Wireshark plugin],
[case "$withval" in
- no) ethereal=false requireethereal=false;;
- yes) ethereal=true; requireethereal=true;;
- *) ethereal=true requireethereal=true ETHEREAL_PLUGIN_DIR=$withval;;
+ no) wireshark=false requirewireshark=false;;
+ yes) wireshark=true; requirewireshark=true;;
+ *) wireshark=true requirewireshark=true WIRESHARK_PLUGIN_DIR=$withval;;
esac],
-[ethereal=true requireethereal=false])
+[wireshark=true requirewireshark=false])
tun=auto
AC_ARG_WITH([tunnel],
mdw_MLIB(2.0.0)
mdw_CATACOMB(2.1.0, [CFLAGS="$CFLAGS $CATACOMB_CFLAGS"])
-if test "$ethereal" = true -a "$ETHEREAL_PLUGIN_DIR" = unknown; then
- AC_CACHE_CHECK([where to put Ethereal plugins],
- [mdw_cv_ethereal_plugin_dir], [
+if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
+ AC_CACHE_CHECK([where to put Wireshark plugins],
+ [mdw_cv_wireshark_plugin_dir], [
changequote(,)
- mdw_cv_ethereal_plugin_dir="failed"
- ethprefix=none
+ mdw_cv_wireshark_plugin_dir="failed"
+ wsprefix=none
for i in "${prefix}" /usr/local /usr `echo $PATH | tr : " "`; do
- if test -x "$i/bin/tethereal"; then
- ethprefix=$i
+ if test -x "$i/bin/tshark"; then
+ wsprefix=$i
break
fi
done
- if test "$ethprefix" != none; then
- ethbin=$ethprefix/bin/tethereal
- ethver=`$ethbin -v | sed 's/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q'`
- dir=$ethprefix/lib/ethereal/plugins/$ethver
+ if test "$wsprefix" != none; then
+ wsbin=$wsprefix/bin/tshark
+ wsver=`$wsbin -v | sed 's/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q'`
+ dir=$wsprefix/lib/wireshark/plugins/$wsver
if test -d "$dir"; then
- mdw_cv_ethereal_plugin_dir=$dir
+ mdw_cv_wireshark_plugin_dir=$dir
fi
fi
changequote([, ])
])
- case $mdw_cv_ethereal_plugin_dir in
- failed) ethereal=false;;
- *) ETHEREAL_PLUGIN_DIR=$mdw_cv_ethereal_plugin_dir;;
+ case $mdw_cv_wireshark_plugin_dir in
+ failed) wireshark=false;;
+ *) WIRESHARK_PLUGIN_DIR=$mdw_cv_wireshark_plugin_dir;;
esac
fi
-if test "$ethereal" = true; then
- AM_PATH_GLIB([1.2.0], [], ethereal=false, [gmodule])
+if test "$wireshark" = true; then
+ AM_PATH_GLIB([1.2.0], [], wireshark=false, [gmodule])
fi
-if test "$ethereal" = true; then
+if test "$wireshark" = true; then
bad=true
mdw_CFLAGS=$CFLAGS
- ethprefix=`echo $ETHEREAL_PLUGIN_DIR | sed 's:/lib/.*$::'`
- AC_CACHE_CHECK([how to find the Ethereal headers],
- [mdw_cv_ethereal_includes], [
- mdw_cv_ethereal_includes=failed
+ wsprefix=`echo $WIRESHARK_PLUGIN_DIR | sed 's:/lib/.*$::'`
+ AC_CACHE_CHECK([how to find the Wireshark headers],
+ [mdw_cv_wireshark_includes], [
+ mdw_cv_wireshark_includes=failed
for i in \
"" \
- "-I${ethprefix}/include/ethereal" \
- "-I${ethprefix}/include" \
- "-I${prefix}/include/ethereal" \
+ "-I${wsprefix}/include/wireshark" \
+ "-I${wsprefix}/include" \
+ "-I${prefix}/include/wireshark" \
"-I${prefix}/include" \
- "-I/usr/include/ethereal" \
- "-I/usr/local/include/ethereal" \
+ "-I/usr/include/wireshark" \
+ "-I/usr/local/include/wireshark" \
"-I/usr/local/include"; do
CFLAGS="$GLIB_CFLAGS $i"
AC_TRY_COMPILE([
#include <netinet/in.h>
#include <glib.h>
-#include <ethereal/config.h>
-#include <ethereal/epan/packet.h>
+#include <wireshark/config.h>
+#include <wireshark/epan/packet.h>
], [
dissector_handle_t dh;
dh = create_dissector_handle(0, 0);
], [bad=false; break])
done
if test $bad = false; then
- mdw_cv_ethereal_includes=$i
+ mdw_cv_wireshark_includes=$i
fi
CFLAGS=$mdw_CFLAGS
])
- case $mdw_cv_ethereal_plugin_dir in
- failed) ethereal=false;;
- *) ETHEREAL_PLUGIN_DIR=$mdw_cv_ethereal_plugin_dir;;
+ case $mdw_cv_wireshark_includes in
+ failed) wireshark=false;;
esac
fi
-if test "$ethereal" = true; then
- ETHEREAL_CFLAGS="$CFLAGS $GLIB_CFLAGS $mdw_cv_ethereal_includes"
- AC_SUBST(ETHEREAL_CFLAGS)
- AC_SUBST(ETHEREAL_PLUGIN_DIR)
- DIRS="$DIRS ethereal"
+if test "$wireshark" = true; then
+ WIRESHARK_CFLAGS="$CFLAGS $GLIB_CFLAGS $mdw_cv_wireshark_includes"
+ AC_SUBST(WIRESHARK_CFLAGS)
+ AC_SUBST(WIRESHARK_PLUGIN_DIR)
+ DIRS="$DIRS wireshark"
fi
-if test "$ethereal" = false -a "$requireethereal" = true; then
- AC_MSG_ERROR([failed to configure Ethereal plugin])
+if test "$wireshark" = false -a "$requirewireshark" = true; then
+ AC_MSG_ERROR([failed to configure Wireshark plugin])
fi
AH_TEMPLATE([CONFIGDIR],
AC_SUBST(initconfig)
])
AC_SUBST(DIRS)
-AC_OUTPUT(Makefile doc/Makefile ethereal/Makefile tripe-init)
+AC_OUTPUT( \
+ Makefile doc/Makefile wireshark/Makefile \
+ tripe-init tripe-keys tripemon)
dnl ----- That's all, folks -------------------------------------------------