configure.ac 1.64 KB
Newer Older
Mark Andrews's avatar
Mark Andrews committed
1
AC_INIT([DNS Compliance Tester], [1.0], [marka@isc.org], , [https://gitlab.isc.org/isc-projects/DNS-Compliance-Testing])
2 3 4 5 6
AM_INIT_AUTOMAKE([subdir-objects no-dist-gzip dist-xz -Wall -Werror])
AM_SILENT_RULES([yes])
AC_PROG_CC_C99
AC_CONFIG_SRCDIR([genreport.c])
AC_CONFIG_HEADER([config.h])
Mark Andrews's avatar
Mark Andrews committed
7
AC_CONFIG_FILES([Makefile])
8
AC_CANONICAL_HOST
Mark Andrews's avatar
Mark Andrews committed
9
AC_CHECK_FUNCS(strlcpy strlcat)
10 11 12
AC_SEARCH_LIBS([res_mkquery],[resolv bind])
AC_SEARCH_LIBS([res_9_mkquery],[resolv bind])
AC_SEARCH_LIBS([__res_mkquery],[resolv bind])
13
AC_CHECK_HEADERS(sys/types.h netinet/in.h arpa/nameser.h resolv.h)
Mark Andrews's avatar
Mark Andrews committed
14
AX_CHECK_OPENSSL
Mark Andrews's avatar
Mark Andrews committed
15 16 17
CFLAGS="$CFLAGS $OPENSSL_INCLUDES"
LIBS="$LIBS $OPENSSL_LIBS"
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
AC_MSG_CHECKING(for res_getservers)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
],
[
union res_sockaddr_union servers[10];
res_getservers(&_res, &servers, sizeof(servers)/sizeof(*servers));
],
[
AC_DEFINE([HAVE_RES_GETSERVERS], [1],
	 [Define to 1 if you have the `res_getservers' function.])
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)])
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
AC_MSG_CHECKING(for struct sockaddr_in.sin_len)
AC_TRY_COMPILE([
#include <sys/socket.h>
#include <netinet/in.h>
],
[
struct sockaddr_in sin;
sin.sin_len = 0;
],
[
AC_DEFINE([HAVE_SIN_LEN], [1],
	 [Define to 1 struct sockaddr_in has sin_len.])
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for struct sockaddr_in6.sin6_len)
AC_TRY_COMPILE([
#include <sys/socket.h>
#include <netinet/in.h>
],
[
struct sockaddr_in6 sin6;
sin6.sin6_len = 0;
],
[
AC_DEFINE([HAVE_SIN6_LEN], [1],
	 [Define to 1 struct sockaddr_in6 has sin6_len.])
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)])
Mark Andrews's avatar
Mark Andrews committed
65
AC_OUTPUT