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