Debug: more info for string-expansion troubles
[exim.git] / test / configure.ac
... / ...
CommitLineData
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(sys/socket.h)
19AC_CHECK_HEADERS(openssl/crypto.h,[CLIENT_SSL=bin/client-ssl])
20AC_CHECK_HEADERS(gnutls/gnutls.h,[CLIENT_GNUTLS=bin/client-gnutls])
21
22dnl The check on dynamically loaded modules requires the building of
23dnl something to load. This seems to be something that varies between
24dnl systems and compilers something awful. Therefore, we enable it only
25dnl for those systems and compilers that we know about.
26
27dnl I tried using AC_CANONICAL_HOST, but it insisted on looking for an
28dnl "install" script for some weird reason.
29
30host_os=`uname -s`
31
32case $CC-$host_os in
33 gcc-*linux* | gcc-*Linux* | gcc-*LINUX* | gcc-FreeBSD)
34 LOADED=bin/loaded
35 LOADED_OPT="-shared -fPIC"
36 echo "Using gcc on $host_os: will compile dynamically loaded module"
37 ;;
38 *)
39 LOADED=
40 echo "Will not compile dynamically loaded module: not known OS/CC combination"
41 ;;
42esac
43
44dnl At least one operating system needs BIND_8_COMPAT to be defined.
45
46case $host_os in
47 Darwin)
48 BIND_8_COMPAT=-DBIND_8_COMPAT
49 ;;
50esac
51
52dnl Solaris requires additional libraries for networking functions.
53
54AC_SEARCH_LIBS([inet_addr], [nsl])
55AC_SEARCH_LIBS([connect], [socket])
56AC_SEARCH_LIBS([inet_pton], [nsl socket resolv])
57AC_SEARCH_LIBS([inet_ntop], [nsl socket resolv])
58
59dnl "Export" these variables
60
61AC_SUBST(BIND_8_COMPAT)
62AC_SUBST(CLIENT_SSL)
63AC_SUBST(CLIENT_GNUTLS)
64AC_SUBST(LOADED)
65AC_SUBST(LOADED_OPT)
66AC_SUBST(LIBS)
67
68dnl This must be last; it determines what files are written
69
70AC_OUTPUT(Makefile)