dnl Process this file with autoconf to produce a configure script. AC_INIT(TuxMessenger, 2.0.13, taw27@srcf.ucam.org) dnl Version number VERSION=AC_PACKAGE_VERSION AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(tuxmessenger, "$VERSION") OLD_CFLAGS="$CFLAGS" AC_PROG_CC CFLAGS="$OLD_CFLAGS" AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h]) AC_C_CONST AC_FUNC_MALLOC AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_FUNC_STAT AC_FUNC_REALLOC AC_CHECK_FUNCS([gethostbyname memmove memset socket strdup strstr strcasecmp mkdir]) dnl Check for GTK+ 2.6.0 (prefered version, but not mandatory) AM_PATH_GTK_2_0(2.6.0,AC_DEFINE(HAVE_GTK_2_6_0, TRUE, [Have GTK 2.6.0?]),AC_MSG_WARN([ *** Didn't find GTK 2.6.0 or above - some (insignificant) features will be disabled...])) dnl Now check for GTK+ 2.4.0 (minimum acceptable version) dnl This has to be done after checking for 2.6.x in order to have the flags set up. AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR([ *** GTK+ 2.4.0 or above is required by TuxMessenger. Please make sure you have the GTK+ *** development files installed. The latest version of GTK+ is *** always available at http://www.gtk.org/.])) AM_PATH_XML2(2.5.0,,AC_MSG_ERROR([ *** Libxml is required to build TuxMessenger; Available at http://www.libxml.org/.])) dnl Check for OpenSSL AC_MSG_CHECKING([if openssl is available]) LIBS="$LIBS -lssl -lcrypto" AC_TRY_LINK([#include ], [ return OPENSSL_VERSION_NUMBER; ], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) AC_MSG_ERROR([*** Couldn't find OpenSSL ***]) ] ) dnl Check for GNOME-Canvas AC_MSG_CHECKING([for GNOME-Canvas]) CFLAGS="$CFLAGS `pkg-config --cflags libgnomecanvas-2.0`" LIBS="$LIBS `pkg-config --libs libgnomecanvas-2.0`" AC_TRY_LINK([#include ], , [ AC_MSG_RESULT(found) ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR([*** Couldn't find GNOME-Canvas ***]) ] ) AC_OUTPUT(Makefile src/Makefile data/Makefile)