Release 2017.1
[cascardo/rnetclient.git] / configure.ac
1 dnl Autoconf configure script for rnetclient.
2 dnl Copyright (C) 2013-2014  Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
3 dnl Copyright (C) 2014  Sergio Durigan Junior <sergiodj@sergiodj.net>
4 dnl
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
9 dnl
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 dnl GNU General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 dnl Run ./bootstrap.sh on the source directory in order to process this
19 dnl file.
20
21 dnl Initialization routines.
22 AC_INIT([rnetclient], [2017.1], [softwares-impostos@fsfla.org], [],
23         [http://wiki.libreplanetbr.org/rnetclient])
24 dnl If you update this auxiliary directory, remember to also update the
25 dnl value of $AUX_DIR in the 'bootstrap.sh' script.
26 AC_CONFIG_AUX_DIR([build-aux])
27 AM_INIT_AUTOMAKE
28
29 dnl Do we have a usable compiler and 'install'?
30 AC_PROG_CC
31 AC_PROG_INSTALL
32 AC_LANG_WERROR
33
34 dnl Checking for GNUTLS.
35 AC_SEARCH_LIBS([gnutls_init], [gnutls], [],
36         AC_MSG_ERROR([could not find gnutls]))
37
38 dnl Checking for libgcrypt.
39 AC_SEARCH_LIBS([gcry_cipher_open], [gcrypt], [],
40         AC_MSG_ERROR([could not find libgcrypt]))
41
42 dnl Checking for zlib.
43 AC_SEARCH_LIBS([zlibVersion], [z], [],
44         AC_MSG_ERROR([could not find zlib]))
45
46 dnl Setting useful flags.
47 CFLAGS="`pkg-config --cflags gnutls 2> /dev/null` \
48 `pkg-config --cflags zlib 2> /dev/null` \
49 -Wall -Werror -Wextra -Wunused -Wunused-variable \
50 $CFLAGS"
51
52 dnl Outputting the necessary files for the build.
53 AC_CONFIG_HEADERS([config.h])
54 AC_OUTPUT([Makefile]
55           [data/Makefile]
56           [doc/Makefile]
57           [doc/man/Makefile]
58           [doc/man/pt_BR/Makefile])