1 dnl Process this file with autoconf to produce a configure script.
3 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 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.
22 AC_INIT([gsasl], [0.2.17], [bug-gsasl@gnu.org])
23 AC_CONFIG_AUX_DIR([build-aux])
25 AM_INIT_AUTOMAKE([1.10 gnits])
26 AC_CONFIG_HEADERS(config.h)
29 # Internationalization.
30 AM_GNU_GETTEXT(external)
31 AM_GNU_GETTEXT_VERSION(0.16.1)
33 # Checks for programs.
38 AM_MISSING_PROG(PERL, perl, $missing_dir)
39 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
40 AM_MISSING_PROG(DIA, dia, $missing_dir)
41 AM_MISSING_PROG(EPSTOPDF, epstopdf, $missing_dir)
43 # Checks for header files.
44 AC_CHECK_HEADERS(sys/poll.h sys/time.h)
45 AC_CHECK_HEADERS(netdb.h netinet/in.h pwd.h errno.h)
47 # Checks for library functions.
48 AC_SEARCH_LIBS(socket, socket)
49 AC_CHECK_FUNCS(getpwuid)
51 # Allow disabling of obsolete stuff.
52 AC_ARG_ENABLE(obsolete,
53 AS_HELP_STRING([--disable-obsolete], [disable backwards compatibility code]),
55 if test "$obsolete" = "no"; then
56 AC_DEFINE(GSASL_NO_OBSOLETE, 1,
57 [Define to 1 if you don't want backwards compatibility code.])
61 AC_MSG_CHECKING([if backwards compatibility code should be present])
62 AC_MSG_RESULT($obsolete)
63 AM_CONDITIONAL(OBSOLETE, test "$obsolete" = "yes")
67 AS_HELP_STRING([--without-gnutls], [disable GnuTLS support]),
68 gnutls=$withval, gnutls=yes)
69 if test "$gnutls" != "no"; then
70 AC_LIB_HAVE_LINKFLAGS(gnutls,, [#include <gnutls/gnutls.h>],
71 [gnutls_certificate_verify_peers2 (0, 0);])
73 if test "$ac_cv_libgnutls" != yes; then
75 AC_MSG_WARN([GnuTLS not found. STARTTLS support disabled.])
77 AC_MSG_CHECKING([if STARTTLS support via GnuTLS should be built])
78 AC_MSG_RESULT($gnutls)
80 # For gnulib stuff in gl/.
87 AC_CONFIG_SUBDIRS(lib)
89 # Run self-tests under valgrind?
90 if test "$cross_compiling" = no; then
91 AC_CHECK_PROGS(VALGRIND, valgrind)
93 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
94 opt_valgrind_tests=yes
99 AC_MSG_CHECKING([whether self tests are run under valgrind])
100 AC_ARG_ENABLE(valgrind-tests,
101 AS_HELP_STRING([--enable-valgrind-tests],
102 [run self tests under valgrind]),
103 opt_valgrind_tests=$enableval)
104 AC_MSG_RESULT($opt_valgrind_tests)
107 AC_CONFIG_FILES(Makefile po/Makefile.in \
108 doc/Makefile doc/reference/Makefile doc/doxygen/Doxyfile \
109 gl/Makefile src/Makefile examples/Makefile tests/Makefile)