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.11], [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.
36 AM_MISSING_PROG(PERL, perl, $missing_dir)
37 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
39 # Checks for header files.
40 AC_CHECK_HEADERS(sys/types.h sys/poll.h sys/time.h sys/select.h sys/socket.h)
41 AC_CHECK_HEADERS(unistd.h netdb.h netinet/in.h pwd.h errno.h)
43 # Checks for library functions.
44 AC_SEARCH_LIBS(socket, socket)
45 AC_CHECK_FUNCS(getpwuid)
47 # Allow disabling of obsolete stuff.
48 AC_ARG_ENABLE(obsolete,
49 AS_HELP_STRING([--disable-obsolete], [disable backwards compatibility code]),
51 if test "$obsolete" = "no"; then
52 AC_DEFINE(GSASL_NO_OBSOLETE, 1,
53 [Define to 1 if you don't want backwards compatibility code.])
57 AC_MSG_CHECKING([if backwards compatibility code should be present])
58 AC_MSG_RESULT($obsolete)
59 AM_CONDITIONAL(OBSOLETE, test "$obsolete" = "yes")
63 AS_HELP_STRING([--without-gnutls], [disable GnuTLS support]),
64 gnutls=$withval, gnutls=yes)
65 if test "$gnutls" != "no"; then
66 AC_LIB_HAVE_LINKFLAGS(gnutls,, [#include <gnutls/gnutls.h>],
67 [gnutls_certificate_verify_peers2 (0, 0);])
69 if test "$ac_cv_libgnutls" != yes; then
71 AC_MSG_WARN([GnuTLS not found. STARTTLS support disabled.])
73 AC_MSG_CHECKING([if STARTTLS support via GnuTLS should be built])
74 AC_MSG_RESULT($gnutls)
76 # For gnulib stuff in gl/.
83 AC_CONFIG_SUBDIRS(lib)
86 AC_CONFIG_FILES(Makefile po/Makefile.in \
87 doc/Makefile doc/reference/Makefile doc/doxygen/Doxyfile \
88 gl/Makefile src/Makefile examples/Makefile tests/Makefile)