John Jetmore's -Mset patch.
[exim.git] / test / configure.ac
1 dnl $Cambridge: exim/test/configure.ac,v 1.1 2006/02/06 16:07:10 ph10 Exp $
2
3 dnl Process this file with autoconf to produce a configure script.
4
5 dnl This is required at the start; the name is the name of a file
6 dnl it should be seeing, to verify it is in the same directory.
7
8 AC_INIT(listtests)
9
10 dnl A safety precaution
11
12 AC_PREREQ(2.57)
13
14 dnl Checks for programs.
15
16 AC_PROG_CC
17
18 dnl Checks for header files.
19
20 AC_CHECK_HEADERS(openssl/crypto.h,[CLIENT_SSL=bin/client-ssl])
21 AC_CHECK_HEADERS(gnutls/gnutls.h,[CLIENT_GNUTLS=bin/client-gnutls])
22
23 dnl The check on dynamically loaded modules requires the building of
24 dnl something to load. This seems to be something that varies between
25 dnl systems and compilers something awful. Therefore, we enable it only
26 dnl for those systems and compilers that we know about.
27
28 dnl I tried using AC_CANONICAL_HOST, but it insisted on looking for an
29 dnl "install" script for some weird reason.
30
31 host_os=`uname -s`
32
33 case $CC-$host_os in
34 gcc-*linux* | gcc-*Linux* | gcc-*LINUX* | gcc-FreeBSD)
35 LOADED=bin/loaded
36 LOADED_OPT=-shared
37 echo "Using gcc on $host_os: will compile dynamically loaded module"
38 ;;
39 *)
40 LOADED=
41 echo "Will not compile dynamically loaded module: not known OS/CC combination"
42 ;;
43 esac
44
45 dnl "Export" these variables
46
47 AC_SUBST(CLIENT_SSL)
48 AC_SUBST(CLIENT_GNUTLS)
49 AC_SUBST(LOADED)
50 AC_SUBST(LOADED_OPT)
51
52 dnl This must be last; it determines what files are written
53
54 AC_OUTPUT(Makefile)