Updated Changelog
[centerim/davrieb.git] / libgadu / configure.ac
blobf08a9fff87305d76a8c3ccb588040386ac1fab85
1 AC_INIT(aclocal.m4)
2 AM_INIT_AUTOMAKE(libgadu, 0.1)
4 AC_PROG_RANLIB
5 AC_PROG_CC
6 AC_PROG_CXX
8 AC_ARG_ENABLE(gg, [  --disable-gg   Build without Gadu-Gadu], build_gg="$enableval", build_gg="yes")
9 AM_CONDITIONAL(BUILD_GADU, test "x$build_gg" = xyes)
11 if test "$build_gg" = "yes"; then
12     if test -n "$with_ssl" -a x"$with_ssl" != xno; then
13         AC_DEFINE(HAVE_SSL)
14         if test -n "$with_openssl" -a x"$with_openssl" != xno; then
15             AC_DEFINE(HAVE_OPENSSL)
16         else
17             AC_MSG_RESULT([not found or disabled])
18             with_ssl="no"
20             AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [
21             AC_CHECK_LIB(lzo, lzo1x_1_compress, LZO_LIBS=-llzo)
22             if test "$LZO_LIBS" = ""; then
23              AC_CHECK_LIB(lzo2, lzo1x_1_compress, LZO_LIBS=-llzo2, [
24               AC_MSG_ERROR(
25 ***
26 *** Could not find liblzo or liblzo2.
29             fi
30                          CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS"
31                          LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra"
32                          AC_DEFINE(HAVE_GNUTLS, 1, [use gnutls])
33             with_ssl="yes"
34             ac_configure_args="$ac_configure_args --with-ssl"
35             ])
36         fi
37     fi
39     AC_MSG_CHECKING(endianness)
40     AC_TRY_COMPILE([
41         #include <sys/types.h>
42         #include <sys/param.h>
43     ], [
44         #if defined(BYTE_ORDER) && defined(BIG_ENDIAN)
45             #if BYTE_ORDER == BIG_ENDIAN
46                 bogus
47             #endif
48         #else
49             #if defined(_BIG_ENDIAN)
50                 bogus
51             #endif
52         #endif
53     ],[
54         ac_end=little
55     ],[
56         AC_DEFINE(WORDS_BIGENDIAN, [big endian architecture])
57         ac_end=big
58     ])
59     AC_MSG_RESULT($ac_end)
61     AC_CHECK_HEADERS([stdint.h sys/types.h],,)
64 AC_OUTPUT(Makefile)