Use libtasn1 v2.4.
[gnutls.git] / lib / configure.ac
blob01178b7fae3f33ce3ca52eef15e0bc999ff1e659
1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 # 2009, 2010 Free Software Foundation, Inc.
5 # Author: Nikos Mavrogiannopoulos, Simon Josefsson
7 # This file is part of GNUTLS.
9 # The GNUTLS library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public License
11 # as published by the Free Software Foundation; either version 2.1 of
12 # the License, or (at your option) any later version.
14 # The GNUTLS library is distributed in the hope that it will be
15 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty
16 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with the GNUTLS library; if not, write to the Free
21 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 # MA 02110-1301, USA
24 AC_PREREQ(2.61)
25 AC_INIT([libgnutls], [2.9.10], [bug-gnutls@gnu.org])
26 AC_CONFIG_AUX_DIR([build-aux])
27 AC_CONFIG_MACRO_DIR([m4])
29 AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
30 AM_CONFIG_HEADER(config.h)
32 AC_PROG_CC
33 lgl_EARLY
35 AC_LIBTOOL_WIN32_DLL
36 AC_PROG_LIBTOOL
38 LIBGNUTLS_HOOKS
40 AM_GNU_GETTEXT([external])
41 AM_GNU_GETTEXT_VERSION([0.17])
43 AC_C_BIGENDIAN
45 # For includes/gnutls/gnutls.h.in.
46 AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
47 AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
48 AC_SUBST(PATCH_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\..*\.\(.*\)/\1/g'`)
49 AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`)
50 AC_CHECK_TYPE(ssize_t,
51   [
52     DEFINE_SSIZE_T="#include <sys/types.h>"
53     AC_SUBST(DEFINE_SSIZE_T)
54   ], [
55     AC_DEFINE(NO_SSIZE_T, 1, [no ssize_t type was found])
56     DEFINE_SSIZE_T="typedef int ssize_t;"
57     AC_SUBST(DEFINE_SSIZE_T)
58   ], [
59     #include <sys/types.h>
60   ])
62 # For minitasn1.
63 AC_CHECK_SIZEOF(unsigned long int, 4)
64 AC_CHECK_SIZEOF(unsigned int, 4)
66 AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
67                                  [disable zlib compression support]),
68             ac_zlib=$withval, ac_zlib=yes)
69 AC_MSG_CHECKING([whether to include zlib compression support])
70 if test x$ac_zlib != xno; then
71  AC_MSG_RESULT(yes)
72  AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
73  if test "$ac_cv_libz" != yes; then
74    AC_MSG_WARN(
75 *** 
76 *** ZLIB was not found. You will not be able to use ZLIB compression.)
77  fi
78 else
79  AC_MSG_RESULT(no)
82 lgl_INIT
84 LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
85 LIBGNUTLS_CFLAGS="-I${includedir}"
86 AC_SUBST(LIBGNUTLS_LIBS)
87 AC_SUBST(LIBGNUTLS_CFLAGS)
89 # Finish things from ../configure.ac.
90 AC_SUBST([WERROR_CFLAGS])
91 AC_SUBST([WSTACK_CFLAGS])
92 AC_SUBST([WARN_CFLAGS])
93 AC_PROG_CXX
94 AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
96 AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.])
98 AC_CONFIG_FILES([
99   Makefile
100   gnutls.pc
101   gl/Makefile
102   gl/tests/Makefile
103   includes/Makefile
104   includes/gnutls/gnutls.h
105   minitasn1/Makefile
106   opencdk/Makefile
107   openpgp/Makefile
108   po/Makefile.in
109   x509/Makefile
111 AC_OUTPUT