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.15], [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)
39 AM_MISSING_PROG(DIA, dia, $missing_dir)
40 AM_MISSING_PROG(EPSTOPDF, epstopdf, $missing_dir)
42 # Checks for header files.
43 AC_CHECK_HEADERS(sys/poll.h sys/time.h)
44 AC_CHECK_HEADERS(netdb.h netinet/in.h pwd.h errno.h)
46 # Checks for library functions.
47 AC_SEARCH_LIBS(socket, socket)
48 AC_CHECK_FUNCS(getpwuid)
50 # Allow disabling of obsolete stuff.
51 AC_ARG_ENABLE(obsolete,
52 AS_HELP_STRING([--disable-obsolete], [disable backwards compatibility code]),
54 if test "$obsolete" = "no"; then
55 AC_DEFINE(GSASL_NO_OBSOLETE, 1,
56 [Define to 1 if you don't want backwards compatibility code.])
60 AC_MSG_CHECKING([if backwards compatibility code should be present])
61 AC_MSG_RESULT($obsolete)
62 AM_CONDITIONAL(OBSOLETE, test "$obsolete" = "yes")
66 AS_HELP_STRING([--without-gnutls], [disable GnuTLS support]),
67 gnutls=$withval, gnutls=yes)
68 if test "$gnutls" != "no"; then
69 AC_LIB_HAVE_LINKFLAGS(gnutls,, [#include <gnutls/gnutls.h>],
70 [gnutls_certificate_verify_peers2 (0, 0);])
72 if test "$ac_cv_libgnutls" != yes; then
74 AC_MSG_WARN([GnuTLS not found. STARTTLS support disabled.])
76 AC_MSG_CHECKING([if STARTTLS support via GnuTLS should be built])
77 AC_MSG_RESULT($gnutls)
79 # For gnulib stuff in gl/.
86 AC_CONFIG_SUBDIRS(lib)
88 # Run self-tests under valgrind?
89 if test "$cross_compiling" = no; then
90 AC_CHECK_PROGS(VALGRIND, valgrind)
92 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
93 opt_valgrind_tests=yes
98 AC_MSG_CHECKING([whether self tests are run under valgrind])
99 AC_ARG_ENABLE(valgrind-tests,
100 AS_HELP_STRING([--enable-valgrind-tests],
101 [run self tests under valgrind]),
102 opt_valgrind_tests=$enableval)
103 AC_MSG_RESULT($opt_valgrind_tests)
106 AC_CONFIG_FILES(Makefile po/Makefile.in \
107 doc/Makefile doc/reference/Makefile doc/doxygen/Doxyfile \
108 gl/Makefile src/Makefile examples/Makefile tests/Makefile)