Include extra compiler flags
[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], [2014.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 and libgcrypt.
35 PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.0, , AC_MSG_ERROR(Could not find gnutls))
36 AM_PATH_LIBGCRYPT(,,AC_MSG_ERROR(Could not find gcrypt))
37
38 dnl Setting useful flags.
39 LIBS="$LIBGCRYPT_LIBS $GNUTLS_LIBS $LIBS -lz"
40 CFLAGS="$LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS \
41         -Wall -Werror -Wextra -Wunused -Wunused-variable \
42         $CFLAGS"
43
44 dnl Outputting the necessary files for the build.
45 AC_CONFIG_HEADERS([config.h])
46 AC_OUTPUT(Makefile)