Debug: indent DNS ops
[exim.git] / test / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl This is required at the start; the name is the name of a file
4 dnl it should be seeing, to verify it is in the same directory.
5
6 AC_INIT
7 AC_CONFIG_SRCDIR([listtests])
8
9 dnl A safety precaution
10
11 AC_PREREQ([2.71])
12
13 dnl Checks for programs.
14
15 AC_PROG_CC
16
17 dnl Checks for header files.
18
19 AC_CHECK_HEADERS(sys/socket.h)
20 AC_CHECK_HEADERS(openssl/crypto.h,[CLIENT_OPENSSL=bin/client-ssl])
21 AC_CHECK_HEADERS(openssl/crypto.h,[CLIENT_ANYTLS=bin/client-anytls])
22 AC_CHECK_HEADERS(gnutls/gnutls.h,[CLIENT_GNUTLS=bin/client-gnutls])
23 AC_CHECK_HEADERS(gnutls/gnutls.h,[CLIENT_ANYTLS=bin/client-anytls])
24 AC_CHECK_HEADERS(gnutls/gnutls.h,[B64_GNUTLS=bin/ed25519_privkey_pem_to_pubkey_raw_b64])
25
26 dnl The check on dynamically loaded modules requires the building of
27 dnl something to load. This seems to be something that varies between
28 dnl systems and compilers something awful. Therefore, we enable it only
29 dnl for those systems and compilers that we know about.
30
31 dnl I tried using AC_CANONICAL_HOST, but it insisted on looking for an
32 dnl "install" script for some weird reason.
33
34 host_os=`uname -s`
35
36 case $CC-$host_os in
37   gcc-*linux* | gcc-*Linux* | gcc-*LINUX* | gcc-FreeBSD | gcc-*SunOS* | cc-*SunOS* )
38     LOADED=bin/loaded
39     LOADED_OPT="-shared -fPIC"
40     echo "Using gcc on $host_os: will compile dynamically loaded module"
41     ;;
42   *)
43     LOADED=
44     echo "Will not compile dynamically loaded module: not known OS/CC combination"
45     ;;
46 esac
47
48 dnl At least one operating system needs BIND_8_COMPAT to be defined.
49
50 case $host_os in
51   Darwin)
52     BIND_8_COMPAT=-DBIND_8_COMPAT
53     ;;
54 esac
55
56 dnl Solaris requires additional libraries for networking functions.
57
58 AC_SEARCH_LIBS([inet_addr], [nsl])
59 AC_SEARCH_LIBS([connect], [socket])
60 AC_SEARCH_LIBS([inet_pton], [nsl socket resolv])
61 AC_SEARCH_LIBS([inet_ntop], [nsl socket resolv])
62
63 AC_CHECK_FUNCS_ONCE(getaddrinfo)
64
65 dnl "Export" these variables
66
67 AC_SUBST(BIND_8_COMPAT)
68 AC_SUBST(CLIENT_OPENSSL)
69 AC_SUBST(CLIENT_GNUTLS)
70 AC_SUBST(CLIENT_ANYTLS)
71 AC_SUBST(B64_GNUTLS)
72 AC_SUBST(LOADED)
73 AC_SUBST(LOADED_OPT)
74 AC_SUBST(LIBS)
75
76 dnl This must be last; it determines what files are written
77
78 AC_CONFIG_FILES([Makefile])
79 AC_OUTPUT