Bump versions.
[gsasl.git] / configure.ac
blob8112f7c5deecb62bc4a23eaffec6ca1994697da0
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 # This program 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 3 of the License, or
10 # (at your option) any later version.
12 # This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
20 AC_PREREQ(2.61)
21 AC_INIT([gsasl], [0.2.21], [bug-gsasl@gnu.org])
22 AC_CONFIG_AUX_DIR([build-aux])
24 AM_INIT_AUTOMAKE([1.10 gnits])
25 AC_CONFIG_HEADERS(config.h)
26 AB_INIT
28 # Internationalization.
29 AM_GNU_GETTEXT(external)
30 AM_GNU_GETTEXT_VERSION(0.16.1)
32 # Checks for programs.
33 AC_PROG_CC
34 gl_EARLY
35 AC_LIBTOOL_WIN32_DLL
36 AC_PROG_LIBTOOL
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]),
53     obsolete=$enableval)
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.])
57 else
58   obsolete=yes
60 AC_MSG_CHECKING([if backwards compatibility code should be present])
61 AC_MSG_RESULT($obsolete)
62 AM_CONDITIONAL(OBSOLETE, test "$obsolete" = "yes")
64 # Check for gnutls
65 AC_ARG_WITH(gnutls,
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
73   gnutls=no
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/.
80 gl_INIT
82 # Check for gtk-doc.
83 GTK_DOC_CHECK(1.1)
85 # Set up the library.
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
94 else
95   opt_valgrind_tests=no
96   VALGRIND=
97 fi 
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)
105 # We are done.
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)
109 AC_OUTPUT