aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-06-13 23:41:36 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-06-13 23:43:13 +0300
commit73dde99f2e9a2d402178aa6234e15d8c6d7cbb33 (patch)
tree53dc92cd2bd21d3f449b879c91d5d0ab8fe5c111 /configure.ac
parentda4f9073102fdbddc78acca0329de6740eb32064 (diff)
downloadmockmta-73dde99f2e9a2d402178aa6234e15d8c6d7cbb33.tar.gz
mockmta-73dde99f2e9a2d402178aa6234e15d8c6d7cbb33.tar.bz2
Use autotools
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 37 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..3fee77f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,37 @@
+AC_PREREQ(2.63)
+AC_INIT([mockmta],[1.0],[gray@gnu.org.ua])
+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_LIB(rt, clock_gettime)
+AX_PTHREAD([],
+ [AC_MSG_ERROR([POSIX threads support is required, but not available])])
+
+gnutls_status=probe
+AC_ARG_WITH([gnutls],
+ [AC_HELP_STRING([--without-gnutls],
+ [do not use the GNU TLS library])],
+ [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])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.