AC_INIT PACKAGE=cataract VERSION=0.99.2 APP_BUILD_DATE=2009-02-26 APP_COPYRIGHT_STRING="Copyright (c) 2008-2009 Tomas Bzatek" AC_SUBST(PACKAGE) AC_SUBST(VERSION) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) GLIB_REQUIRED=2.16.0 EXIV2_REQUIRED=0.17 AC_C_CONST AC_ISC_POSIX AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AM_PROG_CC_C_O dnl Check for pkgconfig first AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no) dnl Give error and exit if we don't have pkgconfig if test "x$HAVE_PKGCONFIG" = "xno"; then AC_MSG_ERROR(you need to have pkgconfig installed !) fi PKG_CHECK_MODULES(LIBS, [ glib-2.0 >= $GLIB_REQUIRED libxml-2.0 MagickWand exiv2 >= $EXIV2_REQUIRED ]) AC_SUBST(LIBS_CFLAGS) AC_SUBST(LIBS_LIBS) AM_PATH_GLIB_2_0($GLIB_REQUIRED, :, AC_MSG_ERROR([ *** GLIB $GLIB_REQUIRED or better is required. The latest version of. *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]), gobject gmodule-no-export gthread) DISABLE_DEPRECATED_CFLAGS=" -DG_DISABLE_DEPRECATED" AC_SUBST(DISABLE_DEPRECATED_CFLAGS) dnl WARN_CFLAGS="-Wall -Werror" WARN_CFLAGS="-Wall" AC_SUBST(WARN_CFLAGS) dnl ************************************************** dnl *** Check for new exiv2 thumbnailing API *** dnl ************************************************** AC_DEFUN([EXIV2_HAVE_NEW_THUMBNAILING_API], [AC_CACHE_CHECK(for new Exiv2::ExifThumb API, ac_cv_exiv2_have_new_exifthumb, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #include void test () { Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(""); Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifThumb exifThumb(image->exifData()); exifThumb.erase(); } ],[return 0;], ac_cv_exiv2_have_new_exifthumb=yes, ac_cv_exiv2_have_new_exifthumb=no) AC_LANG_RESTORE ]) if test "$ac_cv_exiv2_have_new_exifthumb" = yes; then AC_DEFINE(HAVE_EXIFTHUMB,1,[new Exiv2::ExifThumb API]) fi ]) EXIV2_HAVE_NEW_THUMBNAILING_API AC_DEFINE_UNQUOTED(APP_BUILD_DATE, ["$APP_BUILD_DATE"], [build date]) AC_DEFINE_UNQUOTED(APP_COPYRIGHT_STRING, ["$APP_COPYRIGHT_STRING"], [copyright string]) AC_CONFIG_FILES([ Makefile src/Makefile templates/Makefile sample/Makefile ]) AC_OUTPUT