Support header for 2016.
[cascardo/rnetclient.git] / configure.ac
index a9cce1f..03d2e92 100644 (file)
@@ -19,7 +19,7 @@ dnl Run ./bootstrap.sh on the source directory in order to process this
 dnl file.
 
 dnl Initialization routines.
-AC_INIT([rnetclient], [2014.1], [softwares-impostos@fsfla.org], [],
+AC_INIT([rnetclient], [2015.1], [softwares-impostos@fsfla.org], [],
        [http://wiki.libreplanetbr.org/rnetclient])
 dnl If you update this auxiliary directory, remember to also update the
 dnl value of $AUX_DIR in the 'bootstrap.sh' script.
@@ -29,15 +29,29 @@ AM_INIT_AUTOMAKE
 dnl Do we have a usable compiler and 'install'?
 AC_PROG_CC
 AC_PROG_INSTALL
+AC_LANG_WERROR
 
-dnl Checking for GNUTLS and libgcrypt.
-PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.0, , AC_MSG_ERROR(Could not find gnutls))
-AM_PATH_LIBGCRYPT(,,AC_MSG_ERROR(Could not find gcrypt))
+dnl Checking for GNUTLS.
+AC_SEARCH_LIBS([gnutls_init], [gnutls],        [],
+       AC_MSG_ERROR([could not find gnutls]))
+
+dnl Checking for libgcrypt.
+AC_SEARCH_LIBS([gcry_cipher_open], [gcrypt], [],
+       AC_MSG_ERROR([could not find libgcrypt]))
+
+dnl Checking for zlib.
+AC_SEARCH_LIBS([zlibVersion], [z], [],
+       AC_MSG_ERROR([could not find zlib]))
 
 dnl Setting useful flags.
-LIBS="$LIBGCRYPT_LIBS $GNUTLS_LIBS $LIBS -lz"
-CFLAGS="$LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS $CFLAGS"
+CFLAGS="`pkg-config --cflags gnutls 2> /dev/null` \
+`pkg-config --cflags zlib 2> /dev/null` \
+-Wall -Werror -Wextra -Wunused -Wunused-variable \
+$CFLAGS"
 
 dnl Outputting the necessary files for the build.
 AC_CONFIG_HEADERS([config.h])
-AC_OUTPUT(Makefile)
+AC_OUTPUT([Makefile]
+         [doc/Makefile]
+         [doc/man/Makefile]
+         [doc/man/pt_BR/Makefile])