dnl configure.ac: this file is processed by autoconf to produce ./configure. AC_PREREQ(2.59) sinclude(../eggmod.m4) AC_INIT([Eggdrop DNS Module],[1.8.0],[bugs@eggheads.org]) AC_CONFIG_SRCDIR(coredns.c) AC_CONFIG_AUX_DIR(../../../misc) AC_COPYRIGHT([Copyright (C) 1999 - 2016 Eggheads Development Team]) AC_REVISION([m4_esyscmd([../../../misc/getcommit])]) dns_reslib_avail="false" AC_HEADER_RESOLV for lib in '' -lresolv -lbind -lsocket do LIBS="$lib" AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_NETINET_IN_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_ARPA_NAMESER_H # include /* DNS HEADER struct */ #endif #ifdef HAVE_NETDB_H # include #endif #include ], [ res_init(); res_mkquery(0, NULL, 0, 0, NULL, 0, NULL, NULL, 0); ; return 0; ]) ], [ RESLIB="$lib" dns_reslib_avail="true" break ]) done AC_MSG_CHECKING([for a working resolver library]) if test "$dns_reslib_avail" = "true"; then AC_MSG_RESULT([yes ($LIBS)]) else AC_MSG_RESULT(no) # Cygwin checks. case $host_os in *cygwin* ) AC_MSG_CHECKING([for /usr/local/bind/lib/libbind.a]) if test -r /usr/local/bind/lib/libbind.a; then AC_MSG_RESULT([yes]) RESLIB="${RESLIB} -L/usr/local/bind/lib -lbind" RESINCLUDE="-I/usr/local/bind/include" dns_reslib_avail="true" else AC_MSG_RESULT([no]) fi ;; esac fi if test "${dns_reslib_avail}" = "false"; then cat >&2 <