dnl $Id: configure.ac,v 1.2 2008-01-24 21:53:15 adam Exp $ AC_PREREQ(2.60) AC_INIT([yaz-ziffy],[1.0],[yaz-help@indexdata.dk]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([1.9]) AC_PROG_CC AC_PROG_RANLIB AC_LANG(C) YAZ_INIT([static],[3.0.4]) if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi 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]) AC_CHECK_HEADERS([net/if.h netinet/in.h netinet/if_ether.h],[],[],[ #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NET_IF_H #include #endif #if HAVE_NETINET_IN_H #include #endif ]) dnl ------ libpcap AC_SUBST(PCAP_LIBS) AC_SUBST(PCAP_CFLAGS) AC_ARG_WITH(pcap, [ --with-pcap[=DIR] libpcap root dir located in (dir)], [PCAP_DIR="$withval"],[PCAP_DIR=default]) if test "${PCAP_DIR}" != "no"; then if test "${ac_cv_header_netinet_if_ether_h}" = "no"; then : elif test "${PCAP_DIR}" != "yes" && test "${PCAP_DIR}" != "default"; then PCAP_LIBS="-lpcap" if test "$PCAP_DIR" != "/usr"; then PCAP_LIBS="-L$PCAP_DIR $PCAP_LIBS" PCAP_CFLAGS="-I$PCAP_DIR" fi else oldLibs=$LIBS AC_CHECK_LIB([pcap], [main]) if test "$ac_cv_lib_pcap_main" = "yes"; then AC_CHECK_HEADER([pcap.h]) if test "$ac_cv_header_pcap_h" = "yes"; then PCAP_LIBS="-lpcap" fi fi LIBS=$oldLibs fi fi AC_MSG_CHECKING([for libpcap (required for ziffy)]) if test -z "${PCAP_LIBS}"; then AC_MSG_ERROR([not found]) else AC_MSG_RESULT([found in $PCAP_DIR]) fi dnl dnl ------ Makefiles dnl AC_OUTPUT([Makefile src/Makefile]) dnl Local Variables: dnl mode:shell-script dnl sh-indentation: 2 dnl sh-basic-offset: 4 dnl End: