view mcabber/connwrap/configure.in @ 824:37ef269330f0

Show incomplete subscriptions in the roster When the "from" subscription is missing, curly braces are used. When the "to" subscription is missing, the status is replaced by '?'. Thanks to pmw for the suggestion.
author Mikael Berthe <mikael@lilotux.net>
date Tue, 25 Apr 2006 07:13:43 +0200
parents bf3d6e241714
children
line wrap: on
line source

AC_INIT(aclocal.m4)
AM_INIT_AUTOMAKE(connwrap, 0.1)

AC_PROG_RANLIB

AC_PROG_CC
AC_PROG_CXX

###
###     SSL libs
###

AC_ARG_WITH(ssl, [  --with-ssl              enable SSL secured connections using either OpenSSL
			  or GnuTLS],
	[with_ssl=$withval])

if test "$with_ssl" != "no"; then
    AC_ARG_WITH(openssl,
	[  --with-openssl=[DIR]    enable SSL secured connections using the OpenSSL
			  library in DIR (optional)],
	[with_openssl=$withval])

    if test -z "$with_openssl"; then
	for ac_dir in /usr/local /usr; do
	    if test -f "$ac_dir/include/openssl/ssl.h"; then
		with_openssl=$ac_dir
		break;
	    fi
	done
    fi

    AC_MSG_CHECKING(for OpenSSL)

    if test -n "$with_openssl" -a "$with_openssl" != "no"; then
	if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi
	CFLAGS="$CFLAGS -I${with_openssl}"
	AC_DEFINE(HAVE_OPENSSL)
	AC_MSG_RESULT([found in $with_openssl])
	AC_CHECK_LIB(crypto, main, [
		AC_CHECK_LIB(crypto, SSLeay_add_all_algorithms, [
		    AC_DEFINE(HAVE_SSLEAY)
		])
	    ])
	AC_CHECK_LIB(ssl, main)
    else
	AC_MSG_RESULT([not found or disabled])

	AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [
	    CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS"
	    LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra"
	    AC_DEFINE(HAVE_GNUTLS)
	])
    fi
fi

AC_MSG_CHECKING(for inet_aton() presence)

AC_TRY_LINK([

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

], [

struct in_addr inp;
inet_aton("address", &inp);

], have_aton=yes, have_aton=no)

if test "$have_aton" = "yes"; then
    AC_DEFINE(HAVE_INET_ATON)
    AC_MSG_RESULT(yes)
else
    AC_MSG_RESULT(no)
fi

AC_OUTPUT(Makefile)