Never tell the truth to people who are not worthy of it.
- Mark Twain
AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET
if test "x${with_gnome}" = xyes
then
GNOME_PACKAGES="gtk+-2.0 libgnome-2.0 libgnomeui-2.0 pango"
elif test "x${with_gtk}" = xyes
then
GNOME_PACKAGES="gtk+-2.0"
else
GNOME_PACKAGES=""
fi
for pkg in $GNOME_PACKAGES
do
AC_MSG_CHECKING([version of $pkg])
if gnomevers=`pkg-config --modversion $pkg`
then
AC_MSG_RESULT($gnomevers)
else
AC_MSG_ERROR([$pkg was not found by pkg-config])
fi
done
GNOME_CFLAGS=-g AC_SUBST(GNOME_CFLAGS)
AC_MSG_NOTICE([Adding gcc options: $CFLAGS])
AC_TRY_COMPILE([ #ifdef HAVE_SYS_MMAN_H # include <sys/mman.h> #endif],[ #ifdef HAVE_MMAP if (mmap (NULL, 0, 0, 0, 0, 0) == MAP_FAILED) return 0; #else #error mmap unavailable #endif], ,[ AC_DEFINE([MAP_FAILED], [(void *)-1L], [Define if MAP_FAILED constant not available]) ]) AC_MSG_RESULT()