1 dnl Process this file with autoconf to produce a configure script.
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.
8 dnl A safety precaution
12 dnl Checks for programs.
16 dnl Checks for header files.
18 AC_CHECK_HEADERS(openssl/crypto.h,[CLIENT_SSL=bin/client-ssl])
19 AC_CHECK_HEADERS(gnutls/gnutls.h,[CLIENT_GNUTLS=bin/client-gnutls])
21 dnl The check on dynamically loaded modules requires the building of
22 dnl something to load. This seems to be something that varies between
23 dnl systems and compilers something awful. Therefore, we enable it only
24 dnl for those systems and compilers that we know about.
26 dnl I tried using AC_CANONICAL_HOST, but it insisted on looking for an
27 dnl "install" script for some weird reason.
32 gcc-*linux* | gcc-*Linux* | gcc-*LINUX* | gcc-FreeBSD)
34 LOADED_OPT="-shared -fPIC"
35 echo "Using gcc on $host_os: will compile dynamically loaded module"
39 echo "Will not compile dynamically loaded module: not known OS/CC combination"
43 dnl At least one operating system needs BIND_8_COMPAT to be defined.
47 BIND_8_COMPAT=-DBIND_8_COMPAT
51 dnl Solaris requires additional libraries for networking functions.
53 AC_SEARCH_LIBS([inet_addr], [nsl])
54 AC_SEARCH_LIBS([connect], [socket])
55 AC_SEARCH_LIBS([inet_pton], [nsl socket resolv])
56 AC_SEARCH_LIBS([inet_ntop], [nsl socket resolv])
58 dnl "Export" these variables
60 AC_SUBST(BIND_8_COMPAT)
62 AC_SUBST(CLIENT_GNUTLS)
67 dnl This must be last; it determines what files are written