1 dnl $Id: configure.ac,v 1.2 2008-01-24 21:53:15 adam Exp $
4 AC_INIT([yaz-ziffy],[1.0],[yaz-help@indexdata.dk])
6 AC_CONFIG_SRCDIR([configure.ac])
7 AC_CONFIG_AUX_DIR([config])
10 AM_INIT_AUTOMAKE([1.9])
17 YAZ_INIT([static],[3.0.4])
18 if test -z "$YAZLIB"; then
19 AC_MSG_ERROR([YAZ development libraries missing])
21 AC_CHECK_HEADERS([unistd.h sys/select.h sys/socket.h sys/stat.h sys/time.h sys/times.h sys/types.h arpa/inet.h netinet/tcp.h netinet/in_systm.h])
22 AC_CHECK_HEADERS([net/if.h netinet/in.h netinet/if_ether.h],[],[],[
24 #include <sys/types.h>
27 #include <sys/socket.h>
33 #include <netinet/in.h>
40 AC_ARG_WITH(pcap, [ --with-pcap[=DIR] libpcap root dir located in (dir)], [PCAP_DIR="$withval"],[PCAP_DIR=default])
42 if test "${PCAP_DIR}" != "no"; then
43 if test "${ac_cv_header_netinet_if_ether_h}" = "no"; then
45 elif test "${PCAP_DIR}" != "yes" && test "${PCAP_DIR}" != "default"; then
47 if test "$PCAP_DIR" != "/usr"; then
48 PCAP_LIBS="-L$PCAP_DIR $PCAP_LIBS"
49 PCAP_CFLAGS="-I$PCAP_DIR"
53 AC_CHECK_LIB([pcap], [main])
54 if test "$ac_cv_lib_pcap_main" = "yes"; then
55 AC_CHECK_HEADER([pcap.h])
56 if test "$ac_cv_header_pcap_h" = "yes"; then
63 AC_MSG_CHECKING([for libpcap (required for ziffy)])
64 if test -z "${PCAP_LIBS}"; then
65 AC_MSG_ERROR([not found])
67 AC_MSG_RESULT([found in $PCAP_DIR])
73 AC_OUTPUT([Makefile src/Makefile])
78 dnl sh-basic-offset: 4