-dnl Find the include directory. This would be much easier if they just
-dnl provided a pkg-config file.
-case "$haveshark" in
- yes)
- bad=yes
- mdw_CFLAGS=$CFLAGS
- wsprefix=`echo $wireshark_plugindir | 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${wsprefix}/include/wireshark" \
- "-I${wsprefix}/include" \
- "-I${prefix}/include/wireshark" \
- "-I${prefix}/include" \
- "-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 <wireshark/config.h>
-#include <wireshark/epan/packet.h>],
- [dissector_handle_t dh; dh = create_dissector_handle(0, 0);],
- [bad=no; break])
- done
- case "$bad" in
- no) mdw_cv_wireshark_includes=$i ;;
- esac
- CFLAGS=$mdw_CFLAGS
- ])
- case "$mdw_cv_wireshark_includes" in
- failed) haveshark=no ;;
- esac
-esac
-