1 dnl Process this file with autoconf to produce a configure script.
3 # Copyright (C) 2002, 2003, 2004, 2005, 2006 Simon Josefsson.
5 # This file is part of GNU SASL.
7 # GNU SASL is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # GNU SASL is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU SASL; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 AC_INIT([gsasl], [0.2.13], [bug-gsasl@gnu.org])
24 AM_INIT_AUTOMAKE([1.9 gnits])
25 AC_CONFIG_HEADERS(config.h)
28 # Internationalization.
29 AM_GNU_GETTEXT(external)
30 AM_GNU_GETTEXT_VERSION(0.14.1)
32 # Checks for programs.
37 AM_MISSING_PROG(PERL, perl, $missing_dir)
38 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
40 # Checks for header files.
41 AC_CHECK_HEADERS(sys/poll.h sys/time.h)
42 AC_CHECK_HEADERS(netdb.h netinet/in.h pwd.h errno.h)
44 # Checks for library functions.
45 AC_SEARCH_LIBS(socket, socket)
46 AC_CHECK_FUNCS(getpwuid)
48 # Allow disabling of obsolete stuff.
49 AC_ARG_ENABLE(obsolete,
50 AS_HELP_STRING([--disable-obsolete], [disable backwards compatibility code]),
52 if test "$obsolete" = "no"; then
53 AC_DEFINE(GSASL_NO_OBSOLETE, 1,
54 [Define to 1 if you don't want backwards compatibility code.])
58 AC_MSG_CHECKING([if backwards compatibility code should be present])
59 AC_MSG_RESULT($obsolete)
60 AM_CONDITIONAL(OBSOLETE, test "$obsolete" = "yes")
64 AS_HELP_STRING([--without-gnutls], [disable GnuTLS support]),
65 gnutls=$withval, gnutls=yes)
66 if test "$gnutls" != "no"; then
67 AC_LIB_HAVE_LINKFLAGS(gnutls,, [#include <gnutls/gnutls.h>],
68 [gnutls_certificate_verify_peers2 (0, 0);])
70 if test "$ac_cv_libgnutls" != yes; then
72 AC_MSG_WARN([GnuTLS not found. STARTTLS support disabled.])
74 AC_MSG_CHECKING([if STARTTLS support via GnuTLS should be built])
75 AC_MSG_RESULT($gnutls)
77 # For gnulib stuff in gl/.
84 AC_CONFIG_SUBDIRS(lib)
86 # Run self-tests under valgrind?
87 if test "$cross_compiling" = no; then
88 AC_CHECK_PROGS(VALGRIND, valgrind)
90 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
91 opt_valgrind_tests=yes
96 AC_MSG_CHECKING([whether self tests are run under valgrind])
97 AC_ARG_ENABLE(valgrind-tests,
98 AS_HELP_STRING([--enable-valgrind-tests],
99 [run self tests under valgrind]),
100 opt_valgrind_tests=$enableval)
101 AC_MSG_RESULT($opt_valgrind_tests)
104 AC_CONFIG_FILES(Makefile po/Makefile.in \
105 doc/Makefile doc/reference/Makefile doc/doxygen/Doxyfile \
106 gl/Makefile src/Makefile examples/Makefile tests/Makefile)