aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 1d79f645fe424465edc7f2bfca6895cd4fc9f98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
AC_PREREQ(2.63)
AC_INIT([mockmta],[1.1],[gray@gnu.org.ua],[],[https://puszcza.gnu.org.ua/projects/mockmta])
AC_CONFIG_SRCDIR(mockmta.c)
AM_INIT_AUTOMAKE([1.15 foreign tar-ustar])
AC_USE_SYSTEM_EXTENSIONS  
AC_PROG_CC
AC_PROG_CC_C99
if test "$ac_cv_prog_cc_c99" = no; then
  AC_MSG_ERROR([A C99 compiler is required])
fi
AC_CHECK_HEADERS([paths.h])
AC_CHECK_LIB(rt, clock_gettime)
AX_PTHREAD([],
 [AC_MSG_ERROR([POSIX threads support is required, but not available])])

#
# GnuTLS
# 
gnutls_status=probe
AC_ARG_WITH([gnutls],
 [AC_HELP_STRING([--with-gnutls],
                 [use the GNU TLS library (default)])],
 [case "$withval" in
  yes|no) gnutls_status=$withval;;
  *) AC_MSG_ERROR([bad value for --with-gnutls])
  esac])

if test $gnutls_status != no; then
  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.3.0],
    [gnutls_status=yes],
    [gnutls_status=no])
fi
if test $gnutls_status = yes; then
  AC_DEFINE([WITH_TLS], [1], [Define if GNUTLS support is enabled])
fi  

AC_SUBST([LIBGNUTLS_CFLAGS])
AC_SUBST([LIBGNUTLS_LIBS])

#
# TCP wrappers
#
# **********************
# TCP wrappers
# **********************
AC_ARG_WITH(tcp-wrappers,
        AC_HELP_STRING([--with-tcp-wrappers],
                       [compile with TCP wrappers support (default)]),
        [status_tcpwrap=${withval}],
        [status_tcpwrap=yes])

if test "$status_tcpwrap" = yes; then
  AC_CHECK_LIB(nsl, main)
  AC_CHECK_LIB(wrap, main,, [status_tcpwrap=no])
  if test "$status_tcpwrap" = yes; then
    AC_CHECK_HEADERS(tcpd.h,,[status_tcpwrap=no])
  fi
fi
if test "$status_tcpwrap" = yes; then
  AC_DEFINE([WITH_LIBWRAP],1,[Defined if compiling with libwrap])
fi

AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.